Merge remote-tracking branch 'upstream/main'

This commit is contained in:
ViViDboarder 2021-04-07 10:00:37 -07:00
commit 4f8ad3f804
35 changed files with 2305 additions and 3776 deletions

View File

@ -1,17 +0,0 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.hbs]
insert_final_newline = false
[*.md]
trim_trailing_whitespace = false

View File

@ -1,19 +0,0 @@
Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org 👫.
If you're filing a bug 🐛, please include the following information:
### Screenshot
![]()
### Steps to Reproduce
1. This is the first step
2. This may be the post content used to cause an issue...
### Technical details
* Casper Version:
* Ghost Version:
* Browser Version:
* OS Version:

View File

@ -1,15 +0,0 @@
name: Test
on:
pull_request:
push:
branches:
- master
- 'renovate/*'
jobs:
test:
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
steps:
- uses: actions/checkout@v1
- run: yarn
- run: yarn test:ci

View File

@ -1,2 +0,0 @@
version-tag-prefix ""
version-git-message "%s"

View File

@ -1,4 +1,4 @@
Copyright (c) 2013-2020 Ghost Foundation Copyright (c) 2013-2021 Ghost Foundation
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation

View File

@ -12,7 +12,7 @@ The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the la
Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes. Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/api/handlebars-themes/) which explains every possible Handlebars helper and template. This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/themes/) which explains every possible Handlebars helper and template.
**The main files are:** **The main files are:**
@ -66,4 +66,4 @@ You can add your own SVG icons in the same manner.
# Copyright & License # Copyright & License
Copyright (c) 2013-2020 Ghost Foundation - Released under the [MIT license](LICENSE). Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE).

View File

