Skip to content

Commit

Permalink
Major cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdmacrae committed Jan 19, 2018
1 parent 4dedfea commit dff8c1e
Show file tree
Hide file tree
Showing 30 changed files with 139 additions and 4,229 deletions.
5 changes: 4 additions & 1 deletion .forestry/front_matter/templates/landing-page.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
hide_body: true
hide_body: false
pages:
- /about.md
- /index.md
fields:
- name: title
label: Title
Expand Down
8 changes: 4 additions & 4 deletions .forestry/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ admin_path: ''
webhook_url:
collections:
_publications:
default_front_matter_template: publications
default_front_matter_template: publication
_projects:
default_front_matter_template: projects
default_front_matter_template: project
_people:
default_front_matter_template: people
default_front_matter_template: person
_posts:
default_front_matter_template: posts
default_front_matter_template: post
20 changes: 0 additions & 20 deletions _data/publications.yml

This file was deleted.

2 changes: 1 addition & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% assign limit = forloop.index | plus: 1 %}
{% capture href %}{% for part in parts limit: limit %}{{ part | append: '/' }}{% endfor %}{% endcapture %}
<li>
<a href="{{ href | relative_url }}">{{ text }}</a>&nbsp;<i class="fa fa-chevron-right"></i>
<a href="{{ href | absolute_url }}">{{ text }}</a>&nbsp;<i class="fa fa-chevron-right"></i>
</li>
{% endif %}
{% endfor %}
Expand Down
14 changes: 7 additions & 7 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<footer class="site-footer">
<div class="container pure-g">
<div class="footer-col pure-u-1 pure-u-md-1-4">
<img src="{{ "/img/logo-white.png" | relative_url }}" alt="" class="footer-logo">
<img src="{{ "/img/logo-white.png" | absolute_url }}" alt="" class="footer-logo">
</div>
<div class="footer-col pure-u-1 pure-u-md-1-4">
<h3>About {{ site.short_title }}</h3>
<ul>
{% for item in site.menus.footer %}
<li><a href="{{ item.url | relative_url }}">{{ item.title }}</a></li>
<li><a href="{{ item.url | absolute_url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
</div>
<div class="footer-col pure-u-1 pure-u-md-1-4">
<h3>Projects</h3>
<ul>
{% for project in site.projects limit:5 %}
<li><a href="{{ project.url | relative_url }}">{{ project.title }}</a></li>
<li><a href="{{ project.url | absolute_url }}">{{ project.title }}</a></li>
{% endfor %}
{% if site.projects | size > 5 %}
<li><a href="{{ "/projects/" | relative_url }}">See all projects</a></li>
<li><a href="{{ "/projects/" | absolute_url }}">See all projects</a></li>
{% endif %}
</ul>
</div>
Expand All @@ -28,13 +28,13 @@ <h3>Contact</h3>
</div>
</div>
<div class="copyright">
<p>&copy;{{ 'now' | date: "%Y" }} {{ site.title }} - All Rights Reserved</p>
<p>
<a href="{{ "/admin" | relative_url }}">Site Admin</a>
&copy;{{ 'now' | date: "%Y" }} {{ site.title }} - All Rights Reserved<br>
<a href="{{ "/admin" | absolute_url }}">Site Admin</a>
</p>
</div>
</footer>
<!-- Javascript -->
<script src="{{ "/js/main.js" | relative_url }}" type="text/javascript"></script>
<script src="{{ "/js/main.js" | absolute_url }}" type="text/javascript"></script>
</body>
</html>
5 changes: 2 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
<title>{{ page.title }} - {{ site.title }}</title>
<meta name="description" content="{% if .page.description %}{{ .page.description }}{% else %}{{ .site.description }}{% endif %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="{{ "/img/favicon.png" | relative_url }}"/>
<link rel="icon" type="image/png" href="{{ "/img/favicon.png" | absolute_url }}"/>
<link rel="stylesheet" href="https://yui-s.yahooapis.com/pure/0.6.0/pure-min.css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/grids-responsive-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" href="https://yui-s.yahooapis.com/pure/0.6.0/grids-responsive-min.css">
<!--<![endif]-->
<link rel="stylesheet" href="{{ "/css/main.css" | relative_url }}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<link rel="stylesheet" href="{{ "/css/main.min.css" | absolute_url }}">
</head>
<body>
10 changes: 5 additions & 5 deletions _includes/hero.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if page.banner_image %}
<header id="banner" style="background-image: url('{{ page.banner_image | relative_url }}');">
<header id="banner" style="background-image: url('{{ page.banner_image | absolute_url }}');">
<div class="container pure-g">
<div class="pure-u-1 pure-u-md-1">
<header class="call-to-action">
Expand All @@ -9,7 +9,7 @@ <h2>{{ page.sub_heading }}</h2>
{% endif %}
{% if page.hero_button %}
<div>
<a href="{{ page.hero_button.href | relative_url }}" class="pure-button button-success button-xlarge" title="{{ page.hero_button.text }}">
<a href="{{ page.hero_button.href | absolute_url }}" class="pure-button button-success button-xlarge" title="{{ page.hero_button.text }}">
{{ page.hero_button.text }}&nbsp;<i class="fa fa-chevron-right"></i>
</a>
</div>
Expand All @@ -18,12 +18,12 @@ <h2>{{ page.sub_heading }}</h2>
</header>
</div>
</header>
{% if page.description %}
{% if page.textline %}
<section class="main-message">
<div class="container pure-g">
<div class="pure-u-1 pure-u-md-1">
<div class="content content-narrow">
<p>{{ page.description }}</p>
<p>{{ page.textline }}</p>
</div>
</div>
</div>
Expand All @@ -36,7 +36,7 @@ <h2>{{ page.sub_heading }}</h2>
<div class="content content-narrow">
{% if page.collection == 'people' and page.thumbnail and page.thumbnail != "" %}
<div class="profile-photo">
<img src="{{ page.thumbnail | relative_url }}" alt="{{ page.title }}">
<img src="{{ page.thumbnail | absolute_url }}" alt="{{ page.title }}">
</div>
{% endif %}
<h2>{{ page.title }}</h2>
Expand Down
8 changes: 4 additions & 4 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<header class="site-header">
<div class="container">
<h1 class="logo">
<a href="{{ "/" | relative_url }}">{{ site.name }}</a>
<a href="{{ "/" | absolute_url }}">{{ site.name }}</a>
</h1>
<nav class="main-nav">
<ul class="navigation">
Expand All @@ -21,12 +21,12 @@ <h1 class="logo">
<ul class="second-level">
{% for child in child.children %}
<li>
<a href="{{ child.url | relative_url }}">{{ child.title }}</a>
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<a href="{{ child.url | relative_url }}"{% if child.target %} target="_blank" {% endif %}>
<a href="{{ child.url | absolute_url }}"{% if child.target %} target="_blank" {% endif %}>
{{ child.title }}
{% if child.childen %}
<i class='icon-right-dir-2'></i>
Expand All @@ -36,7 +36,7 @@ <h1 class="logo">
{% endfor %}
</ul>
{% endif %}
<a href="{{ link.url | relative_url }}"{% if link.target %} target="_blank" {% endif %}>
<a href="{{ link.url | absolute_url }}"{% if link.target %} target="_blank" {% endif %}>
{{ link.title }}
{% if link.childen %}
<i class='icon-chevron-down'></i>
Expand Down
4 changes: 2 additions & 2 deletions _includes/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ <h2>Latest News</h2>
<ul class="posts">
{% for post in site.posts limit:3 %}
<li>
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<a href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<date>{{ post.date | date_to_string }}</date>
<date>{{ post.sub-title }}</date>
</li>
{% endfor %}
</ul>
<a href="{{ "/posts/" | relative_url }}" class="button-outline pure-button">More News <i class="fa fa-chevron-right"></i></a>
<a href="{{ "/posts/" | absolute_url }}" class="button-outline pure-button">More News <i class="fa fa-chevron-right"></i></a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion _includes/partners.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>Funding Partners</h2>
<ul class="slides">
{% for logo in page.partners %}
<li>
<img src="{{ logo | relative_url }}" alt="{{ logo }}" />
<img src="{{ logo | absolute_url }}" alt="{{ logo }}" />
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion _includes/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% for item in page.services %}
<div class="pure-u-1 pure-u-md-1-2">
<div class="service">
<div class="service-icon"><img src="{{ item.icon | relative_url }}" alt=""></div>
<div class="service-icon"><img src="{{ item.icon | absolute_url }}" alt=""></div>
<h2>{{ item.heading }}</h2>
<p>{{ item.description }}</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions _includes/staff.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ <h2 class="section-heading">Belkirk Staff</h2>
<div class="post">
<div class="post-header">
{% if person.thumbnail %}
<img alt="{{ person.title }}" src="{{ person.thumbnail | relative_url }}">
<img alt="{{ person.title }}" src="{{ person.thumbnail | absolute_url }}">
{% else %}
<img alt="{{ person.title }}" src="{{ "/img/placeholder.png" | relative_url }}>
<img alt="{{ person.title }}" src="{{ "/img/placeholder.png" | absolute_url }}>
{% endif %}
</div>
<div class="post-body">
<h3>
<a href="{{ person.url | relative_url }}">{{ person.title }}</a>
<a href="{{ person.url | absolute_url }}">{{ person.title }}</a>
</h3>
{% if person.sub-title %}
<div class="subtitle">
Expand Down
2 changes: 1 addition & 1 deletion _layouts/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>Archive of posts from {{ page.date | date: "%Y" }}</h1>
<ul class="posts-list">
{% for post in page.posts %}
<li>
<a class="post-link" href="{{ post.url | relative_url }}">{{ post.title }}</a>
<a class="post-link" href="{{ post.url | absolute_url }}">{{ post.title }}</a>
<div class="post-date">{{ post.date | date: "%b %-d, %Y" }}</div>
</li>
{% endfor %}
Expand Down
2 changes: 2 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
A general page layout. Used by default for all content on the site.
{% endcomment %}

