Adding Skeleventy-based site sources.

This commit is contained in:
Benjamin A. Shelton 2022-11-04 23:25:35 -06:00
commit 28a89401ff
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
79 changed files with 2183 additions and 0 deletions

View file

@ -0,0 +1,11 @@
<footer id="footer" class="footer bg-white">
<div class="footer-inner inner box-flex pt-600 pb-600">
<p class="color-primary text-400"><a href="https://bashelton.com/">bashelton.com</a>; revised November 2022</p>
</div>
</footer>

View file

@ -0,0 +1,10 @@
<header id="header" class="header bg-grey">
<div class="header-inner inner pt-600 pb-600 mobileL:box-flex">
{% include "components/logo.njk" %}
{% include "components/nav.njk" %}
</div>
</header>

View file

@ -0,0 +1 @@
<a class="logo box-block color-white weight-bold" href="{{ '/' | url }}" title="Sunday School Notes for &quot;Just Us&quot;">&quot;Just Us&quot; Class Notes</a>

View file

@ -0,0 +1,32 @@
<nav id="mobile-nav" class="mobile-nav width-full height-screen box-flex bg-primary pl-700 pr-700 pt-800 z-20 mobileXL:box-hidden" aria-label="Mobile">
{% set navigation = collections.all | eleventyNavigation %}
<ul class="width-full">
{%- for item in navigation %}
<li class="item">
<a href="{{ item.url | url }}" class="link box-block color-white text-600 {{ 'active' if item.url === page.url }}" {{ 'aria-current=page' if item.url === page.url }}>{{ item.title }}</a>
</li>
{%- endfor %}
</ul>
</nav>
<button id="mobile-nav-toggle" class="mobile-nav-toggle box-flex width-full bg-secondary z-20 mobileXL:box-hidden" aria-label="Mobile Navigation Toggle" aria-expanded="false" aria-controls="mobile-nav">
<span class="mobile-nav-label text-400">Menu</span>
<span class="mobile-nav-icon box-flex ml-300" aria-hidden="true">
<span class="icon-line box-block bg-primary"></span>
<span class="icon-line box-block bg-primary"></span>
<span class="icon-line box-block bg-primary"></span>
</span>
</button>

View file

@ -0,0 +1,22 @@
<nav id="nav" class="nav box-hidden mobileXL:box-block" aria-label="Primary">
{% set navigation = collections.all | eleventyNavigation %}
<ul class="menu mobileXL:box-flex">
{%- for item in navigation %}
<li class="item">
<a href="{{ item.url | url }}" class="link box-block color-white text-400 weight-bold pl-300 pr-300 {{ 'active' if item.url === page.url }}" {{ 'aria-current=page' if item.url === page.url }}>{{ item.title }}</a>
</li>
{%- endfor %}
<!--<li class="item"><a href="https://bashelton.com" class="link box-block color-white text-400 pl-300">bashelton.com</a></li>-->
</ul>
</nav>

View file

@ -0,0 +1,23 @@
<ul class="social-icons box-flex">
{% for icon, link in site.social_links %}
<li class="ml-400">
<a href="{{ link | safe }}" class="icon-link box-block color-primary" target="_blank" rel="noreferrer noopener">
<span class="sr-only">Find me on {{ icon }}</span>
<svg class="icon box-block" fill="currentColor" aria-hidden="true">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/images/icons/icon-library.svg#icon-{{ icon }}"></use>
</svg>
</a>
</li>
{% endfor %}
</ul>

View file

@ -0,0 +1,17 @@
{# Twitter #}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ meta_title if meta_title else title }} | {{ site.name }}">
<meta name="twitter:description" content="{{ meta_description | truncate(140) if meta_description else content | striptags | truncate(140) }}">
<meta name="twitter:site" content="{{ site.author.handle }}">
<meta name="twitter:creator" content="{{ site.author.handle }}">
<meta name="twitter:image:src" content="{{ site.url }}{{ site.images.twitter }}">
{# Open Graph #}
<meta name="og:title" content="{{ meta_title if meta_title else title }} | {{ site.name }}">
<meta name="og:description" content="{{ meta_description | truncate(140) if meta_description else content | striptags | truncate(140) }}">
<meta name="og:image" content="{{ site.url }}{{ site.images.og }}">
<meta name="og:url" content="{{ site.url }}{{ page.url }}">
<meta name="og:site_name" content="{{ site.name }}">
<meta name="og:locale" content="en_GB">
<meta name="og:type" content="website">

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>