diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2ca2e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile ~/.gitignore_global + +# Ignore bundler config +/.bundle + +# Ignore the build directory +/build + +# Ignore Sass' cache +/.sass-cache \ No newline at end of file diff --git a/404.html b/404.html deleted file mode 100644 index d5db153..0000000 --- a/404.html +++ /dev/null @@ -1,16 +0,0 @@ - Page not Found | Tom Gillard - Melbourne front end web developer Skip to main content

Uh-Oh

Page not found

Looks like you got off track a little.

The page you were looking for doesn't seem to exist. Try one of the items in the main menu above.

\ No newline at end of file diff --git a/404.html.gz b/404.html.gz deleted file mode 100644 index 746a0a4..0000000 Binary files a/404.html.gz and /dev/null differ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..76542e0 --- /dev/null +++ b/Gemfile @@ -0,0 +1,17 @@ +source 'http://rubygems.org' + +gem "wdm", :platforms => [:mswin, :mingw] +gem "tzinfo-data", :platforms => [:mswin, :mingw] + +# Middleman modules +gem "middleman", "~>3.2.1" +gem "middleman-blog", "~>3.5.1" +gem "middleman-minify-html" +gem "middleman-smusher" +gem "middleman-livereload" + +# For blog posts using markdown syntax +gem "kramdown" + +# For feed.xml.builder +gem "builder" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..775097a --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,135 @@ +GEM + remote: http://rubygems.org/ + specs: + activesupport (3.2.21) + i18n (~> 0.6, >= 0.6.4) + multi_json (~> 1.0) + addressable (2.3.8) + builder (3.2.2) + chunky_png (1.3.4) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.9.1) + compass (1.0.3) + chunky_png (~> 1.2) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.0.7) + execjs (1.4.1) + multi_json (~> 1.0) + ffi (1.9.8-x86-mingw32) + haml (4.0.6) + tilt + hike (1.2.3) + htmlcompressor (0.1.2) + http_parser.rb (0.6.0) + httpclient (2.6.0.1) + i18n (0.6.11) + json (1.8.2) + kramdown (1.6.0) + listen (1.3.1) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + rb-kqueue (>= 0.2) + middleman (3.2.2) + coffee-script (~> 2.2.0) + compass (>= 0.12.2) + execjs (~> 1.4.0) + haml (>= 3.1.6) + kramdown (~> 1.2) + middleman-core (= 3.2.2) + middleman-sprockets (>= 3.1.2) + sass (>= 3.1.20) + uglifier (~> 2.4.0) + middleman-blog (3.5.3) + addressable (~> 2.3.5) + middleman-core (~> 3.2) + tzinfo (>= 0.3.0) + middleman-core (3.2.2) + activesupport (~> 3.2.6) + bundler (~> 1.1) + i18n (~> 0.6.9) + listen (~> 1.1) + rack (>= 1.4.5) + rack-test (~> 0.6.1) + thor (>= 0.15.2, < 2.0) + tilt (~> 1.4.1) + middleman-livereload (3.3.4) + em-websocket (~> 0.5.1) + middleman-core (~> 3.2) + rack-livereload (~> 0.3.15) + middleman-minify-html (3.4.0) + htmlcompressor (~> 0.1.0) + middleman-core (>= 3.2) + middleman-smusher (3.0.0) + middleman (>= 3.0.0) + smusher (~> 0.4.9) + middleman-sprockets (3.3.3) + middleman-core (>= 3.2) + sprockets (~> 2.2) + sprockets-helpers (~> 1.1.0) + sprockets-sass (~> 1.1.0) + multi_json (1.11.0) + rack (1.6.0) + rack-livereload (0.3.15) + rack + rack-test (0.6.3) + rack (>= 1.0) + rake (10.4.2) + rb-fsevent (0.9.4) + rb-inotify (0.9.5) + ffi (>= 0.5.0) + rb-kqueue (0.2.3) + ffi (>= 0.5.0) + sass (3.4.13) + smusher (0.4.9) + httpclient (>= 2.2) + json + rake + sprockets (2.12.3) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-helpers (1.1.0) + sprockets (~> 2.0) + sprockets-sass (1.1.0) + sprockets (~> 2.0) + tilt (~> 1.1) + thor (0.19.1) + thread_safe (0.3.5) + tilt (1.4.1) + tzinfo (1.2.2) + thread_safe (~> 0.1) + tzinfo-data (1.2015.2) + tzinfo (>= 1.0.0) + uglifier (2.4.0) + execjs (>= 0.3.0) + json (>= 1.8.0) + wdm (0.1.0) + +PLATFORMS + x86-mingw32 + +DEPENDENCIES + builder + kramdown + middleman (~> 3.2.1) + middleman-blog (~> 3.5.1) + middleman-livereload + middleman-minify-html + middleman-smusher + tzinfo-data + wdm diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..286bae8 --- /dev/null +++ b/Rakefile @@ -0,0 +1,15 @@ +# bundle exec rake deploy +desc "deploy build directory to github" +task :deploy do + puts "## Deploying build files to Github master branch" + cd "build" do + system "git add ." + system "git add -u" + puts "\n## Commiting: Site updated at #{Time.now.utc}" + message = "Site updated at #{Time.now.utc}" + system "git commit -m \"#{message}\"" + puts "\n## Pushing generated website" + system "git push origin master" + puts "\n## Github master branch deployment complete" + end +end \ No newline at end of file diff --git a/about/index.html b/about/index.html deleted file mode 100644 index dad158c..0000000 --- a/about/index.html +++ /dev/null @@ -1,16 +0,0 @@ - About | Tom Gillard - Melbourne front end web developer Skip to main content

Who is Tom Gillard?

Front End Developer from Melbourne, Australia

Oh, hi there. I'm Tom.

I love building websites and am so grateful to been doing so for a living. My love affair began dabbling in building sites for a variety of no-name bands I had the fun of playing in and has manifested itself into a keen interest in responsive design and front-end performance.

This site was started to document my findings and challenges in projects and tinkerings as I come across them. It's more of a technical journal than a blog. Some posts will be a long analysis on an idea and some will be quick, little thoughts. Either way I hope you get something out of them.

If you'd like to get in contact please send me an email. Otherwise, we can communicate over twitter.

\ No newline at end of file diff --git a/about/index.html.gz b/about/index.html.gz deleted file mode 100644 index 5063e32..0000000 Binary files a/about/index.html.gz and /dev/null differ diff --git a/blog/2013-09-08-youre-doing-it-peter/index.html b/blog/2013-09-08-youre-doing-it-peter/index.html deleted file mode 100644 index e726d83..0000000 --- a/blog/2013-09-08-youre-doing-it-peter/index.html +++ /dev/null @@ -1,55 +0,0 @@ - You're doing it Peter! | Tom Gillard - Melbourne front end web developer Skip to main content

You're doing it Peter!

So here it is; my very own blog site. This debut post is dedicated to discussing a few new techniques I tried during the development process.

My, what big words you have.

I’ve been an advocate for responsive web design in the last few projects I’ve worked on and one thing I really have trouble with is typography. I agree with Harry Roberts and find it helpful to preset your font sizes, testing them out in a digital styleguide or standard content page. As well as this I wanted to take it a step further and try out something that I read on Trent Walton’s blog where the font size for the entire site is scaled based on a variety of breakpoints.

I was able to achieve this by applying a percentage (%) based value to the body element within a bunch of predetermined breakpoints (these are written using Sass using variables and mixins, so I’ve just included the outputted css below).

body {
-  font-size: 100%;
-  line-height: 1.4;
-}
-@media screen and (min-width: 600px) {
-  body {
-    font-size: 112.5%;
-    line-height: 1.6;
-  }
-}
-@media screen and (min-width: 800px) {
-  body {
-    font-size: 125%;
-    line-height: 1.6;
-  }
-}
-@media screen and (min-width: 1200px) {
-  body {
-    font-size: 150%;
-  }
-}
-

Loosey Goosey

The other major thing I wanted to try was breaking out of the 960 grid and make things more fluid. I’ve tinkered with a variety of grid frameworks such as; Foundation, Bootstrap and inuit, with my most preferred being Susy. When starting development on this blog, I began using Susy but found that I was too constricted to it’s rules and soon ran into issues when it came to fluid breakpoints.

Realising the design only really calls for a single column with the exception of the little profile image in the footer, I threw it all out and simply set varying container widths at each breakpoint (If I find that I need to split the content into more than one column, I’ll create those styles as I need them).

.container {
-  @extend %cf;
-  position: relative;
-  width: 90%;
-  margin: 0 auto;
-
-  @include respond-to($desk) { // 800px / 16px
-    width: 86%;
-  }
-}
-
-.article {
-  @include respond-to($desk) {
-    width: 70%;
-    margin-left: auto;
-    margin-right: auto;
-  }
-}
-

And voila! A nice little fluid blog that scales quite nicely.

T

TOPICS: responsive setup

\ No newline at end of file diff --git a/blog/2013-09-08-youre-doing-it-peter/index.html.gz b/blog/2013-09-08-youre-doing-it-peter/index.html.gz deleted file mode 100644 index 1f3c55e..0000000 Binary files a/blog/2013-09-08-youre-doing-it-peter/index.html.gz and /dev/null differ diff --git a/blog/2013-10-06-a-rested-development/index.html b/blog/2013-10-06-a-rested-development/index.html deleted file mode 100644 index 6cf1b85..0000000 --- a/blog/2013-10-06-a-rested-development/index.html +++ /dev/null @@ -1,16 +0,0 @@ - A rested development | Tom Gillard - Melbourne front end web developer Skip to main content

A rested development

The last few months have been pretty full on at work. Along with late nights working on a few pet projects, it wasn't long before I started to feel the burn (out).

I was in a terrible spot, burning the candle at both ends. I got migrains for the first time ever, my mood was the lowest it had ever been and I began to notice I was quite unpleasant to be around. I was snapping at people all the time, simple tasks were getting the better of me, I was having trouble focusing and was always tired.

Now, I’m quite a tall guy and have lived majority of my life feeling lethargic and run down but a recent trip to the doctor showed that I was fine. No illnesses, no diseases, nothing wrong with any of my organs. Just healthy. So clearly, I needed to change something.

The Regime

