Skip to content

Commit

Permalink
Changed 'tags' to 'categories'
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronD17 committed Dec 14, 2016
1 parent 91c557c commit ee4bdee
Show file tree
Hide file tree
Showing 51 changed files with 234 additions and 236 deletions.
40 changes: 20 additions & 20 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h1>
</h1>
<div class="post-details intro-text">
{{ page.date | date: "%d %B %Y" }} | <abbr title="{{ page.content | number_of_words }} words">{{ wordcount | divided_by: 200 | plus: 1 }} min{% if wordcount > 200 %}s{% endif %}</abbr><br />
{% for tag in page.tags %}
<a href="{{ site.baseurl }}/#{{tag}}">{{tag}}{% if tag == "charlie" %} <i class="fa fa-paw fa-fw"></i>{% endif %}</a>{% unless post.tags.size == 1 %}{% if forloop.rindex0 == 1 %} &{% elsif forloop.last == false %}, {% endif %}{% endunless %}
{% for category in page.categories %}
<a href="{{ site.baseurl }}/#{{category}}">{{category}}{% if category == "charlie" %} <i class="fa fa-paw fa-fw"></i>{% endif %}</a>{% unless post.categories.size == 1 %}{% if forloop.rindex0 == 1 %} &{% elsif forloop.last == false %}, {% endif %}{% endunless %}
{% endfor %}
</div>
</div>
Expand All @@ -39,8 +39,8 @@ <h1>
<section class="content-section">
<div class="container">
<div class="col-lg-10 col-lg-offset-1">
{% for tag in page.tags %}
{% if tag == "projects" %}
{% for category in page.categories %}
{% if category == "projects" %}
{% capture now %}{{'now' | date: '%s'}}{% endcapture %}
{% capture posted %}{{page.date | date: '%s'}}{% endcapture %}
{% assign diff = now | minus: posted %}
Expand All @@ -54,10 +54,10 @@ <h1>
{% endif %}
{% endfor %}
{{ content }}
{% for tag in page.tags %}
{% if tag == "charlie" %}
{% for category in page.categories %}
{% if category == "charlie" %}
<blockquote>
<p><em><a href="https://www.instagram.com/charlie.border.collie">Charlie is on Instagram as charlie.border.collie, if you would like to see more pictures of him.</a></em></p>
<p><em><a href="https://www.inscategoryram.com/charlie.border.collie">Charlie is on Inscategoryram as charlie.border.collie, if you would like to see more pictures of him.</a></em></p>
</blockquote>
{% endif %}
{% endfor %}
Expand All @@ -66,8 +66,8 @@ <h1>
</section>

{% assign otherposts = false %}
{% for tag in page.tags %}
{% assign postsWithTag = site.tags[tag] | size %}
{% for category in page.categories %}
{% assign postsWithTag = site.categories[category] | size %}
{% if postsWithTag != 1 %}
{% assign otherposts = true %}
{% endif %}
Expand All @@ -77,27 +77,27 @@ <h1>
<section class="content-section text-center">
<div class="container">
<div class="col-lg-10 col-lg-offset-1">
{% assign pagetags = page.tags.size %}
{% for tag in page.tags %}
{% assign pagecategories = page.categories.size %}
{% for category in page.categories %}
{% assign postCount = 0 %}
{% for post in site.tags[tag] %}
{% for post in site.categories[category] %}
{% assign postCount = postCount | plus: 1 %}
{% endfor %}
{% if postCount == 1 %}
{% assign pagetags = pagetags | minus: 1 %}
{% assign pagecategories = pagecategories | minus: 1 %}
{% endif %}
{% endfor %}

