Initial commit

This commit is contained in:
Marcus Noble 2016-05-21 10:42:57 +01:00
commit a2e3afb01d
1689 changed files with 2262 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
build
node_modules
npm-debug.log
.DS_store

100
app.js Normal file
View File

@ -0,0 +1,100 @@
"use strict";
const fs = require('fs');
const https = require('https');
const express = require('express');
const app = express();
const Metalsmith = require('metalsmith');
const inplace = require('metalsmith-in-place');
const layouts = require('metalsmith-layouts');
const markdown = require('metalsmith-markdownit');
const permalinks = require('metalsmith-permalinks');
const collections = require('metalsmith-collections');
const pagination = require('metalsmith-pagination');
const define = require('metalsmith-define');
const feed = require('metalsmith-feed');
const sass = require('metalsmith-sass');
const Handlebars = require('handlebars');
const emoji = require('markdown-it-emoji');
const moment = require('moment');
const port = process.env.PORT || 8000;
app.use(express.static(__dirname + '/build'));
var md = markdown('commonmark', {html: true});
md.parser.use(emoji);
Handlebars.registerHelper('markdown', function(text) {
return md.parser.render(text);
});
Handlebars.registerHelper('moment', function(date, format) {
return new moment(date).format(format);
});
Metalsmith(__dirname)
.use(define({
site: {
title: 'Marcus Noble',
description: 'Awesomeness with a side of geek',
url: 'https://blog.marcusnoble.co.uk'
}
}))
.use(collections({
posts: {
pattern: 'posts/*',
sortBy: 'date',
reverse: true,
},
projects: {
pattern: 'projects/*'
},
pages: {
pattern: 'pages/*'
}
}))
.use(inplace({
engine: 'handlebars',
directory: 'templates',
partials: 'templates/partials'
}))
.use(md)
.use(permalinks({
pattern: ':date-:title',
date: 'YYYY-MM-DD',
linksets: [
{
match: { collection: 'pages' },
pattern: ':title'
}
]
}))
.use(feed({
collection: 'posts',
destination: 'feed.xml'
}))
.use(pagination({
'collections.posts': {
perPage: 5,
layout: 'index.html',
first: 'index.html',
noPageOne: true,
path: 'page:num/index.html',
pageMetadata: {
title: 'Posts'
}
}
}))
.use(layouts({
engine: 'handlebars',
directory: 'templates',
partials: 'templates/partials'
}))
.use(sass())
.build(function(err) {
if (err) throw err;
app.listen(port, function () {
console.log(`App listening on port ${port}`);
});
});

26
package.json Normal file
View File

@ -0,0 +1,26 @@
{
"private": true,
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "^4.13.4",
"handlebars": "^4.0.5",
"markdown-it-emoji": "^1.1.1",
"metalsmith": "^2.1.0",
"metalsmith-collections": "^0.7.0",
"metalsmith-define": "^2.0.1",
"metalsmith-feed": "^0.2.0",
"metalsmith-in-place": "^1.4.4",
"metalsmith-layouts": "^1.6.5",
"metalsmith-markdownit": "^0.3.0",
"metalsmith-pagination": "^1.4.0",
"metalsmith-permalinks": "^0.5.0",
"metalsmith-sass": "^1.3.0",
"moment": "^2.13.0"
},
"engines": {
"node": "6.0.0"
}
}

64
src/css/_underlines.scss Normal file
View File

@ -0,0 +1,64 @@
@mixin textShadowToCropUnderline($color) {
text-shadow:
.01em 0 $color,
-.01em 0 $color,
0 .01em $color,
0 -.01em $color,
.06em 0 $color,
-.06em 0 $color,
.09em 0 $color,
-.09em 0 $color,
.12em 0 $color,
-.12em 0 $color,
.15em 0 $color,
-.15em 0 $color;
}
@mixin linkUnderlines($background, $color, $hoverColor) {
color: $color;
text-decoration: none;
@include textShadowToCropUnderline($background);
background-image:
linear-gradient($background, $background),
linear-gradient($background, $background),
linear-gradient($color, $color);
background-size:
.05em 2px,
.05em 2px,
2px 2px;
background-repeat:
no-repeat,
no-repeat,
repeat-x;
background-position: 0% 1.08em, 100% 1.08em, 0% 1.08em;
&::selection {
@include textShadowToCropUnderline($selectionColor);
background-color: $selectionColor;
}
&::-moz-selection {
@include textShadowToCropUnderline($selectionColor);
background-color: $selectionColor;
}
&:before,
&:after,
*,
*:before,
*:after {
text-shadow: none;
}
&:visited {
color: $color;
}
&:hover {
color: $hoverColor;
background-image:
linear-gradient($background, $background),
linear-gradient($background, $background),
linear-gradient($hoverColor, $hoverColor);
}
}

299
src/css/main.scss Normal file
View File