My wife and I got a bit of money back from the taxman (what a guy!) and decided to invest it into our wellbeing. We signed up to our local gym which has a pool and variety of classes like boxing, yoga, cycling, etc. I also started to attend the free yoga classes my work offers every Tuesday.

I gotta say. Two weeks into the new regime and I’m feeling much better. I’ve swapped late night coding sessions with an early morning workout.

The results:

  • Improved mood
  • More energetic/new found passion for things
  • Sharper focus on dev tasks
  • Hightened confidence in myself and my work

New year / New me

I originally wrote this post back in October and it’s now almost 2014. Unfortunately for me the new regime fell flat as soon as the taxman money dried up (actually I got a little sick of 6:30am starts and easily convinced myself that the sleep in was just as good for me). But I’m not giving up!

I have the grand plan of riding to work each day for the entire year (no pressure haha).

I’ve already given up coffee for tea (I was addicted)

I’ve given my wife permission to rip the laptop from my hands and hit me over the head with a book for me to read once it hits 10pm

Lunch time walks around the park near work will also feature heavily as it’s a great excuse to get away from my desk and not just hunch in the kitchen over my tuna wrap.

Bascially, I want to be more focused, more energetic and most importantly, more pleasant to be around. I know this has deviated from my plan to blog about my site’s setup but we can always get to that… To me this is super important!

If you’ve identified with anything I’ve mentioned here I urge you to make the switch and look after yourself. You’ll feel better for doing so.

T

TOPICS: opinion

\ No newline at end of file diff --git a/blog/2013-10-06-a-rested-development/index.html.gz b/blog/2013-10-06-a-rested-development/index.html.gz deleted file mode 100644 index 8247e44..0000000 Binary files a/blog/2013-10-06-a-rested-development/index.html.gz and /dev/null differ diff --git a/blog/2013-12-29-the-bells-and-the-whistles/index.html b/blog/2013-12-29-the-bells-and-the-whistles/index.html deleted file mode 100644 index 6d16873..0000000 --- a/blog/2013-12-29-the-bells-and-the-whistles/index.html +++ /dev/null @@ -1,16 +0,0 @@ - The bells and the whistles | Tom Gillard - Melbourne front end web developer Skip to main content

The bells and the whistles

Middleman's blog engine is pretty powerful. Check out the following article from a fellow blogger that helped me get this site up and running.

The Middleman docs on blogging have a lot of great info to get you started with building your own blog using middleman but if you want more of a step by step how-to, Design by Joel has a really great article on building a blog in middleman.

Enjoy!

T

TOPICS: setup middleman

\ No newline at end of file diff --git a/blog/2013-12-29-the-bells-and-the-whistles/index.html.gz b/blog/2013-12-29-the-bells-and-the-whistles/index.html.gz deleted file mode 100644 index 0b0f5a5..0000000 Binary files a/blog/2013-12-29-the-bells-and-the-whistles/index.html.gz and /dev/null differ diff --git a/blog/2013-12-30-page-by-numbers/index.html b/blog/2013-12-30-page-by-numbers/index.html deleted file mode 100644 index c634a79..0000000 --- a/blog/2013-12-30-page-by-numbers/index.html +++ /dev/null @@ -1,37 +0,0 @@ - Page by numbers | Tom Gillard - Melbourne front end web developer Skip to main content

Page by numbers

Setting up pagination for my blog was easy enough however, trying to get it to work was a little less straight forward. So I'd like to share how I got pagnination setup on this here site.

Configuration.

Inside the activate:blog do |blog| block of my config.rb file, I added the following pagination settings;

blog.paginate = true
-blog.page_link = "page:num"
-blog.per_page = 5
-

Although they’re pretty straight forward, demos and explainations of the above settings can be found in the Middleman docs.

Template.

This is where I had a little difficulty.

In order for pagnination to work after setting up pagination in config.rb, I needed to add in a little frontmatter tag to the top of the template I wanted to paginate. This is very important. Forget to include this and the rest of the code is useless.

---
-pageable: true
----
-

Add this to the top of any template you want to use pagination on. The homepage of my site is the only place I require any pagination for the time being so I added this to top of the index.html.erb file in the root of my site.

This essentially tells middleman that we want to split up the contents of this site into manageable pages. Middleman then uses the settings in your config.rb file to figure out how many items per page.

Show me the pages

So after configuring and enabling pagination on my site I needed to output the markup. I opted for a fairly simple pagination pattern that shows “Articles X to Y of Z” with next (newer) and previous (older) navigation. To do this I needed to use some of Middleman’s built-in pagination variables;

  • page_start
  • page_end
  • prev_page
  • prev_page.url
  • next_page
  • next_page.url

The final code snippet looks like this;

<div class="article pagination">
-  <p class="pagination__summary">Articles <%= page_start %> to <%= page_end %> of <%= articles.length %></p>
-  <ul class="list--clean list--pagination">
-    <% if prev_page %>
-      <li class="prev">
-        <a href="<%= prev_page.url %>">Older articles</a>
-      </li>
-    <% end %>
-    <% if next_page %>
-      <li class="next">
-        <a href="<%= next_page.url %>">Newer articles</a>
-      </li>
-    <% end %>
-  </ul>
-</div>
-

So there you have it, pagination on a static site thanks to Middleman. Hopefully that helps clear things up for some people looking to achieve the same or a similar result.

T

TOPICS: setup middleman

\ No newline at end of file diff --git a/blog/2013-12-30-page-by-numbers/index.html.gz b/blog/2013-12-30-page-by-numbers/index.html.gz deleted file mode 100644 index 10bb0b2..0000000 Binary files a/blog/2013-12-30-page-by-numbers/index.html.gz and /dev/null differ diff --git a/blog/2013-12-31-page-alive/index.html b/blog/2013-12-31-page-alive/index.html deleted file mode 100644 index 63f4fa7..0000000 --- a/blog/2013-12-31-page-alive/index.html +++ /dev/null @@ -1,43 +0,0 @@ - Page Alive! | Tom Gillard - Melbourne front end web developer Skip to main content

Page Alive!

Middleman can generate dynamic pages with a data file, a template and a little configuration. Let me show you how.

I first stumbled across Middleman’s dynamic pages feature on a freelance project I was working on for a friend of mine. The site was for a local event manager who wanted to showcase several (I think it was about 10) of their most recent events.

Now I’m not a huge fan of manual coding and always look for ways to automate or reuse code so I really didn’t want to have to manually create all those pages.

Unfortunately the Middleman demo is a little basic for what I needed but luckily for me with a bit of digging and some communication back and forth with one of Middleman’s contributors, Ben Hollis, I discovered the true power of dynamic pages.

Like I mentioned in the intro, all you need is 3 key ingredients; a data file, a template and a couple of lines in your config.rb file.

Here’s how I have implemented it.

1. Data file

On the same level as my source (and eventually build) directories I created a data directory. Within my newly created data directory I created a new YAML file called projects.yml (Middleman also supports JSON data).

This YAML file contained all the data properties of a project and was to be used for looping through and outputting each project’s details into a template.

Let’s say each project has a client, title, description and list of event manager’s responsibilities.

Our projects.yml file looks something like this;

  - client: client1
-    title: "First project"
-    description: "This is a description of the 1st project."
-    responsibilities:
-      "<li>catering</li>
-      <li>venue management</li>
-      <li>event staffing</li>"
-  
-  - client: client2
-    title: "Second project"
-    description: "This is a description of the 2nd project."
-    responsibilities:
-      "<li>catering</li>"
-

2. Template

In my project (within the source directory) I created a new directory called projects (as this is what I was going to be displaying). Inside the projects directory I created template.html.erb. This file is to be referenced in config.rb as the template to use for generating the individual project pages.

The template looks like this;

<% p = locals[:project] %>
-<div class="l-wrapper">
-  <div class="l-content">
-    <h2><%= p[:title] %></h2>
-    <%= p[:description] %>
-    <p class="highlight">Key responsibilities:</p>
-    <ul class="itemised-list">
-	    <%= p[:responsibilities] %>
-    </ul>
-  </div>
-</div>
-

Don’t worry about the <% p = locals[:project] %> at the top of the file, locals[:project] is defined in config.rb and will be explained in the next section.

‘p’ stores the project data object and is then used to access each property of the project such as title, description and the list of responsibilities.

3. Configuration

The final piece of the puzzle lies in the config.rb file with this block;

data.projects.each do |pd|
-  proxy "/projects/#{pd[:client]}.html", "/projects/template.html", :layout => :popup, :locals => { :project => pd }, :ignore => true
-end
-

What this block is doing is as follows;

data.projects.each do |pd| is looping through each project item in projects.yml

proxy is creating a dummy url using the client property of the project item within projects.yml and is being passed the template file in the projects directory. eg: “www.site.com/projects/client1.html”

layout is pointing to a custom layout which resides in the layouts directory and is different from the standard site layout.

You can also set layout to false if your template has all the html in it (rather than using partial includes)

locals is what passes the data in project.yml to the template (remember p = locals[:projects])

ignore tells middleman not to create a html file for template.html.erb as we only want html files for each of the projects.

So once that’s all setup all you need to do is fire up middleman server and test it out by going to; http://localhost:4567/projects/client1.html

This really is a handy feature and you can get pretty creative with what you store in your data files and how you render that data in the template. Also, remember if you’re not too keen on YAML, Middleman also supports JSON.

So go nuts and start adding dynamic pages to your not-so-static Middleman site!

T

TOPICS: middleman tutorial

\ No newline at end of file diff --git a/blog/2013-12-31-page-alive/index.html.gz b/blog/2013-12-31-page-alive/index.html.gz deleted file mode 100644 index 636d68f..0000000 Binary files a/blog/2013-12-31-page-alive/index.html.gz and /dev/null differ diff --git a/blog/2014-01-01-resolution-9/index.html b/blog/2014-01-01-resolution-9/index.html deleted file mode 100644 index 34e1c6c..0000000 --- a/blog/2014-01-01-resolution-9/index.html +++ /dev/null @@ -1,16 +0,0 @@ - Resolution #9 | Tom Gillard - Melbourne front end web developer Skip to main content

Resolution #9

Today's the first day of 2014 and I'd like to set the theme for the new year

It’s really quite simple: do more.

I feel the need to participate and put myself out there more than I have in the past.