@ -1,9 +0,0 @@
# Reporting Security Vulnerabilities
Potential security vulnerabilities can be reported directly us at `security@ghost.org`. The Ghost Security Team communicates privately and works in a secured, isolated repository for tracking, testing, and resolving security-related issues.
The full, up-to-date details of our security policy and procedure can always be found in our documentation:
https://ghost.org/docs/concepts/security/
Please refer to this before emailing us. Thanks for helping make Ghost safe for everyone 🙏.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
:root{--blue:#3eb0ef;--green:#a4d037;--purple:#ad26b4;--yellow:#fecd35;--red:#f05230;--darkgrey:#15171a;--midgrey:#738a94;--lightgrey:#c5d2d9;--whitegrey:#e5eff5;--pink:#fa3a57;--brown:#a3821a;--darkmode:#1a1c20}a,abbr,acronym,address,applet,article,aside,audio,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{max-width:100%}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{box-sizing:inherit}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn,em,i{font-style:italic}h1{margin:.67em 0;font-size:2em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}mark{background-color:#fdffb6}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;color:inherit;font:inherit}button{overflow:visible;border:none}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input:focus{outline:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{padding:0;border:0}textarea{overflow:auto}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}html{overflow-y:scroll;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body,html{overflow-x:hidden}body{color:#303a3e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1.6rem;line-height:1.6em;font-weight:400;font-style:normal;letter-spacing:0;text-rendering:optimizeLegibility;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on}::-moz-selection{text-shadow:none;background:#cbeafb}::selection{text-shadow:none;background:#cbeafb}hr{position:relative;display:block;width:100%;margin:2.5em 0 3.5em;padding:0;height:1px;border:0;border-top:1px solid #e4eaed}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{margin:0;padding:0;border:0}textarea{resize:vertical}blockquote,dl,ol,p,ul{margin:0 0 1.5em}ol,ul{padding-left:1.3em;padding-right:1.5em}ol ol,ol ul,ul ol,ul ul{margin:.5em 0 1em}ul{list-style:disc}ol{list-style:decimal}ol,ul{max-width:100%}li{margin:.5em 0;padding-left:.3em;line-height:1.6em}dt{float:left;margin:0 20px 0 0;width:120px;color:var(--darkgrey);font-weight:500;text-align:right}dd{margin:0 0 5px;text-align:left}blockquote{margin:1.5em 0;padding:0 1.6em;border-left:.5em solid var(--whitegrey)}blockquote p{margin:.8em 0;font-size:1.2em;font-weight:300}blockquote small{display:inline-block;margin:.8em 0 .8em 1.5em;font-size:.9em;opacity:.8}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:400}a{color:#26a6ed;text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.15;font-weight:600;text-rendering:optimizeLegibility}h1{margin:0 0 .5em;font-size:5.5rem;font-weight:600}@media (max-width:500px){h1{font-size:2.2rem}}h2{margin:1.5em 0 .5em;font-size:2.2rem}@media (max-width:500px){h2{font-size:1.8rem}}h3{margin:1.5em 0 .5em;font-size:1.8rem;font-weight:500}@media (max-width:500px){h3{font-size:1.7rem}}h4{margin:1.5em 0 .5em;font-size:1.6rem;font-weight:500}h5,h6{margin:1.5em 0 .5em;font-size:1.4rem;font-weight:500} a,abbr,acronym,address,applet,article,aside,audio,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{display:block;max-width:100%;height:auto}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{box-sizing:inherit}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn,em,i{font-style:italic}h1{margin:.67em 0;font-size:2em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}mark{background-color:#fdffb6}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;color:inherit;font:inherit}button{overflow:visible;border:none}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input:focus{outline:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{padding:0;border:0}textarea{overflow:auto}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{color:#35373a;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1.6rem;line-height:1.6em;font-weight:400;font-style:normal;letter-spacing:0;text-rendering:optimizeLegibility;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on}::-moz-selection{text-shadow:none;background:#daf2fd}::selection{text-shadow:none;background:#daf2fd}hr{position:relative;display:block;width:100%;margin:2.5em 0 3.5em;padding:0;height:1px;border:0;border-top:1px solid #f0f0f0}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{margin:0;padding:0;border:0}textarea{resize:vertical}::not(.gh-content) blockquote,::not(.gh-content) dl,::not(.gh-content) ol,::not(.gh-content) p,::not(.gh-content) ul{margin:0 0 1.5em}ol,ul{padding-left:1.3em;padding-right:1.5em}ol ol,ol ul,ul ol,ul ul{margin:.5em 0 1em}ul{list-style:disc}ol{list-style:decimal}ol,ul{max-width:100%}li{padding-left:.3em;line-height:1.6em}li+li{margin-top:.5em}dt{float:left;margin:0 20px 0 0;width:120px;color:#daf2fd;font-weight:500;text-align:right}dd{margin:0 0 5px;text-align:left}blockquote{margin:1.5em 0;padding:0 1.6em;border-left:#daf2fd}blockquote p{margin:.8em 0;font-size:1.2em;font-weight:300}blockquote small{display:inline-block;margin:.8em 0 .8em 1.5em;font-size:.9em;opacity:.8}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:400}a{color:#15171a;text-decoration:none}h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.15;font-weight:600;text-rendering:optimizeLegibility;letter-spacing:-.01em}h1{margin:0 0 .5em;font-size:4.8rem;font-weight:700;letter-spacing:-.015em}@media (max-width:600px){h1{font-size:2.8rem}}h2{margin:1.5em 0 .5em;font-size:2.8rem;font-weight:700}@media (max-width:600px){h2{font-size:2.3rem}}h3{margin:1.5em 0 .5em;font-size:2.4rem;font-weight:600}@media (max-width:600px){h3{font-size:1.7rem}}h4{font-size:2.2rem}h4,h5{margin:1.5em 0 .5em}h5{font-size:2rem}h6{margin:1.5em 0 .5em;font-size:1.8rem}
/*# sourceMappingURL=global.css.map */ /*# sourceMappingURL=global.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,22 +1,3 @@
/* Variables
/* ---------------------------------------------------------- */
:root {
/* Colours */
--blue: #3eb0ef;
--green: #a4d037;
--purple: #ad26b4;
--yellow: #fecd35;
--red: #f05230;
--darkgrey: #15171A;
--midgrey: #738a94;
--lightgrey: #c5d2d9;
--whitegrey: #e5eff5;
--pink: #fa3a57;
--brown: #a3821a;
--darkmode: color-mod(var(--darkgrey) l(+2%));
}
/* Reset /* Reset
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
@ -127,7 +108,9 @@ table {
border-collapse: collapse; border-collapse: collapse;
} }
img { img {
display: block;
max-width: 100%; max-width: 100%;
height: auto;
} }
html { html {
box-sizing: border-box; box-sizing: border-box;
@ -273,15 +256,12 @@ th {
========================================================================== */ ========================================================================== */
html { html {
overflow-x: hidden;
overflow-y: scroll;
font-size: 62.5%; font-size: 62.5%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
body { body {
overflow-x: hidden; color: #35373A;
color: color-mod(var(--midgrey) l(-30%));
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: 1.6rem; font-size: 1.6rem;
line-height: 1.6em; line-height: 1.6em;
@ -298,7 +278,7 @@ body {
::selection { ::selection {
text-shadow: none; text-shadow: none;
background: color-mod(var(--blue) lightness(+30%)); background: #daf2fd;
} }
hr { hr {
@ -309,7 +289,7 @@ hr {
padding: 0; padding: 0;
height: 1px; height: 1px;
border: 0; border: 0;
border-top: 1px solid color-mod(var(--lightgrey) l(+10%)); border-top: 1px solid #f0f0f0;
} }
audio, audio,
@ -331,11 +311,11 @@ textarea {
resize: vertical; resize: vertical;
} }
p, ::not(.gh-content) p,
ul, ::not(.gh-content) ul,
ol, ::not(.gh-content) ol,
dl, ::not(.gh-content) dl,
blockquote { ::not(.gh-content) blockquote {
margin: 0 0 1.5em 0; margin: 0 0 1.5em 0;
} }
@ -366,16 +346,19 @@ ol {
} }
li { li {
margin: 0.5em 0;
padding-left: 0.3em; padding-left: 0.3em;
line-height: 1.6em; line-height: 1.6em;
} }
li + li {
margin-top: 0.5em;
}
dt { dt {
float: left; float: left;
margin: 0 20px 0 0; margin: 0 20px 0 0;
width: 120px; width: 120px;
color: var(--darkgrey); color: #daf2fd;
font-weight: 500; font-weight: 500;
text-align: right; text-align: right;
} }
@ -388,7 +371,7 @@ dd {
blockquote { blockquote {
margin: 1.5em 0; margin: 1.5em 0;
padding: 0 1.6em 0 1.6em; padding: 0 1.6em 0 1.6em;
border-left: var(--whitegrey) 0.5em solid; border-left: #daf2fd;
} }
blockquote p { blockquote p {
@ -416,14 +399,10 @@ blockquote cite a {
} }
a { a {
color: color-mod(var(--blue) l(-5%)); color: #15171A;
text-decoration: none; text-decoration: none;
} }
a:hover {
text-decoration: underline;
}
h1, h1,
h2, h2,
h3, h3,
@ -434,35 +413,38 @@ h6 {
line-height: 1.15; line-height: 1.15;
font-weight: 600; font-weight: 600;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
letter-spacing: -0.01em;
} }
h1 { h1 {
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
font-size: 5.5rem; font-size: 4.8rem;
font-weight: 600; font-weight: 700;
letter-spacing: -0.015em;
} }
@media (max-width: 500px) { @media (max-width: 600px) {
h1 { h1 {
font-size: 2.2rem; font-size: 2.8rem;
} }
} }
h2 { h2 {
margin: 1.5em 0 0.5em 0; margin: 1.5em 0 0.5em 0;
font-size: 2.2rem; font-size: 2.8rem;
font-weight: 700;
} }
@media (max-width: 500px) { @media (max-width: 600px) {
h2 { h2 {
font-size: 1.8rem; font-size: 2.3rem;
} }
} }
h3 { h3 {
margin: 1.5em 0 0.5em 0; margin: 1.5em 0 0.5em 0;
font-size: 1.8rem; font-size: 2.4rem;
font-weight: 500; font-weight: 600;
} }
@media (max-width: 500px) { @media (max-width: 600px) {
h3 { h3 {
font-size: 1.7rem; font-size: 1.7rem;
} }
@ -470,18 +452,15 @@ h3 {
h4 { h4 {
margin: 1.5em 0 0.5em 0; margin: 1.5em 0 0.5em 0;
font-size: 1.6rem; font-size: 2.2rem;
font-weight: 500;
} }
h5 { h5 {
margin: 1.5em 0 0.5em 0; margin: 1.5em 0 0.5em 0;
font-size: 1.4rem; font-size: 2rem;
font-weight: 500;
} }
h6 { h6 {
margin: 1.5em 0 0.5em 0; margin: 1.5em 0 0.5em 0;
font-size: 1.4rem; font-size: 1.8rem;
font-weight: 500;
} }

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
} }
// append contents // append contents
var postElements = this.response.querySelectorAll('.post-card'); var postElements = this.response.querySelectorAll('article.post-card');
postElements.forEach(function (item) { postElements.forEach(function (item) {
// document.importNode is important, without it the item's owner // document.importNode is important, without it the item's owner
// document will be different which can break resizing of // document will be different which can break resizing of

View File

@ -1,61 +0,0 @@
/* eslint-env browser */
/**
* Nav/Title replacement
* Used on invividual post pages, displays the post title in place of the nav
* bar when scrolling past the title
*
* Usage:
* ```
* Casper.stickyTitle({
* navSelector: '.site-nav-main',
* titleSelector: '.post-full-title',
* activeClass: 'nav-post-title-active'
* });
* ```
*/
(function (window, document) {
// set up Casper as a global object
if (!window.Casper) {
window.Casper = {};
}
window.Casper.stickyNavTitle = function stickyNavTitle(options) {
var nav = document.querySelector(options.navSelector);
var title = document.querySelector(options.titleSelector);
var lastScrollY = window.scrollY;
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = title.getBoundingClientRect().top + window.scrollY;
var triggerOffset = title.offsetHeight + 35;
// show/hide post title
if (lastScrollY >= trigger + triggerOffset) {
nav.classList.add(options.activeClass);
} else {
nav.classList.remove(options.activeClass);
}
ticking = false;
}
window.addEventListener('scroll', onScroll, {passive: true});
update();
};
})(window, document);

View File

@ -1,61 +1,57 @@
{{!< default}} {{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} {{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
<section class="outer">
<div class="inner posts">
<header class="author-profile">
{{#author}} {{#author}}
{{!-- Everything inside the #author tags pulls data from the author --}} {{!-- Everything inside the #author tags pulls data from the author --}}
<div class="author-profile-content">
<header class="site-archive-header">
{{> site-header}}
{{> header-background background=cover_image}} {{!--Special header-image.hbs partial to generate the background image--}}
<div class="inner">
<div class="site-header-content author-header">
{{#if profile_image}} {{#if profile_image}}
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" /> <img class="author-profile-pic" src="{{profile_image}}" alt="{{name}}" />
{{else}} {{else}}
<span class="author-profile-image">{{> "icons/avatar"}}</span> <span class="author-profile-pic">{{> "icons/avatar"}}</span>
{{/if}} {{/if}}
<div class="author-header-content">
<h1 class="site-title">{{name}}</h1> <h1>{{name}}</h1>
<p>
{{#if bio}} {{#if bio}}
<h2 class="author-bio">{{bio}}</h2> {{bio}}
{{else}}
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} published
{{/if}} {{/if}}
<div class="author-meta"> </p>
<div class="author-profile-meta">
{{#if location}} {{#if location}}
<div class="author-location">{{location}}</div> <div class="author-profile-location">📍 {{location}}</div>
{{/if}} {{/if}}
<div class="author-stats">
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}
</div>
{{#if website}} {{#if website}}
<span class="author-social-link"><a href="{{website}}" target="_blank" rel="noopener">Website</a></span> <span ></span><a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{website}}</a></span>
{{/if}} {{/if}}
{{#if twitter}} {{#if twitter}}
<span class="author-social-link"><a href="{{twitter_url}}" target="_blank" rel="noopener">Twitter</a></span> <span ></span><a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{twitter_url}}</a></span>
{{/if}} {{/if}}
{{#if facebook}} {{#if facebook}}
<span class="author-social-link"><a href="{{facebook_url}}" target="_blank" rel="noopener">Facebook</a></span> <span ></span><a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{facebook_url}}</a></span>
{{/if}} {{/if}}
</div> </div>
</div>
</div>
</div>
</div>
</header>
{{/author}}
{{!-- The main content area --}} </div>
<main id="site-main" class="site-main outer">
<div class="inner posts"> {{/author}}
</header>
<div class="post-feed"> <div class="post-feed">
{{#foreach posts}} {{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}} {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}} {{> "post-card"}}
{{/foreach}} {{/foreach}}
</div> </div>
</div> </div>
</main> </section>

View File

@ -1,5 +0,0 @@
{
"github": {
"token": "<gh-personal-access-token>"
}
}

View File

@ -1,8 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{@site.lang}}"> <html lang="{{@site.locale}}">
<head> <head>
{{!-- Document Settings --}} {{!-- Basic meta - advanced meta is output with {ghost_head} below --}}
<title>{{meta_title}}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
@ -17,121 +18,99 @@
<meta name="HandheldFriendly" content="True" /> <meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Styles'n'Scripts --}} {{!-- Theme assets - use the {asset} helper to reference styles & scripts,
this will take care of caching and cache-busting automatically --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" /> <link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
<link rel="stylesheet" type="text/css" href="{{asset "css/prism.css"}}" /> <link rel="stylesheet" type="text/css" href="{{asset "css/prism.css"}}" />
{{!-- This tag outputs SEO meta+structured data and other important settings --}} {{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings,
it should always be the last tag before the closing head tag --}}
{{ghost_head}} {{ghost_head}}
</head> </head>
<body class="{{body_class}}"> <body class="{{body_class}}">
<div class="viewport">
<div class="site-wrapper"> <header id="gh-head" class="gh-head {{#if @site.cover_image}}has-cover{{/if}}">
<nav class="gh-head-inner inner gh-container">
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}} <div class="gh-head-brand">
<a class="gh-head-logo" href="{{@site.url}}">
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
</a>
<a class="gh-burger" role="button">
<div class="gh-burger-box">
<div class="gh-burger-inner"></div>
</div>
</a>
</div>
<div class="gh-head-menu">
{{navigation}}
</div>
<div class="gh-head-actions">
<div class="gh-social">
{{#if @site.facebook}}
<a class="gh-social-facebook" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @site.twitter}}
<a class="gh-social-twitter" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#unless @member}}
<a class="gh-head-button" href="#/portal/signup">Subscribe</a>
{{else}}
<a class="gh-head-button" href="#/portal/account">Account</a>
{{/unless}}
</div>
</nav>
</header>
<main>
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}}
{{{body}}} {{{body}}}
</main>
{{!-- The footer at the very bottom of the screen --}} {{!-- The global footer at the very bottom of the screen --}}
<footer class="site-footer outer"> <footer class="site-footer outer">
<div class="site-footer-content inner"> <div class="inner">
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section> <section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section>
<nav class="site-footer-nav"> <nav class="site-footer-nav">
<a href="{{@site.url}}">Latest Posts</a> {{navigation type="secondary"}}
{{#if @site.facebook}}<a href="{{facebook_url @site.facebook}}" target="_blank" rel="noopener">Facebook</a>{{/if}}
{{#if @site.twitter}}<a href="{{twitter_url @site.twitter}}" target="_blank" rel="noopener">Twitter</a>{{/if}}
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</nav> </nav>
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
</div> </div>
</footer> </footer>
</div> </div>
{{!-- /.viewport --}}
{{!-- The big email subscribe modal content --}}
{{#if @labs.members}}
<div class="subscribe-success-message">
<a class="subscribe-close" href="javascript:;"></a>
You've successfully subscribed to {{@site.title}}!
</div>
<div id="subscribe" class="subscribe-overlay"> {{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
<a class="subscribe-close-overlay" href="#"></a>
<a class="subscribe-close-button" href="#"></a>
<div class="subscribe-overlay-content">
{{#if @site.logo}}
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
{{/if}}
<div class="subscribe-form">
<h1 class="subscribe-overlay-title">Subscribe to {{@site.title}}</h1>
<p class="subscribe-overlay-description">Stay up to date! Get all the latest & greatest posts delivered straight to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com"
autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</div>
</div>
</div>
{{/if}}
{{!-- jQuery, required for fitvids --}}
<script <script
src="https://code.jquery.com/jquery-3.4.1.min.js" src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"> crossorigin="anonymous">
</script> </script>
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
<script src="{{asset "built/casper.js"}}"></script> <script src="{{asset "built/casper.js"}}"></script>
<script src="{{asset "js/prism.js"}}"></script>
{{!-- Scripts for Members subscription --}}
<script> <script>
// Parse the URL parameter
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// Give the parameter a variable name
var action = getParameterByName('action');
$(document).ready(function () { $(document).ready(function () {
if (action == 'subscribe') { // Mobile Menu Trigger
$('body').addClass("subscribe-success"); $('.gh-burger').click(function () {
} $('body').toggleClass('gh-head-open');
$('.subscribe-success-message .subscribe-close').click(function () {
$('.subscribe-success-message').addClass('close');
});
// Reset form on opening subscrion overlay
$('.subscribe-button').click(function() {
$('.subscribe-overlay form').removeClass();
$('.subscribe-email').val('');
}); });
// FitVids - Makes video embeds responsive
$(".gh-content").fitVids();
}); });
</script> </script>
{{!-- The #block helper will pull in data from the #contentFor other template files. In this case, there's some JavaScript which we only want to use in post.hbs, but it needs to be included down here, after jQuery has already loaded. --}} {{!-- Ghost outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}}
{{{block "scripts"}}}
<script type="text/javascript" src="{{asset "js/prism.js"}}"></script>
{{!-- Ghost outputs important scripts and data with this tag - it should always be the very last thing before the closing body tag --}}
{{ghost_foot}} {{ghost_foot}}
</body> </body>

View File

@ -1,30 +1,37 @@
{{!< default}}
{{!-- {{!--
This error template is used for all 404 errors, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity. There are two error files in this theme, one for 404s and one for all other errors.
This file is the former, and handles all 404 Page Not Found errors.
The 404 error is the most common error that a visitor might see, for example when
following a broken link
Keep this template as lightweight as you can!
--}} --}}
{{!< default}} <section class="outer error-content">
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
<header class="site-header">
{{> site-header}}
</header>
<main id="site-main" class="site-main outer error-content">
<div class="inner"> <div class="inner">
<section class="error-message"> <section class="error-message">
<h1 class="error-code">{{statusCode}}</h1> <h1 class="error-code">{{statusCode}}</h1>
<p class="error-description">{{message}}</p> <p class="error-description">{{message}}</p>
<a class="error-link" href="{{@site.url}}">Go to the front page →</a> <a class="error-link" href="{{@site.url}}">Go to the front page →</a>
</section> </section>
</div>
</section>
{{#get "posts" limit="3" include="authors,tags"}} {{!-- Given that people landing on this page didn't find what they
<div class="post-feed"> were looking for, let's give them some alternative stuff to read. --}}
{{#foreach posts}} <aside class="read-more-wrap">
<div class="read-more inner">
{{#get "posts" include="authors" limit="3" as |more_posts|}}
{{#if more_posts}}
{{#foreach more_posts}}
{{> "post-card"}} {{> "post-card"}}
{{/foreach}} {{/foreach}}
</div> {{/if}}
{{/get}} {{/get}}
</div> </div>
</main> </aside>

View File

@ -1,7 +1,15 @@
{{!-- {{!--
This error template is used for all 400/500 errors, except 404, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity. There are two error files in this theme, one for 404s and one for all other errors.
You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in this file. This file is the latter, and handle all 400/500 errors that might occur.
Because 500 errors in particular usuall happen when a server is struggling, this
template is as simple as possible. No template dependencies, no JS, no API calls.
This is to prevent rendering the error-page itself compounding the issue causing
the error in the first place.
Keep this template as lightweight as you can!
--}} --}}
<!DOCTYPE html> <!DOCTYPE html>
@ -32,7 +40,7 @@ You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in
</div> </div>
</header> </header>
<main id="site-main" class="site-main outer error-content"> <main class="outer error-content">
<div class="inner"> <div class="inner">
<section class="error-message"> <section class="error-message">

View File

@ -96,10 +96,10 @@ exports.build = build;
exports.zip = series(build, zipper); exports.zip = series(build, zipper);
exports.default = series(build, serve, watcher); exports.default = series(build, serve, watcher);
exports.release = () => { exports.release = async () => {
// @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/ // @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/
// require(./package.json) can run into caching issues, this re-reads from file everytime on release // require(./package.json) can run into caching issues, this re-reads from file everytime on release
var packageJSON = JSON.parse(fs.readFileSync('./package.json')); let packageJSON = JSON.parse(fs.readFileSync('./package.json'));
const newVersion = packageJSON.version; const newVersion = packageJSON.version;
if (!newVersion || newVersion === '') { if (!newVersion || newVersion === '') {
@ -109,45 +109,36 @@ exports.release = () => {
console.log(`\nCreating release for ${newVersion}...`); console.log(`\nCreating release for ${newVersion}...`);
let config; const githubToken = process.env.GST_TOKEN;
try {
config = require('./config');
} catch (err) {
config = null;
}
if (!config || !config.github || !config.github.token) { if (!githubToken) {
console.log('Please copy config.example.json and configure Github token.'); console.log('Please configure your environment with a GitHub token located in GST_TOKEN');
return; return;
} }
let compatibleWithGhost; try {
const result = await inquirer.prompt([{
return inquirer.prompt([{
type: 'input', type: 'input',
name: 'compatibleWithGhost', name: 'compatibleWithGhost',
message: 'Which version of Ghost is it compatible with?', message: 'Which version of Ghost is it compatible with?',
default: '3.0.0' default: '4.0.0'
}]) }]);
.then(result => {
compatibleWithGhost = result.compatibleWithGhost; const compatibleWithGhost = result.compatibleWithGhost;
return Promise.resolve();
}) const releasesResponse = await releaseUtils.releases.get({
.then(() => releaseUtils.releases.get({
userAgent: 'Casper', userAgent: 'Casper',
uri: `https://api.github.com/repos/${REPO_READONLY}/releases` uri: `https://api.github.com/repos/${REPO_READONLY}/releases`
})) });
.then((response) => {
if (!response || !response.length) { if (!releasesResponse || !releasesResponse) {
console.log('No releases found. Skipping...'); console.log('No releases found. Skipping...');
return; return;
} }
let previousVersion = response[0].tag_name || response[0].name; let previousVersion = releasesResponse[0].tag_name || releasesResponse[0].name;
console.log(`Previous version: ${previousVersion}`); console.log(`Previous version: ${previousVersion}`);
return Promise.resolve(previousVersion);
})
.then((previousVersion) => {
const changelog = new releaseUtils.Changelog({ const changelog = new releaseUtils.Changelog({
changelogPath: CHANGELOG_PATH, changelogPath: CHANGELOG_PATH,
folder: path.join(process.cwd(), '.') folder: path.join(process.cwd(), '.')
@ -161,27 +152,22 @@ exports.release = () => {
.sort() .sort()
.clean(); .clean();
return Promise.resolve(); const newReleaseResponse = await releaseUtils.releases.create({
})
.then(() => releaseUtils.releases.create({
draft: true, draft: true,
preRelease: false, preRelease: false,
tagName: newVersion, tagName: 'v' + newVersion,
releaseName: newVersion, releaseName: newVersion,
userAgent: 'Casper', userAgent: 'Casper',
uri: `https://api.github.com/repos/${REPO}/releases`, uri: `https://api.github.com/repos/${REPO}/releases`,
github: { github: {
token: config.github.token token: githubToken
}, },
content: [`**Compatible with Ghost ≥ ${compatibleWithGhost}**\n\n`], content: [`**Compatible with Ghost ≥ ${compatibleWithGhost}**\n\n`],
changelogPath: CHANGELOG_PATH changelogPath: CHANGELOG_PATH
})) });
.then((response) => { console.log(`\nRelease draft generated: ${newReleaseResponse.releaseUrl}\n`);
console.log(`\nRelease draft generated: ${response.releaseUrl}\n`); } catch (err) {
return Promise.resolve();
})
.catch((err) => {
console.error(err); console.error(err);
process.exit(1); process.exit(1);
}); }
}; };

View File

@ -2,23 +2,29 @@
{{!-- The tag above means: insert everything in this file {{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}} into the {body} of the default.hbs template --}}
<header class="site-home-header">
{{> header-background background=@site.cover_image}} {{!--Special header-image.hbs partial to generate the background image--}}
<div class="inner">
{{> "site-nav"}}
<div class="site-header-content"> <div class="site-header-content">
{{#if @site.cover_image}}
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img class="site-header-cover"
srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 600w,
{{img_url @site.cover_image size="l"}} 1000w,
{{img_url @site.cover_image size="xl"}} 2000w"
sizes="100vw"
src="{{img_url @site.cover_image size="xl"}}"
alt=""
/>
{{/if}}
<h1 class="site-title"> <h1 class="site-title">
{{#if @site.logo}} {{#if @site.logo}}
<img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" /> <img class="site-logo" src="{{img_url @site.logo size="m"}}" alt="{{@site.title}}" />
{{else}} {{else}}
{{@site.title}} {{@site.title}}
{{/if}} {{/if}}
</h1> </h1>
<h2 class="site-description">{{@site.description}}</h2> <p>{{@site.description}}</p>
</div> </div>
</div>
</div>
</header>
{{!-- The main content area --}} {{!-- The main content area --}}
<main id="site-main" class="site-main outer"> <main id="site-main" class="site-main outer">
@ -35,64 +41,3 @@ into the {body} of the default.hbs template --}}
</div> </div>
</main> </main>
{{> site-header}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
// NOTE: Scroll performance is poor in Safari
// - this appears to be due to the events firing much more slowly in Safari.
// Dropping the scroll event and using only a raf loop results in smoother
// scrolling but continuous processing even when not scrolling
$(document).ready(function () {
var nav = document.querySelector('.site-nav-main .site-nav');
var feed = document.querySelector('.post-feed');
var lastScrollY = window.scrollY;
var lastWindowHeight = window.innerHeight;
var lastDocumentHeight = $(document).height();
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function onResize() {
lastWindowHeight = window.innerHeight;
lastDocumentHeight = $(document).height();
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = feed.getBoundingClientRect().top + window.scrollY;
var progressMax = lastDocumentHeight - lastWindowHeight;
// show/hide nav
if (lastScrollY >= trigger - 20) {
nav.classList.add('fixed-nav-active');
} else {
nav.classList.remove('fixed-nav-active');
}
ticking = false;
}
window.addEventListener('scroll', onScroll, { passive: true });
window.addEventListener('resize', onResize, false);
update();
});
</script>
{{/contentFor}}

View File

@ -2,10 +2,10 @@
"name": "vivid-casper", "name": "vivid-casper",
"description": "Minor tweaks from the default personal blogging theme for Ghost. Beautiful, minimal and responsive.", "description": "Minor tweaks from the default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
"demo": "https://demo.ghost.io", "demo": "https://demo.ghost.io",
"version": "3.1.0", "version": "4.0.4",
"engines": { "engines": {
"ghost": ">=3.0.0", "ghost": ">=4.0.0",
"ghost-api": "v3" "ghost-api": "v4"
}, },
"license": "MIT", "license": "MIT",
"screenshots": { "screenshots": {
@ -46,18 +46,19 @@
"bugs": "https://github.com/ViViDboarder/Casper/issues", "bugs": "https://github.com/ViViDboarder/Casper/issues",
"contributors": "https://github.com/ViViDboarder/Casper/graphs/contributors", "contributors": "https://github.com/ViViDboarder/Casper/graphs/contributors",
"devDependencies": { "devDependencies": {
"@tryghost/release-utils": "0.6.3", "@tryghost/release-utils": "0.6.12",
"autoprefixer": "9.8.6", "autoprefixer": "10.2.5",
"beeper": "2.0.0", "beeper": "2.1.0",
"cssnano": "4.1.10", "cssnano": "4.1.10",
"gscan": "3.5.5", "gscan": "4.0.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-concat": "2.6.1", "gulp-concat": "2.6.1",
"gulp-livereload": "4.0.2", "gulp-livereload": "4.0.2",
"gulp-postcss": "8.0.0", "gulp-postcss": "9.0.0",
"gulp-uglify": "3.0.2", "gulp-uglify": "3.0.2",
"gulp-zip": "5.0.2", "gulp-zip": "5.1.0",
"inquirer": "7.3.3", "inquirer": "8.0.0",
"postcss": "8.2.8",
"postcss-color-mod-function": "3.0.3", "postcss-color-mod-function": "3.0.3",
"postcss-easy-import": "3.0.0", "postcss-easy-import": "3.0.0",
"pump": "3.0.0" "pump": "3.0.0"
@ -87,5 +88,10 @@
"width": 2000 "width": 2000
} }
} }
},
"renovate": {
"extends": [
"@tryghost:theme"
]
} }
} }

View File

@ -1,30 +1,17 @@
{{!< default}} {{!< default}}
{{!-- The tag above means: insert everything in this file {{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}} into the {body} tag of the default.hbs template --}}
{{!-- The big featured header, it uses blog cover image as a BG if available --}}
<header class="site-header">
<div class="outer site-nav-main">
<div class="inner">
{{> "site-nav"}}
</div>
</div>
</header>
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}} {{#post}}
{{!-- Everything inside the #post block pulls data from the page --}}
<main id="site-main" class="site-main outer"> <article class="article {{post_class}}">
<div class="inner">
<article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
<header class="post-full-header">
<h1 class="post-full-title">{{title}}</h1>
</header>
<header class="article-header gh-canvas">
{{#if feature_image}} {{#if feature_image}}
<figure class="post-full-image"> <figure class="article-image">
{{!-- This is a responsive image, it loads different sizes depending on device {{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}} https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img <img
@ -32,34 +19,22 @@ into the {body} of the default.hbs template --}}
{{img_url feature_image size="m"}} 600w, {{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w, {{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w" {{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 800px) 400px, sizes="(min-width: 1400px) 1400px, 92vw"
(max-width: 1170px) 1170px,
2000px"
src="{{img_url feature_image size="xl"}}" src="{{img_url feature_image size="xl"}}"
alt="{{title}}" alt="{{title}}"
/> />
</figure> </figure>
{{/if}} {{/if}}
</header>
<section class="gh-content gh-canvas">
<h1 class="article-title">{{title}}</h1>
<section class="post-full-content">
<div class="post-content">
{{content}} {{content}}
</div>
</section> </section>
</article> </article>
</div>
</main>
{{/post}} {{/post}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
$(function() {
var $postContent = $(".post-full-content");
$postContent.fitVids();
});
</script>
{{/contentFor}}

View File

@ -1,47 +0,0 @@
{{!--
Wow what the hell is going on in here even?
Ok so, several templates use this big header with a giant BG image. Nice idea, but big images
have a heavy impact on performance, so it's a good idea to make them responsive. Because we
can only get the image dynamically using Handlebars, and we can only set the image to properly
be a background image using CSS, we end up with a handful of inline styles.
If the template in question has a background image, then we render responsive image styles
for it, and apply those styles to the <header> tag. Else, we just output a <header> tag
with a `no-image` class so we can style it accordingly.
--}}
{{#if background}}
<style type="text/css">
.responsive-header-img {
background-image: url({{img_url background size='xl'}});
}
@media(max-width: 1000px) {
.responsive-header-img {
background-image: url({{img_url background size='l'}});
background-image: -webkit-image-set(url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x);
background-image: image-set(url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x);
}
}
@media(max-width: 600px) {
.responsive-header-img {
background-image: url({{img_url background size='m'}});
background-image: -webkit-image-set(url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x);
background-image: image-set(url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x);
}
}
</style>
<div class="outer site-header-background responsive-header-img">
{{else}}
<div class="outer site-header-background no-image">
{{/if}}

View File

@ -1,4 +1,7 @@
<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has index="nth:6"}}post-card-large{{/has}}{{/is}}{{/unless}}"> {{!-- This is a partial file used to generate a post "card"
which templates loop over to generate a list of posts. --}}
<article class="post-card {{post_class}} {{#is "home"}}{{#if feature_image}}{{#has index="0"}}post-card-large{{/has}}{{/if}}{{/is}}">
{{#if feature_image}} {{#if feature_image}}
<a class="post-card-image-link" href="{{url}}"> <a class="post-card-image-link" href="{{url}}">
@ -9,10 +12,10 @@
{{img_url feature_image size="m"}} 600w, {{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w, {{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w" {{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 700px" sizes="(max-width: 1000px) 400px, 800px"
loading="lazy"
src="{{img_url feature_image size="m"}}" src="{{img_url feature_image size="m"}}"
alt="{{title}}" alt="{{title}}"
loading="lazy"
/> />
</a> </a>
{{/if}} {{/if}}
@ -20,7 +23,6 @@
<div class="post-card-content"> <div class="post-card-content">
<a class="post-card-content-link" href="{{url}}"> <a class="post-card-content-link" href="{{url}}">
<header class="post-card-header"> <header class="post-card-header">
{{#if primary_tag}} {{#if primary_tag}}
{{#primary_tag}} {{#primary_tag}}
@ -29,26 +31,15 @@
{{/if}} {{/if}}
<h2 class="post-card-title">{{title}}</h2> <h2 class="post-card-title">{{title}}</h2>
</header> </header>
<section class="post-card-excerpt"> <section class="post-card-excerpt">
{{#if feature_image}} <p>{{excerpt}}</p>
<p>{{excerpt words="30"}}</p>
{{else}}
<p>{{excerpt words="44"}}</p>
{{/if}}
</section> </section>
</a> </a>
<footer class="post-card-meta"> <footer class="post-card-meta">
<ul class="author-list"> <ul class="author-list">
{{#foreach authors}} {{#foreach authors}}
<li class="author-list-item"> <li class="author-list-item">
<div class="author-name-tooltip">
{{name}}
</div>
{{#if profile_image}} {{#if profile_image}}
<a href="{{url}}" class="static-avatar"> <a href="{{url}}" class="static-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" /> <img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
@ -61,7 +52,7 @@
</ul> </ul>
<div class="post-card-byline-content"> <div class="post-card-byline-content">
<span>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span> <span>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">&bull;</span> {{reading_time}}</span> <span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
</div> </div>
</footer> </footer>

View File

@ -1,5 +0,0 @@
<div class="outer site-nav-main">
<div class="inner">
{{> "site-nav"}}
</div>
</div>

View File

@ -1,40 +0,0 @@
<nav class="site-nav">
<div class="site-nav-left-wrapper">
<div class="site-nav-left">
{{#if @site.logo}}
<a class="site-nav-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@site.url}}">{{@site.title}}</a>
{{/if}}
<div class="site-nav-content">
{{#if @site.navigation}}
{{navigation}}
{{/if}}
{{#is "post"}}
<span class="nav-post-title {{#unless @site.logo}}dash{{/unless}}">{{post.title}}</span>
{{/is}}
</div>
</div>
</div>
<div class="site-nav-right">
{{#if @site.secondary_navigation}}
{{navigation type="secondary"}}
{{else}}
<div class="social-links">
{{#if @site.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @site.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#unless @labs.members}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/unless}}
{{/if}}
{{#if @labs.members}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{/if}}
</div>
</nav>

View File

@ -1,19 +0,0 @@
<section class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{@site.title}}</h3>
<p class="subscribe-form-description">Get the latest posts delivered right to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com" autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</section>

193
post.hbs
View File

@ -1,64 +1,33 @@
{{!< default}} {{!< default}}
{{!-- The tag above means: insert everything in this file {{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}} into the {body} tag of the default.hbs template --}}
<header class="site-header">
{{> site-header}}
</header>
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}} {{#post}}
{{!-- Everything inside the #post block pulls data from the post --}}
<main id="site-main" class="site-main outer"> <article class="article {{post_class}}">
<div class="inner">
<article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}"> <header class="article-header gh-canvas">
<header class="post-full-header">
{{#if primary_tag}} {{#if primary_tag}}
<section class="post-full-tags"> <section class="article-tag">
{{#primary_tag}} <a href="{{primary_tag.url}}">{{primary_tag.name}}</a>
<a href="{{url}}">{{name}}</a>
{{/primary_tag}}
</section> </section>
{{/if}} {{/if}}
<h1 class="post-full-title">{{title}}</h1> <h1 class="article-title">{{title}}</h1>
{{#if custom_excerpt}} {{#if custom_excerpt}}
<p class="post-full-custom-excerpt">{{custom_excerpt}}</p> <p class="article-excerpt">{{custom_excerpt}}</p>
{{/if}} {{/if}}
<div class="post-full-byline"> <div class="article-byline">
<section class="article-byline-content">
<section class="post-full-byline-content">
<ul class="author-list"> <ul class="author-list">
{{#foreach authors}} {{#foreach authors}}
<li class="author-list-item"> <li class="author-list-item">
<div class="author-card">
{{#if profile_image}}
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
{{else}}
<div class="author-profile-image">{{> "icons/avatar"}}</div>
{{/if}}
<div class="author-info">
{{#if bio}}
<div class="bio">
<h2>{{name}}</h2>
<p>{{bio}}</p>
<p><a href="{{url}}">More posts</a> by {{name}}.</p>
</div>
{{else}}
<h2>{{name}}</h2>
<p>Read <a href="{{url}}">more posts</a> by this author.</p>
{{/if}}
</div>
</div>
{{#if profile_image}} {{#if profile_image}}
<a href="{{url}}" class="author-avatar"> <a href="{{url}}" class="author-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" /> <img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
@ -66,27 +35,21 @@ into the {body} of the default.hbs template --}}
{{else}} {{else}}
<a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a> <a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a>
{{/if}} {{/if}}
</li> </li>
{{/foreach}} {{/foreach}}
</ul> </ul>
<div class="article-byline-meta">
<section class="post-full-byline-meta">
<h4 class="author-name">{{authors}}</h4> <h4 class="author-name">{{authors}}</h4>
<div class="byline-meta-content"> <div class="byline-meta-content">
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
<span class="byline-reading-time"><span class="bull">&bull;</span> {{reading_time}}</span> <span class="byline-reading-time"><span class="bull">&bull;</span> {{reading_time}}</span>
</div> </div>
</section>
</section>
</div> </div>
</header> </section>
</div>
{{#if feature_image}} {{#if feature_image}}
<figure class="post-full-image"> <figure class="article-image">
{{!-- This is a responsive image, it loads different sizes depending on device {{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}} https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img <img
@ -94,121 +57,61 @@ into the {body} of the default.hbs template --}}
{{img_url feature_image size="m"}} 600w, {{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w, {{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w" {{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 800px) 400px, sizes="(min-width: 1400px) 1400px, 92vw"
(max-width: 1170px) 1170px,
2000px"
src="{{img_url feature_image size="xl"}}" src="{{img_url feature_image size="xl"}}"
alt="{{title}}" alt="{{title}}"
/> />
</figure> </figure>
{{/if}} {{/if}}
</header>
<section class="post-full-content"> <section class="gh-content gh-canvas">
<div class="post-content">
{{content}} {{content}}
</div>
</section> </section>
{{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.members}}
{{> subscribe-form}}
{{/if}}
{{!-- {{!--
<section class="post-full-comments"> <section class="article-comments gh-canvas">
If you want to embed comments, this is a good place to do it! If you want to embed comments, this is a good place to paste your code!
</section> </section>
--}} --}}
</article> </article>
</div> {{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
</main> {{#unless @member}}
<section class="footer-cta">
{{!-- Links to Previous/Next posts --}}
<aside class="read-next outer">
<div class="inner"> <div class="inner">
<div class="read-next-feed"> <h2>Sign up for more like this.</h2>
{{#if primary_tag}} <a class="footer-cta-button" href="#/portal">
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}} <div>Enter your email</div>
{{#if related_posts}} <span>Subscribe</span>
<article class="read-next-card"> </a>
<header class="read-next-card-header"> {{!-- ^ This looks like a form element, but it's just a link to Portal,
{{#../primary_tag}} making the form validation and submission much simpler. --}}
<h3><span>More in</span> <a href="{{url}}">{{name}}</a></h3>
{{/../primary_tag}}
</header>
<div class="read-next-card-content">
<ul>
{{#foreach related_posts}}
<li>
<h4><a href="{{url}}">{{title}}</a></h4>
<div class="read-next-card-meta">
<p><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
{{reading_time}}</p>
</div> </div>
</li> </section>
{{/unless}}
{{!-- Read more links, just above the footer --}}
<aside class="read-more-wrap">
<div class="read-more inner">
{{!-- The {#get} helper below fetches some of the latest posts here
so that people have something else to read when they finish this one.
This query gets the latest 3 posts on the site, but adds a filter to
exclude the post we're currently on from being included. --}}
{{#get "posts" filter="id:-{{id}}" include="authors" limit="3" as |more_posts|}}
{{#if more_posts}}
{{#foreach more_posts}}
{{> "post-card"}}
{{/foreach}} {{/foreach}}
</ul>
</div>
<footer class="read-next-card-footer">
<a href="{{#../primary_tag}}{{url}}{{/../primary_tag}}">{{plural meta.pagination.total empty='No posts' singular='% post' plural='See all % posts'}}
→</a>
</footer>
</article>
{{/if}} {{/if}}
{{/get}} {{/get}}
{{/if}}
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
{{#next_post}}
{{> "post-card"}}
{{/next_post}}
{{!-- If there's a previous post, display it using the same markup included from - partials/post-card.hbs --}}
{{#prev_post}}
{{> "post-card"}}
{{/prev_post}}
</div>
</div> </div>
</aside> </aside>
{{/post}} {{/post}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
$(document).ready(function () {
// FitVids - start
var $postContent = $(".post-full-content");
$postContent.fitVids();
// FitVids - end
// Replace nav with title on scroll - start
Casper.stickyNavTitle({
navSelector: '.site-nav-main',
titleSelector: '.post-full-title',
activeClass: 'nav-post-title-active'
});
// Replace nav with title on scroll - end
// Hover on avatar
var hoverTimeout;
$('.author-list-item').hover(function () {
var $this = $(this);
clearTimeout(hoverTimeout);
$('.author-card').removeClass('hovered');
$(this).children('.author-card').addClass('hovered');
}, function () {
var $this = $(this);
hoverTimeout = setTimeout(function () {
$this.children('.author-card').removeClass('hovered');
}, 800);
});
});
</script>
{{/contentFor}}

View File

@ -1,5 +0,0 @@
{
"extends": [
"@tryghost:theme"
]
}

53
tag.hbs
View File

@ -1,32 +1,57 @@
{{!< default}} {{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}} {{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
<section class="outer">
<div class="inner posts">
<div class="post-feed">
{{#tag}} {{#tag}}
<header class="site-archive-header"> <header class="post-card post-card-large">
{{> site-header}} {{#if feature_image}}
{{> header-background background=feature_image}} {{!--Special header-image.hbs partial to generate the background image--}} <div class="post-card-image-link">
<div class="inner site-header-content"> {{!-- This is a responsive image, it loads different sizes depending on device
<h1 class="site-title">{{name}}</h1> https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<h2 class="site-description"> <img class="post-card-image"
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 800px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
/>
</div>
{{/if}}
<div class="post-card-content">
<div class="post-card-content-link">
<header class="post-card-header">
<div class="post-card-primary-tag">Tagged</div>
<h2 class="post-card-title">{{name}}</h2>
</header>
<section class="post-card-excerpt">
<p>
{{#if description}} {{#if description}}
{{description}} {{description}}
{{else}} {{else}}
A collection of {{plural ../pagination.total empty='posts' singular='% post' plural='% posts'}} A collection of {{plural ../pagination.total empty='zero posts' singular='% post' plural='% posts'}}
{{/if}} {{/if}}
</h2> </p>
</div> </section>
</div> </div>
</div>{{!--/.post-card-content--}}
</header> </header>
{{/tag}} {{/tag}}
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<div class="inner posts">
<div class="post-feed">
{{#foreach posts}} {{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}} {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}} {{> "post-card"}}
{{/foreach}} {{/foreach}}
</div> </div>
</div> </div>
</main> </section>

1203
yarn.lock

File diff suppressed because it is too large Load Diff