Skip to content

Commit

Permalink
style: tabs over spaces in nunjucks files
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwhisman committed Oct 7, 2023
1 parent 6c7117d commit dcf8dc7
Show file tree
Hide file tree
Showing 16 changed files with 450 additions and 450 deletions.
10 changes: 5 additions & 5 deletions pages/404.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ permalink: /404.html
<h1>Not Found</h1>

<p>
Sorry, I couldn't find what you were looking for. It either:
Sorry, I couldn't find what you were looking for. It either:
</p>
<ul>
<li>never existed</li>
<li>existed but got moved during some architectural changes to the site</li>
<li>or existed but I deleted it for some reason</li>
<li>never existed</li>
<li>existed but got moved during some architectural changes to the site</li>
<li>or existed but I deleted it for some reason</li>
</ul>
<p>
Have a look at the <a href="/">home page</a>. You <em>might</em> be able to find it from there.
Have a look at the <a href="/">home page</a>. You <em>might</em> be able to find it from there.
</p>
36 changes: 18 additions & 18 deletions pages/cats/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ layout: default
{% from 'partials/macros/cat-picture.njk' import catPicture %}
{% set imagesRendered = 0 %}
{% for month, monthData in global.catsByMonth %}
{% if loop.index <= 3 %}
<h2>{{ monthData.name }}</h2>
<div class="cmp-pictures-of-cats__grid">
{% set altText %}Collection of pictures of my cats, Goose and Barry, taken during {{ monthData.name }}.{% endset %}
{% for image in monthData.pictures %}
{% set imagesRendered = imagesRendered + 1 %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, imagesRendered, 4, altText) }}
{% endfor %}
</div>
{% elseif loop.index === 4 %}
<h2>Older Pictures</h2>
<p><a href="/cats/{{ month }}/">{{ monthData.name }}</a></p>
{% else %}
<p><a href="/cats/{{ month }}/">{{ monthData.name }}</a></p>
{% endif %}
{% if loop.index <= 3 %}
<h2>{{ monthData.name }}</h2>
<div class="cmp-pictures-of-cats__grid">
{% set altText %}Collection of pictures of my cats, Goose and Barry, taken during {{ monthData.name }}.{% endset %}
{% for image in monthData.pictures %}
{% set imagesRendered = imagesRendered + 1 %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, imagesRendered, 4, altText) }}
{% endfor %}
</div>
{% elseif loop.index === 4 %}
<h2>Older Pictures</h2>
<p><a href="/cats/{{ month }}/">{{ monthData.name }}</a></p>
{% else %}
<p><a href="/cats/{{ month }}/">{{ monthData.name }}</a></p>
{% endif %}
{% endfor %}
38 changes: 19 additions & 19 deletions pages/cats/month.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ eleventyExcludeFromCollections: true

{% block content %}
<article class="cmp-container cmp-stack">
<h1>Pictures of Cats: {{ global.catsByMonth[month].name }}</h1>
<h1>Pictures of Cats: {{ global.catsByMonth[month].name }}</h1>

<div class="cmp-pictures-of-cats__grid">
{% set altText %}Collection of pictures of my cats, Goose and Barry, taken during {{ global.catsByMonth[month].name }}.{% endset %}
{% from 'partials/macros/cat-picture.njk' import catPicture %}
{% for image in global.catsByMonth[month].pictures %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, loop.index, 6, altText) }}
{% endfor %}
</div>
<div class="cmp-pictures-of-cats__grid">
{% set altText %}Collection of pictures of my cats, Goose and Barry, taken during {{ global.catsByMonth[month].name }}.{% endset %}
{% from 'partials/macros/cat-picture.njk' import catPicture %}
{% for image in global.catsByMonth[month].pictures %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, loop.index, 6, altText) }}
{% endfor %}
</div>