To quote weezer:

I don’t wanna be an old man anymore / It’s been a year or two since I was out on the floor / Shakin’ booty, makin’ sweet love all the night / It’s time I got back to the Good Life / It’s time I got back, it’s time I got back / And I don’t even know how I got off the track / I wanna go back…Yeah!

So that means more;

  • blogging
  • reading
  • basketball
  • travel
  • time with friends
  • learning new skills
  • challenging myself

Hopefully this blog will help achieve a lot of the above.

Happy new year!

T

TOPICS: opinion

\ No newline at end of file diff --git a/blog/2014-01-01-resolution-9/index.html.gz b/blog/2014-01-01-resolution-9/index.html.gz deleted file mode 100644 index 2d88086..0000000 Binary files a/blog/2014-01-01-resolution-9/index.html.gz and /dev/null differ diff --git a/blog/2014-01-11-social-media-meta-tags/index.html b/blog/2014-01-11-social-media-meta-tags/index.html deleted file mode 100644 index 659f2b9..0000000 --- a/blog/2014-01-11-social-media-meta-tags/index.html +++ /dev/null @@ -1,83 +0,0 @@ - Social media meta | Tom Gillard - Melbourne front end web developer Skip to main content

Social media meta

Make the most of people sharing your products, posts, pages or more simply by adding a few meta tags to the <HEAD> of your site.

With so many people using social media these days, it seems only logical to include the snippets below on all of our sites.

Facebook Open Graph

These are probably the most commonly known and you’ve probably used these once or twice before.

<!-- Facebook Open Graph tags -->
-<meta property="og:image" content="" />
-<meta property="og:site_name" content="" />
-<meta property="og:type" content="" />
-<meta property="og:url" content="" />
-<meta property="og:title" content="" />
-

More details of Facebook’s OpenGraph tags/options can be found on David Walsh’s Blog

Twitter Cards

These are a little newer and there is a LOT you can include (links to mobile apps, product details, etc) so make sure you check out the docs via the link below.

<!-- Twitter Card -->
-<meta name="twitter:card" content="summary" />
-<meta name="twitter:creator" content="">
-<meta name="twitter:url" content="" />
-<meta name="twitter:title" content="" />
-<meta name="twitter:description" content="" />
-<meta name="twitter:image:src" content="" />
-

More details of Twitter’s Card tags/options can be found in their development docs

Rich Pins

Possibly the newest kid on the block launching in 2013, these can also include alot of content when somebody pins something from your site. They type property determines what additional meta data you can share so check out the link to the docs below.

<!-- Pintrest Rich Pins -->
-<meta property="og:title" content="" />
-<meta property="og:description" content="" />
-<meta property="og:type" content="" />
-<meta property="og:url" content="" />
-<meta property="og:image" content="" />
-<meta property="og:site_name" content="" />
-

More details of Pinterest’s Rich Pins tags/options can be found in their development docs

Putting it all together

An example site for a business selling shoes, with the page template based on a watered down version of the HTML5 boilerplate, could look something like this;

<!DOCTYPE html>
-<html class="no-js">
-  <head>
-    <meta charset="utf-8" />
-    <title>Social Meta Tag Example</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link rel="stylesheet" href="css/style.css">
-    <script src="js/vendor/modernizr-2.7.1.min.js"></script>
-    
-    <!-- Facebook Open Graph tags -->
-    <meta property="og:image" content="http://shop.example.com/images/store/SA-001.jpg" />
-    <meta property="og:site_name" content="Example Store" />
-    <meta property="og:type" content="product" />
-    <meta property="og:url" content="http://shop.example.com/product/SA-001" />
-    <meta property="og:title" content="Reebok Shaq Attaq" /> 
-    
-    <!-- Twitter Card -->
-    <meta name="twitter:card" content="product" />
-    <meta name="twitter:creator" content="@exampleStore">
-    <meta name="twitter:url" content="http://shop.example.com/product/SA-001" />
-    <meta name="twitter:title" content="Reebok Shaq Attaq" />
-    <meta name="twitter:description" content="Limited edition Shaquille O'neil basketball shoes." />
-    <meta name="twitter:image:src" content="http://shop.example.com/images/store/SA-001.jpg" /> 
-    
-    <!-- Pintrest Rich Pin -->
-    <meta property="og:title" content="Reebok Shaq Attaq" />
-    <meta property="og:description" content="Limited edition Shaquille O'neil basketball shoes." />
-    <meta property="og:url" content="http://shop.example.com/product/SA-001" />
-    <meta property="og:image" content="http://shop.example.com/images/store/SA-001.jpg" />
-    <meta property="og:site_name" content="Example Store" />
-    <meta property="og:price:amount" content="119.00" />
-    <meta property="og:price:standard_amount" content="159.00" />
-    <meta property="og:price:currency" content="USD" />
-    <meta property="og:availability" content="instock" />
-    <meta property="og:see_also" content="http://shop.example.com/product/SA-001" />
-    <meta property="og:rating" content="4.5" />
-    <meta property="og:rating_scale" content="5" />
-    <meta property="og:rating_count" content="33" />
-    <meta property="product:gender" content="Men" />
-    <meta property="product:color" content="White and Blue" />
-  </head>
-  <body>
-    
-    <p>Hello world! This is HTML5 Boilerplate with social sharing meta tags.</p>
-
-  </body>
-</html>
-

You can also download or copy the bare bones Gist

So get adding and start sharing!

T

TOPICS: Snippets

\ No newline at end of file diff --git a/blog/2014-01-11-social-media-meta-tags/index.html.gz b/blog/2014-01-11-social-media-meta-tags/index.html.gz deleted file mode 100644 index 5af59da..0000000 Binary files a/blog/2014-01-11-social-media-meta-tags/index.html.gz and /dev/null differ diff --git a/blog/2014-01-21-ruby-sass-vs-node-sass/index.html b/blog/2014-01-21-ruby-sass-vs-node-sass/index.html deleted file mode 100644 index c4fc5c9..0000000 --- a/blog/2014-01-21-ruby-sass-vs-node-sass/index.html +++ /dev/null @@ -1,51 +0,0 @@ - Battle of the Sasses | Tom Gillard - Melbourne front end web developer Skip to main content

Battle of the Sasses

Ruby Sass can be a little slow when compiling your Sass project but Libsass claims to compile up to 5x faster. Let's see shall we with a good ol' fashioned Sass off!

Libsass is a C port of the original Sass engine to offer the power of Sass without being tied to Ruby.

Now I work in Windows and Ruby can be a bit of a pain so I’m more than keen to give the new kid on the block a go.

What I’m going to do is create two test projects using the inuit css framework with their own gruntfile but each gruntfile will be different.

Project 1 will have the ruby Sass grunt task while Project 2 will use the newer, faster Libsass with Node-sass and Grunt-Sass.

Ben Frain has a great article on getting up and running with libsass, node-sass and grunt-sass.

The setup

Let’s take a look at each project’s package.json file to compare.

Project 1

-{
-  "name": "project-1",
-  "version": "0.5.0",
-  "dependencies": {},
-  "devDependencies": {
-    "grunt": "~0.4.1",
-    "load-grunt-tasks": "~0.2.0",
-    "time-grunt": "~0.1.1",
-    "grunt-contrib-watch": "~0.4.3",
-    "grunt-contrib-sass": "latest"
-  },
-  "engines": {
-    "node": ">=0.8.0"
-  }
-}
-
-

Project 2

-{
-  "name": "project-1",
-  "version": "0.5.0",
-  "dependencies": {},
-  "devDependencies": {
-    "grunt": "~0.4.1",
-    "load-grunt-tasks": "~0.2.0",
-    "time-grunt": "~0.1.1",
-    "grunt-contrib-watch": "~0.4.3",
-    "grunt-sass": "0.6.1"
-  },
-  "engines": {
-    "node": ">=0.8.0"
-  }
-}
-
-

There’s only one main difference between the two projects and that is the grunt package for Sass.

The test

After running npm install so as to install all our grunt packages from our package.json file, we’ll run the grunt command which looks like this in gruntfile.js.

grunt.registerTask('default', ['sass', 'watch']);
-

This simply compiles our Sass partial files from inuit into style.css and then watches said Sass files for any changes.

Making a quick little change to one of our Sass files (like changing the background colour on the body) and saving that change triggers the grunt watch task to kick in and…

The results

As we can see from the image below, the Node Sass task, which uses libsass, is indeed much faster than the native Ruby based Sass task.

Test results: Ruby Sass - 2.645 seconds. Libsass - 1 second.
Top: Ruby Sass completion time. Bottom: Libsass completion time

Soooooo…

I know this is a pretty light on example but imagine you’re working on a large scale site with multiple Sass modules and even styles for various plugins, not to mention running multiple grunt tasks - you’re gonna love the extra time savings.

Plus, with support for sourcemaps being added to Libsass in the last month, there’s not much of a reason to continue waiting around for the native Ruby Sass grunt task to drag it’s knuckles into CSS pre-compilation.

We’re all far too busy for that right?

T

NOTE: If you use Compass, which Libsass still does not support, checkout the autoprefixer grunt task that uses the Can I Use database.

TOPICS: workflow experiments

\ No newline at end of file diff --git a/blog/2014-01-21-ruby-sass-vs-node-sass/index.html.gz b/blog/2014-01-21-ruby-sass-vs-node-sass/index.html.gz deleted file mode 100644 index 27af3e7..0000000 Binary files a/blog/2014-01-21-ruby-sass-vs-node-sass/index.html.gz and /dev/null differ diff --git a/blog/topics/experiments/index.html b/blog/topics/experiments/index.html deleted file mode 100644 index 14c1358..0000000 --- a/blog/topics/experiments/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

experiments

Browse related articles

\ No newline at end of file diff --git a/blog/topics/experiments/index.html.gz b/blog/topics/experiments/index.html.gz deleted file mode 100644 index f9089fb..0000000 Binary files a/blog/topics/experiments/index.html.gz and /dev/null differ diff --git a/blog/topics/index.html b/blog/topics/index.html deleted file mode 100644 index a7ca0a3..0000000 --- a/blog/topics/index.html +++ /dev/null @@ -1,16 +0,0 @@ - Topics | Tom Gillard - Melbourne front end web developer Skip to main content