{% for tag in page.tags %}
{% assign postsWithTag = site.tags[tag] | size %}
{% for category in page.categories %}
{% assign postsWithTag = site.categories[category] | size %}
{% if postsWithTag > 1 %}
{% if pagetags == 2 %}<div class="col-lg-6">{% elsif pagetags == 3 %}<div class="col-lg-4">{% endif %}
<h3>Recent "{{ tag }}" posts</h3>
{% if pagecategories == 2 %}<div class="col-lg-6">{% elsif pagecategories == 3 %}<div class="col-lg-4">{% endif %}
<h3>Recent "{{ category }}" posts</h3>
<div class="post-divider"></div>
<table class="table posts">
{% assign postCounter = 0 %}
{% assign maxPosts = 3 %}
{% for post in site.tags[tag] %}
{% for post in site.categories[category] %}
{% if post.title != page.title %}
{% assign postCounter = postCounter | plus: 1 %}
<tbody class="archive-excerpt">
Expand All @@ -115,10 +115,10 @@ <h3>Recent "{{ tag }}" posts</h3>
</table>
{% if postsWithTag > maxPosts %}
<h4>
<a href="{{ site.baseurl }}/#{{tag}}">More "{{ tag }}{% if tag == "charlie" %} <i class="fa fa-paw fa-fw"></i>{% endif %}" posts</a>
<a href="{{ site.baseurl }}/#{{category}}">More "{{ category }}{% if category == "charlie" %} <i class="fa fa-paw fa-fw"></i>{% endif %}" posts</a>
</h4>
{% endif %}
{% if pagetags != 1 %}</div>{% endif %}
{% if pagecategories != 1 %}</div>{% endif %}
{% endif %}
{% endfor %}
</div>
Expand Down
8 changes: 4 additions & 4 deletions _posts/2015-11-30-test-post-please-ignore.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Test post, please ignore"
date: 2015-11-30 13:00:00 +0000
tags: blog
layout: post
title: "Test post, please ignore"
date: 2015-11-30 13:00:00 +0000
categories: blog
---
So. Blogging. Historically, not something I've ever been very good at. I always enjoyed building the blog or writing the code more than filling the pages with beautiful prose. Hey, that was almost Seuss-like!

Expand Down
8 changes: 4 additions & 4 deletions _posts/2015-12-10-beginning.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Beginning"
date: 2015-12-10 10:00:00 +0000
tags: blog
layout: post
title: "Beginning"
date: 2015-12-10 10:00:00 +0000
categories: blog
---
It's been a slow couple of weeks at work. I had originally anticipated the development of this blog to take one or two months, maybe an hour or so every couple of nights, given that I've never tried it before, and I've never used any of the languages involved. But here we are, about 90% done before Christmas!

Expand Down
8 changes: 4 additions & 4 deletions _posts/2015-12-18-audience.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Audience"
date: 2015-12-18 10:00:00 +0000
tags: blog
layout: post
title: "Audience"
date: 2015-12-18 10:00:00 +0000
categories: blog
---
Writing has always been an odd subject for me. It's an integral part of life, even if it's just in the form of emails or texts, it's something you do without even really stopping to consider just how much you actually do.

Expand Down
8 changes: 4 additions & 4 deletions _posts/2015-12-26-retrospection.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Retrospection"
date: 2015-12-26 15:00:00 +0000
tags: personal
layout: post
title: "Retrospection"
date: 2015-12-26 15:00:00 +0000
categories: personal
---
In a similar vein to birthdays, the worst part about a new year is the realisation that you're getting old. Or maybe when you're old enough to realise that, it's already too late? Damn, I sure hope that's not the case.

Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-01-03-prognostications.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Prognostications"
date: 2016-01-03 14:00:00 +0000
tags: personal
layout: post
title: "Prognostications"
date: 2016-01-03 14:00:00 +0000
categories: personal
---

I awoke in time to watch the day break this morning. Since then, there's been a cold winter sun shining down over Edinburgh, releasing a beautiful backdrop for deep and insightful thoughts. I'm writing next to my window; the clouds are drifting lazily by, casting long, languid shadows across the hedgerow outside. There are better views, admittedly, but it's calming to watch the skies from pretty much anywhere.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-01-11-unfocused.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Unfocused"
date: 2016-01-11 15:00:00 +0000
tags: productivity
layout: post
title: "Unfocused"
date: 2016-01-11 15:00:00 +0000
categories: productivity
---

