Initial commit - v0.1.0

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

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
base_uri
node_modules
www

5
LICENSE.md Normal file
View File

@ -0,0 +1,5 @@
**Source and Content released under CC0 Public Domain License v1.0**
To the extent possible under law, and except where otherwise indicated, Eric Woodward has waived all copyright and related or neighboring rights to [both the source and content of the Wonder Dome website](https://git.itsericwoodward.com/eric/wonderdome-site/).
http://creativecommons.org/publicdomain/zero/1.0/

35
README.md Normal file
View File

@ -0,0 +1,35 @@
# The Wonder Dome
This website serves as a tiny, little source of information about a specific tiny, little server sitting in a tiny, little house nestled in a tiny, little suburb of Charlotte, NC, USA, Earth.
You can see this site at: https://www.wonderdome.net/
## Installing
+ Requires: [git](https://git-scm.com/), [Node](https://nodejs.org/), [Gulp](http://gulpjs.com/), and a static web server (we recommend [nginx](https://nginx.org/)).
+ Clone from the git repo:
git clone https://git.itsericwoodward.com/eric/wonderdome-site.git wonderdome
+ Go into the directory for the site:
cd wonderdome
+ Install the required NPM libraries:
npm install
+ Put the site's base URI in a file called `base_uri` (or copy one of the supplied ones, based on your chosen environment):
cp base_uri.production base_uri
+ Build the site
gulp build
+ The build command will output to the `www` directory.
+ Point the web server to the `www` directory.
+ Share and enjoy!

105
assets/fonts/LICENSE.md Normal file
View File

@ -0,0 +1,105 @@
Copyright (c) 2010, Matt McInerney <matt@pixelspread.com>, with Reserved Font Name: "Raleway".
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
Version 1.1 - 26 February 2007
SIL Open Font License
====================================================
Preamble
----------
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
Definitions
-------------
`"Font Software"` refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
`"Reserved Font Name"` refers to any names specified as such after the
copyright statement(s).
`"Original Version"` refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
`"Modified Version"` refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
`"Author"` refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
Permission & Conditions
------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1. Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2. Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3. No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5. The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
Termination
-----------
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
assets/fonts/raleway-bold.eot Executable file

Binary file not shown.

3278
assets/fonts/raleway-bold.svg Executable file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 230 KiB

BIN
assets/fonts/raleway-bold.ttf Executable file

Binary file not shown.

BIN
assets/fonts/raleway-bold.woff Executable file

Binary file not shown.

BIN
assets/fonts/raleway-regular.eot Executable file

Binary file not shown.

3278
assets/fonts/raleway-regular.svg Executable file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 231 KiB

BIN
assets/fonts/raleway-regular.ttf Executable file

Binary file not shown.

BIN
assets/fonts/raleway-regular.woff Executable file

Binary file not shown.

BIN
assets/images/404-bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
assets/images/title-bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/images/wonderdome-bg.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

8
assets/scripts/1-docready.min.js vendored Executable file
View File

@ -0,0 +1,8 @@
/* @license
docready.js
https://github.com/jfriend00/docReady
The MIT License (MIT)
Copyright (c) 2014 John Friend
*/
!function(t,e){"use strict";function n(){if(!a){a=!0;for(var t=0;t<o.length;t++)o[t].fn.call(window,o[t].ctx);o=[]}}function d(){"complete"===document.readyState&&n()}t=t||"docReady",e=e||window;var o=[],a=!1,c=!1;e[t]=function(t,e){return a?void setTimeout(function(){t(e)},1):(o.push({fn:t,ctx:e}),void("complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(n,1):c||(document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):(document.attachEvent("onreadystatechange",d),window.attachEvent("onload",n)),c=!0)))}}("docReady",window);

View File

@ -0,0 +1,8 @@
/* @license
lazy-progressive-enhancement.js
https://github.com/tvler/lazy-progressive-enhancement
The MIT License (MIT)
Copyright (c) 2016 Tyler Deitz
*/
function loadMedia(t,e,n){"use strict";function r(t){if(t==null){t=document.querySelectorAll("noscript")}else if(t instanceof Element){t=[t]}else if(typeof t==="string"){t=document.querySelectorAll(t)}return t}function i(t,e){return window.setInterval(function(){var n=t.getBoundingClientRect(),r=150;if(n.bottom>=-r&&n.top-window.innerHeight<r&&(n.right>=-r&&n.left-window.innerWidth<r)){window.clearInterval(t.getAttribute("data-intervalid"));t.srcset=t.getAttribute("data-srcset");t.src=t.getAttribute("data-src");e&&e()}},100)}function a(t){var a,A,l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";for(var d=0;d<(t=r(t)).length;d++){A=(new DOMParser).parseFromString((a=t[d]).textContent,"text/html").body.firstElementChild;if(n){A.setAttribute("data-src",A.getAttribute("src"));A.setAttribute("data-srcset",A.getAttribute("srcset")||"");A.src=A.srcset=l;a.parentElement.replaceChild(A,a);A.setAttribute("data-intervalid",i(A,e&&e.bind(A)))}else{A.onload=e;a.parentElement.replaceChild(A,a)}}}var A=function(){a(t)};if(document.readyState!=="loading"){A()}else{document.addEventListener("DOMContentLoaded",A)}}

9
assets/scripts/3-js.cookie.min.js vendored Executable file
View File

@ -0,0 +1,9 @@
/*!
* JavaScript Cookie v2.1.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
!function(e){if("function"==typeof define&&define.amd)define(e);else if("object"==typeof exports)module.exports=e();else{var n=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=n,o}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var o=arguments[e];for(var t in o)n[t]=o[t]}return n}function n(o){function t(n,i,r){var c;if("undefined"!=typeof document){if(arguments.length>1){if(r=e({path:"/"},t.defaults,r),"number"==typeof r.expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*r.expires),r.expires=s}try{c=JSON.stringify(i),/^[\{\[]/.test(c)&&(i=c)}catch(e){}return i=o.write?o.write(i,n):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",i,r.expires&&"; expires="+r.expires.toUTCString(),r.path&&"; path="+r.path,r.domain&&"; domain="+r.domain,r.secure?"; secure":""].join("")}n||(c={});for(var a=document.cookie?document.cookie.split("; "):[],p=/(%[0-9A-Z]{2})+/g,d=0;d<a.length;d++){var f=a[d].split("="),u=f[0].replace(p,decodeURIComponent),l=f.slice(1).join("=");'"'===l.charAt(0)&&(l=l.slice(1,-1));try{if(l=o.read?o.read(l,u):o(l,u)||l.replace(p,decodeURIComponent),this.json)try{l=JSON.parse(l)}catch(e){}if(n===u){c=l;break}n||(c[u]=l)}catch(e){}}return c}}return t.set=t,t.get=function(e){return t(e)},t.getJSON=function(){return t.apply({json:!0},[].slice.call(arguments))},t.defaults={},t.remove=function(n,o){t(n,"",e(o,{expires:-1}))},t.withConverter=n,t}return n(function(){})});

18
assets/scripts/4-fontfaceobserver.min.js vendored Executable file
View File

@ -0,0 +1,18 @@
/* @license
fontfaceobserver.js
https://github.com/bramstein/fontfaceobserver
The BSD License
Copyright 2014-2016 Bram Stein. All rights reserved.
*/
(function(){'use strict';var f,g=[];function l(a){g.push(a);1==g.length&&f()}function m(){for(;g.length;)g[0](),g.shift()}f=function(){setTimeout(m)};function n(a){this.a=p;this.b=void 0;this.f=[];var b=this;try{a(function(a){q(b,a)},function(a){r(b,a)})}catch(c){r(b,c)}}var p=2;function t(a){return new n(function(b,c){c(a)})}function u(a){return new n(function(b){b(a)})}function q(a,b){if(a.a==p){if(b==a)throw new TypeError;var c=!1;try{var d=b&&b.then;if(null!=b&&"object"==typeof b&&"function"==typeof d){d.call(b,function(b){c||q(a,b);c=!0},function(b){c||r(a,b);c=!0});return}}catch(e){c||r(a,e);return}a.a=0;a.b=b;v(a)}}
function r(a,b){if(a.a==p){if(b==a)throw new TypeError;a.a=1;a.b=b;v(a)}}function v(a){l(function(){if(a.a!=p)for(;a.f.length;){var b=a.f.shift(),c=b[0],d=b[1],e=b[2],b=b[3];try{0==a.a?"function"==typeof c?e(c.call(void 0,a.b)):e(a.b):1==a.a&&("function"==typeof d?e(d.call(void 0,a.b)):b(a.b))}catch(h){b(h)}}})}n.prototype.g=function(a){return this.c(void 0,a)};n.prototype.c=function(a,b){var c=this;return new n(function(d,e){c.f.push([a,b,d,e]);v(c)})};
function w(a){return new n(function(b,c){function d(c){return function(d){h[c]=d;e+=1;e==a.length&&b(h)}}var e=0,h=[];0==a.length&&b(h);for(var k=0;k<a.length;k+=1)u(a[k]).c(d(k),c)})}function x(a){return new n(function(b,c){for(var d=0;d<a.length;d+=1)u(a[d]).c(b,c)})};window.Promise||(window.Promise=n,window.Promise.resolve=u,window.Promise.reject=t,window.Promise.race=x,window.Promise.all=w,window.Promise.prototype.then=n.prototype.c,window.Promise.prototype["catch"]=n.prototype.g);}());
(function(){var k=!!document.addEventListener;function l(a,b){k?a.addEventListener("scroll",b,!1):a.attachEvent("scroll",b)}function v(a){document.body?a():k?document.addEventListener("DOMContentLoaded",a):document.attachEvent("onreadystatechange",function(){"interactive"!=document.readyState&&"complete"!=document.readyState||a()})};function w(a){this.a=document.createElement("div");this.a.setAttribute("aria-hidden","true");this.a.appendChild(document.createTextNode(a));this.b=document.createElement("span");this.c=document.createElement("span");this.h=document.createElement("span");this.f=document.createElement("span");this.g=-1;this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";
this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;";this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}
function y(a,b){a.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;left:-999px;white-space:nowrap;font:"+b+";"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+"px";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=m;z(a)&&null!==a.a.parentNode&&b(a.g)}var m=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||"normal";this.weight=c.weight||"normal";this.stretch=c.stretch||"normal"}var C=null,D=null,H=!!window.FontFace;function I(){if(null===D){var a=document.createElement("div");try{a.style.font="condensed 100px sans-serif"}catch(b){}D=""!==a.style.font}return D}function J(a,b){return[a.style,a.weight,I()?a.stretch:"","100px",b].join(" ")}
B.prototype.load=function(a,b){var c=this,m=a||"BESbswy",x=b||3E3,E=(new Date).getTime();return new Promise(function(a,b){if(H){var K=new Promise(function(a,b){function e(){(new Date).getTime()-E>=x?b():document.fonts.load(J(c,c.family),m).then(function(c){1<=c.length?a():setTimeout(e,25)},function(){b()})}e()}),L=new Promise(function(a,c){setTimeout(c,x)});Promise.race([L,K]).then(function(){a(c)},function(){b(c)})}else v(function(){function q(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=
h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==r&&g==r&&h==r||f==t&&g==t&&h==t||f==u&&g==u&&h==u)),b=!b;b&&(null!==d.parentNode&&d.parentNode.removeChild(d),clearTimeout(G),a(c))}function F(){if((new Date).getTime()-E>=x)null!==d.parentNode&&d.parentNode.removeChild(d),b(c);else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=n.a.offsetWidth,
h=p.a.offsetWidth,q();G=setTimeout(F,50)}}var e=new w(m),n=new w(m),p=new w(m),f=-1,g=-1,h=-1,r=-1,t=-1,u=-1,d=document.createElement("div"),G=0;d.dir="ltr";y(e,J(c,"sans-serif"));y(n,J(c,"serif"));y(p,J(c,"monospace"));d.appendChild(e.a);d.appendChild(n.a);d.appendChild(p.a);document.body.appendChild(d);r=e.a.offsetWidth;t=n.a.offsetWidth;u=p.a.offsetWidth;F();A(e,function(a){f=a;q()});y(e,J(c,'"'+c.family+'",sans-serif'));A(n,function(a){g=a;q()});y(n,J(c,'"'+c.family+'",serif'));A(p,function(a){h=
a;q()});y(p,J(c,'"'+c.family+'",monospace'))})})};window.FontFaceObserver=B;window.FontFaceObserver.prototype.check=window.FontFaceObserver.prototype.load=B.prototype.load;"undefined"!==typeof module&&(module.exports=window.FontFaceObserver);}());

76
assets/scripts/scripts.js Executable file
View File

@ -0,0 +1,76 @@
/****************************************************************************
* WonderDome.net
*
* Copyright 2018 Eric Woodward
* https://git.itsericwoodward.com/eric/wonderdome-site/
*
* Source released under CC0 Public Domain License v1.0
* http://creativecommons.org/publicdomain/zero/1.0/
****************************************************************************/
;
(function(){
'use strict';
if (document.documentElement.className && document.documentElement.className.indexOf('lt-ie8') == -1) {
var
protocol = window.location.protocol;
// Indicate JS is loaded
document.documentElement.className = document.documentElement.className.replace('no-js', 'js');
// Enable cached fonts ASAP
if (typeof Cookies !== 'undefined' && Cookies.get('fonts_loaded') === 'false' ? false : !!Cookies.get('fonts_loaded')) {
document.documentElement.className += " js-hasFontsLoaded";
}
docReady(function() {
setTimeout(function() {
// Handle Fonts
if (typeof Cookies !== 'undefined') {
if (typeof FontFaceObserver !== 'undefined') {
var
font = new FontFaceObserver('raleway');
font
.load()
.then(function () {
if (document.documentElement.className.indexOf("js-hasFontsLoaded") == -1) {
document.documentElement.className += " js-hasFontsLoaded";
}
Cookies.set('fonts_loaded', true);
});
}
}
// Lazy-Load Media
if (typeof loadMedia === 'function') {
loadMedia('.js-lazyLoader', null, true);
}
if (
document.documentElement.className.indexOf('is404') > -1 &&
document.getElementById("searchQuery")
) {
document
.getElementById("searchQuery")
.value =
window
.location
.pathname
.replace(/\\.html?$/, "")
.replace(/\//g, " ");
}
if (document.getElementById("searchForm")) {
document
.getElementById("searchForm")
.addEventListener ("submit",
function(e) {
document
.getElementById("searchQuery")
.value += " site:" + window.location.hostname;
}
);
}
}, 1);
});
}
})();

23
assets/styles/fonts.css Executable file
View File

@ -0,0 +1,23 @@
@font-face {
font-family: 'raleway';
src: url('/fonts/raleway-regular.eot');
src: url('/fonts/raleway-regular.eot?#iefix') format('embedded-opentype'),
url('/fonts/raleway-regular.woff') format('woff'),
url('/fonts/raleway-regular.ttf') format('truetype'),
url('/fonts/raleway-regular.svg#rock_saltregular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'raleway';
src: url('/fonts/raleway-bold.eot');
src: url('/fonts/raleway-bold.eot?#iefix') format('embedded-opentype'),
url('/fonts/raleway-bold.woff') format('woff'),
url('/fonts/raleway-bold.ttf') format('truetype'),
url('/fonts/raleway-bold.svg#rock_saltregular') format('svg');
font-weight: bold;
font-style: normal;
}

1
assets/styles/normalize.min.css vendored Executable file
View File

@ -0,0 +1 @@
/*! normalize.css v1.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}

331
assets/styles/style.css Executable file
View File

@ -0,0 +1,331 @@
/*
* WonderDome.net
*
* Copyright 2018 Eric Woodward
* https://git.itsericwoodward.com/eric/wonderdome-site/
*
* Source released under CC0 Public Domain License v1.0
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/* ==========================================================================
Default settings
========================================================================== */
/* Assumes Normalize already applied */
/* set options */
@charset "UTF-8";
@-ms-viewport {
width: device-width;
}
@viewport {
width: device-width;
}
/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 16px;
}
/* Fix 300ms Delay */
a, button {
-ms-touch-action: manipulation; /* IE10 */
touch-action: manipulation; /* IE11+ */
}
/* ==========================================================================
Helper classes
========================================================================== */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
.pullRight{
float: right;
}
code, kbd, pre, samp {
font-size: .8em;
}
/* ==========================================================================
Site styles
========================================================================== */
/*
Using "Pleroma Dark" for colors.
BG: #121a24
FG: #182230
Text: #b9b9ba
Links: #d8a070
Blue (follow, reply): #0095ff
Orange (favorties): ffa500
Red (cancel): #d31014
Green (Retweet): #0fa00f
*/
html {
color: #b9b9ba;
background: url("/images/wonderdome-bg.jpg") no-repeat center top fixed;
background-size: cover;
font-family: 'raleway', 'Liberation Sans', sans-serif;
font-size: 18px;
line-height: 1.5em;
}
a {
border: 1px solid transparent;
border-bottom: 1px dashed #e7c6a9;
border-radius: 0;
color: #d8a070;
padding: .3em .2em .2em;
text-decoration: none;
-webkit-transition: .3s background-color, .3s color, .3s border-radius;
transition: .3s background-color, .3s color, .3s border-radius;
}
a:hover {
background-color: #e7c6a9;
background-color: rgba(216,160,112,.4);
border: 1px solid #e7c6a9;
border-radius: .5em;
color: #ffffff;
}
figcaption {
font-size: .85em;
}
h2 {
text-align: center;
line-height: 1.25em;
}
li {
margin-bottom: .6em;
}
ol, ul {
padding-left: 1.2em;
}
.licenseLink {
display: inline-block;
border: 1px solid transparent;
border-bottom: 1px solid transparent;
vertical-align: baseline;
}
.logoImg {
display: block;
margin: auto;
}
.page {
background-color: #121a24;
background-color: rgba(18,26,36,.9);
border: 1px solid #121a24;
border-radius: 1em;
margin: 0 auto;
max-width: 50em;
padding: 1em;
}
.pageFooter {
border-top: 1px solid #293039;
font-size: .85em;
}
.pageHeader {
margin-top: 1.5em;
}
.serverPic-img {
border-radius: .5em;
display: inline;
max-width: 100%;
}
.serverPic-link {
border-bottom: 1px solid transparent;
display: block;
margin: 1em auto;
max-width: 30em;
text-align: center;
width: 80%;
}
.siteTitle {
display: block;
margin: auto;
width: 10em;
height: auto;
max-width: 10em;
width: 67%;
}
.siteTitle-link {
border-bottom: 1px solid transparent;
display: block;
margin: 0 auto;
max-width: 4em;
padding: .2em;
text-align: center;
}
.siteTitle-link:hover {
border-radius: 1em;
}
.topLink {
display: block;
font-size: .85em;
font-size: .85rem;
margin: 1em auto;
text-align: center;
width: 6.5em;
width: -moz-fit-content;
}
/* ==========================================================================
JS Overrides
========================================================================== */
html.js-hasFontsLoaded {
line-height: 1.75em;
}
/* ==========================================================================
Media Queries
========================================================================== */
@media only screen and (min-width: 30em) {
html {
font-size: 20px;
}
.page {
max-width: 42em;
}
}
@media only screen and (min-width: 40em) {
a {
white-space:nowrap;
}
}
@media only screen and (min-width: 50em) {
html {
font-size: 22px;
}
.navMenu-navbar {
background-color: #808080;
background: rgba(80,80,80,.6);
}
.page {
max-width: 44em;
}
}
@media only screen and (min-width: 66em) {
/* NOTHING YET */
}
/* ==========================================================================
Print styles
========================================================================== */
@media print {
* {
text-shadow: none !important;
color: #000 !important;
background: transparent !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
select {
background: #FFFDD7 !important;
}
.navbar {
display: none;
}
.table td,
.table th {
background-color: #FFFDD7 !important;
}
.btn > .caret,
.dropup > .btn > .caret {
border-top-color: #000 !important;
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important;
}
}

1
base_uri.development Normal file
View File

@ -0,0 +1 @@
http://wd.local

1
base_uri.production Normal file
View File

@ -0,0 +1 @@
https://www.wonderdome.net

71
content/pages/guide.md Executable file
View File

@ -0,0 +1,71 @@
---
title: A Brief Guide to Getting Started in the Fediverse
description: As the title says, this guide helps get started in the Fediverse by introducing some key concepts, then explains how to get an account, before finally covering how to find good accounts to follow.
date_pub: 2018-07-04T04:14:00-04:00
date_upd: 2018-07-07T01:25:00-04:00
content_type: formatted
short_code: gd
---
## A Brief Guide to Getting Started in the Fediverse
I've only been active in the Fediverse since February, but I've become so excited by the idea of it that I've made it my mission to help other people get online. The first step in this, for me, is to get several of my family and friends on the Fediverse, and I figured that it might be useful to have a document to help them figure out where to go after they sign up. This is that document.
But first, a few quick terms.
<a href="#" class="topLink">[ Back to Top ]</a>
### Fediverse Terms
+ **The Fediverse** - A network of different decentralized social media application instances (web sites with special capabilities) which communicate with each other via one or more protocols (ActivityPub, OStatus, etc). Anyone with enough tech savy can run one of these applications on a server, creating a new instance, and expanding the Fediverse. Some instances are public, allowing anyone to join, while others are private, limited only to a specific group of people (or sometimes just a single person). Some the applications used to make up the Fediverse include...
+ **[Mastodon](https://joinmastodon.org/)** - The most popular decentralized social media application by far (AFAIK). Features a [Tweetdeck](https://en.wikipedia.org/wiki/TweetDeck)-like, multi-column interface.
+ **[Pleroma](https://pleroma.social/)** - Another decentralized social media application which is a little different from Mastodon, but still speaks the same protocols, allowing them to interact with each other. Pleroma is a significantly more lightweight application than Mastodon, and can actually be run on [an old computer in your house](/images/server_pic.jpg) (if you're willing and able to put the time into learning how).
+ **[PeerTube](https://joinpeertube.org/)** - A relatively new application which aims to give a YouTube-like experience while using [peer-to-peer](https://en.wikipedia.org/wiki/Peer-to-peer) sharing to cut down on video hosting costs.
+ Other applications include **[Friendica](https://friendi.ca/)** and **[Hubzilla](https://start.hubzilla.org/)**.
+ **Birdsite** - Another word for Twitter.
+ **Front-Ends** - One of the more interesting things about using the ActivityPub protocol is that it allows for developers to write applications that can support any ActivityPub server, not just a specific instance (or even a specific application). For example, most Pleroma instances also host copies of the Mastodon front-end, for people that prefer its [Tweetdeck](https://en.wikipedia.org/wiki/TweetDeck)-like interface. Other available front-ends include:
+ [Pinafore](https://pinafore.social/), a most excellent (IMHO) web front-end that allows for a single user to manage multiple accounts (even on mobile).
+ [Brutaldon](https://github.com/jfmcbrayer/brutaldon), a web front-end which supports terminal-based browsers like [Lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)).
+ Or, if you'd prefer, you can choose to use one of the native Android or iOS frontend clients available in their respective stores.
+ **Toot** - A microblog entry on Mastodon, or the act of creating such an entry. On Pleroma, the equivalent term is **post** ([apparently](https://social.wonderdome.net/notice/3913)).
+ **Boost** - A reshare of a toot or post by someone else. Unlike on the birdsite, Pleroma and Mastodon don't support comments with the reshares, which (IMHO) seems to help minimize the "look at the stupid thing this person said" factor.
OK, so now that we've gotten that out of the way, how should you actually get started in the Fediverse?
<a href="#" class="topLink">[ Back to Top ]</a>
### Step 1: Get an account.
If you haven't been invited to join a specific instance and don't have a recommendation to go on (such as from a friend or associate), I'd suggest checking out [instances.social](https://instances.social/list), a website that lists a large number of Mastodon and Pleroma instances, many of which have open registrations.
<a href="#" class="topLink">[ Back to Top ]</a>
### Step 2: Follow people.
Now that you're signed up, you need to start following others. So, how do you find people to follow? If you're signing up at a public instance (or even a private instance focused around some common interests or goals), you can start by viewing your instance's [Whole Known Network](https://pleroma.site/main/all) timeline. This timeline includes posts by people on that instance, as well as posts by the accounts that the people on that instance follow (for example, when you go to [mastodon.social](https://mastodon.social/), by default you'll see their Whole Known Network, consisting of every post from any account that's followed by at least one account on mastodon.social). Look for some posts that interest you, and follow the accounts that made those posts.
If you're having trouble finding accounts to follow, you can use [instances.social](https://instances.social/list) for that, too. Just scroll through the list looking for instances devoted to [topics that](https://gamemaking.social/) [interest you](https://tenforward.social/), and follow some of the accounts that show up on their landing pages.
Once you start following some accounts, if you're on a Pleroma instance, you'll probably see some posts in your feed that were made by people that you don't follow, and you may wonder how they got there. These are posts that have actually been _boosted_ by someone in your feed, but the Pleroma front-end (by default) doesn't explicitly indicate this.
By the way, IMHO, this is one of the best aspects of the current version of the Fediverse: since there is no opaque [magic algorithm](http://www.slate.com/articles/technology/cover_story/2016/01/how_facebook_s_news_feed_algorithm_works.html) deciding for you what posts you should or shouldn't see, it's important to reshare the best of what you see in your feed, as *this makes the whole network better*.
One quick word of warning - because of the way that both Mastodon and Pleroma are setup, once you start following an account, you won't actually see anything in your feed until those accounts start posting new material. As a result, it may take a few hours before your feed is fully populated with content, so be patient.
<a href="#" class="topLink">[ Back to Top ]</a>
### Step 3: Converse
One of the things that I really like about the Fediverse is that it feels like the Twitter did back when I first joined in 2007: there aren't a ton of people (yet), almost no one has more than a few hundred followers (yet), and the businesses haven't taken over there (yet). But, unlike even the birdsite of yore, there is a much greater emphasis on community as opposed to the *performative* posts ("Look at me! Look at me!") that have dominated centralized social media for so long.
So, once you start following people, the final step is to start actually conversing with them: reply to their questions, post questions of your own, and send messages of support when appropriate. As I said before, the smaller community size makes the connections that much more compelling, and the number of Mastodon and Pleroma instances virtually guarantees that there will be at least some other people out there who are into the same things you are.
So, that's it. If you've followed the guide this far, you have now officially gotten started in the Fediverse. Where you go from here is up to you, and I hope you enjoy it as much as I do.
One last thing - if you liked this guide, and enjoy reading posts about the web, surveillance capitalism, and/or [cats](https://social.wonderdome.net/notice/17646), you might consider following me, [@eric at the Wonder Dome](https://social.wonderdome.net/users/eric).
And thanks for stopping by!
<a href="#" class="topLink">[ Back to Top ]</a>
_Now that you're a Fediverse whiz, you can either [check out Da Roolz for the Wonder Dome](./tos.html), or you can [go back to the front page](./index.html). You have the power!_

27
content/pages/index.md Executable file
View File

@ -0,0 +1,27 @@
---
title: Welcome
description: Welcome to the Wonder Dome, a tiny, little server sitting in a tiny, little house nestled in a tiny, little suburb of Charlotte, NC, USA, Earth.
date_pub: 2018-07-04T03:26:00-04:00
date_upd: 2018-07-07T01:21:00-04:00
content_type: formatted
---
## Welcome to the Wonder Dome!
You have stumbled upon a tiny, little server sitting in a tiny, little house nestled in a tiny, little suburb of Charlotte, NC, USA, Earth.
<a href='/images/server_pic.jpg' class='serverPic-link'><figure><img src='/images/server_pic.jpg' alt='The Tiny, Little Wonder Dome Server' class='serverPic-img' /><figcaption>The Tiny, Little Wonder Dome Server</figcaption></figure></a>
This box primarily serves as [a private Pleroma instance](https://social.wonderdome.net/) run by (and for) a certain family and their close ([meatspace](https://en.wikipedia.org/wiki/Real_life)) associates. Through this instance, said family (and said associates) may connect and converse with the [Fediverse](https://en.wikipedia.org/wiki/Fediverse)-at-large in an attempt to foster dialogue (and share [cat pictures](https://toot.cafe/@itsericwoodward/99988917928015328)) while avoiding the [evil corporate social media silos](https://indieweb.org/silo-quits).
The main things you can find here are:
+ [The Terms of Service (aka *Da Roolz*)](./tos.html) for using the Wonder Dome's [Pleroma](https://pleroma.social/) instance (located at [social.wonderdome.net](https://social.wonderdome.net)), and
+ [A Brief Guide to Getting Started in the Fediverse](./guide.html), our brief guide to getting... started... in the.... Fediverse... Anyways, you should read it if you don't know where to begin with this whole "Mastodon / Pleroma / PeerTube / decentralized [birdsite](https://mastodon.social/tags/birdsite)" thing.
If you have any questions or concerns about [our private Pleroma instance](https://social.wonderdome.net/) or [how to use it](./guide.html), please feel free to contact our admin [@eric via said instance](https://social.wonderdome.net/users/eric),
or via e-mail at <a href="mailto:&#101;&#114;&#105;&#099;&#064;&#119;&#111;&#110;&#100;&#101;&#114;&#100;&#111;&#109;&#101;&#046;&#110;&#101;&#116;">&#101;&#114;&#105;&#099;&#064;&#119;&#111;&#110;&#100;&#101;&#114;&#100;&#111;&#109;&#101;&#046;&#110;&#101;&#116;</a>.
Thanks for visiting!
<a href="#" class="topLink">[ Back to Top ]</a>

46
content/pages/tos.md Executable file
View File

@ -0,0 +1,46 @@
---
title: Terms of Service
description: The Terms of Service for using the Pleroma instance located at social.wonderdome.net (aka Da Roolz).
date_pub: 2018-07-04T03:59:00-04:00
date_upd: 2018-07-07T01:21:00-04:00
content_type: formatted
short_code: ts
---
## Terms of Service for The Wonder Dome
This document is intended to outline the general policy of the [Pleroma](https://pleroma.social/) instance at [social.wonderdome.net](https://social.wonderdome.net). It has been _heavily_ adapted from [the terms](https://info.pleroma.site/tos.html) used at [pleroma.site](https://pleroma.site).
_Editor's note: Yes, we do take a light tone with the below roolz, but that's because we think "not being an jerk" should be the default way to behave, and shouldn't have to be spelled out in <strike>10</strike> **12** specific roolz. However, here you are, looking for roolz to follow, so we respectfully offer the following ones, in the hopes that we can cure society of all it's ills. Thanks. - The Editor_
<a href="#" class="topLink">[ Back to Top ]</a>
### Da Roolz
Below are the <strike>10</strike> **12** simple roolz for using [social.wonderdome.net](https://social.wonderdome.net).
1. You do not talk about Wonder Dome.
2. On second thought, it's OK if you talk about Wonder Dome.
3. If tonight's your first night, you gotta post something.
4. Be excellent to each other. That means no harassment, stalking, or disclosure of others' personal details (doxing).
5. Content which could be deemed inappropriate for a PG-13 movie or workplace environment should either be tagged <em>#nsfw</em>, or set as sensitive content, depending on the frontend used.
6. There is no rool #6.
7. If you, as a user of this instance, have trouble with a local or remote user violating these rules, _please do not take the law into your own hands_. Instead, contact an admin, as we can usually deal with the problem without resorting to bloodshed (usually). Likewise, we would prefer it if you don't contact the remote instance's admin about your troubles, as it tends to lead to bad blood between instances, but we will do so if we believe escalation is necessary.
8. **We don't like spam!** As a result, mass-advertising content is prohibited. However, tastefully reminding your followers of things like Patreon or websites where they can purchase your content is perfectly fine.
9. Content that is illegal in the United States is expressly prohibited, _no matter how stupid the laws banning such content may be_.
10. There is still no rool #6, and now there is no rool #10.
11. There are presently no content type restrictions on media uploads. *Please don't make us change this!* Uploading media that is malicious in nature (e.g. malware), or which belongs to others without permission or attribution, may result in us bringing down the ban-hammer.
12. If you have any questions or concerns that aren't covered by the above policies, please feel free to [contact an admin](https://social.wonderdome.net/users/eric).
<a href="#" class="topLink">[ Back to Top ]</a>
### Moderator Contacts for Violations
If you feel that you, or these rules, have been violated, please contact one of the below listed administrators:
+ [@eric](https://social.wonderdome.net/users/eric)
+ Sorry, he's the only one (so far), but believe us when we say that he's just as scared of you as you are of him.
<a href="#" class="topLink">[ Back to Top ]</a>
_From here, you can either [go put these terms to good use](./guide.html), or you can [go back to the front page](./index.html). The choice is yours!_

View File

@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Wonder Dome | Page Not Found</title>
<link rel="stylesheet" href="/styles/styles.<%= site.version -%>.css">
<style>
*, *:before, *:after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
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-bg.jpg") no-repeat center center fixed;
background-color: #121a24;
background-size: cover;
color: #b9b9ba;
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;
}
</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 &quot;The Gibson&quot;</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 the <a href="/" title="Give up and go to 127.0.0.1!">Wonder Dome home page</a>.</p>
</div>
</body>
</html>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title><%- site.title %></title>
<link><%- site.uri %></link>
<description><%- site.description %></description>
<% if (language) { %>
<language><%= language %></language>
<% } %>
<% if (copyright) { %>
<copyright><%= copyright %></copyright>
<% } %>
<%
if (keywords) {
var keywords = keywords.split(/\W+/);
for (var i=0; i < keywords.length; i++) {
if (keywords[i]) {
%>
<category><%= keywords[i] %></category>
<%
}
}
}
%>
<% if (author.email) { %>
<managingEditor><%= author.email %></managingEditor>
<webMaster><%= author.email %></webMaster>
<% } %>
<% if (image) { %>
<image><%= image %></image>
<% } %>
<generator>HarpJS</generator>
<atom:link href="<%- site.uri %>/feed.xml" rel="self" type="application/rss+xml" />
<%
for(slug in public._data) {
var
post = public._data[slug],
now = new Date(),
then = post.date_pub ? new Date(post.date_pub) : new Date();
if (post.title && !post.is_draft && then.getTime() <= now.getTime()) {
%>
<item>
<title><%- post.title %></title>
<description><%= post.description %></description>
<pubDate><%= then.toUTCString() %></pubDate>
<link><%- site.uri %>/<%- slug %>.html</link>
<guid isPermaLink="true"><%- site.uri %>/<%- slug %>.html</guid>
</item>
<%
}
}
%>
</channel>
</rss>

14
content/support/sitemap.xml.ejs Executable file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<% site.pages.forEach(function(page) { -%>
<url>
<loc><%= page.path %></loc>
<lastmod><%= page.date %></lastmod>
</url>
<%
});
-%>
</urlset>

310
gulpfile.js Normal file
View File

@ -0,0 +1,310 @@
var
// gulp
gulp = require('gulp'),
cleancss = require('gulp-clean-css'),
concat = require('gulp-concat'),
frontmatter = require('gulp-front-matter'),
imagemin = require('gulp-imagemin'),
newer = require('gulp-newer'),
rename = require('gulp-rename'),
// components
del = require('del'),
ejs = require('ejs'),
fs = require('fs'),
md = require('markdown-it')({
html: true,
xhtmlOut: true,
linkify: true,
typographer: true
}),
path = require('path'),
pump = require('pump'),
seq = require('run-sequence'),
through = require('through2'),
// config
site = require('./site.json'),
pkg = require('./package.json'),
// variables
dest_dir = 'www',
css_src_dir = 'assets/styles',
js_src_dir = 'assets/scripts',
pages_src_dir = 'content/pages',
support_src_dir = 'content/support',
// functions
readFileIfExists = function (file_path){
try {
return fs.readFileSync(file_path, {encoding: 'utf8'});
} catch(err) {
if (err.code == 'ENOENT') return undefined;
throw err;
}
},
collectPages = function(base_path) {
var
fm = require('front-matter'),
pages = [],
tags = [];
return through.obj(function (file, enc, cb) {
var
data = fm.test(file.contents.toString()) ? fm(file.contents.toString()) : {},
contents = data && data.body ? data.body : file.contents.toString(),
page = file.page,
name = file.path.replace(file.base,'');
if (data && data.attributes) {
Object.assign(data.attributes, page)
}
page.content = contents;
page.path = file.path.replace(base_path, '');
page.path = page.path.substring(0, page.path.lastIndexOf('.')) + '.html';
page.name = page.path.substring(page.path.lastIndexOf('/') + 1, page.path.lastIndexOf('.'));
if (file.path.endsWith('.md')) {
page.content = md.render(contents);
} else if (file.path.endsWith('ejs')) {
page.content = ejs.render(contents, page, {});
}
pages.push(page);
if (page.tags) {
page.tags.split(' ').forEach(function (tag) {
if (tags.indexOf(tag) == -1) {
tags.push(tag);
}
});
}
this.push(file);
cb();
},
function (cb) {
if (site.pages) {
site.pages = site.pages.concat(pages);
} else {
site.pages = pages;
}
if (site.tags) {
site.tags = site.tags.concat(tags.filter(function (item) {
return tags.indexOf(item) < 0;
}));
} else {
site.tags = tags;
}
cb();
});
},
applyMarkdown = function() {
return through.obj(function (file, enc, cb) {
file.contents = new Buffer(md.render(file.contents.toString()), 'utf8');
this.push(file);
cb();
});
},
applyTemplate = function (template_file) {
// read template_file into a string
// pass string to ejs.render
var
filename = path.join(__dirname, template_file),
options = {
"filename": filename
},
template_str = fs.readFileSync(filename, 'utf8'),
tpl = ejs.compile(template_str, options);
return through.obj(function (file, enc, cb) {
var
name = file.path.replace(file.base,''),
data = {
name: name.substring(0, name.lastIndexOf('.')),
site: site,
page: file.page,
content: file.contents.toString()
};
file.contents = new Buffer(tpl(data), 'utf8');
this.push(file);
cb();
});
},
readJson = function () {
return through.obj(function (file, enc, cb) {
var data = readFileIfExists(path.join(path.dirname(file.path), path.basename(file.path)) + '.json');
if (data !== undefined) {
file.page = JSON.parse(data);
}
this.push(file);
cb();
});
},
parseEJS = function(){
return through.obj(function (file, enc, cb) {
var data = {
site: site,
page: file.page
};
file.contents = new Buffer(ejs.render(file.contents.toString(), data, {}));
this.push(file);
cb();
});
},
buildSupportFiles = function() {
var dest = dest_dir;
console.log('Building Support Files...');
return gulp
.src(path.join(support_src_dir,'**/*.ejs'))
.pipe(parseEJS())
.pipe(rename({
extname: ''
}))
.pipe(gulp.dest(dest));
}
;
site.time = new Date();
site.base_uri = (readFileIfExists('./base_uri') || '').trim();
site.version = pkg.version;
gulp
.task('default', function() {
// place code for your default task here
})
// start with the files from the old web site
.task('css', function() {
var dest = path.join(dest_dir,'styles');
console.log('Concat & cache-bust CSS');
return gulp
// set source (src/**/*.css)
.src(path.join(css_src_dir,'*.css'))
// write to site.<pkg-ver>.css
.pipe(concat('styles.' + pkg.version + '.css'))
// write to dest/content
.pipe(gulp.dest(dest));
})
.task('files', function(){
var dest = path.join(dest_dir,'files');
console.log('Copy files');
return gulp
.src('assets/files/*')
.pipe(newer(dest))
.pipe(gulp.dest(dest));
})
.task('fonts', function(){
var dest = path.join(dest_dir,'fonts');
console.log('Copy fonts');
return gulp
.src('assets/fonts/**')
.pipe(newer(dest))
.pipe(gulp.dest(dest));
})
.task('images', function(){
var dest = path.join(dest_dir,'images');
console.log('Compress, cache and copy images');
return gulp
.src('assets/images/**/*')
.pipe(newer(dest))
.pipe(imagemin({
optimizationLevel: 3
}))
.pipe(gulp.dest(dest));
})
.task('js', function (cb) {
var dest = path.join(dest_dir,'scripts');
console.log('Cache-bust JS');
pump([
// set source
gulp.src(path.join(js_src_dir,'*.js')),
// write to scripts.<pkg-ver>.js
concat(`scripts.${pkg.version}.js`),
// write to dest
gulp.dest(dest)
],
cb
);
})
.task('pages:md', function () {
var dest = dest_dir;
console.log('Building Pages (MD)...');
return gulp
.src(path.join(pages_src_dir,'**/*.md'))
.pipe(frontmatter({
property: 'page',
remove: true
}))
.pipe(collectPages(path.join(process.cwd(), pages_src_dir)))
.pipe(applyMarkdown())
.pipe(applyTemplate('./templates/default.ejs'))
.pipe(rename({extname: '.html'}))
.pipe(gulp.dest(dest));
})
.task('pages:ejs', function () {
var dest = dest_dir;
console.log('Building Pages (EJS)...');
return gulp
.src(path.join(pages_src_dir,'**/*.ejs'))
.pipe(frontmatter({
property: 'page',
remove: true
}))
.pipe(collectPages(path.join(process.cwd(), pages_src_dir)))
.pipe(parseEJS())
.pipe(applyTemplate('./templates/default.ejs'))
.pipe(rename({
extname: '.html'
}))
.pipe(gulp.dest(dest));
})
.task('support', buildSupportFiles)
.task('pages', function() {
seq(
'pages:md',
'pages:ejs'
);
})
.task('build', [
'css', 'files', 'fonts', 'images', 'js', 'pages'
], buildSupportFiles)
.task('clean', function () {
var dest = dest_dir;
return del([
dest
]);
})
.task('watch', function() {
gulp.watch(css_src_dir, ['css']);
gulp.watch(js_src_dir, ['js']);
gulp.watch(pages_src_dir, ['pages']);
gulp.watch(support_src_dir, ['support']);
})
.task('test', function (cb) {
var dest = dest_dir;
console.log('Testing...');
pump([
gulp.src('content/pages/**/*.md'),
(function(){
return through.obj(function (file, enc, cb) {
var file_name = file.path.replace(file.base,'');
console.log(JSON.stringify(file_name.substring(0, file_name.lastIndexOf('.')), null, 2));
cb();
});
})()
],
cb
);
})
;

34
package.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "wonderdome-site",
"version": "0.1.0",
"description": "WonderDome.net static site, built using Gulp.",
"dependencies": {},
"devDependencies": {
"del": "^3.0.0",
"ejs": "^2.5.2",
"event-stream": "^3.3.4",
"front-matter": "^2.1.0",
"fs": "0.0.1-security",
"gulp": "^3.9.1",
"gulp-clean-css": "^3.9.2",
"gulp-concat": "^2.6.0",
"gulp-front-matter": "^1.3.0",
"gulp-imagemin": "^4.1.0",
"gulp-newer": "^1.2.0",
"gulp-rename": "^1.2.2",
"markdown-it": "^8.4.1",
"path": "^0.12.7",
"pump": "^3.0.0",
"run-sequence": "^2.2.1",
"through2": "^2.0.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Eric Woodward",
"license": "CC0-1.0",
"repository": {
"type": "git",
"url": "git://git.itsericwoodward.com/eric/wonderdome-site.git"
}
}

11
site.json Normal file
View File

@ -0,0 +1,11 @@
{
"title" : "The Wonder Dome",
"author": {
"_desc" : "*** Author Info ***",
"name" : "Eric Woodward",
"email" : "eric@itsericwoodward.com"
},
"robots" : "index,follow",
"language" : "en-us",
"copyright" : "To the extent possible under law, Eric Woodward has waived all copyright and related or neighboring rights to the source for the Wonder Dome website."
}

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>