Major update - simpler file structure, better layouts, moar content

This commit is contained in:
2022-09-23 02:40:26 -04:00
commit 8c024d74cd
346 changed files with 19555 additions and 0 deletions

66
src/layouts/default.ejs Normal file
View File

@@ -0,0 +1,66 @@
<!-- DEFAULT BEGIN -->
<%- include('partials/top') %>
<% var titleLink = (site && site.base_uri) ? site.base_uri : '/'; -%>
<body>
<a name="top" id="topAnchor" class="topAnchor"></a>
<div class="page">
<header id="header" class="pageHeader pageSection">
<div class="pageHeader-titleBlock clearfix">
<h1 class="siteTitle"><a href="<%= titleLink %>" class="siteTitle-link"><%= site.title %></a></h1>
</div>
<%- include('partials/navmain') %>
</header>
<main id="content" class="pageMain pageSection">
<div class="pageMain-inner">
<%- include('partials/embed_switch') %>
<% if (page.content_type) { -%>
<%- (include('partials/content_types/' + page.content_type) || '').trim() %>
<% } else { -%>
<%- include('functions') -%>
<% if (page.title && (page.render_opts || '').indexOf('no_title') == -1) { -%>
<h2>
<a
class="titleLink"
href="/<%= page.path %>"
id="<%= snakeCase(page.title) %>"
name="<%= snakeCase(page.title) %>"
><%= page.title %></a>
</h2>
<% } -%>
<%- content %>
<% } -%>
</div>
</main>
<%- include('partials/menusub') %>
<%/*
if ("index" === top_dir) {
loadPartial(top_dir, 'latest')
}
*/%>
<%- include('partials/bio') %>
<%- include('partials/footer') %>
</div>
<%- include('partials/bottom') %>
<!-- DEFAULT END -->

103
src/layouts/functions.ejs Normal file
View File