Topics

Browse all articles

\ No newline at end of file diff --git a/blog/topics/index.html.gz b/blog/topics/index.html.gz deleted file mode 100644 index 6ac82e0..0000000 Binary files a/blog/topics/index.html.gz and /dev/null differ diff --git a/blog/topics/middleman/index.html b/blog/topics/middleman/index.html deleted file mode 100644 index 538f2c4..0000000 --- a/blog/topics/middleman/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

middleman

Browse related articles

\ No newline at end of file diff --git a/blog/topics/middleman/index.html.gz b/blog/topics/middleman/index.html.gz deleted file mode 100644 index 77d53a5..0000000 Binary files a/blog/topics/middleman/index.html.gz and /dev/null differ diff --git a/blog/topics/opinion/index.html b/blog/topics/opinion/index.html deleted file mode 100644 index 2f79492..0000000 --- a/blog/topics/opinion/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

opinion

Browse related articles

\ No newline at end of file diff --git a/blog/topics/opinion/index.html.gz b/blog/topics/opinion/index.html.gz deleted file mode 100644 index 02ba28d..0000000 Binary files a/blog/topics/opinion/index.html.gz and /dev/null differ diff --git a/blog/topics/responsive/index.html b/blog/topics/responsive/index.html deleted file mode 100644 index 67a15c5..0000000 --- a/blog/topics/responsive/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

responsive

Browse related articles

\ No newline at end of file diff --git a/blog/topics/responsive/index.html.gz b/blog/topics/responsive/index.html.gz deleted file mode 100644 index 0514fe0..0000000 Binary files a/blog/topics/responsive/index.html.gz and /dev/null differ diff --git a/blog/topics/setup/index.html b/blog/topics/setup/index.html deleted file mode 100644 index 363ba04..0000000 --- a/blog/topics/setup/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

setup

Browse related articles

\ No newline at end of file diff --git a/blog/topics/setup/index.html.gz b/blog/topics/setup/index.html.gz deleted file mode 100644 index 1429e44..0000000 Binary files a/blog/topics/setup/index.html.gz and /dev/null differ diff --git a/blog/topics/snippets/index.html b/blog/topics/snippets/index.html deleted file mode 100644 index 970f9cf..0000000 --- a/blog/topics/snippets/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

Snippets

Browse related articles

\ No newline at end of file diff --git a/blog/topics/snippets/index.html.gz b/blog/topics/snippets/index.html.gz deleted file mode 100644 index 001d070..0000000 Binary files a/blog/topics/snippets/index.html.gz and /dev/null differ diff --git a/blog/topics/tutorial/index.html b/blog/topics/tutorial/index.html deleted file mode 100644 index ca8f98e..0000000 --- a/blog/topics/tutorial/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

tutorial

Browse related articles

\ No newline at end of file diff --git a/blog/topics/tutorial/index.html.gz b/blog/topics/tutorial/index.html.gz deleted file mode 100644 index 0d28448..0000000 Binary files a/blog/topics/tutorial/index.html.gz and /dev/null differ diff --git a/blog/topics/workflow/index.html b/blog/topics/workflow/index.html deleted file mode 100644 index 82ca066..0000000 --- a/blog/topics/workflow/index.html +++ /dev/null @@ -1,16 +0,0 @@ - | Tom Gillard - Melbourne front end web developer Skip to main content

workflow

Browse related articles