I am the worst person in the world when it comes to procrastination. Combined with a short attention span, it's a wonder I ever get anything done. Even right now, I have Netflix playing in the background, and I've rewritten this sentence three times already because I can't concentrate without looking up every five seconds. Damn.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-01-29-change.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Change"
date: 2016-01-29 11:00:00 +0000
tags: personal
layout: post
title: "Change"
date: 2016-01-29 11:00:00 +0000
categories: personal
---

When you're a child, it's hard to visualise the future. It's hard to extract yourself from day-to-day life and genuinely picture what it will be like to be an adult. To have a job, to move out; to grow up, essentially. The future is an uncharted and remote destination, not quite mythical, but not exactly set in stone either. It's hard to imagine what will be different between now and then.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-02-15-hangover.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Hangover"
date: 2016-02-15 10:00:00 +0000
tags: writing
layout: post
title: "Hangover"
date: 2016-02-15 10:00:00 +0000
categories: writing
---

A sharp, piercing scream penetrates the air like an arrow whistling through the trees. You awake violently, the pain slamming into your head like a sledgehammer, instantly regretting any sort of movement as you slap blindly at the source of the noise. Who sets an alarm for a Sunday morning?
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-02-19-black-gold.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Black Gold"
date: 2016-02-19 12:00:00 +0000
tags: coffee
layout: post
title: "Black Gold"
date: 2016-02-19 12:00:00 +0000
categories: coffee
---

I am a relative newcomer to the world of good quality coffee. Growing up, all that was available in our house were the cheap jars of instant, only ever used if we had guests who did not drink tea. I suspect this is a fairly common arrangement in most households in Britain, because what sort of primitive animal doesn't drink tea?
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-03-09-home.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Home"
date: 2016-03-09 12:00:00 +0000
tags: personal
layout: post
title: "Home"
date: 2016-03-09 12:00:00 +0000
categories: personal
---

Everybody knows where they come from. It may not be entirely truthful, it may be hard to choose an accurate answer, but everybody has a boilerplate response for the ineluctable small-talk query "so where are you from?".
Expand Down
10 changes: 5 additions & 5 deletions _posts/2016-03-26-gdansk.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: post
title: "Gdańsk"
date: 2016-03-26 14:00:00 +0000
tags: travel
custom_js: instagram
layout: post
title: "Gdańsk"
date: 2016-03-26 14:00:00 +0000
categories: travel
custom_js: instagram
---