<nav class="cmp-navigation cmp-navigation--basic-pagination" aria-label="Picture of cats by month">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">Newer pictures</a>
{% endif %}
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">Older pictures</a>
{% endif %}
</nav>
<nav class="cmp-navigation cmp-navigation--basic-pagination" aria-label="Picture of cats by month">
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous }}">Newer pictures</a>
{% endif %}
{% if pagination.href.next %}
<a href="{{ pagination.href.next }}">Older pictures</a>
{% endif %}
</nav>
</article>
{% endblock %}
58 changes: 29 additions & 29 deletions pages/feed.njk
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
---json
{
"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "Dustin Whisman",
"subtitle": "The collected writings of Dustin Whisman, full stack developer.",
"language": "en",
"url": "https://dustinwhisman.com",
"author": {
"name": "Dustin Whisman"
}
}
"permalink": "feed.xml",
"eleventyExcludeFromCollections": true,
"metadata": {
"title": "Dustin Whisman",
"subtitle": "The collected writings of Dustin Whisman, full stack developer.",
"language": "en",
"url": "https://dustinwhisman.com",
"author": {
"name": "Dustin Whisman"
}
}
}
---
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:base="{{ metadata.url }}" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ metadata.title }}</title>
<link>{{ metadata.url }}</link>
<atom:link href="{{ metadata.url }}/{{ permalink }}" rel="self" type="application/rss+xml" />
<description>{{ metadata.subtitle }}</description>
<language>{{ metadata.language }}</language>
{%- for post in collections.writing | reverse %}
{%- set absolutePostUrl = metadata.url + post.url %}
<item>
<title>{{ post.data.articleTitle }}</title>
<link>{{ absolutePostUrl }}</link>
<description>{{ post.data.description }}</description>
<pubDate>{{ post.date.toUTCString() }}</pubDate>
<dc:creator>{{ metadata.author.name }}</dc:creator>
<guid>{{ absolutePostUrl }}</guid>
</item>
{%- endfor %}
</channel>
<channel>
<title>{{ metadata.title }}</title>
<link>{{ metadata.url }}</link>
<atom:link href="{{ metadata.url }}/{{ permalink }}" rel="self" type="application/rss+xml" />
<description>{{ metadata.subtitle }}</description>
<language>{{ metadata.language }}</language>
{%- for post in collections.writing | reverse %}
{%- set absolutePostUrl = metadata.url + post.url %}
<item>
<title>{{ post.data.articleTitle }}</title>
<link>{{ absolutePostUrl }}</link>
<description>{{ post.data.description }}</description>
<pubDate>{{ post.date.toUTCString() }}</pubDate>
<dc:creator>{{ metadata.author.name }}</dc:creator>
<guid>{{ absolutePostUrl }}</guid>
</item>
{%- endfor %}
</channel>
</rss>
140 changes: 70 additions & 70 deletions pages/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,80 +5,80 @@ layout: default
---

<h1 class="util-visually-hidden">
Dustin Whisman: Full Stack Developer
Dustin Whisman: Full Stack Developer
</h1>

<div class="cmp-stack cmp-stack--s5">
<div class="cmp-it-me">
<picture>
<source srcset="/images/beautiful-shining-face.avif" type="image/avif">
<source srcset="/images/beautiful-shining-face.webp" type="image/webp">
<img
src="/images/beautiful-shining-face.jpg"
alt="One of few salvageable photos of me from vacation in Switzerland. I'm almost smiling like a normal person."
class="cmp-it-me__image"
width="200"
height="200"
>
</picture>
<p>
Hi, I'm Dustin. I'm a Full Stack Developer and
<a href="https://www.accessibilityassociation.org/s/wascertification">Web
Accessibility Specialist</a> at
<a href="https://sparkbox.com">Sparkbox</a>, where I write HTML, CSS,
JavaScript, and whatever other <em>webby stuff</em> our clients need.
</p>
<p>
I'm a generalist, so I'd say my strongest skill is problem solving. And
I always prioritize accessibility, performance, and the user experience
of whatever I'm building with whatever tools I'm building them with.
</p>
</div>
<div class="cmp-it-me">
<picture>
<source srcset="/images/beautiful-shining-face.avif" type="image/avif">
<source srcset="/images/beautiful-shining-face.webp" type="image/webp">
<img
src="/images/beautiful-shining-face.jpg"
alt="One of few salvageable photos of me from vacation in Switzerland. I'm almost smiling like a normal person."
class="cmp-it-me__image"
width="200"
height="200"
>
</picture>
<p>
Hi, I'm Dustin. I'm a Full Stack Developer and
<a href="https://www.accessibilityassociation.org/s/wascertification">Web
Accessibility Specialist</a> at
<a href="https://sparkbox.com">Sparkbox</a>, where I write HTML, CSS,
JavaScript, and whatever other <em>webby stuff</em> our clients need.
</p>
<p>
I'm a generalist, so I'd say my strongest skill is problem solving. And
I always prioritize accessibility, performance, and the user experience
of whatever I'm building with whatever tools I'm building them with.
</p>
</div>