\ No newline at end of file diff --git a/blog/topics/workflow/index.html.gz b/blog/topics/workflow/index.html.gz deleted file mode 100644 index f9db040..0000000 Binary files a/blog/topics/workflow/index.html.gz and /dev/null differ diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..c845744 --- /dev/null +++ b/config.rb @@ -0,0 +1,166 @@ +@siteName = "Tom Gillard" +@siteUrl = "http://www.tomgillard.com" + +# silence i18n warning +::I18n.config.enforce_available_locales = false + +# feed.xml.builder +require "builder" + +# ignore files +ignore "/feed-test.xml" +ignore "/README.md" + +### +# Blog +### + +# Set local timezone for post dates +require 'tzinfo' +Time.zone = "Australia/Melbourne" + +# Blog options +activate :blog do |blog| + blog.prefix = "blog" + blog.layout = "blog" + blog.permalink = ":year-:month-:day-:title" + blog.default_extension = ".markdown" + # tags -> topics + blog.tag_template = "single-topic.html" + blog.taglink = "topics/:tag.html" + # pagination + blog.paginate = true + blog.page_link = "page:num" + blog.per_page = 5 +end + +# Markdown settings +set :markdown_engine, :kramdown +set :markdown, :fenced_code_blocks => true, +:autolink => true, +:smartypants => true + + +# Automatic image dimensions on image_tag helper +# activate :automatic_image_sizes +# activate :automatic_alt_tags + + +### +# Helpers - Methods defined in the helpers block are available in templates +### +helpers do + # Sets the html class to 'is-current-page' when the link url is equal to the current page being viewed. + # Use just like the link_to helper. + # <%= current_link_to 'Home', '/index.html' %> + def current_link_to(text, url, opts={}) + current_url = current_resource.url + if current_url == url_for(url) || current_url == url_for(url) + "/" + opts[:class] = "is-current-page" + end + link_to(text, url, opts) + end +end + +#### +# Pretty URLS +#### + +# Apache - outputs: site/pagename.html to site/page-name/index.html +activate :directory_indexes + +# Set a different file to be output from .html +# php: index.php || IIS: default.html +# set :index_file, "default.html" + +# ignore pretty url on individual files +page "/404.html", directory_index: false +page "/sitemap.xml", directory_index: false +page "/feed.xml", directory_index: false + +### +# Page options, layouts, aliases and proxies +### + +# Per-page layout changes: +page "/feed.xml", :layout => false +page "/sitemap.xml", :layout => false + + +# Proxy (fake) files +# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do +# @which_fake_page = "Rendering a fake page with a variable" +# end +# data.projects.details.each do |pd| +# proxy "/projects/#{pd[:client]}.html", "/projects/template.html", :layout => :popup, :locals => { :project => pd }, :ignore => true +# end + +#### +# Folder Locations +#### + +set :css_dir, 'css' +set :js_dir, 'js' +set :images_dir, 'img' + +### +# Compass +### +compass_config do |config| + config.preferred_syntax = :scss +end + +#### +# Build-specific configuration +#### + +configure :development do + + compass_config do |config| + + config.sass_options = {:debug_info => true} + config.output_style = :expanded + config.line_comments = true + + end + + # Livereload in browser + # First: gem install middleman-livereload + # activate :livereload + +end + +configure :build do + + compass_config do |config| + config.output_style = :compressed + config.line_comments = false + end + + # Minify CSS on build + activate :minify_css + + # Minify Javascript on build + activate :minify_javascript + + # Minify HTML on build + # First: gem install middleman-minify-html + activate :minify_html + + # GZIP files - requires setup on server + activate :gzip + + # Uniquely-named assets + # activate :asset_hash + + # Use relative URLs + # activate :relative_assets + + # Compress PNGs after build + # First: gem install middleman-smusher + require "middleman-smusher" + activate :smusher + + # Or use a different image path + # set :http_path, "/Content/images/" +end \ No newline at end of file diff --git a/css/style.css b/css/style.css deleted file mode 100644 index c51f4ef..0000000 --- a/css/style.css +++ /dev/null @@ -1 +0,0 @@ -.accessibility,.visuallyhidden{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}/*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box}h1,h2,h3,h4,h5,h6,p,blockquote,pre,dl,dd,ol,ul,form,fieldset,legend,table,th,td,caption,hr{margin:0;padding:0}abbr[title],dfn[title]{cursor:help}u,ins{text-decoration:none}ins{border-bottom:1px solid}img{font-style:italic}label,input,textarea,button,select,option{cursor:pointer}.text-input:active,.text-input:focus,textarea:active,textarea:focus{cursor:text;outline:none}.form-row:after,.container:after,.logo:after,.list--pagination:after,.media:after{content:"";display:table;clear:both}h1,h2,h3,h4,h5,h6,hgroup,ul,ol,dl,blockquote,p,address,table,fieldset,figure,pre{margin-bottom:12px;margin-bottom:0.75rem}.article--summary .article__content,.article--full .article__content p,.article--full .article__content ul,.article--full .article__content ol{margin-bottom:24px;margin-bottom:1.5rem}hr{margin-bottom:10px;margin-bottom:0.625rem}ul,ol,dd{margin-left:24px;margin-left:1.5rem}*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}html{min-height:100%;width:100%}body{font:100%/1.4 Arial,"Helvetica Neue",Helvetica,sans-serif;-webkit-backface-visibility:hidden;background-color:#DAD4C8;color:#222}@media screen and (min-width: 37.5em){body{font-size:112.5%;line-height:1.6}}@media screen and (min-width: 50em){body{font-size:125%;line-height:1.6}}@media screen and (min-width: 75em){body{font-size:150%}}iframe,object,embed{max-width:100%}@font-face{font-family:"LeagueGothicReg";src:url("/fonts/leaguegothic-regular-webfont.woff2") format("woff2"),url("/fonts/leaguegothic-regular-webfont.woff") format("woff");font-weight:normal;font-style:normal}h1,.alpha{font-size:2.25em}h2,.beta{font-size:1.875em}h3,.gamma{font-size:1.5em}h4,.delta{font-size:1.25em}h5,.epsilon{font-size:1em}h6,.zeta{font-size:0.875em}.giga{font-size:6em}.mega{font-size:4.5em}.kilo{font-size:3em}.lede,.lead{font-size:1.125em}.smallprint,.milli{font-size:0.75em}.micro{font-size:0.625em}q{quotes:"‘" "’" "\\201C" "\\201D"}q:before{content:"\2018";content:open-quote}q:after{content:"\2019";content:close-quote}q q:before{content:"\201C";content:open-quote}q q:after{content:"\201D";content:close-quote}blockquote{quotes:"\\201C" "\\201D"}blockquote p:before{content:"\\201C";content:open-quote}blockquote p:after{content:"";content:no-close-quote}blockquote p:last-of-type:after{content:"\\201D";content:close-quote}blockquote q:before{content:"\2018";content:open-quote}blockquote q:after{content:"\2019";content:close-quote}blockquote{text-indent:-0.41em}blockquote p:last-of-type{margin-bottom:0}.source{display:block;text-indent:0}.source:before{content:"\2014"}pre{overflow:auto}pre mark{background:none;border-bottom:1px solid;color:inherit}.code-comment{opacity:0.75;filter:alpha(opacity=75)}.line-numbers{font-family:monospace, serif;list-style:decimal-leading-zero inside;white-space:nowrap;overflow:auto;margin-left:0}.line-numbers code{white-space:pre}img{max-width:100%}img[width],img[height]{max-width:none}.img--round{border-radius:4px}.img--right{float:right;margin-bottom:12px;margin-left:12px}.img--left{float:left;margin-right:12px;margin-bottom:12px}.img--center{display:block;margin-right:auto;margin-bottom:12px;margin-left:auto}figure>img{display:block}table{width:100%}th,td{padding:3px;text-align:left}@media screen and (min-width: 480px){th,td{padding:6px}}[colspan]{text-align:center}[colspan="1"]{text-align:left}[rowspan]{vertical-align:middle}[rowspan="1"]{vertical-align:top}.numerical{text-align:right}.table--bordered th,.table--bordered td{border:1px solid #999}.table--bordered th:empty,.table--bordered td:empty{border:none}.table--bordered thead tr:last-child th{border-bottom-width:2px}.table--bordered tbody tr th:last-of-type{border-right-width:2px}.table--striped tbody tr:nth-of-type(odd){background-color:#ffc}.table--data{font:12px/1.5 sans-serif}.form-row{vertical-align:top;margin-bottom:5px}.form-row:last-child{margin-bottom:4px}fieldset{padding:12px}label,.label{font-family:verdana, arial, san-serif;font-size:0.75em}.text-input,textarea{border:1px solid black}.text-input{height:26px}textarea{resize:none;overflow:auto;margin-bottom:2px}.check-list{list-style:none;margin:0}.check-list label,.check-list .label{display:inline-block}.extra-help{display:inline-block;visibility:hidden}.text-input:active+.extra-help,.text-input:focus+.extra-help{visibility:visible}.list--article-nav a,.main-menu a,.article--summary{-moz-transition:background-color 0.3s ease;-o-transition:background-color 0.3s ease;-webkit-transition:background-color 0.3s ease;transition:background-color 0.3s ease}.list--clean,.main-menu{list-style:none;margin:0}li>ul,li>ol{margin-bottom:0}a{color:#ae312f}a:hover,a:active{text-decoration:none}a:visited,a:focus{color:#c23734}small{font-size:0.625em}.outline-title,.skipNavigation,.screen-reader-text{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}blockquote{font-style:italic;margin-left:1em;color:#666}code{padding:5px 2px;padding:0.3125rem 0.125rem;background-color:#dedede;font-size:0.8125em}.code--block code{display:block;padding:15px 20px;padding:0.9375rem 1.25rem;border-left:5px solid #c5c5c5;word-wrap:break-word}@media screen and (min-width: 50em){.code--block code{border-left-width:10px}}.profile__image img{margin:0 auto;height:150px;height:9.375rem}@media screen and (min-width: 50em){.profile__image img{height:300px;height:18.75rem}}@-webkit-viewport{width:device-width}@-moz-viewport{width:device-width}@-ms-viewport{width:device-width}@-o-viewport{width:device-width}@viewport{width:device-width}.container{position:relative;width:90%;margin:0 auto}@media screen and (min-width: 50em){.container{width:86%}}.header{background-color:black;padding:10px 0;padding:0.625rem 0}.logo a{text-decoration:none;color:white}.logo .logo__img{float:left;display:block;margin-right:12px;max-width:50px;max-width:3.125rem}.logo .logo__title{margin-bottom:0;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-weight:normal;text-transform:uppercase;font-size:1.125em}@media screen and (min-width: 50em){.logo{float:left;width:25%}}.footer{padding:12px 0;padding:0.75rem 0;background-color:white}.footer small{display:block;text-align:center}@media screen and (min-width: 50em){.footer{padding:36px 0;padding:2.25rem 0}}.main{padding:12px 0;padding:0.75rem 0;background-color:#dad4c8}@media screen and (min-width: 50em){.main{padding:36px 0;padding:2.25rem 0}}.pagination{padding-top:20px;padding-top:1.25rem;border-top:1px solid white}.pagination__summary{text-transform:uppercase;text-align:center;font-size:0.75em}.row{overflow:hidden}@media screen and (min-width: 50em){.half{width:48%;float:left;margin-left:2%}.half:first-child{margin-left:0}}.is-hidden{display:none}.is-visible{display:block !important}.is-small{display:block}@media screen and (min-width: 50em){.is-small{display:none !important}}.is-small--inline{display:inline}@media screen and (min-width: 50em){.is-small--inline{display:none !important}}.is-large{display:none !important}@media screen and (min-width: 50em){.is-large{display:block}}.is-large--inline{display:none}@media screen and (min-width: 50em){.is-large--inline{display:inline}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0, 100%, 0);-moz-transform:translate3d(0, 100%, 0);-ms-transform:translate3d(0, 100%, 0);-o-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}100%{opacity:1;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0, 100%, 0);-moz-transform:translate3d(0, 100%, 0);-ms-transform:translate3d(0, 100%, 0);-o-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}100%{opacity:1;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@-o-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0, 100%, 0);-moz-transform:translate3d(0, 100%, 0);-ms-transform:translate3d(0, 100%, 0);-o-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}100%{opacity:1;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0, 100%, 0);-moz-transform:translate3d(0, 100%, 0);-ms-transform:translate3d(0, 100%, 0);-o-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}100%{opacity:1;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%, 0, 0);-moz-transform:translate3d(100%, 0, 0);-ms-transform:translate3d(100%, 0, 0);-o-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}100%{opacity:1;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}}@-moz-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%, 0, 0);-moz-transform:translate3d(100%, 0, 0);-ms-transform:translate3d(100%, 0, 0);-o-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}100%{opacity:1;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}}@-o-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%, 0, 0);-moz-transform:translate3d(100%, 0, 0);-ms-transform:translate3d(100%, 0, 0);-o-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}100%{opacity:1;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}}@keyframes fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%, 0, 0);-moz-transform:translate3d(100%, 0, 0);-ms-transform:translate3d(100%, 0, 0);-o-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0)}100%{opacity:1;-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}}.m-scene .scene_element{-webkit-animation-duration:0.25s;-moz-animation-duration:0.25s;-o-animation-duration:0.25s;animation-duration:0.25s;-webkit-transition-timing-function:ease-in;-moz-transition-timing-function:ease-in;-ms-transition-timing-function:ease-in;-o-transition-timing-function:ease-in;transition-timing-function:ease-in;-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both}.m-scene .scene_element--fadein{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn}.m-scene .scene_element--fadeinup{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp}.m-scene .scene_element--fadeinright{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight}.m-scene.is-exiting .scene_element{-webkit-animation-direction:alternate-reverse;-moz-animation-direction:alternate-reverse;-o-animation-direction:alternate-reverse;animation-direction:alternate-reverse}.list--inline li{display:inline-block;margin-left:5px;margin-left:0.3125rem}.list--stacked li{display:block}.list--pagination .prev{float:left}.list--pagination .prev a:before{content:"\00AB"}.list--pagination .next{float:right}.list--pagination .next a:after{content:"\00BB"}.list--article-nav li{display:inline}.list--article-nav .prev{float:left}.list--article-nav .next{float:right}@media screen and (min-width: 50em){.list--article-nav li{position:fixed;top:50%;background-color:black;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px}.list--article-nav a{padding:0 12px;padding:0 0.75rem;font-size:1.125em;line-height:1;text-decoration:none;color:#999}.list--article-nav a:hover{color:white}.list--article-nav .prev{left:10%}.list--article-nav .next{right:10%}}.media__image{float:left;margin-right:28px;margin-right:1.75rem}.media__image--rev{float:right;margin-left:28px;margin-left:1.75rem}.media__body{overflow:hidden}.nav{z-index:200;position:fixed;top:0;right:0;overflow:hidden;width:0%;background-color:#b8b8b8;height:100%;-moz-box-shadow:0px 0px 24px;-webkit-box-shadow:0px 0px 24px;box-shadow:0px 0px 24px;-moz-transition:width 0.3s ease;-o-transition:width 0.3s ease;-webkit-transition:width 0.3s ease;transition:width 0.3s ease}.nav:target{width:65.51724%}@media screen and (min-width: 50em){.nav{position:relative;height:auto;background:none;-moz-box-shadow:0px 0px 0px;-webkit-box-shadow:0px 0px 0px;box-shadow:0px 0px 0px}.nav,.nav:target{width:auto;float:right}}.main-menu li{border-top:thin solid #e4e4e4;border-bottom:thin solid #b1b1b1}.main-menu li:first-child{border-top:none}.main-menu li:last-child{border-bottom:none}.main-menu a{padding:12px;padding:0.75rem;display:block;text-decoration:none;text-transform:uppercase;font-size:0.875em;color:#222}.main-menu a:hover,.main-menu a:focus{font-weight:bold;background-color:#ae312f;color:white}@media screen and (min-width: 50em){.main-menu li{border:none;margin-left:-6px;margin-left:-0.375rem;display:inline-block;*display:inline;zoom:1}.main-menu li.first{margin-left:0}.main-menu li.last a{padding-right:0}.main-menu a{padding:6px;padding:0.375rem;padding-left:0;font-weight:bold;color:#999;-moz-transition:color 0.3s ease;-o-transition:color 0.3s ease;-webkit-transition:color 0.3s ease;transition:color 0.3s ease}.main-menu a:hover,.main-menu a:focus,.main-menu a.is-current-page{color:white;background:none}.main-menu a:before{content:"////// "}}.mobile-menu-btn{text-decoration:none;font-weight:bold;color:white}.mobile-menu-btn:hover,.mobile-menu-btn:focus,.mobile-menu-btn:visited{color:white}.mobile-menu-btn--open{float:right;margin-right:12px;margin-right:0.75rem;padding-top:5px;padding-top:0.3125rem;font-size:0.75em}.mobile-menu-btn--close{text-align:right}.video-wrapper{position:relative;padding-bottom:56.25%;padding-top:25px;height:0;margin-bottom:24px}.video-wrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.video-title{text-align:center}.page-heading__wrapper{padding:30px 0 20px;padding:1.875rem 0 1.25rem;background:url(/img/bgs/heading-bg2.png) top left repeat #ae312f;text-align:right;text-transform:uppercase;color:white}.page-heading__title{margin:0;font-family:"Arial Narrow",sans-serif;font-size:5em;text-shadow:4px 5px 0px black;line-height:1}.fonts-loaded .page-heading__title{font-family:"LeagueGothicReg","Arial Narrow",sans-serif}.page-heading__tagline{font-weight:bold;color:#dad4c8}.page-heading__tagline:before{content:"///// "}@media screen and (min-width: 50em){.page-heading__wrapper{padding:65px 0 50px;padding:4.0625rem 0 3.125rem}.fonts-loaded .page-heading__title{font-size:6.25em}}@media screen and (min-width: 50em){.article{width:70%;margin-left:auto;margin-right:auto}}.article__title{margin-bottom:0;text-transform:uppercase}.article__date{position:relative;display:inline;left:-5px;padding:0 5px;padding:0 0.3125rem;margin-bottom:10px;margin-bottom:0.625rem;font-size:0.75em;background-color:white}.article__intro{display:block;padding-bottom:30px;padding-bottom:1.875rem;margin-bottom:0;border-bottom:1px solid #999;line-height:1.4;font-size:1.5em;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-weight:bold;text-align:center;text-transform:uppercase}.article__content{font-family:Georgia,Times,"Times New Roman",serif}.article--summary{border-top:1px solid white;border-bottom:1px solid #999;padding:30px 20px 20px;padding:1.875rem 1.25rem 1.25rem}.article--summary:first-child{border-top:none}.article--summary:last-child{border-bottom:none}.article--summary:hover,.article--summary:focus{background-color:#c5bcaa}.article--summary a{color:#222;text-decoration:none}.article--full .article__content{border-top:1px solid whitesmoke;padding-top:20px;padding-top:1.25rem}.article--full .article__content figure>img{margin:0 auto}.article--full .article__content figcaption{text-align:center}@media screen and (min-width: 50em){.article--full .article__content{padding-top:60px;padding-top:3.75rem}}.blurb{margin-bottom:15px;margin-bottom:0.9375rem;border-bottom:1px solid #999}.blurb__content{font-size:0.875em}.blurb__headshot{padding:10px 0;padding:0.625rem 0}@media screen and (min-width: 50em){.blurb{width:38%;margin-left:auto;margin-right:auto;padding-bottom:15px;padding-bottom:0.9375rem}.blurb__headshot{padding:0}.blurb__content{padding:10px 0;padding:0.625rem 0}.blurb__content p{margin:0;line-height:1.2}}.panel{text-align:center}.panel>li{width:48%;margin:0 10px 20px 0;margin:0 0.625rem 1.25rem 0;padding-bottom:20px;padding-bottom:1.25rem;vertical-align:top}.panel .panel__title{text-transform:capitalize}@media screen and (min-width: 49.9375em){.panel>li{width:32.333334%}.panel>li:nth-child(3n){margin-right:0}}@media screen and (min-width: 75em){.panel>li{width:24%}.panel>li:nth-child(3n){margin-right:10px;margin-right:0.625rem}.panel>li:nth-child(4n){margin-right:0}} \ No newline at end of file diff --git a/css/style.css.gz b/css/style.css.gz deleted file mode 100644 index 0b240aa..0000000 Binary files a/css/style.css.gz and /dev/null differ diff --git a/feed.xml b/feed.xml deleted file mode 100644 index d1cf309..0000000 --- a/feed.xml +++ /dev/null @@ -1,436 +0,0 @@ - - - Sharper in Digital - Thoughts and findings of a Front End Developer - http://tgdev.github.io/blog - - - 2014-01-20T13:00:00Z - - Tom Gillard - - - Battle of the Sasses - - http://tgdev.github.io/blog/2014-01-21-ruby-sass-vs-node-sass/ - 2014-01-20T13:00:00Z - 2015-04-02T11:59:48+11:00 - <p><a href="http://libsass.org/">Libsass</a> is a C port of the original Sass engine to offer the power of Sass without being tied to Ruby.</p> - -<p>Now I work in Windows and Ruby can be a bit of a pain so I’m more than keen to give the new kid on the block a go.</p> - -<p>What I’m going to do is create two test projects using the <a href="http://inuitcss.com">inuit css framework</a> with their own gruntfile but each gruntfile will be different.</p> - -<p>Project 1 will have the ruby Sass grunt task while Project 2 will use the newer, faster Libsass with Node-sass and Grunt-Sass.</p> - -<p>Ben Frain has a great article on <a href="http://benfrain.com/lightning-fast-sass-compiling-with-libsass-node-sass-and-grunt-sass/">getting up and running with libsass, node-sass and grunt-sass</a>.</p> - -<h2 id="the-setup">The setup</h2> - -<p>Let’s take a look at each project’s <code>package.json</code> file to compare.</p> - -<div class="row"> -<div class="half"> -<p><strong>Project 1</strong></p> -<pre class="code--block"> -<code>{ - "name": "project-1", - "version": "0.5.0", - "dependencies": {}, - "devDependencies": { - "grunt": "~0.4.1", - "load-grunt-tasks": "~0.2.0", - "time-grunt": "~0.1.1", - "grunt-contrib-watch": "~0.4.3", - "grunt-contrib-sass": "latest" - }, - "engines": { - "node": "&gt;=0.8.0" - } -} -</code> -</pre> -</div> -<div class="half"> -<p><strong>Project 2</strong></p> -<pre class="code--block"> -<code>{ - "name": "project-1", - "version": "0.5.0", - "dependencies": {}, - "devDependencies": { - "grunt": "~0.4.1", - "load-grunt-tasks": "~0.2.0", - "time-grunt": "~0.1.1", - "grunt-contrib-watch": "~0.4.3", - "grunt-sass": "0.6.1" - }, - "engines": { - "node": "&gt;=0.8.0" - } -} -</code> -</pre> -</div> -</div> - -<p>There’s only one main difference between the two projects and that is the grunt package for Sass.</p> - -<h2 id="the-test">The test</h2> -<p>After running <code>npm install</code> so as to install all our grunt packages from our <code>package.json</code> file, we’ll run the <code>grunt</code> command which looks like this in <code>gruntfile.js</code>.</p> - -<pre class="code--block"><code>grunt.registerTask('default', ['sass', 'watch']); -</code></pre> - -<p>This simply compiles our Sass partial files from inuit into style.css and then watches said Sass files for any changes.</p> - -<p>Making a quick little change to one of our Sass files (like changing the background colour on the body) and saving that change triggers the grunt watch task to kick in and…</p> - -<h2 id="the-results">The results</h2> -<p>As we can see from the image below, the Node Sass task, which uses libsass, is indeed much faster than the native Ruby based Sass task.</p> - -<figure> - <img src="/img/posts/2014/sass-test.png" alt="Test results: Ruby Sass - 2.645 seconds. Libsass - 1 second." /> - <figcaption> - <small>Top: Ruby Sass completion time. Bottom: Libsass completion time</small> - </figcaption> -</figure> - -<h2 id="soooooo">Soooooo…</h2> - -<p>I know this is a pretty light on example but imagine you’re working on a large scale site with multiple Sass modules and even styles for various plugins, not to mention running multiple grunt tasks - you’re gonna love the extra time savings.</p> - -<p>Plus, with support for sourcemaps being added to Libsass in the last month, there’s not much of a reason to continue waiting around for the native Ruby Sass grunt task to drag it’s knuckles into CSS pre-compilation.</p> - -<p>We’re all far too busy for that right?</p> - -<p>T</p> - -<p><small><em>NOTE: If you use Compass, which Libsass still does not support, checkout the <a href="https://github.com/nDmitry/grunt-autoprefixer">autoprefixer grunt task</a> that uses the <a href="http://caniuse.com/">Can I Use</a> database.</em></small></p> - - - - Social media meta - - http://tgdev.github.io/blog/2014-01-11-social-media-meta-tags/ - 2014-01-10T13:00:00Z - 2015-04-02T11:59:48+11:00 - <p>With so many people using social media these days, it seems only logical to include the snippets below on all of our sites.</p> - -<h2 id="facebook-open-graph">Facebook Open Graph</h2> - -<p>These are probably the most commonly known and you’ve probably used these once or twice before.</p> - -<pre class="code--block"><code>&lt;!-- Facebook Open Graph tags --&gt; -&lt;meta property="og:image" content="" /&gt; -&lt;meta property="og:site_name" content="" /&gt; -&lt;meta property="og:type" content="" /&gt; -&lt;meta property="og:url" content="" /&gt; -&lt;meta property="og:title" content="" /&gt; -</code></pre> - -<p>More details of Facebook’s OpenGraph tags/options can be found on <a href="http://davidwalsh.name/facebook-meta-tags">David Walsh’s Blog</a></p> - -<h2 id="twitter-cards">Twitter Cards</h2> -<p>These are a little newer and there is a LOT you can include (links to mobile apps, product details, etc) so make sure you check out the docs via the link below.</p> - -<pre class="code--block"><code>&lt;!-- Twitter Card --&gt; -&lt;meta name="twitter:card" content="summary" /&gt; -&lt;meta name="twitter:creator" content=""&gt; -&lt;meta name="twitter:url" content="" /&gt; -&lt;meta name="twitter:title" content="" /&gt; -&lt;meta name="twitter:description" content="" /&gt; -&lt;meta name="twitter:image:src" content="" /&gt; -</code></pre> - -<p>More details of Twitter’s Card tags/options can be found in their <a href="https://dev.twitter.com/docs/cards">development docs</a></p> - -<h2 id="rich-pins">Rich Pins</h2> -<p>Possibly the newest kid on the block launching in 2013, these can also include alot of content when somebody pins something from your site. They type property determines what additional meta data you can share so check out the link to the docs below.</p> - -<pre class="code--block"><code>&lt;!-- Pintrest Rich Pins --&gt; -&lt;meta property="og:title" content="" /&gt; -&lt;meta property="og:description" content="" /&gt; -&lt;meta property="og:type" content="" /&gt; -&lt;meta property="og:url" content="" /&gt; -&lt;meta property="og:image" content="" /&gt; -&lt;meta property="og:site_name" content="" /&gt; -</code></pre> - -<p>More details of Pinterest’s Rich Pins tags/options can be found in their <a href="http://developers.pinterest.com/rich_pins/">development docs</a></p> - -<h2 id="putting-it-all-together">Putting it all together</h2> -<p>An example site for a business selling shoes, with the page template based on a watered down version of the HTML5 boilerplate, could look something like this;</p> - -<pre class="code--block"><code>&lt;!DOCTYPE html&gt; -&lt;html class="no-js"&gt; - &lt;head&gt; - &lt;meta charset="utf-8" /&gt; - &lt;title&gt;Social Meta Tag Example&lt;/title&gt; - &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; - &lt;link rel="stylesheet" href="css/style.css"&gt; - &lt;script src="js/vendor/modernizr-2.7.1.min.js"&gt;&lt;/script&gt; - - &lt;!-- Facebook Open Graph tags --&gt; - &lt;meta property="og:image" content="http://shop.example.com/images/store/SA-001.jpg" /&gt; - &lt;meta property="og:site_name" content="Example Store" /&gt; - &lt;meta property="og:type" content="product" /&gt; - &lt;meta property="og:url" content="http://shop.example.com/product/SA-001" /&gt; - &lt;meta property="og:title" content="Reebok Shaq Attaq" /&gt; - - &lt;!-- Twitter Card --&gt; - &lt;meta name="twitter:card" content="product" /&gt; - &lt;meta name="twitter:creator" content="@exampleStore"&gt; - &lt;meta name="twitter:url" content="http://shop.example.com/product/SA-001" /&gt; - &lt;meta name="twitter:title" content="Reebok Shaq Attaq" /&gt; - &lt;meta name="twitter:description" content="Limited edition Shaquille O'neil basketball shoes." /&gt; - &lt;meta name="twitter:image:src" content="http://shop.example.com/images/store/SA-001.jpg" /&gt; - - &lt;!-- Pintrest Rich Pin --&gt; - &lt;meta property="og:title" content="Reebok Shaq Attaq" /&gt; - &lt;meta property="og:description" content="Limited edition Shaquille O'neil basketball shoes." /&gt; - &lt;meta property="og:url" content="http://shop.example.com/product/SA-001" /&gt; - &lt;meta property="og:image" content="http://shop.example.com/images/store/SA-001.jpg" /&gt; - &lt;meta property="og:site_name" content="Example Store" /&gt; - &lt;meta property="og:price:amount" content="119.00" /&gt; - &lt;meta property="og:price:standard_amount" content="159.00" /&gt; - &lt;meta property="og:price:currency" content="USD" /&gt; - &lt;meta property="og:availability" content="instock" /&gt; - &lt;meta property="og:see_also" content="http://shop.example.com/product/SA-001" /&gt; - &lt;meta property="og:rating" content="4.5" /&gt; - &lt;meta property="og:rating_scale" content="5" /&gt; - &lt;meta property="og:rating_count" content="33" /&gt; - &lt;meta property="product:gender" content="Men" /&gt; - &lt;meta property="product:color" content="White and Blue" /&gt; - &lt;/head&gt; - &lt;body&gt; - - &lt;p&gt;Hello world! This is HTML5 Boilerplate with social sharing meta tags.&lt;/p&gt; - - &lt;/body&gt; -&lt;/html&gt; -</code></pre> - -<p>You can also download or copy the bare bones <a href="https://gist.github.com/tgdev/8365308">Gist</a></p> - -<p>So get adding and start sharing!</p> - -<p>T</p> - - - - Resolution &#35;9 - - http://tgdev.github.io/blog/2014-01-01-resolution-9/ - 2013-12-31T13:00:00Z - 2015-04-02T11:59:48+11:00 - <p>It’s really quite simple: do more.</p> - -<p>I feel the need to participate and put myself out there more than I have in the past.</p> - -<p>To quote weezer:</p> - -<blockquote> - <p>I don’t wanna be an old man anymore / -It’s been a year or two since I was out on the floor / -Shakin’ booty, makin’ sweet love all the night / -It’s time I got back to the Good Life / -It’s time I got back, it’s time I got back / -And I don’t even know how I got off the track / -I wanna go back…Yeah!</p> -</blockquote> - -<p>So that means more;</p> - -<ul> - <li>blogging</li> - <li>reading</li> - <li>basketball</li> - <li>travel</li> - <li>time with friends</li> - <li>learning new skills</li> - <li>challenging myself</li> -</ul> - -<p>Hopefully this blog will help achieve a lot of the above.</p> - -<p>Happy new year!</p> - -<p>T</p> - - - - Page Alive! - - http://tgdev.github.io/blog/2013-12-31-page-alive/ - 2013-12-30T13:00:00Z - 2015-04-02T11:59:48+11:00 - <p>I first stumbled across <a href="http://middlemanapp.com/basics/dynamic-pages/">Middleman’s dynamic pages</a> feature on a freelance project I was working on for a friend of mine. The site was for a local event manager who wanted to showcase several (I think it was about 10) of their most recent events.</p> - -<p>Now I’m not a huge fan of manual coding and always look for ways to automate or reuse code so I really didn’t want to have to manually create all those pages.</p> - -<p>Unfortunately the Middleman demo is a little basic for what I needed but luckily for me with a bit of digging and some communication back and forth with one of Middleman’s contributors, <a href="http://benhollis.net/about/">Ben Hollis</a>, I discovered the true power of dynamic pages.</p> - -<p>Like I mentioned in the intro, all you need is 3 key ingredients; a data file, a template and a couple of lines in your <code>config.rb</code> file.</p> - -<p>Here’s how I have implemented it.</p> - -<h2 id="data-file">1. Data file</h2> -<p>On the same level as my source (and eventually build) directories I created a <code>data</code> directory. Within my newly created data directory I created a new YAML file called <code>projects.yml</code> (Middleman also supports JSON data).</p> - -<p>This YAML file contained all the data properties of a project and was to be used for looping through and outputting each project’s details into a template.</p> - -<p>Let’s say each project has a client, title, description and list of event manager’s responsibilities.</p> - -<p>Our <code>projects.yml</code> file looks something like this;</p> - -<pre class="code--block"><code> - client: client1 - title: "First project" - description: "This is a description of the 1st project." - responsibilities: - "&lt;li&gt;catering&lt;/li&gt; - &lt;li&gt;venue management&lt;/li&gt; - &lt;li&gt;event staffing&lt;/li&gt;" - - - client: client2 - title: "Second project" - description: "This is a description of the 2nd project." - responsibilities: - "&lt;li&gt;catering&lt;/li&gt;" -</code></pre> - -<h2 id="template">2. Template</h2> -<p>In my project (within the source directory) I created a new directory called <code>projects</code> (as this is what I was going to be displaying). Inside the projects directory I created <code>template.html.erb</code>. This file is to be referenced in <code>config.rb</code> as the template to use for generating the individual project pages.</p> - -<p>The template looks like this;</p> - -<pre class="code--block"><code>&lt;% p = locals[:project] %&gt; -&lt;div class="l-wrapper"&gt; - &lt;div class="l-content"&gt; - &lt;h2&gt;&lt;%= p[:title] %&gt;&lt;/h2&gt; - &lt;%= p[:description] %&gt; - &lt;p class="highlight"&gt;Key responsibilities:&lt;/p&gt; - &lt;ul class="itemised-list"&gt; - &lt;%= p[:responsibilities] %&gt; - &lt;/ul&gt; - &lt;/div&gt; -&lt;/div&gt; -</code></pre> - -<p>Don’t worry about the <code>&lt;% p = locals[:project] %&gt;</code> at the top of the file, locals[:project] is defined in <code>config.rb</code> and will be explained in the next section.</p> - -<p>‘p’ stores the project data object and is then used to access each property of the project such as title, description and the list of responsibilities.</p> - -<h2 id="configuration">3. Configuration</h2> -<p>The final piece of the puzzle lies in the <code>config.rb</code> file with this block;</p> - -<pre class="code--block"><code>data.projects.each do |pd| - proxy "/projects/#{pd[:client]}.html", "/projects/template.html", :layout =&gt; :popup, :locals =&gt; { :project =&gt; pd }, :ignore =&gt; true -end -</code></pre> - -<p>What this block is doing is as follows;</p> - -<p><strong>data.projects.each do |pd|</strong> is looping through each project item in <code>projects.yml</code></p> - -<p><strong>proxy</strong> is creating a dummy url using the client property of the project item within <code>projects.yml</code> and is being passed the template file in the projects directory. eg: “www.site.com/projects/client1.html”</p> - -<p><strong>layout</strong> is pointing to a custom layout which resides in the <code>layouts</code> directory and is different from the standard site layout.</p> - -<p><em>You can also set layout to false if your template has all the html in it (rather than using partial includes)</em></p> - -<p><strong>locals</strong> is what passes the data in <code>project.yml</code> to the template (remember p = locals[:projects])</p> - -<p><strong>ignore</strong> tells middleman not to create a html file for template.html.erb as we only want html files for each of the projects.</p> - -<p>So once that’s all setup all you need to do is fire up middleman server and test it out by going to; http://localhost:4567/projects/client1.html</p> - -<p>This really is a handy feature and you can get pretty creative with what you store in your data files and how you render that data in the template. Also, remember if you’re not too keen on YAML, Middleman also supports JSON.</p> - -<p>So go nuts and start adding dynamic pages to your not-so-static Middleman site!</p> - -<p>T</p> - - - - Page by numbers - - http://tgdev.github.io/blog/2013-12-30-page-by-numbers/ - 2013-12-29T13:00:00Z - 2015-04-02T11:59:48+11:00 - <h2 id="configuration">Configuration.</h2> - -<p>Inside the <code>activate:blog do |blog|</code> block of my <code>config.rb</code> file, I added the following pagination settings;</p> - -<pre class="code--block"><code>blog.paginate = true -blog.page_link = "page:num" -blog.per_page = 5 -</code></pre> - -<p>Although they’re pretty straight forward, demos and explainations of the above settings can be found in the <a href="http://middlemanapp.com/basics/blogging/#toc_10">Middleman docs</a>.</p> - -<h2 id="template">Template.</h2> - -<p>This is where I had a little difficulty.</p> - -<p>In order for pagnination to work after setting up pagination in <code>config.rb</code>, I needed to add in a little frontmatter tag to the top of the template I wanted to paginate. This is very important. Forget to include this and the rest of the code is useless.</p> - -<pre class="code--block"><code>--- -pageable: true ---- -</code></pre> - -<p>Add this to the top of any template you want to use pagination on. The homepage of my site is the only place I require any pagination for the time being so I added this to top of the <code>index.html.erb</code> file in the root of my site.</p> - -<p>This essentially tells middleman that we want to split up the contents of this site into manageable pages. Middleman then uses the settings in your <code>config.rb</code> file to figure out how many items per page.</p> - -<h3 id="show-me-the-pages">Show me the pages</h3> -<p>So after configuring and enabling pagination on my site I needed to output the markup. I opted for a fairly simple pagination pattern that shows “Articles X to Y of Z” with next (newer) and previous (older) navigation. To do this I needed to use some of Middleman’s built-in pagination variables;</p> - -<ul> - <li>page_start</li> - <li>page_end</li> - <li>prev_page</li> - <li>prev_page.url</li> - <li>next_page</li> - <li>next_page.url</li> -</ul> - -<p>The final code snippet looks like this;</p> - -<pre class="code--block"><code>&lt;div class="article pagination"&gt; - &lt;p class="pagination__summary"&gt;Articles &lt;%= page_start %&gt; to &lt;%= page_end %&gt; of &lt;%= articles.length %&gt;&lt;/p&gt; - &lt;ul class="list--clean list--pagination"&gt; - &lt;% if prev_page %&gt; - &lt;li class="prev"&gt; - &lt;a href="&lt;%= prev_page.url %&gt;"&gt;Older articles&lt;/a&gt; - &lt;/li&gt; - &lt;% end %&gt; - &lt;% if next_page %&gt; - &lt;li class="next"&gt; - &lt;a href="&lt;%= next_page.url %&gt;"&gt;Newer articles&lt;/a&gt; - &lt;/li&gt; - &lt;% end %&gt; - &lt;/ul&gt; -&lt;/div&gt; -</code></pre> - -<p>So there you have it, pagination on a static site thanks to Middleman. Hopefully that helps clear things up for some people looking to achieve the same or a similar result.</p> - -<p>T</p> - - - - The bells and the whistles - - http://tgdev.github.io/blog/2013-12-29-the-bells-and-the-whistles/ - 2013-12-28T13:00:00Z - 2015-04-02T11:59:48+11:00 - <p>The <a href="http://middlemanapp.com/basics/blogging/">Middleman docs on blogging</a> have a lot of great info to get you started with building your own blog using middleman but if you want more of a step by step how-to, <a href="http://designbyjoel.com/">Design by Joel</a> has a really great article on <a href="http://designbyjoel.com/blog/2012-10-20-building-a-blog-in-middleman/">building a blog in middleman</a>.</p> - -<p>Enjoy!</p> - -<p>T</p> - - - diff --git a/index.html b/index.html deleted file mode 100644 index 8cd12bb..0000000 --- a/index.html +++ /dev/null @@ -1,16 +0,0 @@ - Blog | Tom Gillard - Melbourne front end web developer Skip to main content