After a whole eight months without leaving the country (seriously, this must be the longest I've gone without travelling since I turned 18), I finally decided to go away for a few days in March of 2016. I spent a good few days looking for the cheapest possible flights I could find, and eventually settled on Gdańsk, in Northern Poland. It was definitely a good choice.
Expand Down
10 changes: 5 additions & 5 deletions _posts/2016-03-27-brussels.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: post
title: "Brussels"
date: 2016-03-27 11:00:00 +0000
tags: travel
custom_js: instagram
layout: post
title: "Brussels"
date: 2016-03-27 11:00:00 +0000
categories: travel
custom_js: instagram
---

We flew to Brussels direct from Gdańsk on literally the cheapest flight I've ever been on. £6.69. I paid more to get the tram to Edinburgh Airport than I did for this flight; at that price, I don't even mind if I don't get a seat. How Wizz Air can possibly make a profit I have no idea, but I'm not complaining.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-04-04-third-wave.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Third Wave"
date: 2016-04-04 14:00:00 +0000
tags: coffee
layout: post
title: "Third Wave"
date: 2016-04-04 14:00:00 +0000
categories: coffee
---

While I am in no way a connoisseur of fine coffee (not yet anyway), I can definitely discern the difference between a good and bad cup. This is both a blessing and a curse; while I can appreciate the art of a good coffee, the cumulative price of continuous quality coffee does my bank balance no good.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-04-11-holly.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Holly"
date: 2016-04-11 12:00:00 +0000
tags: personal
layout: post
title: "Holly"
date: 2016-04-11 12:00:00 +0000
categories: personal
---

This time last week, I took the train home to Newcastle (can I call it [home]({% post_url 2016-03-09-home %})? Jury's still out) to say goodbye to my dog and best friend of thirteen years, Holly.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-04-22-redesign.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Redesign"
date: 2016-04-22 12:30:00 +0000
tags: blog
layout: post
title: "Redesign"
date: 2016-04-22 12:30:00 +0000
categories: blog
---

This past week, I've sat and read through most of the 14 posts I've written since I started this blog, and in doing so realised something fairly crucial. It is not easy to read. Time for a redesign (already)!
Expand Down
10 changes: 5 additions & 5 deletions _posts/2016-04-25-puppy.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: post
title: "Puppy"
date: 2016-04-25 13:00:00 +0000
tags: charlie
custom_js: instagram
layout: post
title: "Puppy"
date: 2016-04-25 13:00:00 +0000
categories: charlie
custom_js: instagram
---

On Sunday, a new lodger moved into the flat in Edinburgh, rent-free. His name is Charlie, and he's an eight-week-old Border Collie. I feel sorry for all of my social media contacts, as they've been inundated with pictures of his face since he arrived. This is unlikely to stop anytime soon.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-05-03-ynab.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "YNAB"
date: 2016-05-03 12:00:00 +0000
tags: productivity review
layout: post
title: "YNAB"
date: 2016-05-03 12:00:00 +0000
categories: productivity review
---

If you met me in person sometime in the last year or so, engaged in conversation with me about personal finance, or even just made an off-hand comment about budgeting or not having enough money, chances are I'll have mentioned (okay, let's be honest, forced down your throat) the benefits of the budgeting software [YNAB][ynab-home-link] - You Need A Budget.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-05-06-sass.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Sass"
date: 2016-05-06 12:00:00 +0000
tags: development
layout: post
title: "Sass"
date: 2016-05-06 12:00:00 +0000
categories: development
---

I've spent over a year now [designing]({% post_url 2015-11-30-test-post-please-ignore %}), building, and [tweaking]({% post_url 2016-04-22-redesign %}) this blog and [accompanying portfolio site][homepage-link]. When I first started, I was still relatively green when it came to front-end development, so I avoided CSS preprocessors in favour of the more familiar pure CSS. I wish I hadn't.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-05-17-usquebaugh.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Usquebaugh"
date: 2016-05-17 20:00:00 +0000
tags: whisky
layout: post
title: "Usquebaugh"
date: 2016-05-17 20:00:00 +0000
categories: whisky
---

I feel like all of my writing could quite easily start off describing the view outside. It’s usually how I begin; staring off into the deep blue Scottish sky. I prefer to write with a clear head, disconnected from the outside world, where I can think and type in peace.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-05-24-minimalism.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Minimalism"
date: 2016-05-24 13:30:00 +0000
tags: minimalism
layout: post
title: "Minimalism"
date: 2016-05-24 13:30:00 +0000
categories: minimalism
---

I'm foregoing the obvious opportunity to leave this blog post blank as a statement about minimalism. It pains me to do so, but I don't want to waste an entire blog post on a pun, however clever I might think I am.
Expand Down
8 changes: 4 additions & 4 deletions _posts/2016-06-05-socialisation.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout: post
title: "Socialisation"
date: 2016-06-05 15:00:00 +0000
tags: charlie
layout: post
title: "Socialisation"
date: 2016-06-05 15:00:00 +0000
categories: charlie
---

Over the last couple of weeks, Charlie and I have been attending "puppy parties" hosted by his vet to help with his socialisation. Up until recently, when I started seriously researching adopting a puppy, I had no idea just how important good socialisation was for young dogs.
Expand Down
10 changes: 5 additions & 5 deletions _posts/2016-06-15-lisbon.markdown
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
layout: post
title: "Lisbon"
date: 2016-06-15 19:00:00 +0000
tags: travel
custom_js: instagram
layout: post
title: "Lisbon"
date: 2016-06-15 19:00:00 +0000
categories: travel
custom_js: instagram
---

Last summer, I visited Frankfurt for the 2015 CGI Euros football tournament. The very last thing to happen in Frankfurt was the announcement that the 2016 competition was to be held in Lisbon. I took the opportunity to explore the city before the tournament; any excuse to travel, right?
Expand Down
Loading

0 comments on commit ee4bdee

Please sign in to comment.