Really ugly progress commit

This commit is contained in:
Timothy Warren 2016-06-14 10:51:48 -04:00
parent 0eb0d18755
commit 719776e862
16 changed files with 434 additions and 554 deletions

View File

@ -1,3 +1,6 @@
# ProgBlog # ProgBlog
A simple node blog with built-in code snippet highlighting A simple node blog with built-in code snippet highlighting
[![Build Status](https://jenkins.timshomepage.net/buildStatus/icon?job=ProgBlog)](https://jenkins.timshomepage.net/job/ProgBlog/)
## Setup

View File

@ -83,7 +83,6 @@ class Container {
return this._require(name); return this._require(name);
} }
/** /**
* Get a base library instance * Get a base library instance
* *

View File

@ -2,9 +2,14 @@
const container = require('../Container'); const container = require('../Container');
const Model = container.getBase('Model'); const Model = container.getBase('Model');
const Config = container.getBase('Config');
class DBModel extends Model { class DBModel extends Model {
constructor() {
super();
this.db = Config.get('database');
}
} }
module.exports = DBModel; module.exports = DBModel;

View File

@ -4,7 +4,6 @@
* Base Class for wrapping HTTP/HTTPS servers * Base Class for wrapping HTTP/HTTPS servers
*/ */
class Server { class Server {
constructor() {}
/** /**
* Event listener for HTTP(s) server "error" event. * Event listener for HTTP(s) server "error" event.
* *

4
app/bootstrap.js vendored
View File

@ -7,7 +7,7 @@ const path = container.get('path');
const Controller = container.get('base/Controller'); const Controller = container.get('base/Controller');
const Config = container.get('base/Config'); const Config = container.get('base/Config');
module.exports = (function () { module.exports = (() => {
const baseRoutePath = path.join(__dirname, 'controllers'); const baseRoutePath = path.join(__dirname, 'controllers');
// Set up templating // Set up templating
@ -28,4 +28,4 @@ module.exports = (function () {
return app; return app;
}()); })();

View File

@ -6,7 +6,7 @@ const knexConn = knexConfig.connection;
const params = { const params = {
driver: knexConfig.client, driver: knexConfig.client,
connection: (knexConfig.client == "sqlite3") ? knexConn.filename : knexConn, connection: (knexConfig.client == 'sqlite3') ? knexConn.filename : knexConn,
}; };
const nodeQuery = require('ci-node-query')(params); const nodeQuery = require('ci-node-query')(params);

View File

@ -25,4 +25,30 @@ module.exports = {
}, },
}, },
'/user/list': {
get: (req, res) => {
},
},
'/user/edit': {
get: (req, res) => {
},
post: (req, res) => {
},
},
'/user/add': {
get: (req, res) => {
},
post: (req, res) => {
},
},
}; };

13
app/models/Blog.js Normal file
View File

@ -0,0 +1,13 @@
'use strict';
const Container = require('../../Container');
const Config = container.get('Config');
const DBModel = container.getBase('DBModel');
class BlogModel extends DBModel {
constructor() {
super();
}
}
module.exports = new BlogModel();

View File

@ -1,4 +1,23 @@
'use strict'; 'use strict';
const container = require('../Container'); const container = require('../Container');
const Config = container.get('Config');
const DBModel = container.getBase('DBModel');
class UserModel extends DBModel {
constructor() {
super();
}
getAll() {
return this.db.get('users');
}
getUserById(userId) {
return this.db.from('users')
.where('id', userId)
.get();
}
}
module.exports = new UserModel();

View File

@ -65,6 +65,7 @@ Javascript has several ways of making a self-executing function.
<div class="cell cell-1of2 edit-right" id="preview"> <div class="cell cell-1of2 edit-right" id="preview">
</div> </div>
</section> </section>
<button type="submit">Save</button>
</section> </section>
<footer> <footer>
<p>&copy; Timothy J. Warren</p> <p>&copy; Timothy J. Warren</p>

View File

@ -0,0 +1,2 @@
<form action="/admin/user/add" method="post">
</form>

View File

@ -1,10 +1,10 @@
{ {
"author": "Timothy J. Warren", "author": "Timothy J. Warren",
"dependencies": { "dependencies": {
"axios": "^0.9.1", "axios": "^0.12.0",
"body-parser": "~1.13.2", "body-parser": "~1.15.1",
"ci-node-query": "^4.0.0", "ci-node-query": "^4.0.0",
"cookie-parser": "~1.3.5", "cookie-parser": "~1.4.3",
"debug": "~2.2.0", "debug": "~2.2.0",
"dotenv": "^2.0.0", "dotenv": "^2.0.0",
"errors": "^0.3.0", "errors": "^0.3.0",
@ -14,16 +14,16 @@
"express-negotiate": "0.0.5", "express-negotiate": "0.0.5",
"express-session": "^1.13.0", "express-session": "^1.13.0",
"getargs": "0.0.8", "getargs": "0.0.8",
"glob": "^6.0.4", "glob": "^7.0.3",
"helmet": "^1.1.0", "helmet": "^2.1.1",
"highlight.js": "^9.1.0", "highlight.js": "^9.1.0",
"jscs": "^2.11.0", "knex": "^0.11.5",
"knex": "^0.10.0",
"lodash": "^4.5.0", "lodash": "^4.5.0",
"markdown-it": "^6.0.0", "markdown-it": "^6.0.0",
"moment": "^2.11.2", "moment": "^2.11.2",
"morgan": "~1.6.1", "morgan": "~1.7.0",
"nodemon": "^1.9.0", "nodemon": "^1.9.0",
"npm-run-all": "^2.1.2",
"nsp": "^2.4.0", "nsp": "^2.4.0",
"scrypt": "^6.0.1", "scrypt": "^6.0.1",
"sqlite3": "^3.1.1", "sqlite3": "^3.1.1",
@ -31,7 +31,7 @@
}, },
"description": "A simple blog with built-in code snippet functionality", "description": "A simple blog with built-in code snippet functionality",
"devDependencies": { "devDependencies": {
"apidoc": "^0.15.1", "apidoc": "^0.16.1",
"chai": "^3.5.0", "chai": "^3.5.0",
"chai-as-promised": "^5.3.0", "chai-as-promised": "^5.3.0",
"documentation": "^4.0.0-beta1", "documentation": "^4.0.0-beta1",
@ -40,7 +40,6 @@
"istanbul": "0.4.*", "istanbul": "0.4.*",
"jscs": "^3.0.0", "jscs": "^3.0.0",
"mocha": "^2.4.5", "mocha": "^2.4.5",
"npm-run-all": "^1.6.0",
"nsp": "^2.2.1", "nsp": "^2.2.1",
"parallelshell": "^2.0.0", "parallelshell": "^2.0.0",
"pre-commit": "^1.1.2", "pre-commit": "^1.1.2",
@ -72,6 +71,7 @@
"audit": "nsp check", "audit": "nsp check",
"build": "npm-run-all --parallel lint:src lint:tests docs:src docs:api coverage", "build": "npm-run-all --parallel lint:src lint:tests docs:src docs:api coverage",
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha", "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha",
"css": "postcss -c postcss.config.json -w",
"default": "npm-run-all --parallel audit lint:src lint:tests test", "default": "npm-run-all --parallel audit lint:src lint:tests test",
"docs": "npm-run-all --parallel docs:src docs:api", "docs": "npm-run-all --parallel docs:src docs:api",
"docs:api": "apidoc -i ./app/ -o ./public/api-docs/", "docs:api": "apidoc -i ./app/ -o ./public/api-docs/",

5
postcss.config.json Normal file
View File

@ -0,0 +1,5 @@
{
"use": "postcss-cssnext",
"input": "public/assets/css/blog.myth.css",
"output": "public/assets/css/blog.css"
}

View File

@ -1,6 +1,6 @@
:root { :root {
background: whitesmoke; background:whitesmoke;
font-family: 'PT Serif', serif; font-family:'PT Serif', serif;
box-sizing: border-box; box-sizing: border-box;
cursor: default; cursor: default;
line-height: 1.4; line-height: 1.4;
@ -10,20 +10,19 @@
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
text-size-adjust: 100%; text-size-adjust: 100%;
scroll-behavior: smooth;
} }
* { * {
-moz-tab-size: 4; -moz-tab-size:4;
-o-tab-size: 4; -o-tab-size:4;
tab-size: 4; tab-size:4;
} }
/*! Basic element styles*/ /*! Basic element styles*/
html { html {
font-size: 62.5%; font-size: 62.5%
} }
body { body {
font-size: 1.6em; font-size: 1.6em;
padding: 0; padding: 0;
@ -31,428 +30,273 @@ body {
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
} }
a { a {
color: #1271db; color: #1271db;
-webkit-transition: .25s ease; -webkit-transition:.25s ease;
transition: .25s ease; transition: .25s ease
} }
a, a:focus, a:hover {
a, text-decoration: none
a:focus,
a:hover {
text-decoration: none;
} }
blockquote, pre {
blockquote, margin:16px 0;
pre { margin: 1.6rem 0
margin: 1.6rem 0;
} }
blockquote, figcaption {
blockquote, font-family: serif
figcaption {
font-family: serif;
} }
article, aside, dl, hr, section {
article, margin-bottom:16px;
aside, margin-bottom: 1.6rem
dl, }
hr, footer, hr {
section { border-top:1px solid rgba(0, 0, 0, .2);
margin-bottom: 1.6rem; border-top: .1rem solid rgba(0, 0, 0, .2)
}
footer, img, section {
max-width: 100%
}
img, select[multiple] {
height: auto
} }
footer,
hr { hr {
border-top: .1rem solid rgba(0, 0, 0, .2); width: 100%
} }
pre, textarea {
footer, overflow: auto
img,
section {
max-width: 100%;
} }
legend, ol, textarea, ul {
img, margin-bottom:8px;
select[multiple] { margin-bottom: .8rem
height: auto;
} }
::after, ::before, td, th {
hr { vertical-align: inherit
width: 100%;
} }
footer, nav ul, td, th {
pre, text-align: center
textarea {
overflow: auto;
} }
[hidden], audio:not([controls]), template {
legend, display: none
ol,
textarea,
ul {
margin-bottom: .8rem;
} }
::after,
::before,
td,
th {
vertical-align: inherit;
}
footer,
nav ul,
td,
th {
text-align: center;
}
[hidden],
audio:not([controls]),
template {
display: none;
}
small { small {
font-size: 75%; font-size: 75%;
color: #777; color: #777
} }
big { big {
font-size: 125%; font-size: 125%
} }
[unselectable] { [unselectable] {
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
user-select: none; user-select: none
} }
[unselectable], button, input[type=submit] {
[unselectable],
button,
input[type=submit] {
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none
}
::after, ::before {
text-decoration: inherit
} }
::after, code, kbd, pre, samp {
::before { font-family:'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
text-decoration: inherit;
} }
code,
kbd,
pre,
samp {
font-family: 'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
}
pre { pre {
/*box-shadow:rgba(0,0,0,0.1) 0 0 5px;*/ /*box-shadow:rgba(0,0,0,0.1) 0 0 5px;*/
padding: 0.25em; padding:0.25em;
} }
code, pre {
code, font-family:'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
pre {
font-family: 'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
overflow-x: auto; overflow-x: auto;
} }
::-moz-selection { ::-moz-selection {
background-color: #b3d4fc; background-color: #b3d4fc;
text-shadow: none; text-shadow: none
} }
::selection { ::selection {
background-color: #b3d4fc; background-color: #b3d4fc;
text-shadow: none; text-shadow: none
} }
button::-moz-focus-inner { button::-moz-focus-inner {
border: 0; border: 0
} }
p { p {
margin: 0 0 1.6rem; margin:0 0 16px;
margin: 0 0 1.6rem
} }
h1, h2, h3, h4, h5, h6 {
h1, font-family:'PT Serif', serif;
h2, margin:0.5em 0;
h3,
h4,
h5,
h6 {
font-family: 'PT Serif', serif;
margin: 0.5em 0;
} }
h1 { h1 {
font-size: 1.75em; font-size: 1.75em;
margin-top: 0; margin-top:0;
font-style: normal; font-style: normal
} }
dd { dd {
margin-left: 4rem; margin-left:40px;
margin-left: 4rem
} }
ol, ul {
ol, padding-left:20px;
ul { padding-left: 2rem
padding-left: 2rem;
} }
blockquote { blockquote {
border-left:2px solid #1271db;
border-left: .2rem solid #1271db; border-left: .2rem solid #1271db;
font-style: italic; font-style: italic;
padding-left: 1.6rem; padding-left:16px;
padding-left: 1.6rem
} }
article, article, aside, details, footer, header, main, section, summary {
aside,
details,
footer,
header,
main,
section,
summary {
display: block; display: block;
height: auto; height: auto;
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%
} }
main { main {
margin: 0 auto; margin: 0 auto;
max-width: 76.8em; max-width: 76.8em;
padding: 0 1.6rem 1.6rem; padding:0 16px 16px;
padding: 0 1.6rem 1.6rem
} }
footer { footer {
padding: 1rem 0; padding:10px 0;
padding: 1rem 0
} }
nav ul { nav ul {
list-style: none; list-style: none;
margin: 0.5em auto; margin: 0.5em auto;
} }
nav a, td, th {
nav a, padding:8px 16px;
td, padding: .8rem 1.6rem
th {
padding: .8rem 1.6rem;
} }
nav ul li { nav ul li {
display: inline; display: inline
} }
nav a { nav a {
border-bottom:2px solid transparent;
border-bottom: .2rem solid transparent; border-bottom: .2rem solid transparent;
color: #444; color: #444;
-webkit-transition: .25s ease; -webkit-transition:.25s ease;
transition: .25s ease; transition: .25s ease
} }
nav a:hover { nav a:hover {
border-color: rgba(0, 0, 0, .2); border-color: rgba(0, 0, 0, .2)
} }
nav a:active { nav a:active {
border-color: rgba(0, 0, 0, .56); border-color: rgba(0, 0, 0, .56)
} }
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
margin-bottom: 1.6rem; margin-bottom:16px;
margin-bottom: 1.6rem
} }
caption { caption {
padding: .8rem 0; padding:8px 0;
padding: .8rem 0
} }
thead th { thead th {
background: #efefef; background: #efefef;
color: #444; color: #444
} }
tr { tr {
background: #fff; background: #fff;
margin-bottom: .8rem; margin-bottom:8px;
margin-bottom: .8rem
} }
td, th {
td, border:1px solid #ccc;
th { border: .1rem solid #ccc
border: .1rem solid #ccc;
} }
tfoot tr { tfoot tr {
background: 0 0; background: 0 0
} }
tfoot td { tfoot td {
color: #efefef; color: #efefef;
font-size: .8em; font-size: .8em;
font-style: italic; font-style: italic;
padding: 1.6rem .4rem; padding:16px 4px;
padding: 1.6rem .4rem
} }
/*! Flexbox grid */ /*! Flexbox grid */
section { section {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-webkit-flex: 0;
-ms-flex: 0; -ms-flex: 0;
flex: 0; flex: 0;
} }
.w930 { .w930 {
max-width: 930px; max-width:930px;
} }
.grid { .grid {
display: -webkit-box; display:-webkit-box;
display: -webkit-flex; display:-ms-flexbox;
display: -ms-flexbox; display:flex;
display: flex; -ms-flex-wrap:wrap;
-webkit-flex-wrap: wrap; flex-wrap:wrap;
-ms-flex-wrap: wrap; margin:0 auto;
flex-wrap: wrap; padding:0;
margin: 0 auto;
padding: 0;
} }
.grid-no-wrap { .grid-no-wrap {
-webkit-flex-wrap: nowrap !important;
-ms-flex-wrap: nowrap !important; -ms-flex-wrap: nowrap !important;
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
} }
.grid-top { .grid-top {-webkit-box-align:start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}
-webkit-box-align: start; .grid-bottom {-webkit-box-align:end;-ms-flex-align:end;-ms-grid-row-align:flex-end;align-items:flex-end}
-webkit-align-items: flex-start; .grid-center {-webkit-box-align:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center}
-ms-flex-align: start; .grid-justify-center {-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
align-items: flex-start;
}
.grid-bottom { .cell {-webkit-box-flex:1;-ms-flex:1;flex:1};
-webkit-box-align: end; .cell-top {-ms-flex-item-align: start;align-self: flex-start}
-webkit-align-items: flex-end; .cell-bottom {-ms-flex-item-align: end;align-self: flex-end}
-ms-flex-align: end; .cell-center {-ms-flex-item-align: center;align-self: center}
align-items: flex-end; .cell-autoSize {-webkit-box-flex: 0;-ms-flex: none;flex: none}
}
.grid-center { .cell-1of2 {-webkit-box-flex: 0 !important;-ms-flex: 0 0 50% !important;flex: 0 0 50% !important}
-webkit-box-align: center; .cell-1of3 {-webkit-box-flex: 0 !important;-ms-flex: 0 0 33.3333% !important;flex: 0 0 33.3333% !important}
-webkit-align-items: center; .cell-2of3 {-webkit-box-flex: 0 !important;-ms-flex: 0 0 66.6666% !important;flex: 0 0 66.6666% !important}
-ms-flex-align: center; .cell-1of4 {-webkit-box-flex: 0 !important;-ms-flex: 0 0 25% !important;flex: 0 0 25% !important}
align-items: center;
}
.grid-justify-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.cell {
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
;
.cell-top {
-webkit-align-self: flex-start;
-ms-flex-item-align: start;
align-self: flex-start;
}
.cell-bottom {
-webkit-align-self: flex-end;
-ms-flex-item-align: end;
align-self: flex-end;
}
.cell-center {
-webkit-align-self: center;
-ms-flex-item-align: center;
align-self: center;
}
.cell-autoSize {
-webkit-box-flex: 0;
-webkit-flex: none;
-ms-flex: none;
flex: none;
}
.cell-1of2 {
-webkit-box-flex: 0 !important;
-webkit-flex: 0 0 50% !important;
-ms-flex: 0 0 50% !important;
flex: 0 0 50% !important;
}
.cell-1of3 {
-webkit-box-flex: 0 !important;
-webkit-flex: 0 0 33.3333% !important;
-ms-flex: 0 0 33.3333% !important;
flex: 0 0 33.3333% !important;
}
.cell-2of3 {
-webkit-box-flex: 0 !important;
-webkit-flex: 0 0 66.6666% !important;
-ms-flex: 0 0 66.6666% !important;
flex: 0 0 66.6666% !important;
}
.cell-1of4 {
-webkit-box-flex: 0 !important;
-webkit-flex: 0 0 25% !important;
-ms-flex: 0 0 25% !important;
flex: 0 0 25% !important;
}
.grid-fit > .cell { .grid-fit > .cell {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1; -ms-flex: 1;
flex: 1; flex: 1;
} }
.grid-full > .cell { .grid-full > .cell {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-webkit-flex: 0 0 100%;
-ms-flex: 0 0 100%; -ms-flex: 0 0 100%;
flex: 0 0 100%; flex: 0 0 100%;
} }
.grid-1of2 > .cell { .grid-1of2 > .cell {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-webkit-flex: 0 0 50%;
-ms-flex: 0 0 50%; -ms-flex: 0 0 50%;
flex: 0 0 50%; flex: 0 0 50%;
} }
.grid-1of3 > .cell { .grid-1of3 > .cell {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-webkit-flex: 0 0 33.3333%;
-ms-flex: 0 0 33.3333%; -ms-flex: 0 0 33.3333%;
flex: 0 0 33.3333%; flex: 0 0 33.3333%;
} }
.grid-1of4 > .cell { .grid-1of4 > .cell {
-webkit-box-flex: 0; -webkit-box-flex: 0;
-webkit-flex: 0 0 25%;
-ms-flex: 0 0 25%; -ms-flex: 0 0 25%;
flex: 0 0 25%; flex: 0 0 25%;
} }
@ -460,7 +304,6 @@ section {
.grid-gutters { .grid-gutters {
margin: 0 0 1em 0; margin: 0 0 1em 0;
} }
.grid-gutters > .cell { .grid-gutters > .cell {
padding: 1em 0 0 1em; padding: 1em 0 0 1em;
} }
@ -468,7 +311,6 @@ section {
.grid-guttersLg { .grid-guttersLg {
margin: -1.5em 0 1.5em -1.5em; margin: -1.5em 0 1.5em -1.5em;
} }
.grid-guttersLg > .cell { .grid-guttersLg > .cell {
padding: 1.5em 0 0 1.5em; padding: 1.5em 0 0 1.5em;
} }
@ -476,130 +318,114 @@ section {
.grid-guttersXl { .grid-guttersXl {
margin: -2em 0 2em -2em; margin: -2em 0 2em -2em;
} }
.grid-guttersXl > .cell { .grid-guttersXl > .cell {
padding: 2em 0 0 2em; padding: 2em 0 0 2em;
} }
/*! Misc layout styles*/ /*! Misc layout styles*/
.no-top-margin{margin-top:0 !important}
.no-top-margin { .no-top-padding{padding-top:0 !important}
margin-top: 0 !important; .margin5 {margin:0.5em}
} .padding5 {padding:0.5em}
.no-top-padding {
padding-top: 0 !important;
}
.margin5 {
margin: 0.5em;
}
.padding5 {
padding: 0.5em;
}
.pagebody { .pagebody {
background: #fff; background:#fff;
min-height: 100%; min-height:100%;
border-top: 2px solid silver; border-top:2px solid silver;
box-shadow: rgba(0,0,0,0.1) 0 0 5px; box-shadow:rgba(0,0,0,0.1) 0 0 5px;
} }
.heading { .heading {
margin-top: 16px; margin-top:16px;
margin-bottom: 14px; margin-bottom:14px;
line-height: 24px; line-height:24px;
font-size: 22px; font-size:22px;
} }
.heading .title { .heading .title {
font-family: 'PT Serif', serif; font-family:'PT Serif', serif;
color: #000; color: #000;
font-weight: bold; font-weight:bold;
} }
.heading .tagline { .heading .tagline {
padding-left: 15px; padding-left:15px;
font-weight: 300; font-weight:300;
font-size: 80%; font-size:80%;
color: #000; color:#000;
} }
.bio { .bio {
background: #f9f9f9; background:#f9f9f9;
margin: 12px; margin:12px;
padding: 15px; padding:15px;
text-align: center; text-align:center;
} }
.bio .logo { .bio .logo {
height: 100px; height:100px;
width: 100px; width:100px;
} }
.bio .title { .bio .title {
margin-top: 14px; margin-top:14px;
font-weight: 600; font-weight:600;
} }
.bio .tagline { .bio .tagline {
margin: 8px auto 0 auto; margin:8px auto 0 auto;
font-weight: 300; font-weight:300;
text-align: justify; text-align:justify;
max-width: 80%; max-width:80%;
font-size: 94%; font-size:94%;
} }
.recent-posts { .recent-posts {
padding: 15px; padding:15px;
} }
.recent-posts .title {
font-family:'PT Serif', serif;
margin-top:-12px;
border-top:6px solid #fff;
padding-top:14px;
font-weight:600;
font-size:90%;
margin-bottom:14px;
}
.recent-posts .title { .recent-posts .title .showall {
font-family: 'PT Serif', serif; float:right;
margin-top: -12px; text-decoration:underline;
border-top: 6px solid #fff; padding-right:10px;
padding-top: 14px; font-size:0.80em;
font-weight: 600; }
font-size: 90%;
margin-bottom: 14px;
}
.recent-posts .title .showall { .recent-posts .post {
float: right; border-top:2px solid #fff;
text-decoration: underline; text-decoration:underline;
padding-right: 10px; font-size:94%;
font-size: 0.80em; font-weight:400;
} display:block;
padding-top:8px;
.recent-posts .post { padding-bottom:6px;
border-top: 2px solid #fff; }
text-decoration: underline;
font-size: 94%;
font-weight: 400;
display: block;
padding-top: 8px;
padding-bottom: 6px;
}
/*! Admin Styles*/ /*! Admin Styles*/
.admin textarea { .admin textarea {
font-family: 'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace; font-family:'Anonymous Pro', Menlo, Monaco, Consolas, 'Courier New', monospace;
font-size: 1em; font-size:1em;
box-sizing: border-box; box-sizing:border-box;
width: 100%; width:100%;
min-height: 15em; min-height:15em;
border: none; border:none;
padding: 0; padding:0;
overflow: hidden; overflow:hidden;
resize: none; resize:none;
} }
.admin .edit-left, .admin .edit-left, .admin .edit-right {
.admin .edit-right { background:#fff;
background: #fff; padding:0.5em;
padding: 0.5em;
box-shadow: rgba(0,0,0,0.1) 0 0 5px; box-shadow: rgba(0,0,0,0.1) 0 0 5px;
} }
@ -607,23 +433,18 @@ section {
.small-Grid--gutters { .small-Grid--gutters {
margin: -1em 0 1em -1em; margin: -1em 0 1em -1em;
} }
.small-Grid--gutters > .cell { .small-Grid--gutters > .cell {
padding: 1em 0 0 1em; padding: 1em 0 0 1em;
} }
.small-Grid--guttersLg { .small-Grid--guttersLg {
margin: -1.5em 0 1.5em -1.5em; margin: -1.5em 0 1.5em -1.5em;
} }
.small-Grid--guttersLg > .cell { .small-Grid--guttersLg > .cell {
padding: 1.5em 0 0 1.5em; padding: 1.5em 0 0 1.5em;
} }
.small-Grid--guttersXl { .small-Grid--guttersXl {
margin: -2em 0 2em -2em; margin: -2em 0 2em -2em;
} }
.small-Grid--guttersXl > .cell { .small-Grid--guttersXl > .cell {
padding: 2em 0 0 2em; padding: 2em 0 0 2em;
} }
@ -633,23 +454,18 @@ section {
.med-Grid--gutters { .med-Grid--gutters {
margin: -1em 0 1em -1em; margin: -1em 0 1em -1em;
} }
.med-Grid--gutters > .cell { .med-Grid--gutters > .cell {
padding: 1em 0 0 1em; padding: 1em 0 0 1em;
} }
.med-Grid--guttersLg { .med-Grid--guttersLg {
margin: -1.5em 0 1.5em -1.5em; margin: -1.5em 0 1.5em -1.5em;
} }
.med-Grid--guttersLg > .cell { .med-Grid--guttersLg > .cell {
padding: 1.5em 0 0 1.5em; padding: 1.5em 0 0 1.5em;
} }
.med-Grid--guttersXl { .med-Grid--guttersXl {
margin: -2em 0 2em -2em; margin: -2em 0 2em -2em;
} }
.med-Grid--guttersXl > .cell { .med-Grid--guttersXl > .cell {
padding: 2em 0 0 2em; padding: 2em 0 0 2em;
} }
@ -659,23 +475,18 @@ section {
.large-Grid--gutters { .large-Grid--gutters {
margin: -1em 0 1em -1em; margin: -1em 0 1em -1em;
} }
.large-Grid--gutters > .cell { .large-Grid--gutters > .cell {
padding: 1em 0 0 1em; padding: 1em 0 0 1em;
} }
.large-Grid--guttersLg { .large-Grid--guttersLg {
margin: -1.5em 0 1.5em -1.5em; margin: -1.5em 0 1.5em -1.5em;
} }
.large-Grid--guttersLg > .cell { .large-Grid--guttersLg > .cell {
padding: 1.5em 0 0 1.5em; padding: 1.5em 0 0 1.5em;
} }
.large-Grid--guttersXl { .large-Grid--guttersXl {
margin: -2em 0 2em -2em; margin: -2em 0 2em -2em;
} }
.large-Grid--guttersXl > .cell { .large-Grid--guttersXl > .cell {
padding: 2em 0 0 2em; padding: 2em 0 0 2em;
} }
@ -683,25 +494,21 @@ section {
@media screen { @media screen {
[hidden~=screen] { [hidden~=screen] {
display: inherit; display: inherit
} }
[hidden~=screen]:not(:active):not(:focus):not(:target) { [hidden~=screen]:not(:active):not(:focus):not(:target) {
clip: rect(0 0 0 0)!important; clip: rect(0 0 0 0)!important;
position: absolute!important; position: absolute!important
} }
} }
@media screen and (max-width:40rem) { @media screen and (max-width:40rem) {
article, article, aside, section {
aside,
section {
clear: both; clear: both;
display: block; display: block;
max-width: 100%; max-width: 100%
} }
img { img {
margin-right: 1.6rem; margin-right: 1.6rem
} }
} }

View File

@ -10,7 +10,8 @@
-ms-overflow-style: -ms-autohiding-scrollbar; -ms-overflow-style: -ms-autohiding-scrollbar;
overflow-y: scroll; overflow-y: scroll;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
text-size-adjust: 100% text-size-adjust: 100%;
scroll-behavior: smooth;
} }
* { * {

View File

@ -31,14 +31,14 @@ function normalizePort(val) {
} }
// Create HTTP Server // Create HTTP Server
if (true === config.get('http')) { if (config.get('http') === true) {
let port = normalizePort(config.get('http-port')); let port = normalizePort(config.get('http-port'));
app.set('port', port); app.set('port', port);
container.set('http-server', new HttpServer(app, port)); container.set('http-server', new HttpServer(app, port));
} }
// Create HTTPs Server // Create HTTPs Server
if (true === config.get('https')) { if (config.get('https') === true) {
const httpsPort = normalizePort(config.get('https-port')); const httpsPort = normalizePort(config.get('https-port'));
const httpsConfig = { const httpsConfig = {
key: fs.readFileSync(config.get('https-config-key')), key: fs.readFileSync(config.get('https-config-key')),