diff --git a/app.js b/app.js index 6988805..7b0c6d0 100644 --- a/app.js +++ b/app.js @@ -39,6 +39,12 @@ Handlebars.registerHelper('moment', function(date, format) { Handlebars.registerHelper("striptags", function(text){ return striptags(text); }); +Handlebars.registerHelper("buildTitle", function(title, siteTitle){ + if (title.indexOf(siteTitle) < 0) { + title = `'${title}' by ${siteTitle}`; + } + return title; +}); Metalsmith(__dirname) diff --git a/src/css/main.scss b/src/css/main.scss index 83ff8e2..39aab3b 100644 --- a/src/css/main.scss +++ b/src/css/main.scss @@ -159,3 +159,25 @@ footer { height: 40px; } } + + +.share { + background: transparent; + border: none; + display: none; + cursor: pointer; + + &.show { + display: initial; + } + + &:hover, &:active { + fill: $link-color; + color: $link-color; + } + + svg { + height: 20px; + vertical-align: bottom; + } +} diff --git a/templates/partials/head.html b/templates/partials/head.html index d5dd127..4cff1c9 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -3,7 +3,7 @@ -