<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[FTP - Stapps.io]]></title><description><![CDATA[FTP - Stapps.io]]></description><link>https://blog.stapps.io/</link><generator>Ghost 0.11</generator><lastBuildDate>Fri, 02 Jan 2026 00:33:30 GMT</lastBuildDate><atom:link href="https://blog.stapps.io/tag/ftp/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[REC FTP development using Atom editor]]></title><description><![CDATA[<p>Following on from my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">post on FTP development with REC</a> where I used Sublime Text 2. I believe it's worth trying out other editors to find one that works well for you. Also this editor is FREE which is a big bonus ;).</p>

<p><strong>(UPDATE: Newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live</a></strong></p>]]></description><link>https://blog.stapps.io/ftp-development-using-atom-editor/</link><guid isPermaLink="false">132d06b9-97f1-4121-ab8c-f1f91cbe547b</guid><category><![CDATA[REC]]></category><category><![CDATA[Template]]></category><category><![CDATA[FTP]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[Responsive]]></category><category><![CDATA[Atom]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Thu, 03 Dec 2015 11:36:56 GMT</pubDate><content:encoded><![CDATA[<p>Following on from my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">post on FTP development with REC</a> where I used Sublime Text 2. I believe it's worth trying out other editors to find one that works well for you. Also this editor is FREE which is a big bonus ;).</p>

<p><strong>(UPDATE: Newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live reload</a> now available too)</strong></p>

<p>In this tutorial we'll quickly get setup with <a href="https://atom.io">Atom</a>, it's is a newer editor from the guys at Github. Completely open source, free and built in javascript which makes it pretty interesting (to me at least).  </p>

<h2 id="stepstogetstartedforrecsitedevelopment">Steps to get started for REC site development:</h2>

<ol>
<li><p>Visit <a href="https://atom.io">Atom.io</a>, download and install</p></li>
<li><p>Now we have the editor installed, lets start installing some packages to begin development.</p>

<p>We need to head to the settings view, you can open this by navigating to Edit > Preferences (Linux), Atom > Preferences (OS X), or File > Preferences (Windows).
It's worth exploring some of the available settings, keybindings/shortcuts and other areas.</p>

<p>To install the package we want click on the "+ Install" tab on the left.</p>

<p>The first package we'll install if for Twig syntax highlighting. 
Search for "php-twig" and hit enter.</p>

<p>It's also worth setting up your theme as you'll spend a long time stairing at the screen, you'll want it to be nice :). Click the "Themes" tab on the left.
e.g. I've chosen to use "One Dark" for the UI Theme, and "Atom Dark" for the Syntax Theme.
You can also view and install other Themes from the "+ Install" tab, by clicking the Themes toggle next to the search input. </p></li>
<li><p>Back to installing packages, lets also install an FTP package to work with the REC files. <br>
I've chosen to use remote-sync for this demo, but there are several other ftp packages that may work well for you too. </p></li>
<li><p>Create a new empty folder for this project <br>
(However you normally create folder, e.g. via a file manager program on your computer, or via the terminal using <code>mkdir myproject</code>)</p></li>
<li><p>Add project folder to Atom, "File" > "Add Project Folder..." and select the folder</p></li>
<li><p>Right click on the folder on the left, > "Remote Sync" > "Configure"  </p>