Sharper in Digital

Thoughts and findings of a front end developer

\ No newline at end of file diff --git a/index.html.gz b/index.html.gz deleted file mode 100644 index e15104e..0000000 Binary files a/index.html.gz and /dev/null differ diff --git a/js/libs/html5shiv.js b/js/libs/html5shiv.js deleted file mode 100644 index b658f10..0000000 --- a/js/libs/html5shiv.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){function n(){var e=g.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=f[e[h]];return t||(t={},d++,e[h]=d,f[d]=t),t}function a(e,n,a){return n||(n=t),l?n.createElement(e):(a||(a=r(n)),n=a.cache[e]?a.cache[e].cloneNode():u.test(e)?(a.cache[e]=a.createElem(e)).cloneNode():a.createElem(e),n.canHaveChildren&&!m.test(e)?a.frag.appendChild(n):n)}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return g.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(g,t.frag)}function o(e){e||(e=t);var n=r(e);if(g.shivCSS&&!i&&!n.hasCSS){var a,o=e;a=o.createElement("p"),o=o.getElementsByTagName("head")[0]||o.documentElement,a.innerHTML="x",a=o.insertBefore(a.lastChild,o.firstChild),n.hasCSS=!!a}return l||c(e,n),e}var i,l,s=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",d=0,f={};!function(){try{var e=t.createElement("a");e.innerHTML="",i="hidden"in e;var n;if(!(n=1==e.childNodes.length)){t.createElement("a");var r=t.createDocumentFragment();n="undefined"==typeof r.cloneNode||"undefined"==typeof r.createDocumentFragment||"undefined"==typeof r.createElement}l=n}catch(a){l=i=!0}}();var g={elements:s.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==s.shivCSS,supportsUnknownElements:l,shivMethods:!1!==s.shivMethods,type:"default",shivDocument:o,createElement:a,createDocumentFragment:function(e,a){if(e||(e=t),l)return e.createDocumentFragment();for(var a=a||r(e),c=a.frag.cloneNode(),o=0,i=n(),s=i.length;s>o;o++)c.createElement(i[o]);return c}};e.html5=g,o(t)}(this,document); \ No newline at end of file diff --git a/js/libs/html5shiv.js.gz b/js/libs/html5shiv.js.gz deleted file mode 100644 index 2a2d5d4..0000000 Binary files a/js/libs/html5shiv.js.gz and /dev/null differ diff --git a/js/site-scripts.js b/js/site-scripts.js deleted file mode 100644 index ef38476..0000000 --- a/js/site-scripts.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * jQuery JavaScript Library v1.11.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-09-28T01:23Z - */ -!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=it.type(e);return"function"===n||it.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(it.isFunction(t))return it.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return it.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ft.test(t))return it.filter(t,e,n);t=it.filter(t,e)}return it.grep(e,function(e){return it.inArray(e,t)>=0!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=xt[e]={};return it.each(e.match(bt)||[],function(e,n){t[n]=!0}),t}function a(){ht.addEventListener?(ht.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(ht.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ht.addEventListener||"load"===event.type||"complete"===ht.readyState)&&(a(),it.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(Nt,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Et.test(n)?it.parseJSON(n):n}catch(i){}it.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!it.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(it.acceptData(e)){var i,o,a=it.expando,s=e.nodeType,l=s?it.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=Q.pop()||it.guid++:a),l[u]||(l[u]=s?{}:{toJSON:it.noop}),("object"==typeof t||"function"==typeof t)&&(r?l[u]=it.extend(l[u],t):l[u].data=it.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[it.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[it.camelCase(t)])):i=o,i}}function d(e,t,n){if(it.acceptData(e)){var r,i,o=e.nodeType,a=o?it.cache:e,s=o?e[it.expando]:it.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){it.isArray(t)?t=t.concat(it.map(t,it.camelCase)):t in r?t=[t]:(t=it.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!it.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?it.cleanData([e],!0):nt.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function f(){return!0}function p(){return!1}function h(){try{return ht.activeElement}catch(e){}}function m(e){var t=Mt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==Ct?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==Ct?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||it.nodeName(r,t)?o.push(r):it.merge(o,g(r,t));return void 0===t||t&&it.nodeName(e,t)?it.merge([e],o):o}function v(e){Dt.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return it.nodeName(e,"table")&&it.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==it.find.attr(e,"type"))+"/"+e.type,e}function x(e){var t=Vt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){for(var n,r=0;null!=(n=e[r]);r++)it._data(n,"globalEval",!t||it._data(t[r],"globalEval"))}function T(e,t){if(1===t.nodeType&&it.hasData(e)){var n,r,i,o=it._data(e),a=it._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)it.event.add(t,n,s[n][r])}a.data&&(a.data=it.extend({},a.data))}}function C(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!nt.noCloneEvent&&t[it.expando]){i=it._data(t);for(r in i.events)it.removeEvent(t,r,i.handle);t.removeAttribute(it.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,x(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),nt.html5Clone&&e.innerHTML&&!it.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Dt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function E(t,n){var r,i=it(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:it.css(i[0],"display");return i.detach(),o}function N(e){var t=ht,n=Zt[e];return n||(n=E(e,t),"none"!==n&&n||(Kt=(Kt||it(" + + +