@@ -0,0 +1,103 @@
<%
htmlize = (text) => {
return (text || '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
};
prettyDate = (date) => {
// January 20, 2017 at 20:26
const
month_names = [
'January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'
];
let
d = new Date(date),
has_time = d && !(d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0),
dArr = [];
if (d) {
dArr = [
month_names[d.getMonth()],
' ',
(d.getDate() < 10 ? '0' : ''),
d.getDate(),
', ',
d.getFullYear()
];
if (has_time) {
dArr = dArr
.concat([
' at ',
(d.getHours() < 10 ? '0' : ''),
d.getHours(),
':',
(d.getMinutes() < 10 ? '0' : ''),
d.getMinutes()
]);
}
}
return dArr.join('');
};
shortDate = (date) => {
// 2021-06-20 20:26
const
d = new Date(date),
has_time = d && !(d.getHours() === 0 && d.getMinutes() === 0 && d.getSeconds() === 0);
let dArr = [];
if (d) {
dArr = [
d.getFullYear(),
'-',
(d.getMonth() < 9 ? '0' : ''),
(d.getMonth() + 1),
'-',
(d.getDate() < 10 ? '0' : ''),
d.getDate()
];
if (has_time) {
dArr = dArr
.concat([
' @ ',
(d.getHours() < 10 ? '0' : ''),
d.getHours(),
':',
(d.getMinutes() < 10 ? '0' : ''),
d.getMinutes()
]);
}
return dArr.join('');
}
};
snakeCase = (val) => {
return val.trim().toLowerCase().replace(/\W/g, '_');
};
sortByPath = (p1, p2) => {
if (p1.path < p2.path) return -1;
if (p1.path > p2.path) return 1;
return 0;
};
reverseSortByDate = (p1, p2) => {
if (p1.date_pub && p2.date_pub) {
let
p1_dt = (new Date(p1.date_pub)).getTime(),
p2_dt = (new Date(p2.date_pub)).getTime();
if (p1_dt < p2_dt) {
return 1;
}
if (p2_dt < p1_dt) {
return -1;
}
return 0;
}
};
-%>

View File

@@ -0,0 +1,170 @@
<%
const titleLink = (site?.base_uri) ? site.base_uri : '/';
const { entriesToList = [], pageCount, pageNum, year = '' } = page;
-%>
<%- include('partials/top') %>
<body class='postMainIndex'>
<a name="top" id="topAnchor" class="topAnchor"></a>
<div class="page">
<header id="header" class="pageHeader pageSection">
<div class="pageHeader-titleBlock clearfix">
<h1 class="siteTitle"><a href="<%= titleLink %>" class="siteTitle-link"><%= site.title %></a></h1>
</div>
<%- include('partials/navmain') %>
</header>
<main id="content" class="pageMain pageSection">
<div class="pageMain-inner">
<%- include('partials/embed_switch') %>
<%- include('functions') -%>
<% if (page?.title && (page.render_opts || '').indexOf('no_title') == -1) { -%>
<h2>
Journal Entries By Year:
<a
class="boxLink isCurrent"
href="<%= page.path %>"
id="<%= snakeCase(page.title) %>"
name="<%= snakeCase(page.title) %>"
> <%= year %></a>
</h2>
<% if (pageCount > 1) { -%>
<p>
(Page <%= pageNum %> of <%= pageCount %>)
</p>
<% } -%>
<p>
Assorted journal entries from <%= year %>.
</p>
<hr class="feedLine">
<p>
<% } -%>
<% if (entriesToList && year) { -%>
<% entriesToList.forEach((entry) => { -%>
<% if (entry?.content_type === 'journal') { -%>
<%
const {
author = {},
content = '',
date_pub = '',
description = '',
path = '',
readTime = '',
tags = [],
title = '',
tldr = ''
} = entry;
-%>
<article class="update journal h-entry js-update">
<div class="p-author author h-card vcard authorHidden">
<% if (author?.site && author?.name) { -%>
<% if (author?.photo) { -%>
<a href="<%= author.site %>"><img class="u-photo" src="<%= author.photo %>"></a>
<% } -%>
<a class="p-name fn u-url url" rel="author" href="<%= author.site %>"><%= author.name %></a>
<% } else if (site?.author?.site && site?.author?.name) { -%>
<% if (site?.author?.photo) { -%>
<a href="<%= site.author.site %>"><img class="u-photo" src="<%= site.author.photo %>"></a>
<% } -%>
<a class="p-name fn u-url url" rel="author" href="<%= site.author.site %>"><%= site.author.name %></a>
<% } -%>
</div>
<h3 id="<%= snakeCase(title) %>" >
<a class="p-name u-url" href="/<%= path %>"><%= title %></a>
</h3>
<% if (tldr || description) { -%>
<p><i>TL;DR &mdash; <%- tldr || description %></i></p>
<% } -%>
<% if (readTime) { -%>
<p class="journal readTime">
<span class="icon glasses-icon">&#x1f453;</span> <%= readTime %>
</p>
<% } -%>
<% if (content) { -%>
<div class="e-content">
<%- content %>
</div>
<% } -%>
<footer class="update-footer clearfix">
<a rel="bookmark" href="/<%= path %>" class="u-url update-footer-link update-footer-time">
<time datetime="<%= date_pub %>"
class="dt-published published js-pubDate pubDate"
><%= prettyDate(date_pub) %></time>
</a>
<!--
<span class="update-citation">[iew.us q/1g0k2]
<a class="u-shortlink" type="text/html" rel="shortlink" href="https://iew.us/q/1g0k2">&#128279;</a>
</span>
-->
<% if (Array.isArray(tags) && tags.length) { -%>
<div class="update-tags">
<span class="icon folder-icon">&#x1f4c1;</span>
<% tags.forEach((tag) => { -%>
<a class="boxLink" href="/journal/tags/<%= tag %>/index.html">
#<span class="p-category category"><%= tag %></span>
</a>
<% }) -%>
</div>
<% } -%>
</footer>
</article>
<p class="backLink">
<a class="boxLink" href="#top">Top</a>
</p>
<hr class="feedLine">
<% } -%>
<% }); -%>
<% } -%>
<%- include('partials/pageMenu') %>
</div>
</main>
<%- include('partials/journal/menusub') %>
<%- include('partials/bio') %>
<%- include('partials/footer') %>
</div>
<%- include('partials/bottom') %>

View File

@@ -0,0 +1,75 @@
<aside class="asideContent asideRight asideAnaMenu asideMenu anaMenu">
<h4 class="asideMenu-title <%=page.path.indexOf('anachronism') > -1 ? 'isCurrent' : ''%>">
<a class="asideMenu-title-link" href="/anachronism/">Custom <em>Anachronism</em> Cards</a>
</h4>
<h5 class="asideMenu-subtitle <%=page.path.indexOf('us_americans') > -1 ? 'isCurrent' : ''%>">
<a class="asideMenu-subtitle-link" href="/anachronism/us_americans/">US Americans by Warrior Pack</a>
</h5>
<ul class="asideMenu-list">
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'billy_the_kid' ? 'isCurrent' : ''%>"
href="/anachronism/us_americans/billy_the_kid.html">
Billy &ldquo;The Kid&rdquo;
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'george_washington' ? 'isCurrent' : ''%>"
href="/anachronism/us_americans/george_washington.html">
George Washington
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'robert_e_lee' ? 'isCurrent' : ''%>"
href="/anachronism/us_americans/robert_e_lee.html">
Robert E. Lee
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'ulysses_s_grant' ? 'isCurrent' : ''%>"
href="/anachronism/us_americans/ulysses_s_grant.html">
Ulysses S. Grant
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'wyatt_earp' ? 'isCurrent' : ''%>"
href="/anachronism/us_americans/wyatt_earp.html">
Wyatt Earp
</a>
</li>
</ul>
<h5 class="asideMenu-subtitle <%=page.path.indexOf('us_americans') == -1 ? 'isCurrent' : ''%>">
<a class="asideMenu-subtitle-link" href="/anachronism/us_americans/">US Americans by Card Type</a>
</h5>
<ul class="asideMenu-list">
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'warriors' ? 'isCurrent' : ''%>"
href="/anachronism/warriors.html">
Warriors
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'inspirations' ? 'isCurrent' : ''%>"
href="/anachronism/inspirations.html">
Inspirations
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'weapons' ? 'isCurrent' : ''%>"
href="/anachronism/weapons.html">
Weapons
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'armors' ? 'isCurrent' : ''%>"
href="/anachronism/armors.html">
Armors
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'specials' ? 'isCurrent' : ''%>"
href="/anachronism/specials.html">
Specials
</a>
</li>
</ul>
</aside>

View File

@@ -0,0 +1,76 @@
<!-- BIO BEGIN -->
<%
var
show_bio = !(page.name === 'about' && page.path.indexOf('about') === 0),
photo_class = (page.name === 'index' && page.path === '' || page.path.indexOf('index') === 0 ? ' showPhoto' : '');
if (show_bio) {
%>
<aside id="bio" class="vcard h-card p-author author asideContent asideLeft asideBio asideMenu">
<div class="asideBio-div <%=photo_class%>">
<a href="/"
class="u-url u-uid url icon-container asideBio-div-link asideBio-div-imgLink"
rel="author"><img
class="photo u-photo asideBio-div-img"
alt="It's Eric Woodward's avatar"
src="<%=site?.author?.photo%>"/></a>
<a class="p-name fn u-url u-uid url asideBio-div-link asideBio-div-textLink"
href="/"><%=site.author.name%></a>
<a class="u-url url asideBio-div-textLink" href="/">
<!-- This is here to force the hand of your MF2 parser --></a>
</div>
<p>My name is <a class="p-name fn u-url u-uid url asideBio-div-link"
href="/"><%=site.author.name%></a> and this is my website.</p>
<p class="p-note p-role role">
I am a <span class="p-category category">geek</span>,
<span class="p-category category">coder</span>,
<span class="p-category category">gamer</span>,
<span class="p-category category">tinkerer</span>,
<span class="p-category category">husband</span>,
<span class="p-category category">father</span>,
<span class="p-category category">server admin</span>,
<span class="p-category category">web developer</span>,
and <span class="p-category category">American</span>
<span class="p-category category">cyborg</span>,
though not necessarily in that order.
</p>
<ul class="asideMenu-list socialList">
<li class="asideMenu-item socialList-item">
<a rel="me auth" class="asideMenu-link u-url url" title="It's Eric Woodward's Gitea Instance" href="https://git.itsericwoodward.com">My Git Repos</a>
</li>
<li class="asideMenu-item socialList-item">
<a rel="me" class="asideMenu-link u-url url" title="itsericwoodward on LinkedIn" href="https://www.linkedin.com/in/itsericwoodward">LinkedIn</a>
</li>
<li class="asideMenu-item socialList-item">
<a rel="me auth" class="asideMenu-link u-url url" title="ItsEricWoodward on GitHub" href="https://github.com/ItsEricWoodward">GitHub</a>
</li>
<li class="asideMenu-item socialList-item">
<a rel="me" class="asideMenu-link u-url url" title="EricPlaysGames on BoardGameGeek"
href="https://boardgamegeek.com/user/ericplaysgames">BoardGameGeek</a>
</li>
<li class="asideMenu-item socialList-item">
<a rel="me" class="asideMenu-link u-url url u-email" title="&#69;&#109;&#97;&#105;&#108;" href="&#109;&#x61;&#x69;&#108;&#116;&#x6f;&#58;&#x65;&#x72;&#x69;&#x63;&#64;&#x69;&#116;&#x73;&#x65;&#114;&#x69;&#x63;&#119;&#111;&#111;&#x64;&#x77;&#97;&#x72;&#100;&#x2e;&#99;&#111;&#109;">&#69;&#109;&#97;&#105;&#108;</a>
</li>
<!--
<li class="asideMenu-item socialList-item">
<a rel="pgpkey" class="asideMenu-link u-url url" type="application/pgp-keys" title="PGP Public Key" href="/files/public.aexpk">
PGP Key
</a>
</li>
-->
<li class="asideMenu-item socialList-item">
<a class="asideMenu-link" href="http://h2vx.com/vcf/https%3A//itsericwoodward.com">
Add to Address Book
</a>
</li>
</ul>
</aside>
<% } %>
<!-- BIO END-->

View File

@@ -0,0 +1,16 @@
<!-- BOTTOM BEGIN -->
</div>
<script type="text/javascript" src="/scripts/1-docready.min.js"></script>
<script type="text/javascript" src="/scripts/2-es6-promise.auto.min.js"></script>
<script type="text/javascript" src="/scripts/3-lazy-progressive-enhancement.min.js"></script>
<script type="text/javascript" src="/scripts/4-js.cookie.min.js"></script>
<script type="text/javascript" src="/scripts/5-fontfaceobserver.min.js"></script>
<script type="text/javascript" src="/scripts/6-classlist.min.js"></script>
<script type="text/javascript" src="/scripts/7-dayjs.min.js"></script>
<script type="text/javascript" src="/scripts/scripts.js"></script>
</body>
</html>
<!-- BOTTOM END -->

View File

@@ -0,0 +1,14 @@
<%- include('../../functions') -%>
<% if (page.title && (page.render_opts || '').indexOf('no_title') == -1) { -%>
<h2>
<a
class="titleLink"
href="/<%= page.path %>"
id="<%= snakeCase(page.title) %>"
name="<%= snakeCase(page.title) %>"
><%= page.title %></a>
</h2>
<% } -%>
<%- content %>

View File

@@ -0,0 +1,108 @@
<%- include('../../functions') -%>
<%
var
journals = site.pages.filter(thePage => thePage.content_type === 'journal'),
curr = journals.filter(journal => journal.filePath === page.filePath),
currIndex = journals.map(journal => journal.filePath).indexOf(page.filePath),
prev = currIndex < (journals.length - 1) ? journals[currIndex + 1] : null,
next = currIndex > 0 ? journals[currIndex - 1] : null;
%>
<% if (page.title) { -%>
<h2>
<a class="p-name u-url" href="/<%= page.path %>"><%= page.title %></a>
</h2>
<% } -%>
<% if (page.readTime) { -%>
<p class="journal readTime">
<span class="icon glasses-icon">&#x1f453;</span> <%= page.readTime %>
</p>
<% } -%>
<% if (page.tldr || page.description) { -%>
<p><i>TL;DR &mdash; <%- page.tldr || page.description %></i></p>
<% } -%>
<div class="e-content">
<%- content %>
</div>
<footer class="update-footer clearfix">
<% if (Array.isArray(page?.tags) && page.tags.length) { -%>
<div class="update-tags">
<span class="icon folder-icon">&#x1f4c1;</span>
<% page.tags.forEach((tag, index) => { -%>
<%= index > 0 ? ' / ' : '' %>
<a href="/journal/tags/<%= tag %>/index.html">
#<span class="p-category category"><%= tag %></span>
</a>
<% }) -%>
</div>
<% } -%>
<!--
<span class="update-citation">[iew.us q/1g0k2]
<a class="u-shortlink" type="text/html" rel="shortlink" href="https://iew.us/q/1g0k2">&#128279;</a>
</span>
-->
<a rel="bookmark" href="/<%= page.path %>" class="u-url update-footer-link update-footer-time">
<time datetime="<%= page.date_pub %>"
class="dt-published published js-pubDate pubDate"
><%= prettyDate(page.date_pub) %></time>
</a>
<div class="update-nav clearfix">
<% if (prev) { -%>
<div class="update-nav-linkWrapper">
&lt; Previous Entry
<a class="update-nav-link update-nav-prev" href='/<%= prev.path %>'>
<%=prev.title%>
<br />
<span class="update-nav-pubDate">
(<time
datetime="<%= prev.date_pub %>"
class="dt-published published js-pubDate pubDate js-noRelativeTime"
><%= shortDate(prev.date_pub) %></time>)
</span>
</a>
</div>
<% } -%>
<% if (next) { -%>
<div class="update-nav-linkWrapper update-nav-nextWrapper">
Next Entry &gt;
<a class="update-nav-link update-nav-next" href='/<%= next.path %>'>
<%=next.title%>
<br />
<span class="update-nav-pubDate">
(<time
datetime="<%= next.date_pub %>"
class="dt-published published js-pubDate pubDate js-noRelativeTime"
><%= shortDate(next.date_pub) %></time>)
</span>
</a>
</div>
<% } -%>
</div>
</footer>

View File

@@ -0,0 +1,99 @@
<%- include('../../functions') -%>
<%
var
card_url = "http://gatherer.wizards.com/Pages/Search/Default.aspx?name=+[%22CARD-NAME%22]",
detail_url = "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=",
image_url = "/images/magic/commanders/",
deck = page.deck || {},
info = deck.info || {},
cards = deck.cards || [],
lands = deck.lands || [],
changes = deck.changes || [],
starting_lands = info.starting_lands || [],
commander = info.commander && info.commander_id ?
"<li><a href='" + detail_url + info.commander_id + "' target='_blank'>" + info.commander +
"</a> <em>(Commander)</em></li>" :
"",
commander_img = info.commander && info.commander_img ?
"<img src='" + image_url + info.commander_img + "' class='magic-commander-img' alt='" + info.commander + " card' />":
""
;
-%>
<h2>
<a href="/<%= page.path %>" name="<%= snakeCase(page.title) %>" id="<%= snakeCase(page.title) %>">
<%= page.title %>
</a>
</h2>
<p>
Below is my <strong><%= info.name %></strong> deck for <a href="https://magic.wizards.com/">Magic: the Gathering</a>
(<%= info.format %> format).
It was last updated on <%= info.date_upd %>.
</p>
<p>
Each card listed below is linked to its entry on <a href="http://gatherer.wizards.com/">The Gatherer</a>
(the official <abbr title="Magic: the Gatheirng">MtG</abbr> card database) and should open in a new window or tab in
your browser.
</p>
<h3> Decklist </h3>
<%- commander_img %>
<ul>
<%- commander %>
<% cards.forEach(function(card) { %>
<li><a href="<%- card_url.replace('CARD-NAME', card) %>" target="_blank"><%= card %></a></li>
<% }) %>
<% lands.forEach(function(land) { %>
<li><a href="<%- card_url.replace('CARD-NAME', land.type) %>" target="_blank"><%= land.type %></a> (x<%=land.count%>)</li>
<% }) %>
</ul>
<% if (starting_lands && starting_lands.length > 0) { %>
<h4>Starting Lands</h4>
<p>
In order to speed our games along, my gaming group allows everyone to start with 3 basic lands.
The lands listed below are included in the counts above.</p>
<ul>
<% starting_lands.forEach(function(land) { %>
<% if (typeof land === 'string') { %>
<li><a href="<%- card_url.replace('CARD-NAME', land) %>" target="_blank"><%= land %></a></li>
<% } else {%>
<li>
<a href="<%- card_url.replace('CARD-NAME', land.type) %>" target="_blank"><%= land.type %></a> (x<%=land.count%>)
</li>
<% } %>
<% }) %>
</ul>
<% } %>
<% if (changes && changes.length > 0) { %>
<h4>Changes from Previous Versions</h4>
<ul>
<% changes.forEach(function(change) { %>
<li>
Implemented <%= change.date_upd %>:
<ul>
<% if (change.adds) { %>
<% change.adds.forEach(function(add) { %>
<li><a href="<%- card_url.replace('CARD-NAME', add) %>" target="_blank"><%= add %></a> (added)</li>
<% }) %>
<% } %>
<% if (change.dels) { %>
<% change.dels.forEach(function(del) { %>
<li><a href="<%- card_url.replace('CARD-NAME', del) %>" target="_blank"><%= del %></a> (removed)</li>
<% }) %>
<% } %>
</ul>
</li>
<% }) %>
</ul>
<% } %>
<%- content %>

View File

@@ -0,0 +1,15 @@
<!-- EMBED-SWITCH BEGIN -->
<%
if (page.path && page.path.indexOf('/updates') === 0) {
-%>
<div class='embedSwitch'>
<form action='' method=''>
<input type='checkbox' id='toggle_embeds' name='toggle_embeds' class='toggleSwitch js-toggleEmbeds' />
<label for='toggle_embeds'><span class='toggleSwitch-info'>Enable Embedded Media<span></label>
</form>
</div>
<% } -%>
<!-- EMBED-SWITCH END -->

View File

@@ -0,0 +1,51 @@
<!-- FOOTER BEGIN -->
<footer id="footer" class="pageFooter pageSection clearfix">
<div class="pageFooter-inner">
<p class="pageFooter-dates">
<% if (page.date_pub && !isNaN(new Date(page.date_pub).getTime())) { -%>
Page first published:
<time datetime="<%= new Date(page.date_pub).toISOString() %>"><%= shortDate(new Date(page.date_pub).toISOString()) %></time>
<br />
<% } -%>
<% if (page.date_upd && !isNaN(new Date(page.date_upd).getTime())) { -%>
Page last updated:
<time datetime="<%= new Date(page.date_upd).toISOString() %>"><%= shortDate(new Date(page.date_upd).toISOString()) %></time>
<br />
<% } -%>
</p>
<p>
<a rel="license"
class="licenseLink"
href="http://creativecommons.org/licenses/by-sa/4.0/">
<img
alt="Creative Commons NC-BY-SA 4.0 License"
class="licenseImg"
src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png" />
</a>
Except where otherwise noted, content on this site is &copy; 2014-2022
<a
xmlns:cc="http://creativecommons.org/ns#"
href="<%=site.author.uri%>"
property="cc:attributionName"
rel="cc:attributionURL">
<%=site.author.name%></a>,
and is licensed under a
<a
rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
</p>
<p>
Background image by <a href="https://www.pexels.com/photo/programming-427722/">EMIL Ivanov / PEXELS</a>, used under the <a href="http://creativecommons.org/publicdomain/zero/1.0/">CC0 Public Domain License</a>.
</p>
<a href="#top" class="topLink">Back to Top</a>
</div>
</footer>
<!-- FOOTER END -->

View File

@@ -0,0 +1,30 @@
<!-- HEADER BEGIN -->
<header id="header" class="pageHeader pageSection">
<div class="pageHeader-titleBlock clearfix">
<h1 class="siteTitle"><a href="<%=site.base_uri%>" class="siteTitle-link"><%= site.title %></a></h1>
</div>
<div class="menubar clearfix">
<nav class="navMenu">
<ul class="navMenu-list">
<li class="navMenu-list-item"><a class="navMenu-list-link" href="/updates">Updates</a></li>
<li class="navMenu-list-item"><a class="navMenu-list-link" href="/projects.html">Projects</a></li>
<li class="navMenu-list-item"><a class="navMenu-list-link" href="/about.html">About</a></li>
</ul>
<div class="searchBox">
<form method="get" class="searchBox-form" id="searchForm" action="https://duckduckgo.com/">
<input id="searchQuery" class="searchBox-query" type="text" value="" name="q" maxlength="255" />
<input type="hidden" name="kl" value="us-en" /><!-- language -->
<input type="hidden" name="kh" value="1" /><!-- force https -->
<input type="hidden" name="kae" value="r" /><!-- theme = retro -->
<input type="hidden" name="k1" value="1" /><!-- tracker-less ads -->
<input type="hidden" name="sites" value="www.itsericwoodward.com"/>
<input type="submit" class="searchBox-go" value="🔍">
</form>
</div>
</nav>
</div>
</header>
<!-- HEADER END -->

View File

@@ -0,0 +1,60 @@
<aside class="asideContent asideRight asideLinkMenu asideMenu linkMenu">
<h4 class="asideMenu-title">
<a href="/journal/" class="asideMenu-title-link <%=page.name === 'index' ? 'isCurrent' : ''%>">Journal Entries</a>
</h4>
<h5 class="asideMenu-subtitle">By Year</h5>
<ul class="asideMenu-list">
<%
if (site?.pages) {
let
years = [];
site.pages.forEach(function(page) {
if (page.content_type && page.content_type === 'journal' && page.date_pub) {
let the_year = (new Date(page.date_pub)).getFullYear();
if (years.indexOf(the_year) === -1) {
years.push(the_year);
}
}
});
years = years.sort().reverse();
years.forEach((year) => {
-%>
<li class="asideMenu-item">
<a class="asideMenu-link <%= page.path.indexOf(year) > -1 ? 'isCurrent' : '' %>"
href="/journal/<%= year %>/index.html">
<%= year %>
</a>
</li>
<%
})
}
-%>
</ul>
<h5 class="asideMenu-subtitle">By Tags</h5>
<ul class="asideMenu-list">
<%
if (Array.isArray(site?.tags)) {
site.tags.forEach((tag) => {
-%>
<li class="asideMenu-item">
<a class="asideMenu-link <%= page.path.includes('/' + tag + '/') ? 'isCurrent' : '' %>"
href="/journal/tags/<%= tag %>/index.html">
#<%= tag %>
</a>
</li>
<%
})
}
else {
-%>
<%= JSON.stringify(site.tags, null, 2) -%>
<%
}
-%>
</ul>
</aside>

View File

@@ -0,0 +1,43 @@
<aside class="asideContent asideRight asideLinkMenu asideMenu linkMenu">
<h4 class="asideMenu-title">
<a href="/linklists/" class="asideMenu-title-link <%=page.name === 'index' ? 'isCurrent' : ''%>">More LinkLists</a>
</h4>
<ul class="asideMenu-list">
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'blogroll' ? 'isCurrent' : ''%>"
href="/linklists/blogroll.html">
Blogroll
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'free_gamedev' ? 'isCurrent' : ''%>"
href="/linklists/free_gamedev.html">
Free Game Dev Resources
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'muck_stuff' ? 'isCurrent' : ''%>"
href="/linklists/muck_stuff.html">
MUCK Resources
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'pd_comics' ? 'isCurrent' : ''%>"
href="/linklists/pd_comics.html">
PD Comic Book Resources
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'tabletop_rpg' ? 'isCurrent' : ''%>"
href="/linklists/tabletop_rpg.html">
Tabletop Role-Playing Game Resources
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'web_game_tuts' ? 'isCurrent' : ''%>"
href="/linklists/web_game_tuts.html">
Web and JS Game Design Tutorials
</a>
</li>
</ul>
</aside>

View File

@@ -0,0 +1,36 @@
<aside class="asideContent asideRight asideMenu">
<h4 class="asideMenu-title">
<a
href="/magic-cards/"
class="asideMenu-title-link <%=page.name === 'index' ? 'isCurrent' : ''%> backLink-titleLink"
>Custom Magic Cards</a
>
</h4>
<ul class="asideMenu-list">
<li class="asideMenu-item">
<a
class="asideMenu-link <%=page.name === 'dnd' ? 'isCurrent' : ''%>"
href="/magic-cards/dnd.html"
>
D&amp;D-Inspired Creatures
</a>
</li>
<li class="asideMenu-item">
<a
class="asideMenu-link <%=page.name === 'snm-planeswalkers' ? 'isCurrent' : ''%>"
href="/magic-cards/snm-planeswalkers.html"
>
The Planeswalkers of Saturday Night Magic
</a>
</li>
<li class="asideMenu-item">
<a
class="asideMenu-link <%=page.name === 'tokens' ? 'isCurrent' : ''%>"
href="/magic-cards/tokens.html"
>
Custom Tokens
</a>
</li>
</ul>
</aside>

View File

@@ -0,0 +1,62 @@
<aside class="asideContent asideRight asideMenu">
<h4 class="asideMenu-title">
<a href="/magic-decks/" class="asideMenu-title-link <%=page.name === 'index' ? 'isCurrent' : ''%> backLink-titleLink">Magic Decks (Commander)</a>
</h4>
<ul class="asideMenu-list">
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'edgar' ? 'isCurrent' : ''%>"
href="/magic-decks/edgar.html">
Edgar-World
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'estrid' ? 'isCurrent' : ''%>"
href="/magic-decks/estrid.html">
Estrid&apos;s Masks of Fate
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'ur-dragon' ? 'isCurrent' : ''%>"
href="/magic-decks/ur-dragon.html">
The Fight of Dragons
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'knights' ? 'isCurrent' : ''%>"
href="/magic-decks/knights.html">
Hard Day&apos;s Knight
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'saheeli' ? 'isCurrent' : ''%>"
href="/magic-decks/saheeli.html">
Saheeli-Thopters
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'slimefoot' ? 'isCurrent' : ''%>"
href="/magic-decks/slimefoot.html">
Slimefoot&#39;s Sapsuckers
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'hidetsugu' ? 'isCurrent' : ''%>"
href="/magic-decks/hidetsugu.html">
Tap-Bomb
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'temmet' ? 'isCurrent' : ''%>"
href="/magic-decks/temmet.html">
Temmet&#39;s Invisi-Tokens
</a>
</li>
<li class="asideMenu-item">
<a class="asideMenu-link <%=page.name === 'wrexial' ? 'isCurrent' : ''%>"
href="/magic-decks/wrexial.html">
Wrexial Rising
</a>
</li>
</ul>
</aside>

View File

@@ -0,0 +1,21 @@
<!-- MENUSUB BEGIN -->
<% if (page.section && page.subsection && page.section === 'games') { %>
<% if (page.subsection === 'anachronism') { %>
<%- include('anachronism/menusub') %>
<% } else if (page.subsection === 'magic-cards' && page.name !== 'index') { %>
<%- include('magic-cards/menusub') %>
<% } else if (page.subsection === 'magic-decks' && page.name !== 'index') { %>
<%- include('magic-decks/menusub') %>
<% } else if (page.subsection === 'thur' && page.name !== 'index') { %>
<%- include('thur/menusub') %>
<% } %>
<% } else if (page.section && page.subsection && page.section === 'web') { %>
<% if (page.subsection === 'linklists' && page.name !== 'index') { %>
<%- include('linklists/menusub') %>
<% } %>
<% } else if (page.content_type === 'journal') { %>
<%- include('journal/menusub') %>
<% } %>
<!-- MENUSUB END -->

View File

@@ -0,0 +1,40 @@
<!-- NAVMAIN BEGIN -->
<div class="menubar clearfix">
<nav class="navMenu">
<ul class="navMenu-list">
<!--
<li class="navMenu-list-item"><a class="navMenu-list-link<%= (page.path && page.path.indexOf('/updates') === 0 ? ' isCurrentSection' : '') %>" href="/updates">Updates</a></li>
-->
<li class="navMenu-list-item"><a
class="navMenu-list-link<%= (page.section && page.section === 'games' ? ' isCurrentSection' : '') %>"
href="/games/index.html">Games</a></li>
<li class="navMenu-list-item"><a
class="navMenu-list-link<%= (page.section && page.section === 'web' ? ' isCurrentSection' : '') %>"
href="/web.html">Web</a></li>
<li class="navMenu-list-item"><a
class="navMenu-list-link<%= (page.path && page.path.indexOf('journal') === 0 ? ' isCurrentSection' : '') %>"
href="/journal/index.html">Journal</a></li>
<li class="navMenu-list-item"><a
class="navMenu-list-link<%= (page.path && page.path.indexOf('about') === 0 ? ' isCurrentSection' : '') %>"
href="/about.html">About</a></li>
<li class="navMenu-list-item"><a
class="navMenu-list-link<%= (page.path && page.path.indexOf('now') === 0 ? ' isCurrentSection' : '') %>"
href="/now.html">Now</a></li>
</ul>
<div class="searchBox">
<form method="get" class="searchBox-form" id="searchForm" action="https://duckduckgo.com/">
<input id="searchQuery" class="searchBox-query" type="text" value="" name="q" maxlength="255">
<input type="hidden" name="kl" value="us-en" /><!-- language -->
<input type="hidden" name="kh" value="1" /><!-- force https -->
<input type="hidden" name="kae" value="r" /><!-- theme = retri -->
<input type="hidden" name="k1" value="1" /><!-- tracker-less ads -->
<input type="hidden" name="sites" value="<%= site.base_uri %>"/>
<input type="submit" class="searchBox-go" value="🔍">
</form>
</div>
</nav>
</div>
<!-- NAVMAIN END -->

View File

@@ -0,0 +1,17 @@
<% const { pageCount, pageNum } = page; -%>
<% if (pageNum && pageCount > 1) { -%>
<div class="pageMenu">
Pages
<br />
<% for (let i=1; i <= pageCount; i++) { -%>
<% if (i === (pageNum + 1)) { -%>
<a class="boxLink" href="page<%= i -%>.html" rel="next"><%= i -%></a>
<% } else if (i === (pageNum - 1)) { -%>
<a class="boxLink" href="<%= i === 1 ? 'index' : `page${i}`-%>.html" rel="prev"><%= i -%></a>
<% } else { -%>
<a class="boxLink <%= i === pageNum ? 'isCurrent' : '' -%>" href="page<%= i -%>.html"><%= i -%></a>
<% } -%>
<% } -%>
</div>
<% } -%>

View File

@@ -0,0 +1,43 @@
<aside class="asideContent asideRight asideThurMenu asideMenu thurMenu">
<h4 class="asideMenu-title thurMenu-title">
<a href="/thur/" class="asideMenu-title-link <%=page.name === 'index' ? 'isCurrent' : ''%> backLink-titleLink">The World of Thur</a>
</h4>
<ul class="asideMenu-list thurMenu-list">
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'rules' ? 'isCurrent' : ''%>"
href="/thur/rules.html">
Game Rules
</a>
</li>
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'knowledge' ? 'isCurrent' : ''%>"
href="/thur/knowledge.html">
General Knowledge
</a>
</li>
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'regions' ? 'isCurrent' : ''%>"
href="/thur/regions.html">
Regions &amp; Realms
</a>
</li>
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'races' ? 'isCurrent' : ''%>"
href="/thur/races.html">
Sentient Races
</a>
</li>
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'classes' ? 'isCurrent' : ''%>"
href="/thur/classes.html">
Classes &amp; Crafts
</a>
</li>
<li class="asideMenu-item thurMenu-item">
<a class="asideMenu-link <%=page.name === 'magic' ? 'isCurrent' : ''%>"
href="/thur/magic.html">
Magic &amp; Spells
</a>
</li>
</ul>
</aside>

View File

@@ -0,0 +1,11 @@
<!-- TOOLBAR BEGIN -->
<div class="toolbar clearfix">
<a href="/" class="logoBtn">
<img src="/images/mw-logo-wide-300x70.png" class="toolbar-logo" />
</a>
<a href="#pageMenu" class="linkButton linkButton-pageMenu js-linkButton-pageMenu">Menu</a>
</div>
<!-- TOOLBAR END -->

View File

@@ -0,0 +1,88 @@
<!-- TOP BEGIN -->
<%
const
getPageField = (field_name) => {
return page[field_name] || site[field_name] || '';
},
getUrl = () => site.base_uri + (site.base_uri.endsWith('/') ? '' : '/') + page.path;
-%>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie lt-ie10 lt-ie9 lt-ie8 lt-ie7" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie lt-ie10 lt-ie9 lt-ie8" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie lt-ie10 lt-ie9" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie lt-ie10" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <![endif]-->
<!--[if gt IE 9]> <html class="no-js ie" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <![endif]-->
<!--[if !IE]>--> <html class="no-js" lang="en" xmlns:fb="http://ogp.me/ns/fb#"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<base href="<%= getUrl() %>" />
<title><%= page.title ? page.title + ' | ' : ''%><%= page.sub_title ? page.sub_title + ' | ' : ''%><%= site.title %></title>
<link rel="pgpkey" type="application/pgp-keys" title="PGP Public Key" href="/files/public.aexpk" />
<!-- Courtesy of https://www.favicon-generator.org/ -->
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/images/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/images/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/images/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/images/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/images/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/images/favicons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicons/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#9aa8bc">
<meta name="msapplication-TileImage" content="/images/favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#9aa8bc">
<meta name="description" content="<%= getPageField('description') %>">
<meta name="author" content="<%= (page.author || site.author).name %>">
<meta name="generator" content="Gulp"/>
<meta name="keywords" content="<%= getPageField('keywords') %>">
<meta name="robots" content="<%= getPageField('robots') %>">
<!-- Open Graph -->
<meta property="og:type" content="website" />
<meta property="og:url" content="<%= site.base_uri %><%= page.path %>" />
<meta property="og:site_name" content="<%= site.title %>" />
<meta property="og:title" content="<%= getPageField('title') %>" />
<% if (page.image) { %>
<meta property="og:image" content="<%= page.image %>"/>
<% } %>
<% if (page.description) { %>
<meta property="og:description" content="<%= page.description %>" />
<% } %>
<!-- Twitter Card -->
<% if (page.image) { %>
<meta name="twitter:card" content="summary_large_image" />
<% } else { %>
<meta name="twitter:card" content="summary" />
<% } %>
<meta name="twitter:url" content="<%= site.base_uri %><%= page.path %>" />
<meta name="twitter:title" content="<%= getPageField('title') %>" />
<meta name="twitter:description" content="<%= getPageField('description') %>" />
<meta name="twitter:image:src" content="<%= getPageField('image') %>" />
<% if (page.author && page.author.twitter) { %>
<meta name="twitter:creator" content="<%= page.author.twitter %>" />
<% } else if (site.author && site.author.twitter) { %>
<meta name="twitter:creator" content="<%= site.author.twitter %>" />
<% } %>
<link rel="start" href="<%= site.base_uri %>/"/>
<link rel="contents" href="/sitemap.xml" title="Sitemap"/>
<link rel="alternate" type="application/rss+xml" title="Recent Changes" href="/feed"/>
<link rel="canonical" href="<%= site.base_uri %><%= page.path %>"/>
<link rel="stylesheet" href="/styles/imports.css" type="text/css" />
<link rel="stylesheet" href="/styles/fonts.css" type="text/css" />
<link rel="stylesheet" href="/styles/styles.css" type="text/css" />
</head>
<!-- TOP END -->

View File

161
src/layouts/tag.ejs Normal file
View File

@@ -0,0 +1,161 @@
<%
var cwd = (process && process.cwd) ? process.cwd() : '';
var titleLink = (site && site.base_uri) ? site.base_uri : '/';
const { entriesToList, pageCount, pageNum, tag } = page;
-%>
<%- include('partials/top') %>
<!-- BEGIN TAG PAGE -->
<body class='postMainIndex'>
<a name="top" id="topAnchor" class="topAnchor"></a>
<div class="page">
<header id="header" class="pageHeader pageSection">
<div class="pageHeader-titleBlock clearfix">
<h1 class="siteTitle"><a href="<%= titleLink %>" class="siteTitle-link"><%= site.title %></a></h1>
</div>
<%- include('partials/navmain') %>
</header>
<main id="content" class="pageMain pageSection">
<div class="pageMain-inner">
<%- include('partials/embed_switch') -%>
<%- include('functions') -%>
<% if (page.title && (page.render_opts || '').indexOf('no_title') == -1) { -%>
<h2>
Journal Entries By Tag: <a
class="boxLink isCurrent"
href="<%= page.path %>"
id="<%= snakeCase(page.title) %>"
name="<%= snakeCase(page.title) %>"
>#<%= tag -%></a>
</h2>
<% if (pageCount > 1) { -%>
<p>
(Page <%= pageNum %> of <%= pageCount %>)
</p>
<% } -%>
<p>
Assorted journal entries with the tag <em>#<%= tag %></em>.
</p>
<hr class="feedLine">
<p>
<% } -%>
<% if (content && Array.isArray(entriesToList)) { -%>
<% entriesToList.forEach((page) => { -%>
<article class="update journal h-entry js-update">
<div class="p-author author h-card vcard authorHidden">
<% if (page.author && page.author.site && page.author.name) { -%>
<% if (page.author.photo) { -%>
<a href="<%= page.author.site %>"><img class="u-photo" src="<%= page.author.photo %>"></a>
<% } -%>
<a class="p-name fn u-url url" rel="author" href="<%= page.author.site %>"><%= page.author.name %></a>
<% } else if (site.author && site.author.site && site.author.name) { -%>
<% if (site.author.photo) { -%>
<a href="<%= site.author.site %>"><img class="u-photo" src="<%= site.author.photo %>"></a>
<% } -%>
<a class="p-name fn u-url url" rel="author" href="<%= site.author.site %>"><%= site.author.name %></a>
<% } -%>
</div>
<h3 id="<%= snakeCase(page.title) %>" >
<a class="p-name u-url" href="/<%= page.path %>"><%= page.title %></a>
</h3>
<% if (page.tldr || page.description) { -%>
<p><i>TL;DR &mdash; <%- page.tldr || page.description %></i></p>
<% } -%>
<% if (page.readTime) { -%>
<p class="journal readTime">
<span class="icon glasses-icon">&#x1f453;</span> <%= page.readTime %>
</p>
<% } -%>
<% if (page.content) { -%>
<div class="e-content">
<%- page.content %>
</div>
<% } -%>
<footer class="update-footer clearfix">
<% if (Array.isArray(page?.tags) && page.tags.length) { -%>
<div class="update-tags">
<span class="icon folder-icon">&#x1f4c1;</span>
<% page.tags.forEach((tag, index) => { -%>
<%= index > 0 ? ' / ' : '' %>
<a href="/journal/tags/<%= tag %>/index.html">
#<span class="p-category category"><%= tag %></span>
</a>
<% }) -%>
</div>
<% } -%>
<!--
<span class="update-citation">[iew.us q/1g0k2]
<a class="u-shortlink" type="text/html" rel="shortlink" href="https://iew.us/q/1g0k2">&#128279;</a>
</span>
-->
<a rel="bookmark" href="/<%= page.path %>" class="u-url update-footer-link update-footer-time">
<time datetime="<%= page.date_pub %>"
class="dt-published published js-pubDate pubDate"
><%= prettyDate(page.date_pub) %></time>
</a>
</footer>
</article>
<p class="backLink">
<a class="backLink-link" href="#top">Top</a>
</p>
<hr class="feedLine">
<% }) -%>
<% } -%>
<%- include('partials/pageMenu') %>
<!-- END TAG PAGE -->
</div>
</main>
<%- include('partials/journal/menusub') %>
<%- include('partials/bio') %>
<%- include('partials/footer') %>
</div>
<%- include('partials/bottom') %>