<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>front-end development Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<atom:link href="https://stampede-design.com/blog/tag/front-end-development/feed/" rel="self" type="application/rss+xml" />
	<link>https://stampede-design.com/blog/tag/front-end-development/</link>
	<description>We are creating better worlds though thoughtful design and technology. Connect with us!</description>
	<lastBuildDate>Tue, 07 Apr 2026 09:05:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://stampede-design.com/wp-content/uploads/2024/02/cropped-Stampede-Favicon-old-32x32.png</url>
	<title>front-end development Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<link>https://stampede-design.com/blog/tag/front-end-development/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Designing with Development in Mind</title>
		<link>https://stampede-design.com/blog/designing-with-development-in-mind/</link>
					<comments>https://stampede-design.com/blog/designing-with-development-in-mind/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Wed, 11 Nov 2020 09:30:50 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[design and development]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[handoff]]></category>
		<category><![CDATA[workflow]]></category>
		<guid isPermaLink="false">https://stampede-design.com/?p=9914</guid>

					<description><![CDATA[<p>A good UX designer ensures that their designs are technically feasible and reasonable to execute in code. In other words, you need to talk to developers and know what kinds of code-related limitations there are in order to prioritise practical solutions and execution. This means that not all designs can or should be made! As&#8230;<a href="https://stampede-design.com/blog/designing-with-development-in-mind/"> Keep reading</a></p>
<p>The post <a href="https://stampede-design.com/blog/designing-with-development-in-mind/">Designing with Development in Mind</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="lead">A good UX designer ensures that their designs are technically feasible and reasonable to execute in code. In other words, you need to talk to developers and know what kinds of code-related limitations there are in order to prioritise practical solutions and execution. This means that not all designs can or should be made! As a Backend Developer who’s coded a pretty decent number of websites, here are some important things to consider in order to design with development in mind.</p>



<h2 class="wp-block-heading">Design after familiarising yourself with a platform</h2>



<p>Take the time to get to know the platform, web technologies, and end output you’re designing for as each platform has design and functionality related limitations. If you don’t do this first, there’s always the danger that you’re going to design something that is completely wrong for the platform or cannot be coded within a reasonable amount of time. So make sure it’s possible first! </p>



<p><strong>How do I do this?</strong> The easiest way to do this is to use the platform and see how it works. Being aware of what scenarios and platforms you’re designing for will help you figure out how big your sandbox is. It also means setting the right expectations for what’s possible with tech. This way, you don’t over promise to your client or product owner only to later say that a key feature you designed can’t be coded. </p>



<p>For example, within WordPress, get to know:</p>



<ul class="wp-block-list"><li> The content pop workflow in Gutenberg and see what the output is on the frontend</li><li> Widgets</li><li> Custom post types</li><li> Popular plugins like Gravity Forms, FacetWP and FooGallery</li></ul>



<p>For web tech, get familiar with knowing:</p>



<ul class="wp-block-list"><li> Solid responsive design knowledge from small to 4K screens</li><li> Bootstrap components</li><li> How social sharing works</li><li> How designs will affect website performance</li></ul>



<p>This is by no means an exhaustive list, but it should give you a good idea of what you need to know. Still unsure? Talk to a frontend (FED) and backend (BED) developer for some guidance. </p>



<h2 class="wp-block-heading">Keep in mind coding effort </h2>



<p>It’s very possible that a little bit of design will result in a lot of coding. A typical scenario I’ve encountered is when a designer has designed a seemingly simple feature in a minute, however, it ends up taking much longer to code during FED and BED. The reason for this significantly longer development time is that making designs functional may require more complex backend logic. The danger of not considering coding time and effort is that you’re designing development heavy features that are time-consuming to code which can result in your product development running behind schedule.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="876" height="601" src="https://stampede-design.com/wp-content/uploads/2020/02/Screenshot-2020-02-05-at-12.38.29-PM.png" alt="Example of product sashes on the Christmas Elves ecommerce website." class="wp-image-9915" srcset="https://stampede-design.com/wp-content/uploads/2020/02/Screenshot-2020-02-05-at-12.38.29-PM.png 876w, https://stampede-design.com/wp-content/uploads/2020/02/Screenshot-2020-02-05-at-12.38.29-PM-300x206.png 300w, https://stampede-design.com/wp-content/uploads/2020/02/Screenshot-2020-02-05-at-12.38.29-PM-790x542.png 790w, https://stampede-design.com/wp-content/uploads/2020/02/Screenshot-2020-02-05-at-12.38.29-PM-768x527.png 768w" sizes="(max-width: 876px) 100vw, 876px" /><figcaption>An example of product sashes with backend logic from Christmas Elves.</figcaption></figure></div>


<p>Say you’re designing a product sash for products on an ecommerce website. The designer has already designed several product sashes like Sold Out, Popular and On Sale that have backend logic (rules that dictates behaviour) attached so that these sashes will only appear in certain cases. For example, the backend logic for the Sold Out sash means it only appears when the product inventory is 0. Now let’s say that we want to add a new sash for “Popular”. Design and FED-wise, this would probably be pretty fast because there&#8217;s already an existing sash template for the designer to modify and existing sashes implemented from which to create a new HTML element in FED. However, the effort to backend code the Popular sash is much higher. </p>



<div class="toro-banner">
  <img decoding="async" src="https://torotimer.com/wp-content/uploads/2022/09/toro-timer@2x.png" alt="Toro Timer">
  <div class="copy">
    <h3>Track time with Toro Timer</h3>
    <p>Toro helps remote teams stay productive no matter where they are. <!-- <a href="#!">Learn more</a> --></p>
    <div class="btn__group">
      <a href="https://torotimer.com/#EarlyAccess" class="btn-toro">Get early access</a>
    </div>
  </div>
</div>



<p>In order for the BED to code the Popular sash’s backend logic, they first have to know the rules for what constitutes as “Popular”. Different versions will also take different amounts of time. For instance, one possibility is where the product owner wants the Popular sash to show if more than 20 units have been sold within the last two weeks. Alternatively, they may want to be able to manually control what is labelled as “Popular” in which case the admin can tag the product as “Popular”. So depending on these two types of BED logic, there would be a big difference in the time needed to code. </p>



<p>Now, developers generally do not shy away from coding (or at least we hope that they don’t!), but you have to consider how much work you’re creating for them down the line. This is especially important when you have multiple designs and products to juggle and client or colleague expectations to manage. In this light, it might be better for you to give up on this feature (for now) or coming up with a pared down version for the sake of staying on schedule and not overworking your developer.</p>



<p><strong>What should I do?</strong> Think about what kind of logic would be needed to execute your design first then consult your client, product owner and friendly neighbourhood developer before proceeding with design. You may find out that what you want to do is not realistic or of low value to the end user. Alternatively, you may find that it’s easy to design, code and has great value! Either way, you’re better informed about the effect of your designs. </p>



<h2 class="wp-block-heading">Design reusable UI components</h2>



<p>It’s important to remember that designs need to be practical, not only in terms of how it will be initially coded but how it will be managed in the long term. In tech terms, this means thinking about designing UI components so they can be reused across the website or app. This adds to the longevity of a design because it can be easily maintained from a backend standpoint while still looking good on the frontend. In order to achieve this you may have to reach a compromise with your design’s aesthetic elements in favour of ease of maintenance. </p>


<div class="wp-block-image is-style-expanded">
<figure class="aligncenter size-full"><img decoding="async" width="1000" height="287" src="https://stampede-design.com/wp-content/uploads/2020/11/Irregular-shapes-1000px-wide.png" alt="Examples of irregular shapes that look nice but can be hard to code in a scalable way." class="wp-image-10124" srcset="https://stampede-design.com/wp-content/uploads/2020/11/Irregular-shapes-1000px-wide.png 1000w, https://stampede-design.com/wp-content/uploads/2020/11/Irregular-shapes-1000px-wide-300x86.png 300w, https://stampede-design.com/wp-content/uploads/2020/11/Irregular-shapes-1000px-wide-790x227.png 790w, https://stampede-design.com/wp-content/uploads/2020/11/Irregular-shapes-1000px-wide-768x220.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /><figcaption>Irregular shapes can have visual impact, but too many variations are a nightmare to code.</figcaption></figure></div>


<p>Let’s explore the consequences of this in an example. You may have chosen to design a website which has varied irregular shapes (think jellybeans and splats). Though this may make for a more visually interesting design, it might become hellish for developers as variations might lead to the writing of bad or unmaintainable code. This is because every unique shape has different margin and padding requirements and the more variations there are, the more low-level coding is required to fine tune them. If the developer is inexperienced, there’s a possibility that the way it’s been coded may not be so readable, elegant or maintainable. This means that if another developer, or even the same one, comes in later, they will have trouble understanding the code and will therefore have more trouble fixing it. More design and coding variations also means that the developer cannot use a blanket fix on them and must spend more time coding a fix for each one. Another problem is that with more code comes more opportunities for older code to break. The end result? Massive headaches. </p>



<p>The last point is that people usually do not end up using all the bells and whistles you designed. Though the website may look fancy after you initially deploy it, your client or whoever ends up doing the content updates and maintenance may not choose to follow suit, or, may even get confused if there are too many options. They may very well end up sticking to one or two elements that they’re comfortable with for content population and forego the other options. All the other stuff you designed and coded will then be wasted effort.</p>



<p><strong>What should I do?</strong> Although it is possible to use as many shapes as you like, think about how they’re actually going to be coded and maintained later. One strategy is to design UI components in a way that makes them reusable. Set a fixed number of variations e.g. 4 and stick to those only. The definition of maintainable code is that it’s code that is easy to modify, extend and debug. By designing a custom shape that you can then flip horizontally and vertically to make “new” shapes, you will get the visual variety that you need while still making it easier for the developers to write fixes if ever they break. It’ll also hopefully be simpler for whoever maintains the website in the end. </p>



<hr class="wp-block-separator has-css-opacity"/>



<p>There you have it folks! Though it’s easy to create aesthetically pleasing designs and features, you have to consider the direct effect design will have on FED and BED and beyond. Remember, design isn’t just about how it looks, it’s also about how it works and what the experience is like for others that you’re working with. Talk to your developers often to discover limitations and peek into what it’ll be like to maintain the design in the future so that you design with development in mind.</p>
<p>The post <a href="https://stampede-design.com/blog/designing-with-development-in-mind/">Designing with Development in Mind</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/designing-with-development-in-mind/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Creating a Custom Block Type for WordPress Gutenberg Editor</title>
		<link>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/</link>
					<comments>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/#respond</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Wed, 20 Feb 2019 09:14:16 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[block editor]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[Gutenberg]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">https://stampede-design.com/?p=9619</guid>

					<description><![CDATA[<p>For all the buzz it has generated in 2018, you would need to be a hermit (or at least someone who doesn’t work in web-development) to not have heard of WordPress version 5.&#160;I&#8217;m of course referring to its game-changing feature — the new block-based editor, Gutenberg. The new editor radically changes the writing experience in&#8230;<a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/"> Keep reading</a></p>
<p>The post <a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/">Creating a Custom Block Type for WordPress Gutenberg Editor</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="lead">For all the buzz it has generated in 2018, you would need to be a hermit (or at least someone who doesn’t work in web-development) to not have heard of WordPress version 5.&nbsp;I&#8217;m of course referring to its game-changing feature — the new block-based editor, Gutenberg. The new editor radically changes the writing experience in WordPress because of its block-based system. Content authors can now treat content editing with more of a page building approach, akin to popular page-builders like Elementor and Divi.</p>



<p>Gutenberg by default comes with a handful of block types that should cover standard web content updating needs. However, it also has a nifty&nbsp;<a href="https://wordpress.org/gutenberg/handbook/designers-developers/developers/block-api/" target="_blank" rel="noopener noreferrer">Block API</a> for adding custom block types if you need them to display specially designed components for our website. In this tutorial, you are going to add a custom Gutenberg block type so that the output is a notice box with a few predefined styles that accepts arbitrary text input from the user.</p>



<p>This is what you&#8217;re going for.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="999" height="339" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output.png" alt="" class="wp-image-9622" srcset="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output.png 999w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-300x102.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-768x261.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-790x268.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-output-280x95.png 280w" sizes="(max-width: 999px) 100vw, 999px" /><figcaption> Our custom Notice blocks’ final output. Please ignore the crude styling because that’s not really in the scope of this tutorial. </figcaption></figure>



<p class="afterimagecaption">And here is how it looks from the admin&#8217;s side.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1274" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-admin.gif" alt="" class="wp-image-9621"/><figcaption> How admins would interact with the custom Notice block. </figcaption></figure>



<p class="afterimagecaption">Alright, let&#8217;s get to coding!</p>



<h2 class="wp-block-heading">Step 1: Create a plugin for the new block type</h2>



<p>You will be creating a custom block type as a WordPress plugin. This will allow you to decouple it from any themes you are using and in case anything goes wrong, you can simply deactivate it.</p>



<p>So create a new folder in the WP plugins folder and let&#8217;s call it <code>gutenberg-notice-block</code>. In this new folder, create a <code>plugin.php</code> file with the following code:</p>



<pre class="wp-block-code"><code lang="php" class="language-php line-numbers">/**
* Plugin Name: Gutenberg Notice Block
* Author: Shaiful
* Description: A notice box with a few predefined styles that accepts arbitrary text input.
* Version: 1.0
*/

// Load assets for wp-admin when editor is active
function shaiful_gutenberg_notice_block_admin() {
   wp_enqueue_script(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.js', __FILE__ ),
      array( 'wp-blocks', 'wp-element' )
   );

   wp_enqueue_style(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.css', __FILE__ ),
      array()
   );
}

add_action( 'enqueue_block_editor_assets', 'shaiful_gutenberg_notice_block_admin' );

// Load assets for frontend
function shaiful_gutenberg_notice_block_frontend() {

   wp_enqueue_style(
      'gutenberg-notice-block-editor',
      plugins_url( 'block.css', __FILE__ ),
      array()
   );
}
add_action( 'wp_enqueue_scripts', 'shaiful_gutenberg_notice_block_frontend' );</code></pre>



<p>Basically what this file does is initialise the plugin by loading the necessary JS and CSS files at the right place and at the right time. The code above is looking for <code>block.js</code> and <code>block.css</code>, which you will create momentarily.</p>



<p>At this point, you should be able to see the new plugin listed in your WP Plugins admin page. Go ahead and activate it.</p>



<p>Moving forward, all of your coding will be done in JavaScript with some ReactJS flavour to interact with the Gutenberg Block API.</p>



<h2 class="wp-block-heading">Step 2: Register the new block type</h2>



<p>Create a file called <code>block.js</code> in your custom plugin folder. This file will hold the entire logic of the custom block type for the admin-side and frontend of your website.</p>



<p>Start by adding the following bare-bones code.</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
var el = wp.element.createElement;

wp.blocks.registerBlockType('shaiful-gutenberg/notice-block', {

   title: 'Notice', // Block name visible to user

   icon: 'lightbulb', // Toolbar icon can be either using WP Dashicons or custom SVG

   category: 'common', // Under which category the block would appear

   attributes: { // The data this block will be storing

      type: { type: 'string', default: 'default' }, // Notice box type for loading the appropriate CSS class. Default class is 'default'.

      title: { type: 'string' }, // Notice box title in h4 tag

      content: { type: 'array', source: 'children', selector: 'p' } /// Notice box content in p tag

   },

   edit: function(props) {
      // How our block renders in the editor in edit mode
      return null;
   },

   save: function(props) {
      // How our block renders on the frontend
      return null;
   }
});
</code></pre>



<p>The code above registers your new block type with the name “Notice”, using a light-bulb <a href="https://developer.wordpress.org/resource/dashicons/" target="_blank" rel="noopener noreferrer">Dashicon</a> and putting it under the Common Blocks panel in the Gutenberg blocks browser. You should be able to see the new block in your editor at this point.</p>



<p>You also specify the attributes (and their data type) that your new block will be storing which are the box type, the box title and the box content.</p>



<p>Lastly, there are two functions called edit() and save(). The edit() function is responsible for rendering your block in the editor while the save() function outputs your block HTML on our website&#8217;s frontend.</p>



<p>Let&#8217;s explore them now.</p>



<h2 class="wp-block-heading">Step 3: The edit() function</h2>



<p>The edit() function controls how the block will appear in the Gutenberg editor for the user to interact with.</p>



<p>For your custom Notice block type, the goal is to accomplish two things:</p>



<ol class="wp-block-list"><li>The user can select the notice box type as well as enter the box title and content.</li><li>Selecting different notice box types will show a simple live preview of what the box is going to look like on the frontend.</li></ol>



<p>Add the following code into the edit() function.</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
edit: function(props) {
   // How our block renders in the editor in edit mode

   function updateTitle( event ) {
      props.setAttributes( { title: event.target.value } );
   }

   function updateContent( newdata ) {
      props.setAttributes( { content: newdata } );
   }

   function updateType( event ) {
      props.setAttributes( { type: event.target.value } );
   }

   return el( 'div',
      {
         className: 'notice-box notice-' + props.attributes.type
      },
      el(
         'select',
         {
            onChange: updateType,
            value: props.attributes.type,
         },
         el("option", {value: "default" }, "Default"),
         el("option", {value: "success" }, "Success"),
         el("option", {value: "danger" }, "Danger")
      ),
      el(
         'input',
         {
            type: 'text',
            placeholder: 'Enter title here...',
            value: props.attributes.title,
            onChange: updateTitle,
            style: { width: '100%' }
         }
      ),
      el(
         wp.editor.RichText,
         {
            tagName: 'p',
            onChange: updateContent,
            value: props.attributes.content,
            placeholder: 'Enter description here...'
         }
      )
   ); // End return

},  // End edit()
</code></pre>



<p>Line 16-49 is the main code you will use to display the user interface in a way that allows you to update the content in your block type. The code is written in ReactJS specifically the React.createElement() function is used to create new DOM elements. Do not worry if ReactJS is unfamiliar to you. You can make use of <a href="https://babeljs.io/repl" target="_blank" rel="noopener noreferrer">this specific tool</a> to compile <a href="https://reactjs.org/docs/introducing-jsx.html" target="_blank" rel="noopener noreferrer">JSX template code</a> to React.createElement() functions.</p>



<p>Here is an example.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1323" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react.png" alt="" class="wp-image-9637" srcset="https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react.png 1323w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-300x196.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-768x503.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-790x517.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/babel-compile-jsx-to-react-229x150.png 229w" sizes="(max-width: 1323px) 100vw, 1323px" /><figcaption> Using Babel to compile JSX to ReactJS code. </figcaption></figure>



<p class="afterimagecaption">It&#8217;s a good idea to create your <code>block.css</code> file right now so that you can test the live preview functionality in the editor. Make sure the CSS file is saved in your plugin folder.</p>



<pre class="wp-block-code"><code lang="css" class="language-css line-numbers">/* block.css */
div.notice-box {
   border: 1px LightSkyBlue solid;
   border-left-width: 5px;
   padding: 10px 15px;
   margin: 30px;
}

div.notice-box.notice-success {
  border-color: MediumSpringGreen ;
}

div.notice-box.notice-danger{
   border-color: LightCoral ;
}

div.notice-box h4 {
   font-size: 18px;
   margin:0 0 10px 0;
}
div.notice-box p {
   font-size: 16px;
   line-height: 24px;
   margin:0;
}
</code></pre>



<p>At this point, you should be able to add your Notice block type into the editor and see three different fields for configuring the notice box. The dropdown for selecting the notice box type should also gives you a live preview between the default (blue), success (green) and danger (red) box types.</p>



<h2 class="wp-block-heading">Step 4: The save() function</h2>



<p>The save() function for your Notice block type is pretty straightforward. You just have to construct the correct HTML structure and populate the title and content into the notice box <code>&lt;div&gt;</code>. Once again the DOM elements creation code has to be written in ReactJS.</p>



<p>Here is the code:</p>



<pre class="wp-block-code"><code lang="javascript" class="language-javascript line-numbers">/* block.js */
save: function(props) {
   // How our block renders on the frontend

   return el( 'div',
      {
         className: 'notice-box notice-' + props.attributes.type
      },
      el(
         'h4',
         null,
         props.attributes.title
      ),
      el( wp.editor.RichText.Content, {
         tagName: 'p',
         value: props.attributes.content
      })

   ); // End return

} // End save()
</code></pre>



<p>That&#8217;s it!</p>



<p>Your Notice block type should now work on both the admin and website&#8217;s frontend.</p>



<p>Here is the&nbsp;<a href="https://stampede-design.com/demo/gutenberg-notice-block.zip">link</a> to download the completed plugin.</p>



<h2 class="wp-block-heading">Something to keep in mind</h2>



<p>Looking at the save() function, you’d imagine that updating the HTML output in there would cause a global update for all instances of the Notice box that you have populated on your website. It’s natural to expect this (it is, at least from our experience with working with WP shortcodes). Unfortunately, this isn’t what happens.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1274" height="866" src="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error.png" alt="" class="wp-image-9620" srcset="https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error.png 1274w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-300x204.png 300w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-768x522.png 768w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-790x537.png 790w, https://stampede-design.com/wp-content/uploads/2019/02/gutenberg-notice-block-error-221x150.png 221w" sizes="(max-width: 1274px) 100vw, 1274px" /></figure>



<p>Making any changes to the block HTML output would trigger a conflict with all existing instances of the blocks that have been populated. What&#8217;s worse is that the only way to fix this is by repopulating the blocks one by one. This is the caveat of static block types.</p>



<p>To work around this, make use of the&nbsp;<a href="https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks/" target="_blank" rel="noopener noreferrer">Dynamic Blocks</a>&nbsp;feature which hands over the save() function from JS to PHP to generate the block HTML output on the fly.</p>



<h2 class="wp-block-heading">Final thoughts</h2>



<p>The ability to create custom block types is very cool and opens a lot of possibilities for content customisation. After trying it out myself, I would say the basic concept is fairly easy to follow. The real challenge, however, is presenting the custom block in the best possible way to give content authors the best editing experience, especially for blocks with complex functionalities. I find that the official developer documentation for various attributes configurations or working with RichText field for example, are still lacking. It will improve surely but the best reference materials we have at this moment are online articles and the existing blocks that came out of the box with WP5.</p>



<p>On another note, I am personally looking forward to the Advanced Custom Fields (ACF) plugin taking on the custom block types with their own <a href="https://www.advancedcustomfields.com/blog/acf-5-8-introducing-acf-blocks-for-gutenberg/" target="_blank" rel="noopener noreferrer">ACF Blocks for Gutenberg</a>. This new addition should lower the barrier for WP developers to take advantage of Gutenberg block capabilities in a more intuitive way.</p>
<p>The post <a href="https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/">Creating a Custom Block Type for WordPress Gutenberg Editor</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/creating-a-custom-block-type-for-wordpress-gutenberg-editor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Embedding Forms in Bigcommerce Using Google Forms</title>
		<link>https://stampede-design.com/blog/google-forms-in-bigcommerce/</link>
					<comments>https://stampede-design.com/blog/google-forms-in-bigcommerce/#respond</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Fri, 11 Mar 2016 01:39:00 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bigcommerce]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[Google Forms]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=6326</guid>

					<description><![CDATA[<p>Bigcommerce out of the box sports a decent contact form that is usable for everyone 99% of the time. However, things get a little tricky if we need to add in a few extra fields in there or even a whole new form. Shaiful walks you through on how to take advantage of Google Forms to host custom forms in BigCommerce.</p>
<p>The post <a href="https://stampede-design.com/blog/google-forms-in-bigcommerce/">Embedding Forms in Bigcommerce Using Google Forms</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead" class="lead"><a href="http://bigcommerce.com/" target="_blank">BigCommerce</a> out of the box sports a decent contact form that is usable for everyone 99% of the time. However, things get a little tricky if we need to add in a few extra fields in there or even a whole new form; for example, a product warranty registration form. This is when we handover all form responsibilities to <a href="https://www.google.com/forms/about/" target="_blank">Google Forms</a>.</p>
<p><div class="full"><img decoding="async" class="alignnone wp-image-7156" src="https://stampede-design.com/wp-content/uploads/2016/03/thumb-bigcommerce.jpg" alt="Bigcommerce" /></div></p>
<p>The standard way of embedding Google Forms is to use an iframe, which is sufficient. The more preferable way of course is by manually extracting the form&#8217;s HTML fields and re-coding it according to your theme&#8217;s HTML structure. Not only will it match your theme nicely, but you can also insert some custom JS validation on the fields as needed. Another plus is that Google Forms captures form submissions in a convenient spreadsheet format.</p>
<h2>The Steps</h2>
<p>The first step is to create two web pages in BigCommerce that will become our form page and success page when users submit the form. The form page is a <a href="https://support.bigcommerce.com/articles/Public/Creating-Custom-Template-Files" target="_blank">custom template file</a> that will contain our form HTML codes while the success page is simply a generic page. Take note of the success page URL.</p>
<p>Next, build our form in Google Forms with the most minimalist styling. Once tested and published, view its source to get the form codes and re-code the form into our custom template file — in the HTML structure we like while preserving the field names and the &lt;form&gt; action (and method). Next is some code alterations.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;var submitted=false;&lt;/script&gt;
&lt;iframe name=&quot;hidden_iframe&quot; id=&quot;hidden_iframe&quot;style=&quot;display:none;&quot; onload=&quot;if(submitted) {window.location='SUCCESS_PAGE_URL';}&quot;&gt;&lt;/iframe&gt;


&lt;form action=&quot;https://docs.google.com/forms/d/1CsZt9s0vVegFb3-Qa3162Ri7A91ggx6S9B6qvBZcyJY/formResponse&quot; method=&quot;POST&quot; target=&quot;hidden_iframe&quot; onsubmit=&quot;submitted=true;&quot;&gt;
...your form fields...
&lt;/form&gt;


</pre>
<p>Add line 1 and 2 right before our form tag and replace the correct success page URL in line 2.</p>
<p>Next, add <code>target="hidden_iframe" onsubmit="submitted=true;"</code> attributes to the &lt;form&gt; tag so that the form submits into the hidden &lt;iframe&gt; we created in line 2.</p>
<p>Finally, give it a test run. It is advisable to validate the form fields with JS to ensure the form is indeed being submitted successfully.</p>
<p>Although this guide is written for BigCommerce, the implementation steps are generic enough to be used on any platforms where you have HTML and JS editing access. Hope it helps.</p>
<p><span class="message_body">Need help making your BigCommerce store stands out from the competition? <a href="https://stampede-design.com/contact/">Get in touch</a>.</span></p>
<p>The post <a href="https://stampede-design.com/blog/google-forms-in-bigcommerce/">Embedding Forms in Bigcommerce Using Google Forms</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/google-forms-in-bigcommerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Showing Selected Product Variant Image in Shopify Product Slideshow</title>
		<link>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/</link>
					<comments>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Sat, 04 Jul 2015 16:46:08 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[shopify]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ui]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=6275</guid>

					<description><![CDATA[<p>Believe it or not, some little features on product slideshows would make all the big difference to your sales. Shaiful shows how to customise the slideshow in Shopify.</p>
<p>The post <a href="https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/">Showing Selected Product Variant Image in Shopify Product Slideshow</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead" class="lead">Product slideshows are indispensable when it comes to e-commerce websites. One little feature that we usually see on product slideshows is the ability to switch images based on the selection of product options such as colors. It&#8217;s a little feature that makes a difference!</p>
<p><div class="full"><img decoding="async" class="wp-image-6899 size-full" src="https://stampede-design.com/wp-content/uploads/2015/07/product-slideshow1.gif" alt="product-slideshow" /><p class="capt_block">A staple feature of e-commerce websites.</p></div></p>
<p>In Shopify, this feature may already comes standard with most of the themes or in an updated version of the current theme you are using, which is great. However in some cases you could be using a heavily customized theme and updating is not going to be a breeze, well, all you need is just a couple of lines of codes and you got yourself an upgraded product slideshow.</p>
<h2>The Code</h2>
<p>Paste the code below into the bottom of either template file product.liquid or snippet file product-form.liquid.</p>
<pre class="brush: jscript; title: ; notranslate">

{% if product.variants.size &gt; 1 %}
&lt;script&gt;
(function($) {
  var variantImages = {},
    thumbnails,
    variant,
    variantImage,
    variantImage_count = 0;
  	//produce mapping between variant image and options
    {% for variant in product.variants %}
       variant = {{ variant | json }};
       if ( typeof variant.featured_image !== 'undefined' &amp;&amp; variant.featured_image !== null ) {
         variantImage =  variant.featured_image.src.split('?')&#x5B;0].replace(/http(s)?:/,'');
         variantImages&#x5B;variantImage] = variantImages&#x5B;variantImage] || {};
         {% for option in product.options %}
           {% assign option_value = variant.options&#x5B;forloop.index0] %}
           {% assign option_key = 'option-' | append: forloop.index0 %}
           if (typeof variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] === 'undefined') {
             variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] = {{ option_value | json }};
           }
           else {
             var oldValue = variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}];
             if ( oldValue !== null &amp;&amp; oldValue !== {{ option_value | json }} )  {
               variantImages&#x5B;variantImage]&#x5B;{{ option_key | json }}] = null;
             }
           }
         {% endfor %}
         variantImage_count++;
   	   }
    {% endfor %}

    $(function() {

      if (variantImage_count &gt; 0) {
        $('select.single-option-selector').change(function() {
          var selected_color = $(this).val();
          thumbnails = $('.flex-control-thumbs img').each(function(index, el) {
            var image = $(el).attr('src').split('?')&#x5B;0].replace(/(_thumb\.)|(_small\.)|(_compact\.)|(_medium\.)|(_large\.)|(_grande\.)/,'.');
            if (typeof variantImages&#x5B;image] !== 'undefined') {
              if(selected_color == variantImages&#x5B;image]&#x5B;'option-0']) {
                //only check against the first option &#x5B;'option-0'], which is Color (in my case)
              	$('.flexslider').flexslider(index);
              }
            }
		      });
        });
      }

    });
})(jQuery);
&lt;/script&gt;
{% endif %}

</pre>
<p>The code is a combination of Liquid template tags and JS. It is based on the customization provided by Shopify for <a href="https://docs.shopify.com/manual/configuration/store-customization/page-specific/product-page/make-image-change-variant" target="_blank">enabling customers to select a product variant by clicking its image</a> and modified to work the other way around.</p>
<p>Line 10-30 produces the mapping between variants image and options in a JSON object that is used for comparison against the product thumbnails in the select box event handler function as seen in line 35-46. Line 42 is the actual code that tells the slideshow to jump to a specific slide. As you might have guessed, the code is unique to <a href="http://www.woothemes.com/flexslider/" target="_blank">Flexslider</a> slideshow plugin. You need to determine what slideshow plugin you are using and then figure out how to jump to a specific slide using its API.</p>
<p>I hope you find this guide useful. If you have questions/feedback, let me know in the comments.</p>
<p>Have a nice day!</p>
<p>The post <a href="https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/">Showing Selected Product Variant Image in Shopify Product Slideshow</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/showing-selected-product-variant-image-in-shopify-product-slideshow/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Responsive Bootstrap Push Menu Tutorial</title>
		<link>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/</link>
					<comments>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/#comments</comments>
		
		<dc:creator><![CDATA[Syazwan Hakim]]></dc:creator>
		<pubDate>Wed, 27 Aug 2014 16:16:22 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[mobile navigation]]></category>
		<category><![CDATA[responsive design]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://dev.stampedelabs.com/client/v3/wp/?p=5939</guid>

					<description><![CDATA[<p>Responsive Bootstrap Push Menu is a combination of Bootstrap &#038; jPushMenu plugin, for better viewing on mobile. Requiring HTML, CSS and Javascript, Syazwan shows the tutorial on how to achieve the effect.</p>
<p>The post <a href="https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/">Responsive Bootstrap Push Menu Tutorial</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Getting bored with the current responsive Bootstrap menu?</p>
<p>Or you simply don&#8217;t want to use Bootstrap 3 dropdown menu on mobile because the menu is just too tall?</p>
<p><div class="full"><img loading="lazy" decoding="async" width="463" height="392" class="size-full wp-image-5940" src="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu.png" alt="Bootstrap 3 Mobile Menu" srcset="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu.png 463w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-menu-300x254.png 300w" sizes="(max-width: 463px) 100vw, 463px" /><p class="capt_block">Bootstrap 3 Mobile Menu</p></div></p>
<p>Well, why don&#8217;t you try to use push menu for mobile instead?</p>
<p><div class="full"><img loading="lazy" decoding="async" width="474" height="490" class="size-full wp-image-5943" src="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu.png" alt="Bootstrap 3 Mobile Push Menu" srcset="https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu.png 474w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu-290x300.png 290w, https://stampede-design.com/wp-content/uploads/2014/10/bootstrap3-mobile-push-menu-32x32.png 32w" sizes="(max-width: 474px) 100vw, 474px" /><p class="capt_block">Bootstrap 3 Mobile Push Menu</p></div></p>
<p>For this responsive bootstrap push menu tutorial, I&#8217;m using <a href="http://takien.github.io/jPushMenu/" target="_blank">Takien&#8217;s jPushMenu</a>. The tutorial shall require all the three big guns &#8211; HTML, CSS &amp; Javascript to make the push menu happen.</p>
<p>Before jumping to the tutorial, why don&#8217;t you check out these demos for <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-left.html">Left Overlay</a>, <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-left-push.html">Left Push</a>, <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-right.html">RightOverlay</a>, or <a href="https://stampede-design.com/demo/bootstrap-pushnav/menu-right-push.html">Right Push</a>?.</p>
<h2>Responsive Bootstrap Push Menu &#8211; HTML</h2>
<p>Here I am using default <a href="http://getbootstrap.com/components/#navbar" target="_blank">Bootstrap Navbar</a> with additional classes for push menu to work.</p>
<pre class="brush: jscript; title: ; notranslate" class="lead">&lt;pre&gt;
&lt;nav class=&quot;navbar&quot;&gt;
&lt;div class=&quot;container-fluid&quot;&gt;
&lt;!-- Brand and toggle get grouped for better mobile display --&gt;
&lt;div class=&quot;navbar-header&quot;&gt;&lt;button class=&quot;navbar-toggle&quot; type=&quot;button&quot; data-toggle=&quot;collapse&quot; data-target=&quot;#bs-example-navbar-collapse-1&quot;&gt; &lt;span class=&quot;sr-only&quot;&gt;Toggle navigation&lt;/span&gt; &lt;/button&gt; &lt;a class=&quot;navbar-brand&quot; href=&quot;#&quot;&gt;Brand&lt;/a&gt;&lt;/div&gt;

&lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
&lt;div id=&quot;bs-example-navbar-collapse-1&quot; class=&quot;collapse&quot;&gt;
&lt;ul class=&quot;nav&quot;&gt;
&lt;li class=&quot;active&quot;&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;dropdown&quot;&gt;&lt;a class=&quot;dropdown-toggle&quot; href=&quot;#&quot; data-toggle=&quot;dropdown&quot;&gt;Dropdown &lt;/a&gt;
&lt;ul class=&quot;dropdown-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Another action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Something else here&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Separated link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;One more separated link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;form class=&quot;navbar-form&quot;&gt;
&lt;div class=&quot;form-group&quot;&gt;&lt;input class=&quot;form-control&quot; type=&quot;text&quot; placeholder=&quot;Search&quot; /&gt;&lt;/div&gt;

&lt;button class=&quot;btn&quot; type=&quot;submit&quot;&gt;Submit&lt;/button&gt;&lt;/form&gt;
&lt;ul class=&quot;nav&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;dropdown&quot;&gt;&lt;a class=&quot;dropdown-toggle&quot; href=&quot;#&quot; data-toggle=&quot;dropdown&quot;&gt;Dropdown &lt;/a&gt;
&lt;ul class=&quot;dropdown-menu&quot;&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Another action&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Something else here&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;divider&quot;&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Separated link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;!-- /.navbar-collapse --&gt;&lt;/div&gt;

&lt;!-- /.container-fluid --&gt;&lt;/nav&gt;
&lt;/pre&gt;</pre>
<p>Based on the above html, added classes can be found on line 05 (<strong>toggle-menu menu-left push-body</strong>) and line 15 (<strong>cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left</strong>).</p>
<p>&nbsp;</p>
<p>The post <a href="https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/">Responsive Bootstrap Push Menu Tutorial</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/responsive-bootstrap-push-menu-tutorial/feed/</wfw:commentRss>
			<slash:comments>56</slash:comments>
		
		
			</item>
		<item>
		<title>Fontello As My Favourite Font Icon Service</title>
		<link>https://stampede-design.com/blog/fontello-as-my-favourite-font-icon-service/</link>
					<comments>https://stampede-design.com/blog/fontello-as-my-favourite-font-icon-service/#comments</comments>
		
		<dc:creator><![CDATA[Syazwan Hakim]]></dc:creator>
		<pubDate>Fri, 30 May 2014 17:05:16 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[design tools]]></category>
		<category><![CDATA[font icons]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[ui]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=5222</guid>

					<description><![CDATA[<p>Years ago, cropping icons for website is no fun as well as time consuming. Fortunately, with many font icon services out there, this is no longer the case. Syazwan elaborates on his favourite service, Fontello.</p>
<p>The post <a href="https://stampede-design.com/blog/fontello-as-my-favourite-font-icon-service/">Fontello As My Favourite Font Icon Service</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As a front end developer, cropping an icon for website is no fun and it is also a time consuming process. Fortunately, that was 3-4 years ago.</p>
<p>Nowadays, there are quite a number of font icons provider out there. To name a few, they are <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_blank">Font Awesome</a>, <a href="http://icomoon.io/" target="_blank">IcoMoon</a> and <a href="http://typicons.com/" target="_blank">Typeicons</a>. Most of them provided different icon packs.</p>
<p>Out of all font icons available, I&#8217;ll easily pick <a href="http://fontello.com" target="_blank">Fontello </a>as my favourite in the pack.</p>
<h2>Why Fontello?</h2>
<p>I found out that out of all font icons out there, Fontello <strong>provides most of the icons from other providers</strong> such Fontalico, Font Awesome, Entypo, etc. This gives me a lot of icons variations for use, and I am not the one who believes in the saying do not be spoiled by choice.</p>
<p><div class="full"><img decoding="async" class="alignnone size-full wp-image-5228" src="https://stampede-design.com/wp-content/uploads/2018/02/Screenshot-on-5.22.2014-at-10.22.jpg" alt="fontello font icons" /></div></p>
<p>With Fontello service, I can even use my own icon as well. What I need to do is just create a svg format icon and drag it on the section provided. Easy peasy.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="498" height="102" class="alignnone size-full wp-image-5229" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.26.35-PM.png" alt="svg fontello" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.26.35-PM.png 498w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.26.35-PM-300x61.png 300w" sizes="(max-width: 498px) 100vw, 498px" /></div></p>
<p>Another part of Fontello that I love is that the ability to <strong>choose just the icons you need. </strong></p>
<p>Other font icon providers come with CSS that include all icons. Whilst using Fontello, I just need to choose only the icon(s) that I will need to use.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="395" height="291" class="alignnone size-full wp-image-5233" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.31.03-PM.png" alt="fontello choice" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.31.03-PM.png 395w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.31.03-PM-300x221.png 300w" sizes="(max-width: 395px) 100vw, 395px" /></div></p>
<p>Let&#8217;s also say if I need to add new icons in the future, I just need to import config.json (this comes with the file that you&#8217;ve downloaded from Fontello) on Fontello and it will highlight the icon that I have chosen on particular project.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="401" height="144" class="alignnone size-full wp-image-5235" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.36.36-PM.png" alt="fontello js config" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.36.36-PM.png 401w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.36.36-PM-300x108.png 300w" sizes="(max-width: 401px) 100vw, 401px" /></div></p>
<p>Best of all, Fontello is also <strong>highly customisable.</strong> You can easily change class for your icons and use your own font name with Fontello, as shown in these examples &#8211; changing class name followed by changing font name.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="344" height="329" class="alignnone size-full wp-image-5236" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.41.18-PM.png" alt="class name fontello" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.41.18-PM.png 344w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.41.18-PM-300x287.png 300w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.41.18-PM-32x32.png 32w" sizes="(max-width: 344px) 100vw, 344px" /></div></p>
<p><div class="full"><img loading="lazy" decoding="async" width="347" height="150" class="alignnone size-full wp-image-5237" src="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.38.37-PM.png" alt="change font name fontello" srcset="https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.38.37-PM.png 347w, https://stampede-design.com/wp-content/uploads/2014/05/Screenshot-on-5.22.2014-at-10.38.37-PM-300x130.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></div></p>
<p>What do you think? Do you also prefer Fontello over other font icons or are there some font icons out there that caught your fancy? I am interested to hear all about it. Comments below!</p>
<p>The post <a href="https://stampede-design.com/blog/fontello-as-my-favourite-font-icon-service/">Fontello As My Favourite Font Icon Service</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/fontello-as-my-favourite-font-icon-service/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>CSS Sprite Technique</title>
		<link>https://stampede-design.com/blog/css-sprite-technique/</link>
					<comments>https://stampede-design.com/blog/css-sprite-technique/#comments</comments>
		
		<dc:creator><![CDATA[Sani Halid]]></dc:creator>
		<pubDate>Mon, 13 Jan 2014 10:22:31 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[sprites]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4647</guid>

					<description><![CDATA[<p>Learning new things and sharing what he has learned have always been exciting to Sani. Here he will show you how to produce CSS sliding door technique in his first ever tutorial in the blog.</p>
<p>The post <a href="https://stampede-design.com/blog/css-sprite-technique/">CSS Sprite Technique</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hello, Sani here. In my first ever tutorial post I am going to show you how to produce a CSS sprite technique.</p>
<h2>What is this CSS sprite technique &amp; why?</h2>
<p>CSS sprite, as interesting as it is called, is also an interesting CSS method itself. This approach involves changing an image to another different image, or the same image but different colour scape (greyscale, sephia etc.) upon hover.</p>
<p>The advantage of using the using css sprite technique is that the web page will automatically load all images at once, instead of one by one. This will speed up the loading time and there will be not much delay for users with slow Internet connection.</p>
<h2>But how?</h2>
<p>When we hover on the block, the background image will change smoothly to second image. If we use separate image for hover effect it will take time for website to load that image from server thus, will create ± 1 second empty space on hover. This will be a problem for user with slow internet connection.</p>
<h2>Interesting. Show me how.</h2>
<p>Here we go. Take a seat.</p>
<p>First of all, get any images or sprite to start. I would suggest an image with transparent background. In this tutorial I am going to use <a href="http://www.36peas.com/blog/2010/9/13/free-japanese-ninja-shinobi-sprite-sheet.html" target="_blank">this Ninja Sprite from 36peas</a>. Choose any two images &#8211; one for normal state and another for hover. Save them on some canvas by side or top and bottom.</p>
<p>Before we start, it&#8217;s a good idea to show some simple css background code.</p>
<p><div class="full"><img decoding="async" class="alignnone size-full wp-image-4662" src="https://stampede-design.com/wp-content/uploads/2018/02/css-background-value.jpg" alt="css background value" /></div></p>
<p>Single line css background code in correct order would be:</p>
<pre class="brush: xml; title: ; notranslate" class="lead">background: color position size repeat origin clip attachment image;</pre>
<p><div class="full"><img decoding="async" class="alignnone size-full wp-image-4669" src="https://stampede-design.com/wp-content/uploads/2018/02/ninja-sprite.jpg" alt="ninja sprite" /></div></p>
<p>In this image, each ninja will have <strong>width:227px</strong> and <strong>height:298px.</strong></p>
<p>Total width for both ninjas in one canvas would be <strong>width:454px</strong> and <strong>height:298px.</strong></p>
<p>In this tutorial we will only need a combination of three css background codes. Width and height set will just be for one image.</p>
<p>On hover, just change position of the image. Background image in this tutorial I put straight to image file. So the code should be like this:</p>
<p>Normal state:</p>
<pre class="brush: xml; title: ; notranslate">display:block;
height:297px;
width:227px;
background-position:0 0;
background-repeat:no-repeat;
background-image:url('ninja.
png');</pre>
<p>Hover state:</p>
<pre class="brush: xml; title: ; notranslate">background-position:-227px 0;</pre>
<p>Normal state in shortcut css:</p>
<pre class="brush: xml; title: ; notranslate">
display:block;
height:297px;
width:227px;
background:0 0 no-repeat url('ninja.png');</pre>
<p>Hover state in shortcut background css:</p>
<pre class="brush: xml; title: ; notranslate">background:-227px 0 no-repeat url('ninja.png');</pre>
<p>or</p>
<pre class="brush: xml; title: ; notranslate">background-position:-227px 0;</pre>
<p>If you would like to see how it looks like, you may view the demo links here:</p>
<ul>
<li><a href="http://jsfiddle.net/metalbesi/3YZWr/" target="_blank">normal/regular method</a></li>
<li><a href="http://jsfiddle.net/metalbesi/5sm6m/" target="_blank">shortcut background css</a></li>
</ul>
<p>Correct syntax for shortcut background css :</p>
<pre class="brush: xml; title: ; notranslate">background: color position size repeat origin clip attachment image;</pre>
<p>For background-position, always remember all browser read css background position code from x-axis to y-axis. In these examples:</p>
<ul>
<li>background-position:(x-axis)px (y-axis)px;</li>
<li>background-repeat: By default, all browser will use value &#8216;repeat&#8217;. To make it one image simply put &#8216;no-repeat&#8217;.</li>
</ul>
<p>There are some bits of notes about background-image: &#8211; back during my first time doing css background, it was a bit confusing to do relative path if the file images are in different folder.</p>
<p>Here are some examples to show what I meant:</p>
<p><div class="full"><img loading="lazy" decoding="async" width="206" height="176" class="alignnone size-full wp-image-4676" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.24-PM.png" alt="location-html-file" /></div></p>
<p>The location for the html file.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="230" height="188" class="alignnone size-full wp-image-4677" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.39-PM.png" alt="Screenshot on 1.3.2014 at 11.32.39 PM" /></div></p>
<p>The location for images and CSS folder.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="285" height="229" class="alignnone size-full wp-image-4678" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.34.29-PM.png" alt="Screenshot on 1.3.2014 at 11.34.29 PM" /></div></p>
<p>The location for the image file.</p>
<p>By default, the browser will find image in same folder where we save the CSS file. The solution for this problem would be that we have to jump outside the CSS folder by typing  &#8216; ../ &#8216; which means going back to one folder:</p>
<p><div class="full"><img loading="lazy" decoding="async" width="230" height="188" class="alignnone size-full wp-image-4677" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.32.39-PM.png" alt="Screenshot on 1.3.2014 at 11.32.39 PM" /></div></p>
<p>Here is an example based on my local html and css folder.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="285" height="229" class="alignnone size-full wp-image-4678" src="https://stampede-design.com/wp-content/uploads/2014/01/Screenshot-on-1.3.2014-at-11.34.29-PM.png" alt="Screenshot on 1.3.2014 at 11.34.29 PM" /></div></p>
<pre class="brush: xml; title: ; notranslate">background-image:url('../art/ninja.png');</pre>
<p>Here are some links for you to play around:</p>
<ul>
<li><a href="http://www.w3schools.com/cssref/playit.asp?filename=playcss_background-position&amp;preval=10px%20200px" target="_blank">background-position:</a></li>
<li><a href="http://www.w3schools.com/cssref/pr_background-repeat.asp" target="_blank">background-repeat: </a></li>
<li><a href="http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_background_multiple" target="_blank">background-image:</a></li>
</ul>
<h2>Awesome! I am going to try now!</h2>
<p>Yay! And if you do have some questions, suggestions or examples, do drop them links in the comment.</p>
<p>(Thanks <a href="http://www.w3schools.com/cssref/css3_pr_background.asp" target="_blank">W3C</a> for being my main point of references.)</p>
<p>The post <a href="https://stampede-design.com/blog/css-sprite-technique/">CSS Sprite Technique</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/css-sprite-technique/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Add Product Sash/Ribbon in BigCommerce Using jQuery</title>
		<link>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/</link>
					<comments>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 16:48:03 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bigcommerce]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4472</guid>

					<description><![CDATA[<p>Shaiful understands product sashes are a nice touch for e-commerce websites, hence he is here to show you how to have it done.</p>
<p>The post <a href="https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/">Add Product Sash/Ribbon in BigCommerce Using jQuery</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Product sashes like On Sale, Bestseller and Sold Out are certainly a nice touch for any e-commerce websites, aesthetically as well as providing a positive user experience.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="655" height="259" src="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg" alt="Sample of product sashes." class="size-full wp-image-4268" srcset="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg 655w, https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM-300x119.jpg 300w" sizes="(max-width: 655px) 100vw, 655px" /><p class="capt_block">Sample of product sashes.</p></div></p>
<p>In BigCommerce, exclusive product sash features are not built-in but they can be added using some clever jQuery tricks. Specifically, we need to tell jQuery to read the page for certain &#8220;triggers&#8221; or &#8220;conditions&#8221; and show the appropriate sash based on them. The key to product sashes is they have to appear in product listing pages (like category, homepage, search result) and the product details page. This means the &#8220;triggers&#8221; have to be present in all these pages for jQuery to detect.</p>
<h2>On Sale Sash</h2>
<p>In the following example, I am going to show how to add the most common of all product sashes, On Sale. Firstly, we need to set the discounted price for the appropriate products. If this was done right, the products will show up in the shop with a strike-through line on their original retail price. This element will become the &#8220;trigger&#8221; for the On Sale sash. So we just have to tell jQuery, if this element exists, show the On Sale sash. Below are Javascript codes for the category and product details pages.</p>
<h4>Product Category Page</h4>
<pre class="brush: jscript; title: ; notranslate" class="lead">
$(&quot;#CategoryContent .ProductList li .RetailPriceValue&quot;).each(function( index ) {
   $(this).parents('li').find('.ProductImage').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/on-sale.png&quot; class=&quot;product-sash&quot; alt=&quot;On Sale&quot; /&gt;');
});
</pre>
<h4>Product Details Page</h4>
<pre class="brush: jscript; title: ; notranslate">
if($('.DetailRow.RetailPrice').is(':visible')) {
   $('.ProductThumbImage .zoomPad').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/on-sale.png&quot; class=&quot;product-sash&quot; alt=&quot;On Sale&quot; /&gt;');
}
</pre>
<h2>Any Miscellaneous Sashes</h2>
<p>A slightly trickier scenario is to show product sashes like Bestseller and New, which we don&#8217;t really have a way to configure via the BC admin. Even though BC has product tags and custom fields, these data don&#8217;t show up in the product category pages. Fortunately, we have something else to use, the main image alternate text. In BC admin, it&#8217;s the Description box of the main product image. You need to enter a unique identifying keyword in the Description box and thanks to jQuery, reading the presence of this keyword is a breeze. This method will allow you to show any kinds of product sashes.</p>
<p><div class="full"><img loading="lazy" decoding="async" width="754" height="420" src="https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc.png" alt="Enter the keyword into the Description field of the main image." class="size-full wp-image-4490" srcset="https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc.png 754w, https://stampede-design.com/wp-content/uploads/2013/09/bc_admin_image_desc-300x167.png 300w" sizes="(max-width: 754px) 100vw, 754px" /><p class="capt_block">Enter the keyword into the Description field of the main image.</p></div></p>
<p>For showing a Bestseller sash, enter the keyword <em>Bestseller</em>. I personally prefer to enter the actual product name followed by the keyword to keep the semantics right, like <em>5ft Christmas Tree &#8211; Bestseller</em>. Here&#8217;s the code for showing the Bestseller product sash.</p>
<h4>Product Category Page</h4>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;#CategoryContent .ProductList li .ProductImage a img&#x5B;alt*='Bestseller']&quot;).each(function( index ) {
   $(this).parents('li').find('.ProductImage').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/best-seller.png&quot; class=&quot;product-sash&quot; alt=&quot;Bestseller&quot; /&gt;');
});
</pre>
<h4>Product Details Page</h4>
<pre class="brush: jscript; title: ; notranslate">
if(ProductImageDescriptions&#x5B;0] &amp;&amp; ProductImageDescriptions&#x5B;0].indexOf(&quot;Bestseller&quot;) &gt;= 0) {
   $('.ProductThumbImage .zoomPad').append('&lt;img src=&quot;http://myshopurl.com/path_to_image/best-seller.png&quot; class=&quot;product-sash&quot; alt=&quot;Bestseller&quot; /&gt;');
}
</pre>
<p>The examples I provide here only contain the necessary jQuery code snippets to make the product sash works. It&#8217;s not really a step-by-step beginners tutorial. You would need CSS to style the product sash nicely. Don&#8217;t forget about the sash graphics too, they are transparent PNGs. I can also foresee that my codes are totally template-dependent. However, if you are familiar with jQuery selectors I am sure you will be able to understand the gist and tweak the codes accordingly to fit your templates. </p>
<p>Give it a try and post your feedback below!</p>
<p>The post <a href="https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/">Add Product Sash/Ribbon in BigCommerce Using jQuery</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/add-product-sash-ribbon-in-bigcommerce-using-jquery/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
		<item>
		<title>Customizing BigCommerce and Shopify</title>
		<link>https://stampede-design.com/blog/experience-customizing-bigcommerce-and-shopify/</link>
					<comments>https://stampede-design.com/blog/experience-customizing-bigcommerce-and-shopify/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Thu, 27 Jun 2013 21:17:25 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[bigcommerce]]></category>
		<category><![CDATA[customisation]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[shopify]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4263</guid>

					<description><![CDATA[<p>With the abundance of Saas (Software as a Service) e-Commerce services, it must be hard to pick one for your business. Here Shaiful helps you to decide between two of his favourite ones.</p>
<p>The post <a href="https://stampede-design.com/blog/experience-customizing-bigcommerce-and-shopify/">Customizing BigCommerce and Shopify</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>BigCommerce and Shopify are probably two of the most well-known SaaS (Software as a Service) e-commerce solutions out there today. The main selling point of these services is they make it quick for sellers to have their stores up and running. Anyway I&#8217;m not going talk about the features they have to offer. To be specific, I&#8217;m going to share my experience working with both platforms from the perspective of template customization.</p>
<p><div class="full"><img decoding="async" class="alignnone" src="https://stampede-design.com/wp-content/uploads/2018/02/Fotor06272207191.jpg" /></div></p>
<p>Real quick, both services offer a wide array of base themes to get user started. It&#8217;s also worth mentioning that half of the themes on Shopify are premium themes.</p>
<h2>The Common Traits</h2>
<p>Both platforms use a system where the template HTML files are organized into views such as layout or snippets. They use different naming conventions but the general idea is layouts are the skeleton of the whole page and snippets are the bits of content loaded into the page. For example, a layout file could be for homepage or product category page, while a snippet is another file controlling the product loop that can be called from both layout files. Each platform has its own syntax for invoking these files and user can add new layouts and snippets. This system makes it easy to reuse repetitive codes and keeping your code tidy. Making little modifications like adding an FB Like box or a Mailchimp signup form is a piece of cake.</p>
<p>Both platforms also has a built-in HTLM/CSS code editor with basic key features such as a file browser and list of recently opened file. However, the BigCommerce editor has an extra handy feature which lists all the files dependent to the currently viewed file for quick access.</p>
<p>Now we shall compare them.</p>
<h2>BigCommerce (BC) vs Shopify</h2>
<p>Before we go any further, let me just break the news that Shopify hit a home run with this one. The winning formula is Shopify themes are made to be customized in the first place. Two key features that stood out are Theme Settings extension and Liquid programming language.</p>
<p>Theme Settings extension is fairly interesting. It allows the theme developer to tweak the settings or configuration fields of any themes. As an example, if the shop owner decided he needs to use an alternative logo when the website is viewed on a mobile phone, the theme developer can simply add a new upload field into the settings page in addition to the default logo upload field. The new variable will automatically be accessible in the template and the alternative logo can be output and controlled using CSS.</p>
<p>While BC templates only contain static calls to other template files, Shopify has its own template programming language called <a href="http://docs.shopify.com/themes/liquid-basics/index" target="_blank">Liquid</a>. Liquid comes with basic programming functions such as variables assignments, for-loops, conditional statements as well as a handful of cool helper functions. The code can be used both in HTML and CSS files. Here is a very nice <a href="http://cheat.markdunkley.com/" target="_blank">cheat sheet</a>.</p>
<p>With Liquid, a certain degree of logic can be implemented into the template such as giving different CSS class to elements based on the page currently in view. A little more advanced example is using product tags to put ribbon/sash on products in category pages. In my recent project, I tagged products with <em>bestseller</em> and used the following code to produce a Bestseller sash. While this can be implemented in BC using clever Javacsript tricks, I found that the tags system in BC to be a bit limited.</p>
<pre class="brush: xml; title: ; notranslate" class="lead">
{% for mytag in product.tags %}
   {% if mytag == 'bestseller' %} 
      &lt;span class=&quot;circle sd-bestseller&quot;&gt;Bestseller&lt;/span&gt;
   {% endif %}
{% endfor %}
</pre>
<p><div class="full"><img loading="lazy" decoding="async" width="655" height="259" src="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg" alt="Custom Bestseller product sash. On Sale was built-in." class="size-full wp-image-4268" srcset="https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM.jpg 655w, https://stampede-design.com/wp-content/uploads/2013/06/28-6-2013-12-20-53-AM-300x119.jpg 300w" sizes="(max-width: 655px) 100vw, 655px" /><p class="capt_block">Custom Bestseller product sash. On Sale was built-in.</p></div></p>
<p>The next thing I love about Shopify is the dedicated manager for Menus or Navigation in the admin panel. Admins can create as many menu groups as they like in addition to the default Main Menu. Then simply use the Liquid for-loop in the appropriate template file to render the menu (also in any way they like). This is how it looks in its simplest form. Of course, with a little bit more code you can also highlight the active menu item.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul&gt;
   {% for link in linklists&#x5B;'footermenu1'].links %}
      &lt;li&gt;&lt;a href=&quot;{{ link.url }}&quot;&gt;{{ link.title }}&lt;/a&gt;&lt;/li&gt;
   {% endfor %}
&lt;/ul&gt;
</pre>
<p>Once the menu structures are implemented in the template this way, it will be very easy for store admins to add or remove menu links without having to alter the template file directly.</p>
<p>Another feature that works very well with the menu manager is Smart Collection. A collection is Shopify&#8217;s way of saying category. A smart collection is somewhat a dynamic category where products are automatically assigned based on the rules defined to the category for example, if a product has a specific tag or if it falls between a specific price range. A menu can be made to link to the smart collection which gives a &#8220;product filter&#8221; sense of interaction when it is placed strategically on the page.</p>
<p>The next exciting feature Shopify has to offer is <a href="https://apps.shopify.com" target="_blank">Apps</a> to extend the functionality of your online store. There are hundreds of them but a particular one that has proved to be essential is the meta fields app, which allows the user to define additional generic text fields to products. Outputting these extra text can be done effortlessly using simple template tags. With custom meta fields, designers would have far more design flexibility when customizing the theme.</p>
<h2>BC&#8217;s Redeeming Features</h2>
<p>The one limitation of Shopify that I noticed is the checkout pages are off-limits to HTML modifications. Therefore, you won&#8217;t be able to place any special text or move the layout around. This could be due to the fact that a code mistake can cause the whole checkout process to break. CSS changes is still permitted though. BC on the other hand allows their checkout pages HTML structure to be modified.</p>
<p>One little bonus feature of BC is the template files can be accessed via FTPS or WebDAV. This can be really useful in circumstances where you need to make a directory-wide search or batch search and replace task using your local IDE.</p>
<h2>Final Words</h2>
<p>Working with BC and Shopify have been a great learning experience. But if I had to choose which one I enjoyed more, it has to be Shopify!</p>
<p>The post <a href="https://stampede-design.com/blog/experience-customizing-bigcommerce-and-shopify/">Customizing BigCommerce and Shopify</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/experience-customizing-bigcommerce-and-shopify/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Speed Matters</title>
		<link>https://stampede-design.com/blog/speed-matters/</link>
					<comments>https://stampede-design.com/blog/speed-matters/#comments</comments>
		
		<dc:creator><![CDATA[Shen Chong]]></dc:creator>
		<pubDate>Thu, 06 Jun 2013 18:27:23 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[page speed optimisation]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[web performance]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=4053</guid>

					<description><![CDATA[<p>It is fairly unacceptable to have slow loading websites these days, so Shen decides to elaborate why speed matters and what we can do to speed things up.</p>
<p>The post <a href="https://stampede-design.com/blog/speed-matters/">Speed Matters</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We are currently in the great boom of Web 2.0 era. Websites have gone a long way since the Geocities days. Source code and asset files have gone bigger. Not to mention web developers spent hours deciding which file format to use just to squeeze down the file size so that the site could remain aesthetically pleasant yet fast. So why does speed <em>STILL</em> matter?</p>
<p><div class="full"><img decoding="async" class="alignnone" src="https://stampede-design.com/wp-content/uploads/2013/06/Flash_0069.jpg" /></div></p>
<p>Quoting a <a href="http://www.codinghorror.com/blog/2012/10/judging-websites.html" target="_blank">blogpost</a> about a research:</p>
<blockquote><p>Researchers led by Dr. Gitte Lindgaard at Carleton University in Ontario wanted to find out how fast people formed first impressions. They tested users by flashing web pages for 500 milliseconds and 50 milliseconds onto the screen, and had participants rate the pages on various scales. The results at both time intervals were consistent between participants, although the longer display produced more consistent results. Yet, in as little as 50 milliseconds, participants formed judgments about images they glimpsed. The &#8220;halo effect&#8221; of that emotional first impression carries over to cognitive judgments of a web site&#8217;s other characteristics including usability and credibility.</p></blockquote>
<p>Try clearing your browser cache and refresh your website, how long does it take to fully load? 2 seconds? 30 seconds?</p>
<p>If you are running a business on your site, potential customers might have already been turned off by the page load time. This might affect sales.</p>
<h2>So what can you do to speed up your site?</h2>
<p>Thankfully, there are a lot of great tools and solutions out there to help you optimize your site. For this post, I&#8217;ll introduce three techniques that I know of.</p>
<h3>Use a Content Delivery Network (CDN)</h3>
<p>Traditional server architecture is having your web hosting provider&#8217;s server serve up your website to the world wide web. Your website might load fast for users located near the server. But what if your most targeted customers or users span all across the other continents?</p>
<p>This is where CDN comes into play. CDN is a delivery network service. It is a service provider whereby they allow you to cache your site on their network of servers, at an affordable cost (some comes free) all over the world.</p>
<p>Big boys&#8217; sites like Google and Facebook have the power and funds to buy servers and have them setup personally all across the world. For personal or small business sites, CDN services are the way to go. Now you do not have to worry about choosing a hosting provider that is closer to home.</p>
<p>These CDN services also come with additional perks like analytics and security. Some claimed that the analytics data are more accurate than script-embedded services because CDN are the ones that serve the site. Also, you are protected up to the latest threats since your site is under their wing of networks.</p>
<h3>Minify all the things!</h3>
<p><div class="full"><img loading="lazy" decoding="async" width="300" height="225" class="alignnone size-medium wp-image-4055" alt="ZomboDroid06062013104020" src="https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020-300x225.jpg" srcset="https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020-300x225.jpg 300w, https://stampede-design.com/wp-content/uploads/2013/06/ZomboDroid06062013104020.jpg 552w" sizes="(max-width: 300px) 100vw, 300px" /></div></p>
<p>It is okay for your source code to have proper indentation and spacings during development phase. But in production environment, you&#8217;d better off getting your source code and asset files like CSS and javascripts minified to reduce their file size down to a significant level. This will not only save you on bandwidth cost but also speed up the site for first time visitor.</p>
<p>It is also advisable not to change your source code too often in production environment because visitors will have to load up new versions of the source code each time you make a small change. So unless we are talking about critical bugs in the site, update the site by a huge batch of changes. Make use of the browser caching ability.</p>
<h3>Analyze your site and further improve</h3>
<p>There are a couple of tools out there that can help you analyze your site and suggest ways on how to improve your site like Yahoo!&#8217;s YSlow. For me I use <a href="https://developers.google.com/speed/pagespeed/insights_extensions" target="_blank">Google&#8217;s PageSpeed extension</a>. Install it and start analyzing your site today &#8211; it is free. I was able to score up to 99/100 points in my recent optimization attempt.</p>
<p><div class="full"><img decoding="async" class="alignnone" alt="" src="https://pbs.twimg.com/media/BLjluClCUAAu2YY.png:large" /></div></p>
<p>The one point missing is from third party fonts that I have no control on improving.</p>
<p>One thing to note is that even though the analyzer is a great way on improving your site, you still need to consider each suggestion that were thrown at you carefully. Each site is built differently so 100 points should be an ideal target but not a must-attainable score.</p>
<h2>That is it!</h2>
<p>With the three solutions that I suggested, that should give you a general idea on how and why you should speed up your website. If you have any other alternatives, do comment below. I would love to hear about your optimization techniques. <a href="http://cdn.memegenerator.net/instances/400x/38446647.jpg" target="_blank"><em>Best siot</em></a>!</p>
<p>The post <a href="https://stampede-design.com/blog/speed-matters/">Speed Matters</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/speed-matters/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