15 x Squat Jumps

+
+ +
+ +

15 x Single Leg Ventral Hops (on each leg)

+
+ +
+ +

15 x Burpees - L2

+
+ +
+ +

15 x Lateral Jumps - L2

+
+ +
+ +

15 x Jumping Lunges (alternating)

+
+ +
+ +

15 x Agility Dots - L2 (each leg)

+
+ +
+ +

15 x Mountain Climbers - L2

+
+ +
+ +

Repeat 2 - 3 times before cool down

+ + + + \ No newline at end of file diff --git a/workout/index.html b/workout/index.html deleted file mode 100644 index 946ded6..0000000 --- a/workout/index.html +++ /dev/null @@ -1,16 +0,0 @@ - Speed & Agility Workout | Tom Gillard - Melbourne front end web developer Skip to main content

Speed & Agility Workout

A fitness workout from Fitness blender to help train for basketball

The following videos are part of a workout put together by Fitness Blender to help improve speed and agility.

How to:

  1. Start with 15 minutes of cardio to warm the muscles and help prevent injury and strains.
  2. Do each exercise for the set number of reps. Make sure to repeat on both sides of the body where necessary.
  3. Do the entire workout 2 to 3 times through
  4. Stretch thoroughly.

15 x Single Leg Lateral Hops (on each leg)

15 x Squat Jumps

15 x Single Leg Ventral Hops (on each leg)

15 x Burpees - L2

15 x Lateral Jumps - L2

15 x Jumping Lunges (alternating)

15 x Agility Dots - L2 (each leg)

15 x Mountain Climbers - L2

Repeat 2 - 3 times before cool down

\ No newline at end of file diff --git a/workout/index.html.gz b/workout/index.html.gz deleted file mode 100644 index 265303c..0000000 Binary files a/workout/index.html.gz and /dev/null differ