Initial commit
This commit is contained in:
83
src/support/_sitemap.ejs.broken
Normal file
83
src/support/_sitemap.ejs.broken
Normal file
@@ -0,0 +1,83 @@
|
||||
<%
|
||||
/*
|
||||
Not sure it's worth the effort for this ATM.
|
||||
*/
|
||||
|
||||
var
|
||||
generateSitemapList = function(the_head, the_tail) {
|
||||
var
|
||||
sortForIndex = function(a,b) {
|
||||
if (a === 'index.html' || a<b) {
|
||||
return -1;
|
||||
}
|
||||
if (b === 'index.html' || a>b) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
filter = /(\.html$)/,
|
||||
replace = /(\.html$)|(^index\.html$)/,
|
||||
tree = function (head, tail) {
|
||||
var
|
||||
output = '',
|
||||
tree_output = '',
|
||||
data, content;
|
||||
for (var key in head) {
|
||||
var
|
||||
val = head[key];
|
||||
if (key !== '.git') {
|
||||
if (key == '_data') {
|
||||
data = val;
|
||||
} else if (key == '_contents') {
|
||||
content = val;
|
||||
} else {
|
||||
tree_output += tree(val, tail + key + "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (content && data) {
|
||||
content
|
||||
.sort(sortForIndex)
|
||||
.forEach (function(file) {
|
||||
var
|
||||
slug = file.replace(filter, ""),
|
||||
file_data = data && data[slug] ? data[slug] : {},
|
||||
now = new Date(),
|
||||
show_item = false,
|
||||
title, date;
|
||||
if (filter.test(file)) {
|
||||
show_item = true;
|
||||
if (file_data) {
|
||||
var
|
||||
is_draft = file_data.is_draft || false,
|
||||
is_sys_file = file_data.is_sys_file || false,
|
||||
title = (file_data.title || '').trim();
|
||||
if (is_draft || is_sys_file || title === '') {
|
||||
show_item = false;
|
||||
} else {
|
||||
date = file_data.date_last_mod ? new Date(file_data.date_last_mod) : '';
|
||||
date = date !== '' && file_data.date_pub ? new Date(file_data.date_pub) : '';
|
||||
if ((date && date.getTime() > now.getTime())) {
|
||||
show_item = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (show_item) {
|
||||
output +=
|
||||
(file === 'index.html' ? '\n<ul>' : '') +
|
||||
'\n<li><a href="' + tail + file + '">' + title + '</a></li>\n';
|
||||
}
|
||||
});
|
||||
output += '\n</ul>';
|
||||
}
|
||||
return output + tree_output;
|
||||
};
|
||||
return tree(the_head, the_tail);
|
||||
};
|
||||
%>
|
||||
<h2>Site Map</h2>
|
||||
<ul>
|
||||
<%- generateSitemapList(public, "/") %>
|
||||
</ul>
|
2
src/support/browserconfig.xml.ejs
Normal file
2
src/support/browserconfig.xml.ejs
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/images/favicons/ms-icon-70x70.png"/><square150x150logo src="/images/favicons/ms-icon-150x150.png"/><square310x310logo src="/images/favicons/ms-icon-310x310.png"/><TileColor>#9aa8bc</TileColor></tile></msapplication></browserconfig>
|
84
src/support/errors/404.html.ejs
Normal file
84
src/support/errors/404.html.ejs
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>It's Eric Woodward! (dotcom) | Page Not Found</title>
|
||||
<style>
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a,
|
||||
a:link {
|
||||
color: #c9bb69;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #c57f5d;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #efb88f;
|
||||
}
|
||||
|
||||
a:active {
|
||||
background-color: #8c272d;
|
||||
color: #efb88f;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url("/images/404-opte-1000x800.jpg") no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
color: #fff;
|
||||
line-height: 1.3em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
background-color: #333333;
|
||||
background-color: rgba(33,33,33,.7);
|
||||
border-radius: 1em;
|
||||
max-width: 30em;
|
||||
width: 100%;
|
||||
padding: 2em;
|
||||
margin: 2em auto;
|
||||
}
|
||||
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
<p>It looks like this was the result of either:</p>
|
||||
<ul>
|
||||
<li>a mistyped address,</li>
|
||||
<li>an out-of-date link, or</li>
|
||||
<li>a side effect of <a href="https://en.wikipedia.org/wiki/Hackers_(film)">some n00b trying to hack "The Gibson"</a>.</li>
|
||||
</ul>
|
||||
<p>You can <a href="javascript:history.go(-1);" title="Go back and hack!">go back and try again</a>, or just start over at <a href="/" title="Give up and go to 127.0.0.1!">It's Eric Woodward's front page</a>.</p>
|
||||
<form name="404SearchForm" id="404SearchForm" action="https://duckduckgo.com/" method="GET">
|
||||
<input type="text" 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" value="Search" />
|
||||
<input type="reset" value="Clear" />
|
||||
<p>Powered by DuckDuckGo</p>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
src/support/errors/offline.ejs.off
Normal file
9
src/support/errors/offline.ejs.off
Normal file
@@ -0,0 +1,9 @@
|
||||
<%
|
||||
var
|
||||
title = "Offline",
|
||||
text = [
|
||||
' <p>Sorry, but you are currently offline, and don't have that page in your cache.</p>',
|
||||
' <p>You should still be able to go to any page you've already visited (just not this one, apparently).</p>'
|
||||
].join('\n');
|
||||
-%>
|
||||
<%- partial("_error_page", {title: title, text: text, show_search: false}) %>
|
68
src/support/feed.json.ejs
Normal file
68
src/support/feed.json.ejs
Normal file
@@ -0,0 +1,68 @@
|
||||
<%
|
||||
// There's an issue here with trailing commas.
|
||||
// A better solution would probably be to pull the data in I need, build an object, and then dump it via JSON.stringify()
|
||||
// reference: https://jsonfeed.org/version/1.1
|
||||
|
||||
const
|
||||
|
||||
prependSlash = (pagePath) => `${pagePath.indexOf('/') === 0 ? '' : '/'}${pagePath}`,
|
||||
|
||||
{ author, copyright, language, tags } = site,
|
||||
|
||||
feedData = {
|
||||
version: 'https://jsonfeed.org/version/1.1',
|
||||
title: site.title,
|
||||
home_page_url: `${site.uri}`,
|
||||
feed_url: `${site.uri}/feed.json`,
|
||||
authors: [],
|
||||
items: [],
|
||||
};
|
||||
|
||||
if (author) {
|
||||
|
||||
const { name, email, photo, site: aSite } = author || {};
|
||||
const newAuthor = {};
|
||||
|
||||
if (email) newAuthor.email = email;
|
||||
if (name) newAuthor.name = name;
|
||||
if (photo) newAuthor.photo = `${site.uri}${photo}`;
|
||||
if (aSite) newAuthor.site = aSite;
|
||||
|
||||
feedData.authors.push(newAuthor);
|
||||
|
||||
}
|
||||
|
||||
if (Array.isArray(site?.pages)) {
|
||||
|
||||
feedData.items.push(...site.pages
|
||||
.sort((p1, p2) => {
|
||||
|
||||
const p1Date = new Date(p1.date_upd || p1.date_pub);
|
||||
const p2Date = new Date(p2.date_upd || p2.date_pub);
|
||||
|
||||
return p2Date - p1Date;
|
||||
|
||||
})
|
||||
.map((page) => {
|
||||
|
||||
const { body, content, date_pub, date_upd, description, path, tags } = page || {};
|
||||
const p = {
|
||||
id: `${site.uri}${prependSlash(path)}`,
|
||||
url: `${site.uri}${prependSlash(path)}`,
|
||||
};
|
||||
|
||||
if (body) p.content_text = body;
|
||||
if (content) p.content_html = content;
|
||||
if (date_pub) p.date_published = date_pub;
|
||||
if (date_upd) p.date_modified = date_upd;
|
||||
if (description) p.summary = description;
|
||||
if (Array.isArray(tags)) p.tags = tags;
|
||||
|
||||
return { ...p };
|
||||
|
||||
})
|
||||
);
|
||||
|
||||
}
|
||||
-%>
|
||||
<%- JSON.stringify(feedData, null, 2) -%>
|
73
src/support/feed.xml.ejs
Normal file
73
src/support/feed.xml.ejs
Normal file
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<%- include('../layouts/functions') -%>
|
||||
<%
|
||||
// validator: https://validator.w3.org/feed/#validate_by_input
|
||||
const { author, copyright, language, tags } = site;
|
||||
-%>
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title><%- site.title %></title>
|
||||
<link href="<%- site.uri %>/" />
|
||||
<updated><%- (new Date()).toJSON() -%></updated>
|
||||
<id><%- site.uri %></id>
|
||||
|
||||
<author>
|
||||
<% if (author.name) { -%>
|
||||
<name><%- author.name %></name>
|
||||
<% } -%>
|
||||
<% if (author.email) { -%>
|
||||
<email><%- author.email %></email>
|
||||
<% } -%>
|
||||
<% if (author.site) { -%>
|
||||
<uri><%- author.site %></uri>
|
||||
<% } -%>
|
||||
</author>
|
||||
|
||||
<link rel="self" href="<%- site.uri %>/feed.xml" />
|
||||
<% if (copyright) { -%>
|
||||
<rights><%= copyright %></rights>
|
||||
<% } -%>
|
||||
<% if (author.photo) { -%>
|
||||
<logo><%= author.photo %></logo>
|
||||
<% } -%>
|
||||
<generator>ItsEricWoodward.com</generator>
|
||||
|
||||
<%
|
||||
if (typeof tags === 'string') {
|
||||
const keywords = tags.split(/\W+/);
|
||||
for (var i=0; i < keywords.length; i++) {
|
||||
if (keywords[i]) {
|
||||
-%>
|
||||
<category><%= keywords[i] %></category>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
-%>
|
||||
|
||||
<% if (site && Array.isArray(site.pages)) {
|
||||
site.pages
|
||||
.sort((p1, p2) => {
|
||||
const p1Date = new Date(p1.date_upd || p1.date_pub);
|
||||
const p2Date = new Date(p2.date_upd || p2.date_pub);
|
||||
return p2Date - p1Date;
|
||||
})
|
||||
.forEach((page) => { -%>
|
||||
|
||||
<entry>
|
||||
<title type="html"><%= page.title %></title>
|
||||
<id><%- site.uri %><%- page.path %></id>
|
||||
<link href="<%- site.uri %><%- page.path %>" rel="alternate" />
|
||||
<updated><%= (new Date(page.date_upd || page.date_pub)).toJSON() %></updated>
|
||||
<% if (page.description) { -%>
|
||||
<summary type="html"><%= page.description %></summary>
|
||||
<% } -%>
|
||||
|
||||
</entry>
|
||||
<% });
|
||||
} -%>
|
||||
|
||||
</feed>
|
||||
|
41
src/support/manifest.json.ejs
Normal file
41
src/support/manifest.json.ejs
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "App",
|
||||
"icons": [
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "\/images\/favicons\/android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
13
src/support/opensearch.xml.ejs
Normal file
13
src/support/opensearch.xml.ejs
Normal file
@@ -0,0 +1,13 @@
|
||||
<%
|
||||
var
|
||||
uri = (site.base_uri || '').replace(/^https?:\/\//, '');
|
||||
-%>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns:moz="http://www.mozilla.org/2006/browser/search/"
|
||||
xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>itsericwoodward.com</ShortName>
|
||||
<Description>Search itsericwoodward.com</Description>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<Url method="get" type="text/html"
|
||||
template="https://duckduckgo.com/?q={searchTerms}+site%3A<%= uri %>&ia=web"/>
|
||||
</OpenSearchDescription>
|
2
src/support/robots.txt.ejs
Normal file
2
src/support/robots.txt.ejs
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /.well-known/
|
306
src/support/root/index.html.ejs
Normal file
306
src/support/root/index.html.ejs
Normal file
@@ -0,0 +1,306 @@
|
||||
<!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="https://itsericwoodward.com/" />
|
||||
<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="<%= site.base_uri %>/images/favicons/apple-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<%= site.base_uri %>/images/favicons/apple-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<%= site.base_uri %>/images/favicons/apple-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<%= site.base_uri %>/images/favicons/apple-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="<%= site.base_uri %>/images/favicons/apple-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="<%= site.base_uri %>/images/favicons/apple-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="<%= site.base_uri %>/images/favicons/apple-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="<%= site.base_uri %>/images/favicons/apple-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="<%= site.base_uri %>/images/favicons/apple-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="<%= site.base_uri %>/images/favicons/android-icon-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="<%= site.base_uri %>/images/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="<%= site.base_uri %>/images/favicons/favicon-96x96.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<%= site.base_uri %>/images/favicons/favicon-16x16.png">
|
||||
<meta name="msapplication-TileColor" content="#9aa8bc">
|
||||
<meta name="msapplication-TileImage" content="<%= site.base_uri %>/images/favicons/ms-icon-144x144.png">
|
||||
<meta name="theme-color" content="#9aa8bc">
|
||||
|
||||
<meta name="description" content="It's Eric Woodward's home page, the page of a geek, web developer, gamer, tinkerer, husband, father, and American cyborg, though not necessarily in that order.">
|
||||
<meta name="author" content="<%= site.author.name %>">
|
||||
<meta name="generator" content="Gulp"/>
|
||||
<meta name="keywords" content="geek, web developer, gamer, tinkerer, husband, father, American cyborg">
|
||||
<meta name="robots" content="">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://itsericwoodward.com/" />
|
||||
<meta property="og:site_name" content="<%= site.title %>" />
|
||||
<meta property="og:title" content="<%= site.title %>" />
|
||||
<meta property="og:image" content="<%= site.base_uri %>/images/eric-8bit.gif" />
|
||||
<meta property="og:description" content="It's Eric Woodward's home page, the page of a geek, web developer, gamer, tinkerer, husband, father, and American cyborg, though not necessarily in that order." />
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:url" content="<%= site.base_uri %>/" />
|
||||
<meta name="twitter:title" content="<%= site.title %>" />
|
||||
<meta name="twitter:description" content="It's Eric Woodward's home page, the page of a geek, web developer, gamer, tinkerer, husband, father, and American cyborg, though not necessarily in that order." />
|
||||
<meta name="twitter:image:src" content="<%= site.base_uri %>/images/eric-8bit.gif" />
|
||||
<meta name="twitter:creator" content="<%= site.author.twitter %>" />
|
||||
|
||||
<link rel="canonical" href="https://itsericwoodward.com/"/>
|
||||
<link rel="authorization_endpoint" href="https://indieauth.com/auth"/>
|
||||
|
||||
<style>
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #0d1852; /* Old browsers */
|
||||
background: url('<%= site.uri %>/images/code-bg.jpg') top fixed;
|
||||
color: #9aa8bc;
|
||||
font-family: sans-serif;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
border: 1px solid transparent;
|
||||
border-bottom: 1px dashed #25baba;
|
||||
color: #049c74;
|
||||
font-weight: bold;
|
||||
padding: 0 .2rem;
|
||||
text-decoration: none;
|
||||
-webkit-transition: .3s background-color, .3s color, .3s border-radius;
|
||||
transition: .3s background-color, .3s color, .3s border-radius;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
border: 1px solid #25baba;
|
||||
background-color: #25baba;
|
||||
border-radius: .3rem;
|
||||
color: #040308;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #094192;
|
||||
}
|
||||
|
||||
a:hover:visited {
|
||||
color: #040308;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 2px solid #04778f;
|
||||
margin: 1em 0;
|
||||
padding: 0 1em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #25baba;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #25baba;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #25baba;
|
||||
font-size: 1.22em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: #25baba;
|
||||
font-size: 1.12em;
|
||||
}
|
||||
|
||||
h5 {
|
||||
color: #25baba;
|
||||
font-size: 1.06em;
|
||||
}
|
||||
|
||||
h6 {
|
||||
color: #25baba;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
padding-left: 1.2em;
|
||||
}
|
||||
|
||||
code, kbd, pre, samp {
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
code, kbd {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
border-bottom: 1px solid transparent;
|
||||
color: #9aa8bc;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar:visited {
|
||||
color: #9aa8bc;
|
||||
}
|
||||
|
||||
.avatar-fig {
|
||||
margin: 1.5em 0 0.5em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.avatar-figcaption {
|
||||
background: #040308;
|
||||
background: rgba(4,3,8,.8);
|
||||
border: 1px solid #9aa8bc;
|
||||
border-radius: .5em;
|
||||
-webkit-transition: .3s background-color, .3s border-color;
|
||||
transition: .3s background-color, .3s border-color;
|
||||
}
|
||||
|
||||
.avatar:hover .avatar-figcaption {
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.avatar-img {
|
||||
max-width: 75%;
|
||||
width: 14em;
|
||||
}
|
||||
|
||||
.container {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
min-height: 90vh;
|
||||
}
|
||||
|
||||
.dataDiv {
|
||||
background: #040308;
|
||||
background: rgba(4,3,8,.8);
|
||||
border: 1px solid #9aa8bc;
|
||||
border-radius: .5em;
|
||||
display: inline-block;
|
||||
margin: 1em;
|
||||
max-width: 40em;
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
.webring {
|
||||
font-size: .9em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.webring-link {
|
||||
border: 1px solid #726f6a;
|
||||
border-radius: .3em;
|
||||
display: inline-block;
|
||||
line-height: .25em;
|
||||
padding: .25em;
|
||||
}
|
||||
|
||||
@media all and (min-width: 35em) {
|
||||
html {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 40em) {
|
||||
html {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container h-card vcard">
|
||||
<a href="/"
|
||||
class="avatar url fn u-url u-uid url icon-container"
|
||||
rel="author">
|
||||
<figure class="avatar-fig">
|
||||
<img
|
||||
class="photo u-photo avatar-img"
|
||||
alt="It's Eric Woodward's avatar"
|
||||
src="<%= site.uri %>/images/eric-8bit.gif"/>
|
||||
<br />
|
||||
<figcaption class="avatar-figcaption">It's <span class="p-name">Eric Woodward</span>!</figccaption>
|
||||
</figure>
|
||||
</a>
|
||||
|
||||
<div class="dataDiv">
|
||||
|
||||
<p class="p-role role p-note">
|
||||
My name is <a class="p-name fn u-url u-uid url"
|
||||
href="/">Eric Woodward</a>, and 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>
|
||||
|
||||
<p>You can find out more
|
||||
<a href="<%= site.uri %>/about.html">about me</a> by
|
||||
checking out
|
||||
<a rel="me" class="u-url url"
|
||||
title="It's Eric Woodward's Website"
|
||||
href="<%= site.uri %>/">my website</a>
|
||||
or perusing
|
||||
<a rel="me authn" class="u-url url"
|
||||
title="It's Eric Woodward's Git Repos"
|
||||
href="https://git.itsericwoodward.com/eric/">my code</a>.
|
||||
If you want to reach me, you can send me an <a rel="me" class="u-url url u-email" title="Email"
|
||||
href="mailto:eric@itsericwoodward.com">Email</a>,
|
||||
<!-- (securely, if you want to use my
|
||||
<a rel="pgpkey" type="application/pgp-keys" title="PGP Public Key" href="/files/public.aexpk">PGP Key</a>),-->
|
||||
or you can find me on
|
||||
<a rel="me" class="u-url url" title="itsericwoodward on LinkedIn"
|
||||
href="https://www.linkedin.com/in/itsericwoodward">LinkedIn</a>,
|
||||
<a rel="me authn" class="u-url url" title="ItsEricWoodward on GitHub"
|
||||
href="https://github.com/ItsEricWoodward">GitHub</a>, or
|
||||
<a rel="me" class="u-url url" title="EricPlaysGames on BoardGameGeek"
|
||||
href="https://boardgamegeek.com/user/ericplaysgames">BoardGameGeek</a>.
|
||||
Alternatively, you can grab my
|
||||
<a href="http://h2vx.com/vcf/https%3A//itsericwoodward.com">vCard</a> and add me to your address book.
|
||||
</p>
|
||||
<p class="webring">
|
||||
<a href="https://xn--sr8hvo.ws/1️⃣🖲/previous" class="webring-link">←</a>
|
||||
An IndieWeb Webring 🕸💍
|
||||
<a href="https://xn--sr8hvo.ws/1️⃣🖲/next" class="webring-link">→</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
77
src/support/sitemap-v2.xml.ejs.broken
Normal file
77
src/support/sitemap-v2.xml.ejs.broken
Normal file
@@ -0,0 +1,77 @@
|
||||
<%
|
||||
/*
|
||||
This is broken too, adds an unnecessary "undefine" to output.
|
||||
*/
|
||||
|
||||
var
|
||||
generateSitemapXML = function(the_head, the_tail, the_base) {
|
||||
var
|
||||
filter = /(\.html$)/,
|
||||
replace = /(\.html$)|(^index\.html$)/,
|
||||
tree = function (head, tail, base) {
|
||||
var
|
||||
output = '',
|
||||
tree_output = '',
|
||||
data, content;
|
||||
for (var key in head) {
|
||||
var
|
||||
val = head[key];
|
||||
if (key && val && key !== '.git') {
|
||||
if (key == '_data') {
|
||||
data = val;
|
||||
} else if (key == '_contents') {
|
||||
content = val;
|
||||
} else {
|
||||
tree_output += tree(val, tail + key + "/", base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (content) {
|
||||
for (var i in content) {
|
||||
var
|
||||
file = content[i],
|
||||
slug = file.replace(filter, ""),
|
||||
file_data = data && data[slug] ? data[slug] : {},
|
||||
now = new Date(),
|
||||
show_item = false,
|
||||
upd_date;
|
||||
if (filter.test(file)) {
|
||||
show_item = true;
|
||||
if (file_data) {
|
||||
var
|
||||
is_draft = file_data.is_draft || false,
|
||||
is_sys_file = file_data.is_sys_file || false,
|
||||
title = (file_data.title || '').trim();
|
||||
if (is_draft || is_sys_file || title === '') {
|
||||
show_item = false;
|
||||
} else {
|
||||
upd_date = file_data.date_last_mod ? new Date(file_data.date_last_mod) : '';
|
||||
upd_date = upd_date !== '' && file_data.date_pub ? new Date(file_data.date_pub) : '';
|
||||
if ((upd_date && upd_date.getTime() > now.getTime())) {
|
||||
show_item = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
show_item = false;
|
||||
}
|
||||
}
|
||||
if (show_item) {
|
||||
output +=
|
||||
'\n<url>\n <loc>' + the_base + tail + file + '</loc>\n' +
|
||||
(upd_date ? '\n <lastmod>' + upd_date.toUTCString() + '</lastmod>' : '') + '\n</url>';
|
||||
}
|
||||
}
|
||||
return output + (['','undefined'].indexOf(tree_output.trim()) == -1 ? tree_output : '');
|
||||
}
|
||||
};
|
||||
return tree(the_head, the_tail, the_base)
|
||||
.replace('undefined', ''); // hack, not sure where the extra "undefined" is coming from. TODO: Fix this
|
||||
}
|
||||
-%>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
||||
<%- generateSitemapXML(public, "/", site.uri.production) %>
|
||||
</urlset>
|
62
src/support/sitemap.html.ejs.off
Normal file
62
src/support/sitemap.html.ejs.off
Normal file
@@ -0,0 +1,62 @@
|
||||
<%
|
||||
var
|
||||
generateSitemapList = function(the_head, the_tail) {
|
||||
var
|
||||
filter = /(\.html$)/,
|
||||
replace = /(\.html$)|(^index\.html$)/,
|
||||
tree = function (head, tail) {
|
||||
var
|
||||
output = '',
|
||||
tree_output = '',
|
||||
data, content;
|
||||
for (var key in head) {
|
||||
var
|
||||
val = head[key];
|
||||
if (key !== '.git') {
|
||||
if (key == '_data') {
|
||||
data = val;
|
||||
} else if (key == '_contents') {
|
||||
content = val;
|
||||
} else {
|
||||
tree_output += tree(val, tail + key + "/");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (content && data) {
|
||||
for (var i in content) {
|
||||
var
|
||||
file = content[i],
|
||||
slug = file.replace(replace, ""),
|
||||
file_data = data && data[slug] ? data[slug] : {},
|
||||
now = new Date(),
|
||||
show_item = false,
|
||||
title, date;
|
||||
if (filter.test(file) && !(/^404\.html/).test(file)) {
|
||||
show_item = true;
|
||||
if (file_data) {
|
||||
var is_draft = file_data.is_draft || false;
|
||||
date = file_data.date_pub ? new Date(file_data.date_pub) : '';
|
||||
title = file_data.title || '';
|
||||
if (is_draft || title === '' || (date && date.getTime() > now.getTime())) {
|
||||
show_item = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (show_item) {
|
||||
// file = file.replace(replace, "");
|
||||
output +=
|
||||
'\n<li><a href="' + tail + file + '">' + title + '</a></li>\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
return output + tree_output;
|
||||
};
|
||||
return tree(the_head, the_tail);
|
||||
};
|
||||
%>
|
||||
|
||||
<urlset>
|
||||
<%- generateSitemapList(public, "/") %>
|
||||
</urlset>
|
||||
|
16
src/support/sitemap.xml.ejs
Normal file
16
src/support/sitemap.xml.ejs
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<%- include('../layouts/functions') -%>
|
||||
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<% if (site && Array.isArray(site.pages)) {
|
||||
site.pages
|
||||
.sort(sortByPath)
|
||||
.forEach((page) => { -%>
|
||||
<url>
|
||||
<loc><%= page.path %></loc>
|
||||
<lastmod><%= (new Date(page.date_upd || page.date_pub)).toJSON() %></lastmod>
|
||||
</url>
|
||||
<% });
|
||||
} -%>
|
||||
|
||||
</urlset>
|
Reference in New Issue
Block a user