<div class="cmp-stack">
<h2>Recent Projects</h2>
<ul class="cmp-project__list">
{% from 'partials/macros/project-card.njk' import projectCard %}
{% for project in global.recentProjects %}
<li>
{{ projectCard(project, 'h3') }}
</li>
{% endfor %}
</ul>
</div>
<div class="cmp-stack">
<h2>Recent Projects</h2>
<ul class="cmp-project__list">
{% from 'partials/macros/project-card.njk' import projectCard %}
{% for project in global.recentProjects %}
<li>
{{ projectCard(project, 'h3') }}
</li>
{% endfor %}
</ul>
</div>

<div class="cmp-stack">
<h2>Recent Writing</h2>
<ul class="cmp-article-listing__list">
{% for article in collections.writing | reverse %}
{% if loop.index <= 5 %}
<li>
<a href="{{ article.url }}" class="cmp-article-listing__link">{{ article.data.articleTitle }}</a>
<span>
<span class="util-visually-hidden">Published:</span>
<time datetime="{{ article.date.toISOString() }}" class="cmp-badge">
{{ article.date.toLocaleDateString(undefined, { timeZone: 'UTC' }) }}
</time>
</span>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="cmp-stack">
<h2>Recent Writing</h2>
<ul class="cmp-article-listing__list">
{% for article in collections.writing | reverse %}
{% if loop.index <= 5 %}
<li>
<a href="{{ article.url }}" class="cmp-article-listing__link">{{ article.data.articleTitle }}</a>
<span>
<span class="util-visually-hidden">Published:</span>
<time datetime="{{ article.date.toISOString() }}" class="cmp-badge">
{{ article.date.toLocaleDateString(undefined, { timeZone: 'UTC' }) }}
</time>
</span>
</li>
{% endif %}
{% endfor %}
</ul>
</div>

<div class="cmp-stack">
<h2>Recent Pictures of Cats</h2>
<div class="cmp-pictures-of-cats__grid">
{% set altText = "Collection of the most recent pictures of my cats, Goose and Barry." %}
{% from 'partials/macros/cat-picture.njk' import catPicture %}
{% for image in global.picturesOfCats %}
{% if loop.index <= 4 %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, loop.index, 0, altText) }}
{% endif %}
{% endfor %}
</div>
</div>
<div class="cmp-stack">
<h2>Recent Pictures of Cats</h2>
<div class="cmp-pictures-of-cats__grid">
{% set altText = "Collection of the most recent pictures of my cats, Goose and Barry." %}
{% from 'partials/macros/cat-picture.njk' import catPicture %}
{% for image in global.picturesOfCats %}
{% if loop.index <= 4 %}
{% if loop.index > 1 %}
{% set altText = "" %}
{% endif %}
{{ catPicture(image, loop.index, 0, altText) }}
{% endif %}
{% endfor %}
</div>
</div>
</div>
Loading

0 comments on commit dcf8dc7

Please sign in to comment.