Adding Skeleventy-based site sources.
This commit is contained in:
parent
ac7f2e6002
commit
28a89401ff
79 changed files with 2183 additions and 0 deletions
55
sources/site/includes/layouts/base.njk
Normal file
55
sources/site/includes/layouts/base.njk
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ meta_title if meta_title else title }} | {{ site.name }}</title>
|
||||
|
||||
{# include main.css if in development mode #}
|
||||
{% if helpers.environment === 'development' %}
|
||||
<link rel="stylesheet" href="{{ '/css/main.css' | url }}">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ '/css/main.min.css' | url }}">
|
||||
{% endif %}
|
||||
|
||||
{# include javascript #}
|
||||
<script src="{{ '/js/main.js' | url if helpers.environment === 'development' else '/js/main.min.js' | url }}" defer></script>
|
||||
|
||||
{# page meta #}
|
||||
<meta name="description" content="{{ meta_description | truncate(140) if meta_description else content | striptags | truncate(140) }}">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="robots" content="{{ robots if robots else 'index,follow' }}" />
|
||||
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
|
||||
|
||||
{# include social meta tags #}
|
||||
{% include "components/social-meta.njk" %}
|
||||
|
||||
{# include favicon, fonts, etc #}
|
||||
<link rel="icon" type="image/svg+xml" href="{{ site.images.favicon_svg | url }}">
|
||||
<link rel="icon" type="image/png" href="{{ site.images.favicon | url }}">
|
||||
<link rel="apple-touch-icon" href="{{ site.images.apple_touch_icon | url }}" sizes="180x180">
|
||||
</head>
|
||||
|
||||
|
||||
<body id="page-{{ page.fileSlug if page.fileSlug else 'home' }}" class="type-{{ layout | lower }} page-{{ page.fileSlug if page.fileSlug else 'home' }} font-base leading-normal color-base">
|
||||
|
||||
<a class="sr-only" href="#main">Skip to content</a>
|
||||
|
||||
<div id="wrapper" class="wrapper box-flex pb-900">
|
||||
|
||||
{# include header #}
|
||||
{% include "components/header.njk" %}
|
||||
|
||||
{# include content #}
|
||||
{{ content | safe }}
|
||||
|
||||
{# include footer #}
|
||||
{% include "components/footer.njk" %}
|
||||
|
||||
</div>
|
||||
|
||||
{# include mobile nav #}
|
||||
{% include "components/mobile-nav.njk" %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
20
sources/site/includes/layouts/category.njk
Normal file
20
sources/site/includes/layouts/category.njk
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: page
|
||||
pagination:
|
||||
data: collections
|
||||
size: 1
|
||||
alias: category
|
||||
filter:
|
||||
- all
|
||||
- blog
|
||||
permalink: /categories/{{ category }}/
|
||||
hide_from_sitemap: true
|
||||
---
|
||||
|
||||
<ul class="category-{{ category }} leading-loose">
|
||||
{% for post in collections[category] %}
|
||||
<li><a href="{{ post.url | url }}">{{ post.data.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<p class="text-400">Back to <a href="/categories/">all categories</a></p>
|
||||
57
sources/site/includes/layouts/contact.njk
Normal file
57
sources/site/includes/layouts/contact.njk
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<main id="main" class="main inner box-flex pt-800 pb-1100" tabindex="-1">
|
||||
|
||||
<article id="container-centre" class="column centre">
|
||||
|
||||
<header class="page-header">
|
||||
|
||||
<h1 class="page-title">{{ title }}</h1>
|
||||
|
||||
{% if sub_heading %}
|
||||
|
||||
<p class="sub-heading">{{ sub_heading }}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</header>
|
||||
|
||||
<div class="content flow">
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
<form class="form pt-400">
|
||||
|
||||
<div class="row mb-500">
|
||||
<label class="text-400 weight-bold" for="name">Name</label>
|
||||
<input class="input width-full" id="name" type="text" name="name" autocomplete="name" required>
|
||||
</div>
|
||||
|
||||
<div class="row mb-500">
|
||||
<label class="text-400 weight-bold" for="email">Email</label>
|
||||
<input class="input width-full" id="email" type="text" name="email" autocapitalize="off" autocomplete="email" required>
|
||||
</div>
|
||||
|
||||
<div class="row mb-500">
|
||||
<label class="text-400 weight-bold" for="phone">Phone</label>
|
||||
<input class="input width-full" id="phone" type="text" name="phone" autocomplete="tel" required>
|
||||
</div>
|
||||
|
||||
<div class="row mb-800">
|
||||
<label class="text-400 weight-bold" for="message">Message</label>
|
||||
<textarea class="textarea width-full" id="message" name="message"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<button class="button text-400" type="submit">Send message</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
</main>
|
||||
25
sources/site/includes/layouts/home.njk
Normal file
25
sources/site/includes/layouts/home.njk
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<main id="main" class="main inner box-flex pt-800 pb-1100" tabindex="-1">
|
||||
|
||||
<header class="page-header">
|
||||
|
||||
<h1 class="page-title">{{ title }}</h1>
|
||||
|
||||
{% if sub_heading %}
|
||||
|
||||
<p class="sub-heading">{{ sub_heading }}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</header>
|
||||
|
||||
<div class="content flow">
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
82
sources/site/includes/layouts/notes.njk
Normal file
82
sources/site/includes/layouts/notes.njk
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
layout: base
|
||||
pagination:
|
||||
data: collections.notes
|
||||
size: 3
|
||||
alias: notes
|
||||
---
|
||||
|
||||
<main id="main" class="main box-flex" tabindex="-1">
|
||||
|
||||
<article id="container-centre" class="column centre">
|
||||
|
||||
<header class="page-header inner pt-700 pb-600">
|
||||
|
||||
<h1 class="page-title">{{ title }}</h1>
|
||||
|
||||
{% if content %}
|
||||
|
||||
<div class="sub-heading">{{ content | safe }}</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</header>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="bg-white pt-1100 pb-1100">
|
||||
|
||||
<div class="posts inner box-grid">
|
||||
|
||||
{% for post in notes %}
|
||||
|
||||
<article class="card">
|
||||
|
||||
{# post image #}
|
||||
{% if post.data.post_image %}
|
||||
|
||||
<a class="box-block" href="{{ post.url | url }}">
|
||||
|
||||
<span class="card-header box-block">
|
||||
|
||||
<span class="card-categories">
|
||||
|
||||
{% for item in post.data.tags %}
|
||||
|
||||
{%- if item !== 'blog' -%}
|
||||
|
||||
<span class="category box-block bg-secondary color-primary text-300">{{ item | capitalize }}</span>
|
||||
|
||||
{%- endif -%}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</span>
|
||||
|
||||
<img class="card-image" data-src="{{ post.data.post_image | url }}" alt="{{ post.data.image_alt }}">
|
||||
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="card-content pt-700 pb-900 pl-300 pr-300">
|
||||
|
||||
<h2><a class="card-title-link color-primary weight-regular hover-color-secondary" href="{{ post.url | url }}">{{ post.data.title }}</a></h2>
|
||||
|
||||
<time class="datetime color-grey text-400" datetime="{{ post.date | timestamp }}">
|
||||
{{ post.date | dateDisplay }}
|
||||
</time>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
29
sources/site/includes/layouts/page.njk
Normal file
29
sources/site/includes/layouts/page.njk
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<main id="main" class="main inner box-flex pt-600 pb-1100" tabindex="-1">
|
||||
|
||||
<article id="container-centre" class="column centre">
|
||||
|
||||
<header class="page-header">
|
||||
|
||||
<h1 class="page-title">{{ title }}</h1>
|
||||
|
||||
{% if sub_heading %}
|
||||
|
||||
<p class="sub-heading">{{ sub_heading }}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</header>
|
||||
|
||||
<div class="content flow">
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
</main>
|
||||
109
sources/site/includes/layouts/post.njk
Normal file
109
sources/site/includes/layouts/post.njk
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
---
|
||||
layout: base
|
||||
---
|
||||
|
||||
<main id="main" class="main inner box-flex pt-900 pb-600" tabindex="-1">
|
||||
|
||||
<article id="container-centre" class="column centre">
|
||||
|
||||
<header class="page-header length-optimal mb-1000 pb-500">
|
||||
|
||||
<h1 class="post-title">{{ title }}</h1>
|
||||
|
||||
{% if sub_heading %}
|
||||
|
||||
<p class="sub-heading">{{ sub_heading }}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="post-meta box-flex mt-800 text-400">
|
||||
|
||||
<time class="datetime" datetime="{{ date | timestamp }}">{{ date | dateDisplay }}</time>
|
||||
|
||||
{% if tags %}
|
||||
|
||||
<div class="box-flex">
|
||||
|
||||
<ul class="categories">
|
||||
|
||||
{# this will create a comma for multiple category links #}
|
||||
{% set comma = joiner() %}
|
||||
|
||||
{% for item in tags %}
|
||||
|
||||
{%- if item !== 'notes' -%}
|
||||
|
||||
<li class="category"><a href="{{ '/categories/' + item | url }}">{{ comma() }} {{ item | capitalize }}</a></li>
|
||||
|
||||
{%- endif -%}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
|
||||
{# featured post image #}
|
||||
{% if post_image %}
|
||||
|
||||
<figure class="post-image bg-white pt-600 pr-600 pl-600 mb-1000">
|
||||
|
||||
<img data-src="{{ post_image | url }}" alt="{{ image_alt }}">
|
||||
|
||||
{% if image_alt %}
|
||||
<figcaption class="post-image-caption bg-white color-primary pt-600 pb-600 text-400">{{ image_alt }}</figcaption>
|
||||
{% endif %}
|
||||
|
||||
</figure>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="content flow length-optimal">
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
<nav class="pagination mb-1000" aria-label="Pagination">
|
||||
<ul class="items text-400 tablet:box-flex">
|
||||
{% if previous_post %}<li class="mb-300"><span class="weight-bold">Previous:</span> <a href="{{ previous_post.url | url }}">{{ previous_post.data.title }}</a></li>{% endif %}
|
||||
{% if next_post %}<li><span class="weight-bold">Next:</span> <a href="{{ next_post.url | url }}">{{ next_post.data.title }}</a></li>{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
||||
{# schema #}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"headline": "{{ title | truncate(110) }}",
|
||||
{% if post_image %}
|
||||
"image": "{{ site.url }}{{ post_image }}",
|
||||
{% endif %}
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ site.author.name }}"
|
||||
},
|
||||
"publisher": {
|
||||
"@type": "Organization",
|
||||
"name": "{{ site.name }}",
|
||||
"logo": {
|
||||
"@type": "ImageObject",
|
||||
"url": "{{ site.url }}/images/meta/article-schema.png"
|
||||
}
|
||||
},
|
||||
"datePublished": "{{ date | timestamp }}",
|
||||
"dateModified": "{{ date | timestamp }}"
|
||||
}
|
||||
</script>
|
||||
|
||||
</main>
|
||||
|
||||
Loading…
Reference in a new issue