{% include breadcrumbs.html %}

<div class="container pure-g">
<div class="pure-u-1">
<div class="content content-narrow">
Expand Down
92 changes: 49 additions & 43 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,57 +1,63 @@
---
layout: page
layout: default
---
{% comment %}
This layout is used by the documents in the _posts/ collection
{% endcomment %}

{% include breadcrumbs.html %}

<div class="meta">
{% if page.date %}
<div class="post-date">{{ page.date | date_to_string }}</div>
{% endif %}
{% if page.tags.size > 0 %}
<span class="meta-separator">&bull;</span>
<ul class="tags-list">
{% for tag in page.tags %}
<li class="inline tag_list_item">
<a class="tag_list_link" href="{{ "/tag/" | append: tag | relative_url }}">{{ tag }}</a>
{% if forloop.last == true %}{% else %}
<span>,</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>
<div class="container pure-g">
<div class="pure-u-1">
<div class="content content-narrow">
<div class="meta">
{% if page.date %}
<div class="post-date">{{ page.date | date_to_string }}</div>
{% endif %}
{% if page.tags.size > 0 %}
<span class="meta-separator">&bull;</span>
<ul class="tags-list">
{% for tag in page.tags %}
<li class="inline tag_list_item">
<a class="tag_list_link" href="{{ "/tag/" | append: tag | absolute_url }}">{{ tag }}</a>
{% if forloop.last == true %}{% else %}
<span>,</span>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>