<ul><li>Toggle FTP at the top (instead of SCP/SFTP)</li>
<li>Set Hostname as the site's domain name or IP if not live on domain</li>
<li>Port as 21</li>
<li>Target directory as /</li>
<li>Username as the ftp user (in the REC site > Admin > FTP Access > User, for the views@... account)</li>
<li>Enter password, also given in the admin ftp access area.</li>
<li>Tick to upload on save and to delete on local delete (if you'd like these settings)<br><br></li></ul></li>
<li><p>Right click again on the folder on the left, > "Remote Sync" > "Download Folder" <br>
(this may take a few minutes as there are many files)</p></li>
<li><p>Start editing files, (on save it should upload, if not after the first time you may need to restart Atom) <br>
Also after restarting Atom, the first save/upload can take a while, for me on a fairly fast internet connection it took almost 1 minute for this initial connection. But then all save/uploads after take less than a second so it's just a little wait at the start of each coding session which isn't so bad. You could also try out one of the other ftp packages available for Atom if this becomes too much of a pain. </p></li>
<li><p>From here you have your project folder ready to start development, and for a walk through on getting started with REC development please see my <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/">previous post</a> on this, but just skip over the Sublime Text setup instructions.</p></li>
</ol>

<p>I hope this helps you get started with Atom, leave a comment below for any further help.</p>

<p>There's plenty details on <a href="https://atom.io/docs/v1.2.4/">using Atom here</a>, along with <a href="https://www.youtube.com/watch?v=bo5MM2N_3tw">this video</a> to help you get started.</p>]]></content:encoded></item><item><title><![CDATA[Diving into FTP development with REC]]></title><description><![CDATA[<p>As well as via the admin interface, you can use FTP to gain a greater level of control over the design of your <a href="http://www.reallyeasycart.co.uk/">REC</a> site by being able to directly access the files. <a href="http://support.reallyeasycart.co.uk/support/solutions/articles/210152-ftp-access">Why is this useful?</a> </p>

<h3 id="contents">Contents</h3>

<ol>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#prerequisites">Prerequisites</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#startinganewproject">Starting a new project</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#divingin">Diving in</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#nextsteps">Next steps</a></li></ol>]]></description><link>https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/</link><guid isPermaLink="false">0fd73fcd-11bb-4f05-af9f-10c3cde3d50b</guid><category><![CDATA[REC]]></category><category><![CDATA[Template]]></category><category><![CDATA[FTP]]></category><category><![CDATA[Design]]></category><category><![CDATA[Development]]></category><category><![CDATA[Responsive]]></category><dc:creator><![CDATA[Andrew Stilliard]]></dc:creator><pubDate>Wed, 25 Nov 2015 16:00:17 GMT</pubDate><content:encoded><![CDATA[<p>As well as via the admin interface, you can use FTP to gain a greater level of control over the design of your <a href="http://www.reallyeasycart.co.uk/">REC</a> site by being able to directly access the files. <a href="http://support.reallyeasycart.co.uk/support/solutions/articles/210152-ftp-access">Why is this useful?</a> </p>

<h3 id="contents">Contents</h3>

<ol>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#prerequisites">Prerequisites</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#startinganewproject">Starting a new project</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#divingin">Diving in</a>  </li>
<li><a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#nextsteps">Next steps</a></li>
</ol>

<h2 id="prerequisites">Prerequisites</h2>

<p>We'll need an editor to work with the template files, for the purpose of this demo we'll be using <a href="http://www.sublimetext.com/2">Sublime Text 2</a>, although there are plenty others you may prefer such as <a href="http://brackets.io/">Brackets</a>, <a href="https://atom.io/">Atom</a>, <a href="http://www.adobe.com/uk/products/dreamweaver.html">Dreamweaver</a>, more info on <a href="http://blog.teamtreehouse.com/which-text-editor-should-i-use">choosing an editor here</a>.</p>

<p><strong>(UPDATE: I have a <a href="https://blog.stapps.io/ftp-development-using-atom-editor/">new post on using Atom</a>, a free text editor, instead of sublime in case you're interested. You can still use this post for getting started if you skip over the sublime references, down to <a href="https://blog.stapps.io/diving-into-ftp-devleopment-with-rec/#firsttimenotes">First time notes</a>)</strong></p>

<p><strong>(UPDATE 2: &amp; a newer post <em>(2019)</em> for <a href="https://blog.stapps.io/livereload-with-ftp/">vscode &amp; live reload</a>)</strong></p>

<p>With which ever editor you choose you'll need to use <a href="https://www.google.co.uk/search?q=ftp">FTP</a> to transfer files back and forward between your computer and the site, either setup within the editor or you can use a separate ftp client such as the <a href="https://filezilla-project.org/">Filezilla Client</a>. <br>
But here we'll use Sublime Text's excellent SFTP package. </p>

<p>Checklist: <br>
1. Sublime Text 2 installed (<a href="http://www.sublimetext.com/2">http://www.sublimetext.com/2</a>) <br>
2. Sublime Package Control installed (<a href="https://packagecontrol.io/installation#st2">https://packagecontrol.io/installation#st2</a>) <br>
3. Sublime SFTP plugin installed (<a href="https://wbond.net/sublime_packages/sftp/installation">https://wbond.net/sublime_packages/sftp/installation</a>)  </p>

<h2 id="startinganewproject">Starting a new project</h2>

<p>To start we'll want to create a new folder to work in and open Sublime Text with our site files in ready to begin coding. Follow these steps for Sublime Text.</p>

<ol>
<li>Create a folder for us to work in  </li>
<li>Open Sublime  </li>
<li>(In Sublime) "Projects" > "Add Folder to Project..."  </li>
<li>(In Sublime) right click on folder name in sidebar > "SFTP/FTP" > "Map to Remote..."  </li>
<li>Setup the sftp-config.json file <br>
<ul><li>set the type as either "ftps" or "ftp" instead of "sftp" (ftps is a more secure choice)</li>
<li>set your <code>host</code>, <code>user</code> and <code>password</code> (found in your REC site > Admin > FTP Account)</li>
<li><code>port</code> is 21</li>
<li>set file permissions: <code>"file_permissions": "666", "dir_permissions": "777",</code></li>
<li>choose other useful configuration, e.g. 
<ul><li><code>"upload_on_save": true,</code>  - To always upload back to the server when you save the file</li>
<li><code>"sync_down_on_open": true,</code>  - To always re-download the latest version of a file from the server on open</li></ul></li>
<li>Here's an <a href="http://support.reallyeasycart.co.uk/solution/articles/210164-sublime-text-2-3-example-setup">example config</a> for you to compare to if you'd like.</li></ul></li>
<li>Save the sftp-config.json file  </li>
<li>Now download the current files, (In Sublime) right click on folder name in sidebar > "SFTP/FTP" > "Download Folder"  </li>
<li>If everything was configured ok it should start to download all the template folders into your folder. <em>If you have any issues try switching from ftps to ftp, but please leave a comment at the bottom if you have any issues.</em></li>
</ol>

<h2 id="firsttimenotes">First time notes</h2>

<p>Things to keep in mind when developing within REC.</p>

<p><strong>File Permissions</strong></p>

<ul>
<li>The *-base folders are locked, you won't be able to change or delete these files and folders on the site.</li>
<li>but you can work within the *-site folders, by default you'll want to work in the "responsive-site" folder</li>
<li>and you can create new folders for new templates or variations on your design, e.g. a Christmas folder for any minor tweaks to promote extra Christmas sales</li>
</ul>

<p><strong>HTML files</strong></p>

<ul>
<li>These are the core template files</li>
<li>The 0-base, legacy-base and responsive-base are our officially updated themes. Legacy-base is for sites built before responsive-base came out. </li>
<li>Your files will sit in your template folder, and by default this is the "responsive-site" folder. </li>
<li>Files in a child template like responsive-site override the parent template files such as responsive-base.</li>
<li>E.g. When the system renders the middle section of the page (html/layouts/index.html.twig) it first looks for this file in the live template folder, e.g. responsive-site. If that file is found here it will use it, else it will check it's parent folder, responsive-base, if the files found here it will use it, else it will check in the parent of this parent template, 0-base.</li>
<li>The syntax used in these files in HTML + Twig.</li>
<li>Twig is a template language we use to allow you access to the system, e.g. to show variables such as a products name ( e.g. {{ product.name }} ) and price on the products page ( html/store/product_info.html.twig )</li>
<li>Documentation is available on <a href="http://twig.sensiolabs.org/doc/templates.html">Twig</a> and there's a <a href="http://twig.stapps.io/">playground</a> to test Twig ideas outside of REC. </li>
</ul>

<p><strong>CSS / JS files</strong></p>

<ul>
<li>Store your css in css/site.css.twig inside your template folder. </li>
<li>Same for your js, store inside js/site.js.twig</li>
<li>You can however include multiple other files into these files with Twig, we'll talk more about this later :)</li>
<li>The "responsive-base/css/" folder is full of useful css files, mainly in the "modules/" folder, where all the style of the site is stored.</li>
<li>Like the html files you can place a file in the same location but in your responsive-site folder and it will override it, but if you do you'll loose updates to this file as you'll be overriding it.</li>
<li>This works well such as for replacing the nav styling entirely, you'd want to remove the default style and you would not care about the upgrades to it, as you'd be using your own custom version.</li>
<li>But if you wanted to keep using the same nav and only make a minor change to it would be best to make your changes in a separate file loaded from site.css.twig</li>
<li>The css/main.css.twig and js/main.js.twig files as seen in the responsive-base folder are the main files used to include all the other files we use to build the template. <strong>Don't</strong> override these files, as you'd loose new files being included and any other updates to it. Instead use the css/site.css.twig and js/site.js.twig files. These site files are included at the bottom of the main files. You can use them to include other files in the same way but we leave these files blank purposefully for you to use. </li>
</ul>

<p><strong>Javascript / jQuery</strong></p>

<ul>
<li>jQuery comes pre-installed in all REC sites.</li>
<li>We currently use version 1.11.3, and you can change this by overriding the html/sections/head/jquery.html.twig file like all others.</li>
<li>However in REC <code>$</code> does not by default reference to jQuery as we have an older javascript lib also included called Prototype.js. In time we'll remove Prototype.js but when using jQuery you'll need to wrap your code so that you <code>$</code> is jQuery for you. 
This can be done with:  </li>
</ul>

<pre><code class="language-javascript">(function ($) {

// your code... executed immediately, before dom ready

}(jQuery));
</code></pre>

<p>Or  </p>

<pre><code class="language-javascript">jQuery(function ($) {

// your code... executed on dom ready
// same as using jQuery(document).ready(function ($) { ... });

});
</code></pre>

<p>&nbsp;</p>

<p><strong>Caching</strong></p>

<ul>
<li>Our css/js/images etc. all cache in the browser for 1 month. </li>
<li>This is great for performance, but during development you'll want to always see your latest code changes.</li>
<li>You'll either want to always use <a href="http://wiki.scratch.mit.edu/wiki/Hard_Refresh">hard refreshes</a></li>
<li>or set your browser to not cache (e.g. in chrome's developer tools, on the network tab you can tick to disable cache, this will force hard refreshes for you automatically when)</li>
<li>Also once you've finished work via ftp you'll want to bump the version for users browsing the site if it's already live. You can do this in REC site > Admin > Templates > "Bump Cache Buster". </li>
</ul>

<h2 id="divingin">Diving in</h2>

<p>Currently I'm working on a redesign of <a href="http://www.impkids.co.uk/">Impkids</a> clothing site. <br>
I have a few tasks to work through with you here including:</p>

<ol>
<li>Enable preview mode, as this is a live site currently running the legacy-site template and I don't want the changes to show till I'm done.  </li>
<li>Move the slider next to the sidebar above the main content, instead of above the entire middle section as it is by default.  </li>
<li>Style the outer design of the site in css.</li>
</ol>

<p><strong>Preview mode</strong></p>

<p>First, lets enable the preview mode. REC site > Admin > Templates > Hover over the responsive-site template folder and click "Preview". <br>
This will open a new tab with the site in for you, and you're ready to start work in this folder in a preview that only you can see. </p>

<p><strong>Moving the slider</strong></p>

<p>Now we'll work on moving that slider. <br>
If we look in responsive-base, the default layout file that loads in the slider is at <code>html/layouts/index.html.twig</code>. So we need to create a file at this same path, and the <code>layouts</code> directory it's in. </p>

<blockquote>
  <p>In Sublime you can create a new folder by right clicking on the parent folder, in our case responsive-site/html/ and then select "New Folder...". Then the same to create a new file except click "New file...".</p>
</blockquote>

<p>In this file we'll copy the contents from the responsive-<em>base</em> version and paste into our new responsive-<em>site</em> file. <br>
With this file copied in we can take the slider block and move it down to under the <code>&lt;main&gt;</code> element.</p>

<p>Lines 12 to 17 should be:  </p>

<pre><code class="language-twig">{# slider #}
{% block content_slider %}
    {% if page.show_content_slider %}
        {{ page.content_slider }}
    {% endif %}
{% endblock %}
</code></pre>

<p>Which is inside the middle div/section of the page, but we want it to the side of the sidebar so if you cut this chunk out and paste onto what is now line 26, just above the <code>{% if page.show_content %}</code> area. <br>
Save the file and with our FTP sync setup previously it should send this file up to the server.</p>

<p><strong>Styling the layout</strong></p>

<p>The existing Impkids site has a nice outer design where the main column has a white background with a shadow over a light orange background. <br>
We can use css to recreate this in our responsive design. <br>
As mentioned above, we will be putting our CSS into the <code>css/site.css.twig</code> file in responsive-site. </p>

<p>The responsive-site directory comes with this file ready and left blank for you. </p>

<pre><code class="language-css">/* ----- Main outer theme ----- */
body {  
    /* light orange background */
    background-color: #FDC288;
}
/* the layout container is used for the main 3 sections of the page, the header, middle and footer */
.layout-container {
    /* We want the main content on a white background */
    background: #FFF;
    /* with a semi-transparent shadow to the sides */
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.3);

    /* Add some margin to reveal the box-shadow too */
    margin: 0 15px;
    /* and some padding so content inside the layout is not too close to the edge */
    padding: 0 15px;
}
</code></pre>

<p>This gives us the outer design, but lets also talk about the header design. <br>
Impkids logo image is a little unusual, usually the site's logo is uploaded via Admin > Site Setup, however for Impkids it's not and we don't want to upload it now as to not affect the live site in any way. <br>
Instead we will set the logo on the currently blank header-logo element in the header and size it like so:  </p>

<pre><code class="language-css">/* header logo */
.header-logo {
    background: url("/userfiles/impkids/images/IMPLOGO.png");
    position: absolute;
    width: 185px;
    height: 140px;
    left: 32px;
    top: -3px;
    z-index: 999;
    color: #FDC288;
}
</code></pre>

<p>This gives us our header logo image, and next we can move onto the navigation...</p>

<p>We want to move the navigation over to the side of the logo on larger screens and style it like the current site. </p>

<p>I won't go through all the css here but you can see we're moving the nav over (leaving space for our logo), making the nav top of the nav transparent by default and the sub links have a white background. <br>
Then the active link and hover links are large orange bubbles around white text. </p>

<p>The difference here is I only want to change this on larger screens, on the phone and small tablet size we want to use the default nav as it's optimised for touch. </p>

<p>We use media queries to change the display as the screen size increases. <br>
The default screen breakpoints we use are: 35.5em, 48em, 64em, 80em. <br>
A great example of this is in responsive-base/css/modules/pull.css</p>

<pre><code class="language-css">.pull-left { float: left; }
.pull-right { float: right; }

/* same sizes as defined here: http://purecss.io/grids/#pure-responsive-grids */
@media screen and (min-width: 35.5em) {
    .pull-left-sm { float: left; }
    .pull-right-sm { float: right; }
}
@media screen and (min-width: 48em) {
    .pull-left-md { float: left; }
    .pull-right-md { float: right; }
}
@media screen and (min-width: 64em) {
    .pull-left-lg { float: left; }
    .pull-right-lg { float: right; }
}
@media screen and (min-width: 80em) {
    .pull-left-xl { float: left; }
    .pull-right-xl { float: right; }
}
</code></pre>

<p>The above is from that pull.css file, it sets up default classes in css we can use in our html templates to pull elements to the left or right but maybe only at specific screen breakpoints. </p>

<p>It's worth exploring the css/modules/ directory in responsive-base as there are plenty files. </p>

<p>Back to this design though, our end navigation style looks like:  </p>

<pre><code class="language-css">@media screen and (min-width: 48em) {

    /* ----- nav ----- */
    #header .nav {
        left: 240px;
        bottom: 0px;
    }
    /* nav background to transparent*/
    #header .nav ul {
        background-color: transparent;
    }
    #header .nav ul ul {
        background-color: #FFF;
    }
    /* active link */
    #header .nav &gt; ul &gt; li:hover,
    #header .nav &gt; ul &gt; li.is-focused,
    #header .nav &gt; ul &gt; li.is-current {
        background-color: #F78F1E;
        border-radius: 10px;
    }
    #header .nav &gt; ul &gt; li:hover &gt; a,
    #header .nav &gt; ul &gt; li.is-focused &gt; a,
    #header .nav &gt; ul &gt; li.is-current &gt; a {
        color: #FFF;
    }

}
</code></pre>

<p>Now the outer and header styling is pretty close. <br>
There's still plenty for me to work on but I hope this helps you get started with your own designs. </p>

<p><strong>Cleaning up our work</strong></p>

<p>So far our CSS has all been added to our site.css.twig file, but we can actually separate it into multiple files. </p>

<p>e.g. we could take the outer "Main outer theme" part, the <code>body</code> and the <code>.layout-container</code> and put this into a <code>css/outer-layout.css</code> file, the same for the header styles into a <code>css/header.css</code> file.</p>

<p>Then back in the site.css.twig file you'll need to include the newly created files where the css used to be. We can do this with Twig so that we still end up with a single css file being sent to the browser e.g:  </p>

<pre><code class="language-twig">{{ source("css/outer-layout.css") }}
{{ source("css/header.css") }}
</code></pre>

<p>This part is up to you as it's your project. It's fine to leave all your style at first in the site.css.twig file, especially on a small project. But as this file grows you may want to look into doing this. </p>

<p>At this point we have a working responsive site, it's simple and though for my Impkids redesign I have much left to work on, this has just been a small dive into what's needed. The most important next step is to try out different designs, use your css skills and you have pretty much free reign over the style of the site. <br>
Feel free to contact me about any questions you may have on this or on anything to help improve this post for future readers, thank you.</p>

<h2 id="nextsteps">Next steps</h2>

<p>Where can you go from here?</p>

<ul>
<li>Read up on <a href="http://www.smashingmagazine.com/2011/01/guidelines-for-responsive-web-design/">Responsive design</a> (css, designing and workflow ideas)</li>
<li>Browser testing (e.g. using <a href="http://www.browserstack.com/">browserstack</a> or emulators or real devices)</li>
<li><a href="http://blog.teamtreehouse.com/git-for-designers-part-1">Version control</a>, it's useful to have a history of your changes
e.g. After downloading the files in step 6 you could use git to start a history of the files.</li>
</ul>]]></content:encoded></item></channel></rss>