@ -0,0 +1,299 @@
$border-color: rgba(9, 39, 64, 0.72);
$link-color: #AD4E4E;
$nav-height: 40px;
$selectionColor: #D2D2D2;
$background-color: #F4F5F6;
@import "_underlines.scss";
body {
padding-top: $nav-height;
background: $background-color;
}
* {
&::selection {
background-color: $selectionColor;
}
&::-moz-selection {
background-color: $selectionColor;
}
}
a {
color: #4a4a4a;
transition: color ease .3s;
margin: 0 3px;
&:hover {
color: $link-color;
text-decoration: none;
}
&+img {
border-bottom: none;
}
}
pre code {
overflow: scroll;
}
figure p {
margin: 0;
}
iframe {
max-width: 100%;
border: 0;
overflow: scroll;
}
.emoji {
display: inline !important;
margin: 0 !important;
}
nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: $nav-height;
display: block;
font-size: 1.2em;
background: $border-color;
border-bottom: 2px solid saturate($border-color, 60%);
z-index: 10;
text-align: center;
.github-icon {
position: fixed;
top: 0;
right: 10px;
}
.twitter-icon {
position: fixed;
top: 0;
right: 40px;
}
a {
line-height: $nav-height;
height: $nav-height;
padding: 0 5px;
color: #fff;
display: inline-block;
border: none;
svg {
height: $nav-height / 2;
vertical-align: text-bottom;
margin: 10px auto;
}
}
a:hover {
background: #fff;
color: $border-color;
border-bottom: 2px solid saturate($border-color, 60%);
svg path {
fill: $border-color;
}
}
}
#logo {
text-align: center;
img {
width: 200px;
border: 2px solid $border-color;
border-radius: 100px;
padding: 0;
margin: 0 auto;
box-shadow: 3px 3px 5px 3px #ccc;
}
}
.header, .post-list li article {
border-bottom: 1px solid rgba($border-color, .2);
position: relative;
}
.header::after, .post-list li article::after {
display: block;
content: "";
width: 7px;
height: 7px;
border: 1px solid $border-color;
position: absolute;
bottom: -5px;
left: 50%;
margin-left: -5px;
background: #fff;
border-radius: 100%;
box-shadow: rgba(232,232,232,.5) 0 0 0 5px;
}
.right {
float: right !important;
}
.center {
text-align: center;
}
.post-list {
list-style: none;
}
.post, .page {
padding: 0 7px;
a {
@include linkUnderlines($background-color, #4a4a4a, $link-color);
}
}
.post-meta {
display: inline-block;
margin: 15px -7px 5px -7px;
font-size: 1.5rem;
color: #fff;
padding:4px 20px 4px 20px;
position: relative;
box-shadow: inset 0px 1px 0px rgba(255,255,255,.3),
inset 0px 0px 20px rgba(0,0,0,0.1),
0px 1px 1px rgba(0,0,0,0.4);
background: $border-color;
width: 100%;
text-align: left;
a {
color: #9EABB3;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
&::before {
content: "";
width: .2em;
bottom: -.45em;
position: absolute;
display: block;
border: .9em solid $border-color;
box-shadow: 0px 1px 0px rgba(0,0,0,0.4);
z-index: -2;
left: -1.2em;
border-right-width: .75em;
border-left-color: transparent;
}
&::after {
content: "";
width: .2em;
bottom: -.45em;
position: absolute;
display: block;
border: 0.9em solid rgba(9, 39, 64, 0.72);
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.4);
z-index: -2;
right: -1.2em;
border-left-width: .75em;
border-right-color: transparent;
}
span::before{
content:"";
bottom:-.5em;
position:absolute;
display:block;
border-style:solid;
border-color: #000 transparent transparent transparent;
z-index:-1;
left: 0;
border-width: .5em 0 0 .5em;
}
span::after{
content: "";
bottom: -.5em;
position: absolute;
display: block;
border-style: solid;
border-color: #000 transparent transparent transparent;
z-index: -1;
right: 0;
border-width: .5em .5em 0 0;
}
}
.post-body {
margin-bottom: 100px;
a {
font-size: 1.3em;
}
img{
display: block;
max-width: 100%;
margin: 0 auto;
}
}
.pagination {
text-align: center;
margin: 30px;
}
@media (max-width: 768px) {
nav {
display: block;
height: auto;
.nav-right {
position: fixed;
top: 0;
right: 0;
span {
display: none;
}
}
}
}
.card {
display:block;
border: 1px solid $border-color;
border-radius: 0.3em;
padding: 10px;
box-shadow: 1px 1px 2px $border-color;
background-size: cover;
background-position: center center;
position: relative;
}
.experience-list {
h3 {
font-size: 2em;
}
}
.project-image {
width: 100%;
height: 100px;
background-size: cover;
background-position: center;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
src/images/Clock.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
src/images/CrowdLighter.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/images/Fit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
src/images/GoogleFit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
src/images/JSOxLogos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
src/images/JSOxfordLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/images/Jenkins.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
src/images/Mechanism.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

BIN
src/images/MrRobot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
src/images/Pixels.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
src/images/QControl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
src/images/SQLGraph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
src/images/Stickers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

BIN
src/images/Up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
src/images/Wellness.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/images/about_me_pic.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/images/butler.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Some files were not shown because too many files have changed in this diff Show More