{{ content }}
{{ content }}

{% if page.related_posts.size > 0 %}
<h2> Related Posts </h2>
<div class="grid-layout">
<div class="pure-g">
{% for item in page.related_posts %}
{% assign posts = site.posts | where:"path", item %}
{% for post in posts %}
<div class="pure-u-1 pure-u-md-1-3">
<div class="card">
<div class="card-header">
{% if post.thumbnail and post.thumbnail != "" %}
<img src="{{ post.thumbnail | relative_url }}" alt="{{ post.title }}">
{% else %}
<img src="{{ "/img/placeholder.png" | relative_url }}" alt="{{ post.title }}">
{% endif %}
</div>
<div class="card-body">
<h3><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
<p>{{ post.sub-title | slice: 0, 80 }}</p>
</div>
{% if page.related_posts.size > 0 %}
<h2> Related Posts </h2>
<div class="grid-layout">
<div class="pure-g">
{% for item in page.related_posts %}
{% assign posts = site.posts | where:"path", item %}
{% for post in posts %}
<div class="pure-u-1 pure-u-md-1-3">
<div class="card">
<div class="card-header">
{% if post.thumbnail and post.thumbnail != "" %}
<img src="{{ post.thumbnail | absolute_url }}" alt="{{ post.title }}">
{% else %}
<img src="{{ "/img/placeholder.png" | absolute_url }}" alt="{{ post.title }}">
{% endif %}
</div>
<div class="card-body">
<h3><a href="{{ post.url | absolute_url }}">{{ post.title }}</a></h3>
<p>{{ post.sub-title | slice: 0, 80 }}</p>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>
{% endfor %}
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
</div>
15 changes: 11 additions & 4 deletions _layouts/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
{% include breadcrumbs.html %}

{% for post in site.posts %}
<div class="list-layout">
<h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2>
<div>{{ post.content | truncatewords: 30 }}</div>
<date>{{ post.date | date_to_string }}</date>
<div class="container pure-g">
<div class="pure-u-1">
<div class="content content-narrow">
<div class="list-layout">
<h2><a href="{{ post.url | absolute_url }}">{{ post.title }}</a></h2>
<div>{{ post.content | truncatewords: 30 }}</div>
<date>{{ post.date | date_to_string }}</date>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
Loading

0 comments on commit dff8c1e

Please sign in to comment.