Initial commit - v0.1.0

This commit is contained in:
2018-07-07 02:08:17 -04:00
commit 769c04c294
39 changed files with 7997 additions and 0 deletions

14
templates/default.ejs Executable file
View File

@@ -0,0 +1,14 @@
<%- include("partials/top") %>
<body>
<div class="page <%= (page.category || '').toLowerCase() %> <%= (page.name || '') %>">
<header id="header" class="pageHeader pageSection">
<div class="pageHeader-inner clearfix">
<h1 class="siteTitle"><a href="/" class="siteTitle-link"><img src="https://social.wonderdome.net/static/wonderdome-logo.png" alt="<%= site.title %>" class="logoImg"></a></h1>
</div>
</header>
<main id="content" class="pageMain pageSection">
<div class="pageMain-inner">
<%- content %>
</div>
</main>
<%- include("partials/bottom") %>

42
templates/partials/bottom.ejs Executable file
View File

@@ -0,0 +1,42 @@
<footer id="footer" class="pageFooter footer" role="contentinfo">
<div class="footer-inner clearfix">
<p xmlns:dct="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<a rel="license"
class="licenseLink"
href="http://creativecommons.org/publicdomain/zero/1.0/">
<img src="https://licensebuttons.net/p/zero/1.0/80x15.png" class="licenseImg" alt="CC0" />
</a> Site &copy; 2018 Eric Woodward, No Rights Reserved.<br />
To the extent possible under law, and except where otherwise indicated,
<a rel="dct:publisher"
href="https://wonderdome.net/">
<span property="dct:title">Eric Woodward</span></a>
has waived all copyright and related or neighboring rights to
<span property="dct:title">both the source and content of the <em>Wonder Dome website</em></span>.
This work is published from:
<span property="vcard:Country" datatype="dct:ISO3166"
content="US" about="https://wonderdome.net/">
United States</span>.
</p>
<p>
Uses the <a href="https://www.theleagueofmoveabletype.com/raleway">Raleway font</a> by
<a href="http://matt.cc/">Matt McInerney</a>.
</p>
<p>
Powered by
<a href="https://nodejs.org/">Node</a>,
<a href="http://gulpjs.com/">Gulp</a>,
<a href="https://nginx.org/">nginx</a>,
<a href="https://atom.io/">Atom</a>,
and <strong>the power of decentralized social media</strong>.
</p>
<p>
The source code for building this site is available at
<a href='https://git.itsericwoodward.com/eric/wonderdome-site/'>git.itsericwoodward.com</a>.
</p>
<a href="#" class="footer-topLink topLink">[ Back to Top ]</a>
</div>
</footer>
</div>
<script type="text/javascript" src="/scripts/scripts.<%= site.version -%>.js"></script></body>
</html>

61
templates/partials/top.ejs Executable file
View File

@@ -0,0 +1,61 @@
<%
var
getPageField = function(field_name) {
return page[field_name] || site[field_name] || '';
}
-%>
<!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="<%= site.base_uri %><%= page.path %>" />
<title><%= page.title ? page.title + ' | ' : ''%><%= site.title %></title>
<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/styles.<%= site.version -%>.css" type="text/css" />
</head>

62
templates/sitemap.ejs Executable file
View 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>