Compare commits
412 Commits
Author | SHA1 | Date | |
---|---|---|---|
a007415d89 | |||
31188ce3c0 | |||
e1967f8546 | |||
5259d551f5 | |||
115d1d820c | |||
81e4dfd52d | |||
cc4d828575 | |||
ebb2538215 | |||
3767e3d994 | |||
6d290485dc | |||
7da41d344f | |||
55a90a9252 | |||
b20dceae22 | |||
88ca182a58 | |||
140632b885 | |||
8f2b806673 | |||
4af198a19f | |||
f846ceb7ed | |||
7390c17a26 | |||
55d5345800 | |||
cf30adacce | |||
38426cd9e6 | |||
c7713df88f | |||
e6fdb4bfa3 | |||
657bb8f986 | |||
005211ff8f | |||
e2096ee731 | |||
20ced95885 | |||
2aaf7441af | |||
d687d0f099 | |||
96f69f8c07 | |||
4808700c0f | |||
6459992d9a | |||
b28258d0c8 | |||
f3c0526ea5 | |||
129a578751 | |||
1b3541ef2a | |||
664afdb158 | |||
d386ab090f | |||
c6411dbf41 | |||
7eb472ab81 | |||
ae7b6e1022 | |||
b74032835f | |||
eab9e1ae0f | |||
873566a24c | |||
1ade4c8816 | |||
245969800d | |||
db37f3caa8 | |||
a15e9bda40 | |||
ffcbc42d13 | |||
d373d926fa | |||
8699a22019 | |||
eff8d360ba | |||
3e7ca9cb36 | |||
b5297f16d7 | |||
ccf82ec6c1 | |||
d9d70e7010 | |||
52663e9be7 | |||
d1b1d383f5 | |||
cf50364c6d | |||
22e3f69aed | |||
d1ac1b8c2c | |||
45bc14f08d | |||
e27ea96779 | |||
e51c1aff42 | |||
d00647009c | |||
c75b67cf5d | |||
9ebb26559a | |||
0e78d9ed40 | |||
08b3054ada | |||
f5cb9a73d0 | |||
e27f2190d6 | |||
c205947374 | |||
628a32ba96 | |||
0bf84b2b80 | |||
7a86c6fd92 | |||
cfd767be88 | |||
4461d5e2f8 | |||
9efff7d6fa | |||
358f3d6d35 | |||
4e30aff168 | |||
362a4995a2 | |||
b0dfa11ff0 | |||
508bbf1fb0 | |||
a0cedfe23e | |||
1076078f8b | |||
fe257987ce | |||
83669da41c | |||
be6943780d | |||
1f7cd51245 | |||
082cadf640 | |||
c74be0e346 | |||
5fc101fb2c | |||
6439992db2 | |||
21c6f59a61 | |||
5424c465fb | |||
994a2287a2 | |||
6236067373 | |||
68c6224a92 | |||
838120323a | |||
98f7f53119 | |||
d9f92dfe89 | |||
b811b72333 | |||
6c922fca35 | |||
4c8ccde081 | |||
5672c0b6c8 | |||
f74e9241bb | |||
ff4e4226c0 | |||
9a09ff41c3 | |||
f41761e0ad | |||
11b52ed0cf | |||
c3fa4f6b24 | |||
19d5b6c297 | |||
76f0037467 | |||
37a09189c3 | |||
13458e0d2d | |||
eb007cb1c1 | |||
55f5ba65c6 | |||
5cdcda15ee | |||
18f6d85da5 | |||
1f3418708c | |||
05d0b0c7db | |||
08f480ff78 | |||
56ec2e9a90 | |||
c4f2d74d80 | |||
c378e9a9c9 | |||
db98015d41 | |||
7e9cf5c478 | |||
0f9a3c79c1 | |||
8ff91f709e | |||
feb2de765c | |||
9b45ff3418 | |||
827f37255c | |||
ffdf853323 | |||
e4543555fa | |||
67e7291c2b | |||
c880856a32 | |||
b06bcd6534 | |||
49f99d956f | |||
cdb03b65fb | |||
e80f22c2a5 | |||
b6474446f8 | |||
462770968a | |||
017a2829b6 | |||
198f12b725 | |||
48260130fe | |||
8b392ec6dd | |||
4ea98431b3 | |||
6bc9b021b5 | |||
c1006ec649 | |||
cad48b230c | |||
b3f6b8a82c | |||
2d940d8f59 | |||
b7ea0cbff7 | |||
a8150f7c30 | |||
b5b1ea001e | |||
370b9ec74e | |||
3cbe9b2c97 | |||
d652252699 | |||
6107a411a1 | |||
8feb988375 | |||
e898d56f0b | |||
b8319c5bb9 | |||
ceaa887371 | |||
c63a07e8df | |||
0e0898d7e9 | |||
2234b14bbd | |||
046d53e885 | |||
e49664eca4 | |||
21bdffbd8a | |||
ea33b00c0a | |||
17c9fe6c55 | |||
5adeaa458b | |||
5013c91f1a | |||
f43f6c567f | |||
69feef6c46 | |||
4708987c39 | |||
a4eb58f8e7 | |||
5ad96f7c12 | |||
6ac55407b3 | |||
b0e21fe0f7 | |||
85cd131cf1 | |||
53ff37cf10 | |||
816e1f608e | |||
0d49da97a2 | |||
e34e2e3e0a | |||
18ceb822dd | |||
08c1e38ae1 | |||
d9e9e097cd | |||
96aac80081 | |||
3fa7f25147 | |||
b16671d8a7 | |||
3d6a3dc68f | |||
48d06196c2 | |||
573e384381 | |||
5f127c395b | |||
3cc9cb0988 | |||
ca36c4fe91 | |||
260d5ec4e6 | |||
410ec1a9d5 | |||
e72f4236be | |||
c0d5a3d999 | |||
b927cf62ed | |||
91ced578c5 | |||
87772282c8 | |||
bcfeb9be74 | |||
5b310a00f4 | |||
a6a5d1eba1 | |||
fa8cc4cf2e | |||
3a5fda7009 | |||
4f2fe7eb43 | |||
be0600a603 | |||
e4faa3141a | |||
a78784decf | |||
a516282b73 | |||
ea6942a7fe | |||
b5c2869ff6 | |||
b7faac9eda | |||
372dca859b | |||
30cd8d97e0 | |||
0584a58c6c | |||
2231274b07 | |||
715f95d209 | |||
1e0e813931 | |||
2c356f1cc4 | |||
140666ee44 | |||
70f71e9839 | |||
bd1dbd51c7 | |||
f590fb029a | |||
7617c7baf2 | |||
b5d0589222 | |||
e95293cc22 | |||
2d27e13f14 | |||
0d1cf89cc0 | |||
a43c6b3cbc | |||
1365eab4ae | |||
cf24eccdf2 | |||
f12ce05454 | |||
44e33120cb | |||
6c7cf02111 | |||
609507d22d | |||
fd89c6575c | |||
c680f4efcd | |||
b59893091c | |||
5fd447b815 | |||
9ac38156da | |||
f9d9b1fab5 | |||
1ea3ad649b | |||
fc8cf0b2f4 | |||
676b73172f | |||
2505089a41 | |||
957d3049aa | |||
8f81522907 | |||
28d63e1cd2 | |||
b374b88126 | |||
0449bf5537 | |||
e985805958 | |||
c1fcece376 | |||
306f7b2d9b | |||
7e3e891338 | |||
69f5108a39 | |||
44fa55be19 | |||
df4bfbffb2 | |||
bcfbc21b8e | |||
41330614cd | |||
069280eea2 | |||
52f763859a | |||
e3fd4d707e | |||
854880747d | |||
6b9df8bb51 | |||
1360ed83bd | |||
adfb47009e | |||
4752bf03c9 | |||
a17155a3b6 | |||
a1bf3f3823 | |||
d063fb2806 | |||
4a6dfa8e04 | |||
e4a5e96d06 | |||
35e68f6d3f | |||
f631f874f7 | |||
74d787831e | |||
739deb3e4d | |||
bc3e072d31 | |||
838c4ecca2 | |||
7a61bf55ed | |||
9baffdd03f | |||
30ccbca28a | |||
def78b102b | |||
dfb6444b25 | |||
4c298b97cf | |||
6c8a048bad | |||
fd02a6c722 | |||
493da38cff | |||
19cf4adb74 | |||
daa69cbd31 | |||
267fd00802 | |||
8fefeca41b | |||
45f5c83118 | |||
c3cb51711a | |||
3d189760a8 | |||
8087366537 | |||
7748f8c781 | |||
8783bd4ee8 | |||
006b056adc | |||
fe690d4048 | |||
c3c0374ca6 | |||
0429f85774 | |||
1f8df12a7c | |||
75e68ce5b7 | |||
fa15a48192 | |||
0c36dc5235 | |||
aa3c83ec35 | |||
38481aac9a | |||
0052c2ddc3 | |||
9d12bc32f0 | |||
cb674ab56c | |||
c86ee63b86 | |||
b92f18e55a | |||
827940c836 | |||
db0af7f759 | |||
af87b9b3b0 | |||
ec03acff02 | |||
fa48995326 | |||
6350790798 | |||
ab521da23a | |||
91185016eb | |||
0af8d2d8bc | |||
f50f663ef7 | |||
a467e31457 | |||
807018ca97 | |||
ce9918de2f | |||
df2d20caab | |||
c6cb667fea | |||
a1d9eae840 | |||
59eefa3659 | |||
78bde5f3dc | |||
e637d809f6 | |||
e4793cc743 | |||
cd7016493e | |||
7421cff4fe | |||
c465d95e14 | |||
c1c6fed941 | |||
5664f81564 | |||
8838afe43f | |||
f53b6b3435 | |||
be77dad00e | |||
408cf0cc1e | |||
cfdc8a3b85 | |||
e6a24de5c4 | |||
6d0a3a8899 | |||
b54c3debd4 | |||
0e0589cb04 | |||
5bfc82bf0c | |||
d3ffc71b34 | |||
871fc4075f | |||
6f37e5a148 | |||
adc055495c | |||
2ed7ea8f13 | |||
4ddbaae803 | |||
7e0e45c643 | |||
e0771bfc7e | |||
8f1a15296a | |||
2bd82a30e8 | |||
feb7f3aac6 | |||
eed15fd9a5 | |||
201b1924cf | |||
387a2aa3f0 | |||
690ca22fb7 | |||
31d43860ac | |||
14f7cc4e31 | |||
7646f90556 | |||
8e17cdc1fb | |||
2da322d93b | |||
709c7196b9 | |||
c97b847002 | |||
7d37adb3cd | |||
4fe7010f4e | |||
6bf34a5a70 | |||
c9a54e25ab | |||
3281f75945 | |||
c8abe3a7c4 | |||
150b698b1c | |||
9ff3aa7858 | |||
8886056719 | |||
93628dc7f0 | |||
702b2cbf1f | |||
e5969f93da | |||
9e29e145fc | |||
74ae3d5140 | |||
1ec7a12d43 | |||
9ec0f08a48 | |||
b09e846fd2 | |||
92d9174b24 | |||
c27fc17844 | |||
d9cf22a0f7 | |||
7c87383bc6 | |||
09d701c4bc | |||
aec67d8b5f | |||
f55e2b0266 | |||
fee94ba192 | |||
bf4b8d7f15 | |||
98543dd068 | |||
5063d40a32 | |||
7c8cba7fab | |||
e253954051 | |||
4c7fced3aa | |||
fb9f0e6804 | |||
88e3db9d3b | |||
7733f0db63 | |||
1c5db5c027 | |||
e4afcc233f | |||
a66beb4e10 |
@ -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
|
19
.github/ISSUE_TEMPLATE.md
vendored
@ -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:
|
15
.github/workflows/deploy-theme.yml
vendored
@ -1,15 +0,0 @@
|
||||
name: Deploy Theme
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: TryGhost/action-deploy-theme@v1.2.0
|
||||
with:
|
||||
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
||||
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
|
||||
theme-name: "casper-master"
|
11
.travis.yml
@ -1,11 +0,0 @@
|
||||
dist: xenial
|
||||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
|
||||
cache: yarn
|
||||
|
||||
# Don't run builds for renovate PRs
|
||||
if: NOT head_branch =~ ^renovate
|
||||
|
||||
|
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2013-2019 Ghost Foundation
|
||||
Copyright (c) 2013-2022 Ghost Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
@ -4,7 +4,7 @@ The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the la
|
||||
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
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:**
|
||||
|
||||
@ -54,8 +54,7 @@ yarn zip
|
||||
# PostCSS Features Used
|
||||
|
||||
- Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser.
|
||||
- Variables - Simple pure CSS variables
|
||||
- [Color Function](https://github.com/postcss/postcss-color-function)
|
||||
- [Color Mod](https://github.com/jonathantneal/postcss-color-mod-function)
|
||||
|
||||
|
||||
# SVG Icons
|
||||
@ -67,4 +66,4 @@ You can add your own SVG icons in the same manner.
|
||||
|
||||
# Copyright & License
|
||||
|
||||
Copyright (c) 2013-2019 Ghost Foundation - Released under the [MIT license](LICENSE).
|
||||
Copyright (c) 2013-2022 Ghost Foundation - Released under the [MIT license](LICENSE).
|
||||
|
@ -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 🙏.
|
@ -1,2 +1,2 @@
|
||||
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:#313b3f;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 #e3e9ed}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:#15171a;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 #e5eff5}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:#26a8ed;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{border:0;font:inherit;font-size:100%;margin:0;padding:0;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;height:auto;max-width:100%}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;font-family:sans-serif}*,: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{font-size:2em;margin:.67em 0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;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}kbd{background:#f6f8fa;border:1px solid rgba(124,139,154,.25);border-radius:6px;box-shadow:inset 0 -1px 0 rgba(124,139,154,.25);font-family:var(--font-mono);font-size:1.5rem;padding:3px 5px}@media (max-width:600px){kbd{font-size:1.3rem}}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{border:none;overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding: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]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:62.5%}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on;background:#fff;color:var(--color-darkgrey);font-family:var(--font-sans);font-size:1.6rem;font-style:normal;font-weight:400;letter-spacing:0;line-height:1.6em}::-moz-selection{background:#daf2fd;text-shadow:none}::selection{background:#daf2fd;text-shadow:none}hr{border:0;border-top:1px solid #f0f0f0;display:block;height:1px;margin:2.5em 0 3.5em;padding:0;position:relative;width:100%}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{border:0;margin:0;padding: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{line-height:1.6em;padding-left:.3em}li+li{margin-top:.5em}dt{color:#daf2fd;float:left;font-weight:500;margin:0 20px 0 0;text-align:right;width:120px}dd{margin:0 0 5px;text-align:left}blockquote{border-left:#daf2fd;margin:1.5em 0;padding:0 1.6em}blockquote small{display:inline-block;font-size:.9em;margin:.8em 0 .8em 1.5em;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{text-rendering:optimizeLegibility;font-weight:600;letter-spacing:-.01em;line-height:1.15;margin-top:0}h1{font-size:4.8rem;font-weight:700;letter-spacing:-.015em;margin:0 0 .5em}@media (max-width:600px){h1{font-size:2.8rem}}h2{font-size:2.8rem;font-weight:700;margin:1.5em 0 .5em}@media (max-width:600px){h2{font-size:2.3rem}}h3{font-size:2.4rem;font-weight:600;margin:1.5em 0 .5em}@media (max-width:600px){h3{font-size:1.7rem}}h4{font-size:2rem;margin:1.5em 0 .5em}@media (max-width:600px){h4{font-size:1.7rem}}h5{font-size:2rem}h5,h6{margin:1.5em 0 .5em}h6{font-size:1.8rem}
|
||||
/*# sourceMappingURL=global.css.map */
|
@ -1,237 +0,0 @@
|
||||
{
|
||||
"remove-empty-rulesets": true,
|
||||
"always-semicolon": true,
|
||||
"color-case": "lower",
|
||||
"block-indent": " ",
|
||||
"color-shorthand": true,
|
||||
"element-case": "lower",
|
||||
"eof-newline": true,
|
||||
"leading-zero": true,
|
||||
"quotes": "double",
|
||||
"space-before-colon": "",
|
||||
"space-after-colon": " ",
|
||||
"space-before-combinator": " ",
|
||||
"space-after-combinator": " ",
|
||||
"space-between-declarations": "\n",
|
||||
"space-before-opening-brace": " ",
|
||||
"space-after-opening-brace": "\n",
|
||||
"space-after-selector-delimiter": "\n",
|
||||
"space-before-selector-delimiter": "",
|
||||
"space-before-closing-brace": "\n",
|
||||
"strip-spaces": true,
|
||||
"tab-size": 4,
|
||||
"unitless-zero": true,
|
||||
"sort-order": [ [
|
||||
"content",
|
||||
"visibility",
|
||||
"position",
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left",
|
||||
"z-index",
|
||||
"order",
|
||||
"flex",
|
||||
"flex-grow",
|
||||
"flex-shrink",
|
||||
"flex-basis",
|
||||
"align-self",
|
||||
"display",
|
||||
"flex-flow",
|
||||
"flex-direction",
|
||||
"flex-wrap",
|
||||
"justify-content",
|
||||
"align-items",
|
||||
"align-content",
|
||||
"flex-order",
|
||||
"flex-pack",
|
||||
"flex-align",
|
||||
"float",
|
||||
"clear",
|
||||
"overflow",
|
||||
"overflow-x",
|
||||
"overflow-y",
|
||||
"-webkit-overflow-scrolling",
|
||||
"clip",
|
||||
"box-sizing",
|
||||
"margin",
|
||||
"margin-top",
|
||||
"margin-right",
|
||||
"margin-bottom",
|
||||
"margin-left",
|
||||
"padding",
|
||||
"padding-top",
|
||||
"padding-right",
|
||||
"padding-bottom",
|
||||
"padding-left",
|
||||
"min-width",
|
||||
"min-height",
|
||||
"max-width",
|
||||
"max-height",
|
||||
"width",
|
||||
"height",
|
||||
"outline",
|
||||
"outline-width",
|
||||
"outline-style",
|
||||
"outline-color",
|
||||
"outline-offset",
|
||||
"border",
|
||||
"border-spacing",
|
||||
"border-collapse",
|
||||
"border-width",
|
||||
"border-style",
|
||||
"border-color",
|
||||
"border-top",
|
||||
"border-top-width",
|
||||
"border-top-style",
|
||||
"border-top-color",
|
||||
"border-right",
|
||||
"border-right-width",
|
||||
"border-right-style",
|
||||
"border-right-color",
|
||||
"border-bottom",
|
||||
"border-bottom-width",
|
||||
"border-bottom-style",
|
||||
"border-bottom-color",
|
||||
"border-left",
|
||||
"border-left-width",
|
||||
"border-left-style",
|
||||
"border-left-color",
|
||||
"border-image",
|
||||
"border-image-source",
|
||||
"border-image-slice",
|
||||
"border-image-width",
|
||||
"border-image-outset",
|
||||
"border-image-repeat",
|
||||
"border-top-image",
|
||||
"border-right-image",
|
||||
"border-bottom-image",
|
||||
"border-left-image",
|
||||
"border-corner-image",
|
||||
"border-top-left-image",
|
||||
"border-top-right-image",
|
||||
"border-bottom-right-image",
|
||||
"border-bottom-left-image",
|
||||
"color",
|
||||
"font",
|
||||
"font-family",
|
||||
"font-size",
|
||||
"line-height",
|
||||
"font-weight",
|
||||
"font-style",
|
||||
"font-variant",
|
||||
"font-size-adjust",
|
||||
"font-stretch",
|
||||
"font-feature-settings",
|
||||
"letter-spacing",
|
||||
"text-rendering",
|
||||
"text-align",
|
||||
"text-align-last",
|
||||
"text-decoration",
|
||||
"text-emphasis",
|
||||
"text-emphasis-position",
|
||||
"text-emphasis-style",
|
||||
"text-emphasis-color",
|
||||
"text-indent",
|
||||
"text-justify",
|
||||
"text-outline",
|
||||
"text-transform",
|
||||
"text-wrap",
|
||||
"text-overflow",
|
||||
"text-overflow-ellipsis",
|
||||
"text-overflow-mode",
|
||||
"text-shadow",
|
||||
"white-space",
|
||||
"word-spacing",
|
||||
"word-wrap",
|
||||
"word-break",
|
||||
"tab-size",
|
||||
"hyphens",
|
||||
"user-select",
|
||||
"fill",
|
||||
"stroke",
|
||||
"background",
|
||||
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
|
||||
"background-color",
|
||||
"background-image",
|
||||
"background-attachment",
|
||||
"background-position",
|
||||
"background-position-x",
|
||||
"background-position-y",
|
||||
"background-clip",
|
||||
"background-origin",
|
||||
"background-size",
|
||||
"background-repeat",
|
||||
"border-radius",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-bottom-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"box-decoration-break",
|
||||
"box-shadow",
|
||||
"table-layout",
|
||||
"caption-side",
|
||||
"empty-cells",
|
||||
"list-style",
|
||||
"list-style-position",
|
||||
"list-style-type",
|
||||
"list-style-image",
|
||||
"quotes",
|
||||
"counter-increment",
|
||||
"counter-reset",
|
||||
"vertical-align",
|
||||
"src",
|
||||
"opacity",
|
||||
"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
|
||||
"filter",
|
||||
"resize",
|
||||
"cursor",
|
||||
"nav-index",
|
||||
"nav-up",
|
||||
"nav-right",
|
||||
"nav-down",
|
||||
"nav-left",
|
||||
"transition",
|
||||
"transition-delay",
|
||||
"transition-timing-function",
|
||||
"transition-duration",
|
||||
"transition-property",
|
||||
"transform",
|
||||
"transform-origin",
|
||||
"animation",
|
||||
"animation-name",
|
||||
"animation-duration",
|
||||
"animation-play-state",
|
||||
"animation-timing-function",
|
||||
"animation-delay",
|
||||
"animation-iteration-count",
|
||||
"animation-direction",
|
||||
"animation-fill-mode",
|
||||
"pointer-events",
|
||||
"unicode-bidi",
|
||||
"direction",
|
||||
"columns",
|
||||
"column-span",
|
||||
"column-width",
|
||||
"column-count",
|
||||
"column-fill",
|
||||
"column-gap",
|
||||
"column-rule",
|
||||
"column-rule-width",
|
||||
"column-rule-style",
|
||||
"column-rule-color",
|
||||
"break-before",
|
||||
"break-inside",
|
||||
"break-after",
|
||||
"page-break-before",
|
||||
"page-break-inside",
|
||||
"page-break-after",
|
||||
"orphans",
|
||||
"widows",
|
||||
"zoom",
|
||||
"max-zoom",
|
||||
"min-zoom",
|
||||
"user-zoom",
|
||||
"orientation"
|
||||
] ]
|
||||
}
|
@ -1,240 +0,0 @@
|
||||
{
|
||||
"remove-empty-rulesets": true,
|
||||
"always-semicolon": true,
|
||||
"color-case": "lower",
|
||||
"block-indent": " ",
|
||||
"color-shorthand": true,
|
||||
"element-case": "lower",
|
||||
"eof-newline": true,
|
||||
"leading-zero": true,
|
||||
"quotes": "double",
|
||||
"space-before-colon": "",
|
||||
"space-after-colon": " ",
|
||||
"space-before-combinator": " ",
|
||||
"space-after-combinator": " ",
|
||||
"space-between-declarations": "\n",
|
||||
"space-before-opening-brace": " ",
|
||||
"space-after-opening-brace": "\n",
|
||||
"space-after-selector-delimiter": "\n",
|
||||
"space-before-selector-delimiter": "",
|
||||
"space-before-closing-brace": "\n",
|
||||
"strip-spaces": true,
|
||||
"tab-size": 4,
|
||||
"unitless-zero": true,
|
||||
"sort-order": [ [
|
||||
"content",
|
||||
"visibility",
|
||||
"position",
|
||||
"top",
|
||||
"right",
|
||||
"bottom",
|
||||
"left",
|
||||
"z-index",
|
||||
"order",
|
||||
"flex",
|
||||
"flex-grow",
|
||||
"flex-shrink",
|
||||
"flex-basis",
|
||||
"align-self",
|
||||
"display",
|
||||
"flex-flow",
|
||||
"flex-direction",
|
||||
"justify-content",
|
||||
"align-items",
|
||||
"align-content",
|
||||
"flex-wrap",
|
||||
"flex-order",
|
||||
"flex-pack",
|
||||
"flex-align",
|
||||
"float",
|
||||
"clear",
|
||||
"box-sizing",
|
||||
"width",
|
||||
"height",
|
||||
"min-width",
|
||||
"min-height",
|
||||
"max-width",
|
||||
"max-height",
|
||||
"overflow",
|
||||
"overflow-x",
|
||||
"overflow-y",
|
||||
"clip",
|
||||
"margin",
|
||||
"margin-top",
|
||||
"margin-right",
|
||||
"margin-bottom",
|
||||
"margin-left",
|
||||
"padding",
|
||||
"padding-top",
|
||||
"padding-right",
|
||||
"padding-bottom",
|
||||
"padding-left",
|
||||
"outline",
|
||||
"outline-width",
|
||||
"outline-style",
|
||||
"outline-color",
|
||||
"outline-offset",
|
||||
"border",
|
||||
"border-spacing",
|
||||
"border-collapse",
|
||||
"border-width",
|
||||
"border-style",
|
||||
"border-color",
|
||||
"border-top",
|
||||
"border-top-width",
|
||||
"border-top-style",
|
||||
"border-top-color",
|
||||
"border-right",
|
||||
"border-right-width",
|
||||
"border-right-style",
|
||||
"border-right-color",
|
||||
"border-bottom",
|
||||
"border-bottom-width",
|
||||
"border-bottom-style",
|
||||
"border-bottom-color",
|
||||
"border-left",
|
||||
"border-left-width",
|
||||
"border-left-style",
|
||||
"border-left-color",
|
||||
"border-image",
|
||||
"border-image-source",
|
||||
"border-image-slice",
|
||||
"border-image-width",
|
||||
"border-image-outset",
|
||||
"border-image-repeat",
|
||||
"border-top-image",
|
||||
"border-right-image",
|
||||
"border-bottom-image",
|
||||
"border-left-image",
|
||||
"border-corner-image",
|
||||
"border-top-left-image",
|
||||
"border-top-right-image",
|
||||
"border-bottom-right-image",
|
||||
"border-bottom-left-image",
|
||||
"table-layout",
|
||||
"caption-side",
|
||||
"empty-cells",
|
||||
"list-style",
|
||||
"list-style-position",
|
||||
"list-style-type",
|
||||
"list-style-image",
|
||||
"quotes",
|
||||
"counter-increment",
|
||||
"counter-reset",
|
||||
"vertical-align",
|
||||
"stroke",
|
||||
"fill",
|
||||
"stroke-width",
|
||||
"stroke-opacity",
|
||||
"color",
|
||||
"font",
|
||||
"font-family",
|
||||
"font-size",
|
||||
"line-height",
|
||||
"font-weight",
|
||||
"font-style",
|
||||
"font-variant",
|
||||
"font-size-adjust",
|
||||
"font-stretch",
|
||||
"text-rendering",
|
||||
"font-feature-settings",
|
||||
"letter-spacing",
|
||||
"hyphens",
|
||||
"text-align",
|
||||
"text-align-last",
|
||||
"text-decoration",
|
||||
"text-emphasis",
|
||||
"text-emphasis-position",
|
||||
"text-emphasis-style",
|
||||
"text-emphasis-color",
|
||||
"text-indent",
|
||||
"text-justify",
|
||||
"text-outline",
|
||||
"text-transform",
|
||||
"text-wrap",
|
||||
"text-overflow",
|
||||
"text-overflow-ellipsis",
|
||||
"text-overflow-mode",
|
||||
"text-shadow",
|
||||
"white-space",
|
||||
"word-spacing",
|
||||
"word-wrap",
|
||||
"word-break",
|
||||
"tab-size",
|
||||
"user-select",
|
||||
"src",
|
||||
"resize",
|
||||
"cursor",
|
||||
"nav-index",
|
||||
"nav-up",
|
||||
"nav-right",
|
||||
"nav-down",
|
||||
"nav-left",
|
||||
"background",
|
||||
"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader",
|
||||
"background-color",
|
||||
"background-image",
|
||||
"background-size",
|
||||
"background-attachment",
|
||||
"background-position",
|
||||
"background-position-x",
|
||||
"background-position-y",
|
||||
"background-clip",
|
||||
"background-origin",
|
||||
"background-repeat",
|
||||
"border-radius",
|
||||
"border-top-left-radius",
|
||||
"border-top-right-radius",
|
||||
"border-bottom-right-radius",
|
||||
"border-bottom-left-radius",
|
||||
"box-decoration-break",
|
||||
"box-shadow",
|
||||
"opacity",
|
||||
"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity",
|
||||
"filter",
|
||||
"transition",
|
||||
"transition-delay",
|
||||
"transition-timing-function",
|
||||
"transition-duration",
|
||||
"transition-property",
|
||||
"transform",
|
||||
"transform-origin",
|
||||
"animation",
|
||||
"animation-name",
|
||||
"animation-duration",
|
||||
"animation-play-state",
|
||||
"animation-timing-function",
|
||||
"animation-delay",
|
||||
"animation-iteration-count",
|
||||
"animation-direction",
|
||||
"animation-fill-mode",
|
||||
"pointer-events",
|
||||
"unicode-bidi",
|
||||
"direction",
|
||||
"columns",
|
||||
"column-span",
|
||||
"column-width",
|
||||
"column-count",
|
||||
"column-fill",
|
||||
"column-gap",
|
||||
"column-rule",
|
||||
"column-rule-width",
|
||||
"column-rule-style",
|
||||
"column-rule-color",
|
||||
"break-before",
|
||||
"break-inside",
|
||||
"break-after",
|
||||
"page-break-before",
|
||||
"page-break-inside",
|
||||
"page-break-after",
|
||||
"orphans",
|
||||
"widows",
|
||||
"zoom",
|
||||
"max-zoom",
|
||||
"min-zoom",
|
||||
"user-zoom",
|
||||
"orientation",
|
||||
"-webkit-overflow-scrolling",
|
||||
"-ms-overflow-scrolling"
|
||||
] ]
|
||||
}
|
@ -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(var(--darkgrey) l(+2%));
|
||||
}
|
||||
|
||||
/* Reset
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
@ -127,7 +108,9 @@ table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
@ -193,6 +176,20 @@ samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
kbd {
|
||||
padding: 3px 5px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 1.5rem;
|
||||
background: #f6f8fa;
|
||||
border: 1px solid rgba(124, 139, 154, 0.25);
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 -1px 0 rgba(124, 139, 154, 0.25);
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
kbd {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
}
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
@ -273,16 +270,13 @@ th {
|
||||
========================================================================== */
|
||||
|
||||
html {
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
font-size: 62.5%;
|
||||
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
color: color(var(--midgrey) l(-30%));
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||
color: var(--color-darkgrey);
|
||||
font-family: var(--font-sans);
|
||||
font-size: 1.6rem;
|
||||
line-height: 1.6em;
|
||||
font-weight: 400;
|
||||
@ -298,7 +292,7 @@ body {
|
||||
|
||||
::selection {
|
||||
text-shadow: none;
|
||||
background: color(var(--blue) lightness(+30%));
|
||||
background: #daf2fd;
|
||||
}
|
||||
|
||||
hr {
|
||||
@ -309,7 +303,7 @@ hr {
|
||||
padding: 0;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid color(var(--lightgrey) l(+10%));
|
||||
border-top: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
audio,
|
||||
@ -331,11 +325,11 @@ textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
blockquote {
|
||||
::not(.gh-content) p,
|
||||
::not(.gh-content) ul,
|
||||
::not(.gh-content) ol,
|
||||
::not(.gh-content) dl,
|
||||
::not(.gh-content) blockquote {
|
||||
margin: 0 0 1.5em 0;
|
||||
}
|
||||
|
||||
@ -366,16 +360,19 @@ ol {
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0.5em 0;
|
||||
padding-left: 0.3em;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
dt {
|
||||
float: left;
|
||||
margin: 0 20px 0 0;
|
||||
width: 120px;
|
||||
color: var(--darkgrey);
|
||||
color: #daf2fd;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
}
|
||||
@ -388,13 +385,7 @@ dd {
|
||||
blockquote {
|
||||
margin: 1.5em 0;
|
||||
padding: 0 1.6em 0 1.6em;
|
||||
border-left: var(--whitegrey) 0.5em solid;
|
||||
}
|
||||
|
||||
blockquote p {
|
||||
margin: 0.8em 0;
|
||||
font-size: 1.2em;
|
||||
font-weight: 300;
|
||||
border-left: #daf2fd;
|
||||
}
|
||||
|
||||
blockquote small {
|
||||
@ -416,14 +407,10 @@ blockquote cite a {
|
||||
}
|
||||
|
||||
a {
|
||||
color: color(var(--blue) l(-5%));
|
||||
color: #15171A;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
@ -434,35 +421,38 @@ h6 {
|
||||
line-height: 1.15;
|
||||
font-weight: 600;
|
||||
text-rendering: optimizeLegibility;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 0.5em 0;
|
||||
font-size: 5.5rem;
|
||||
font-weight: 600;
|
||||
font-size: 4.8rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.015em;
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
@media (max-width: 600px) {
|
||||
h1 {
|
||||
font-size: 2.2rem;
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
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 {
|
||||
font-size: 1.8rem;
|
||||
font-size: 2.3rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1.5em 0 0.5em 0;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 500;
|
||||
font-size: 2.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
@media (max-width: 600px) {
|
||||
h3 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
@ -470,18 +460,20 @@ h3 {
|
||||
|
||||
h4 {
|
||||
margin: 1.5em 0 0.5em 0;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 500;
|
||||
font-size: 2rem;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
h4 {
|
||||
font-size: 1.7rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
margin: 1.5em 0 0.5em 0;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 500;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
margin: 1.5em 0 0.5em 0;
|
||||
font-size: 1.4rem;
|
||||
font-weight: 500;
|
||||
font-size: 1.8rem;
|
||||
}
|
||||
|
82
assets/js/dropdown.js
Normal file
@ -0,0 +1,82 @@
|
||||
(function () {
|
||||
const mediaQuery = window.matchMedia('(max-width: 767px)');
|
||||
|
||||
const head = document.querySelector('.gh-head');
|
||||
const menu = head.querySelector('.gh-head-menu');
|
||||
const nav = menu.querySelector('.nav');
|
||||
if (!nav) return;
|
||||
|
||||
const logo = document.querySelector('.gh-head-logo');
|
||||
const navHTML = nav.innerHTML;
|
||||
|
||||
if (mediaQuery.matches) {
|
||||
const items = nav.querySelectorAll('li');
|
||||
items.forEach(function (item, index) {
|
||||
item.style.transitionDelay = 0.03 * (index + 1) + 's';
|
||||
});
|
||||
}
|
||||
|
||||
const makeDropdown = function () {
|
||||
if (mediaQuery.matches) return;
|
||||
const submenuItems = [];
|
||||
|
||||
while ((nav.offsetWidth + 64) > menu.offsetWidth) {
|
||||
if (nav.lastElementChild) {
|
||||
submenuItems.unshift(nav.lastElementChild);
|
||||
nav.lastElementChild.remove();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!submenuItems.length) {
|
||||
document.body.classList.add('is-dropdown-loaded');
|
||||
return;
|
||||
}
|
||||
|
||||
const toggle = document.createElement('button');
|
||||
toggle.setAttribute('class', 'nav-more-toggle');
|
||||
toggle.setAttribute('aria-label', 'More');
|
||||
toggle.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>';
|
||||
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.setAttribute('class', 'gh-dropdown');
|
||||
|
||||
if (submenuItems.length >= 10) {
|
||||
document.body.classList.add('is-dropdown-mega');
|
||||
wrapper.style.gridTemplateRows = 'repeat(' + Math.ceil(submenuItems.length / 2) + ', 1fr)';
|
||||
} else {
|
||||
document.body.classList.remove('is-dropdown-mega');
|
||||
}
|
||||
|
||||
submenuItems.forEach(function (child) {
|
||||
wrapper.appendChild(child);
|
||||
});
|
||||
|
||||
toggle.appendChild(wrapper);
|
||||
nav.appendChild(toggle);
|
||||
|
||||
document.body.classList.add('is-dropdown-loaded');
|
||||
|
||||
toggle.addEventListener('click', function () {
|
||||
document.body.classList.toggle('is-dropdown-open');
|
||||
});
|
||||
|
||||
window.addEventListener('click', function (e) {
|
||||
if (!toggle.contains(e.target) && document.body.classList.contains('is-dropdown-open')) {
|
||||
document.body.classList.remove('is-dropdown-open');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
imagesLoaded(head, function () {
|
||||
makeDropdown();
|
||||
});
|
||||
|
||||
window.addEventListener('resize', function () {
|
||||
setTimeout(function () {
|
||||
nav.innerHTML = navHTML;
|
||||
makeDropdown();
|
||||
}, 1);
|
||||
});
|
||||
})();
|
@ -1,24 +0,0 @@
|
||||
/* eslint-env browser */
|
||||
|
||||
/**
|
||||
* Gallery card support
|
||||
* Used on any individual post/page
|
||||
*
|
||||
* Detects when a gallery card has been used and applies sizing to make sure
|
||||
* the display matches what is seen in the editor.
|
||||
*/
|
||||
|
||||
(function (window, document) {
|
||||
var resizeImagesInGalleries = function resizeImagesInGalleries() {
|
||||
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||
images.forEach(function (image) {
|
||||
var container = image.closest('.kg-gallery-image');
|
||||
var width = image.attributes.width.value;
|
||||
var height = image.attributes.height.value;
|
||||
var ratio = width / height;
|
||||
container.style.flex = ratio + ' 1 0%';
|
||||
});
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', resizeImagesInGalleries);
|
||||
})(window, document);
|
@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
(function (window, document) {
|
||||
if (document.documentElement.classList.contains('no-infinite-scroll')) return;
|
||||
|
||||
// next link element
|
||||
var nextElement = document.querySelector('link[rel=next]');
|
||||
if (!nextElement) {
|
||||
@ -43,7 +45,7 @@
|
||||
}
|
||||
|
||||
// append contents
|
||||
var postElements = this.response.querySelectorAll('.post-card');
|
||||
var postElements = this.response.querySelectorAll('article.post-card');
|
||||
postElements.forEach(function (item) {
|
||||
// document.importNode is important, without it the item's owner
|
||||
// document will be different which can break resizing of
|
||||
|
7
assets/js/lib/imagesloaded.pkgd.min.js
vendored
Normal 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);
|
93
author.hbs
@ -1,59 +1,76 @@
|
||||
{{!< default}}
|
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
|
||||
|
||||
{{#author}}
|
||||
{{!-- Everything inside the #author tags pulls data from the author --}}
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner posts">
|
||||
|
||||
<div class="post-feed">
|
||||
|
||||
{{#author}}
|
||||
<section class="post-card post-card-large">
|
||||
|
||||
{{#if cover_image}}
|
||||
<div class="post-card-image-link">
|
||||
{{!-- 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="post-card-image"
|
||||
srcset="{{img_url cover_image size="s"}} 300w,
|
||||
{{img_url cover_image size="m"}} 600w,
|
||||
{{img_url cover_image size="l"}} 1000w,
|
||||
{{img_url cover_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 1000px) 400px, 800px"
|
||||
src="{{img_url cover_image size="m"}}"
|
||||
alt="{{title}}"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="post-card-content">
|
||||
<div class="post-card-content-link">
|
||||
|
||||
<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}}
|
||||
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
|
||||
<img class="author-profile-pic" src="{{profile_image}}" alt="{{name}}" />
|
||||
{{/if}}
|
||||
<div class="author-header-content">
|
||||
<h1 class="site-title">{{name}}</h1>
|
||||
{{#if bio}}
|
||||
<h2 class="author-bio">{{bio}}</h2>
|
||||
|
||||
<header class="post-card-header">
|
||||
<h2 class="post-card-title">{{name}}</h2>
|
||||
</header>
|
||||
|
||||
{{#if bio}}
|
||||
<div class="post-card-excerpt">{{bio}}</div>
|
||||
{{/if}}
|
||||
|
||||
<footer class="author-profile-footer">
|
||||
{{#if location}}
|
||||
<div class="author-profile-location">{{location}}</div>
|
||||
{{/if}}
|
||||
<div class="author-meta">
|
||||
{{#if location}}
|
||||
<div class="author-location">{{location}}</div>
|
||||
{{/if}}
|
||||
<div class="author-stats">
|
||||
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}
|
||||
</div>
|
||||
<div class="author-profile-meta">
|
||||
{{#if website}}
|
||||
<span class="author-social-link"><a href="{{website}}" target="_blank" rel="noopener">Website</a></span>
|
||||
<a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{website}}</a>
|
||||
{{/if}}
|
||||
{{#if twitter}}
|
||||
<span class="author-social-link"><a href="{{twitter_url}}" target="_blank" rel="noopener">Twitter</a></span>
|
||||
<a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
|
||||
{{/if}}
|
||||
{{#if facebook}}
|
||||
<span class="author-social-link"><a href="{{facebook_url}}" target="_blank" rel="noopener">Facebook</a></span>
|
||||
<a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{/author}}
|
||||
|
||||
{{!-- The main content area --}}
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner posts">
|
||||
</section>
|
||||
{{/author}}
|
||||
|
||||
<div class="post-feed">
|
||||
{{#foreach posts}}
|
||||
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{#foreach posts}}
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
|
||||
</div>
|
||||
|
||||
{{pagination}}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"github": {
|
||||
"username": "<username>",
|
||||
"token": "<gh-personal-access-token>"
|
||||
}
|
||||
}
|
184
default.hbs
@ -1,129 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{@site.lang}}">
|
||||
<html lang="{{@site.locale}}"{{#match @custom.color_scheme "Dark"}} class="dark-mode"{{else match @custom.color_scheme "Auto"}} class="auto-color"{{/match}}>
|
||||
<head>
|
||||
|
||||
{{!-- Document Settings --}}
|
||||
{{!-- Basic meta - advanced meta is output with {ghost_head} below --}}
|
||||
<title>{{meta_title}}</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
|
||||
{{!-- Base Meta --}}
|
||||
<title>{{meta_title}}</title>
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<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"}}" />
|
||||
|
||||
{{!-- 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}}
|
||||
|
||||
</head>
|
||||
<body class="{{body_class}}">
|
||||
<body class="{{body_class}} is-head-{{#match @custom.navigation_layout "Logo on cover"}}left-logo{{else match @custom.navigation_layout "Logo in the middle"}}middle-logo{{else}}stacked{{/match}}{{#match @custom.title_font "=" "Elegant serif"}} has-serif-title{{/match}}{{#match @custom.body_font "=" "Modern sans-serif"}} has-sans-body{{/match}}{{#if @custom.show_publication_cover}} has-cover{{/if}}">
|
||||
<div class="viewport">
|
||||
|
||||
<div class="site-wrapper">
|
||||
|
||||
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
|
||||
{{{body}}}
|
||||
|
||||
{{!-- The footer at the very bottom of the screen --}}
|
||||
<footer class="site-footer outer">
|
||||
<div class="site-footer-content inner">
|
||||
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> © {{date format="YYYY"}}</section>
|
||||
<nav class="site-footer-nav">
|
||||
<a href="{{@site.url}}">Latest Posts</a>
|
||||
{{#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>
|
||||
<header id="gh-head" class="gh-head outer{{#match @custom.header_style "Hidden"}} is-header-hidden{{/match}}">
|
||||
<div class="gh-head-inner inner">
|
||||
<div class="gh-head-brand">
|
||||
<a class="gh-head-logo{{#unless @site.logo}} no-image{{/unless}}" href="{{@site.url}}">
|
||||
{{#if @site.logo}}
|
||||
<img src="{{@site.logo}}" alt="{{@site.title}}">
|
||||
{{else}}
|
||||
{{@site.title}}
|
||||
{{/if}}
|
||||
</a>
|
||||
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
|
||||
<button class="gh-burger"></button>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
<nav class="gh-head-menu">
|
||||
{{navigation}}
|
||||
{{#unless @site.members_enabled}}
|
||||
{{#match @custom.navigation_layout "Stacked"}}
|
||||
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
|
||||
{{/match}}
|
||||
{{/unless}}
|
||||
</nav>
|
||||
|
||||
{{!-- 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">
|
||||
<a class="subscribe-close" 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 class="gh-head-actions">
|
||||
{{#unless @site.members_enabled}}
|
||||
{{^match @custom.navigation_layout "Stacked"}}
|
||||
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
|
||||
{{/match}}
|
||||
{{else}}
|
||||
<button class="gh-search gh-icon-btn" data-ghost-search>{{> "icons/search"}}</button>
|
||||
<div class="gh-head-members">
|
||||
{{#unless @member}}
|
||||
{{#unless @site.members_invite_only}}
|
||||
<a class="gh-head-link" href="#/portal/signin" data-portal="signin">Sign in</a>
|
||||
<a class="gh-head-button" href="#/portal/signup" data-portal="signup">Subscribe</a>
|
||||
{{else}}
|
||||
<a class="gh-head-button" href="#/portal/signin" data-portal="signin">Sign in</a>
|
||||
{{/unless}}
|
||||
{{else}}
|
||||
<a class="gh-head-button" href="#/portal/account" data-portal="account">Account</a>
|
||||
{{/unless}}
|
||||
</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>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="site-content">
|
||||
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}}
|
||||
{{{body}}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- jQuery, required for fitvids --}}
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.min.js"
|
||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
|
||||
<script src="{{asset "built/casper.js"}}"></script>
|
||||
{{!-- The global footer at the very bottom of the screen --}}
|
||||
<footer class="site-footer outer">
|
||||
<div class="inner">
|
||||
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> © {{date format="YYYY"}}</section>
|
||||
<nav class="site-footer-nav">
|
||||
{{navigation type="secondary"}}
|
||||
</nav>
|
||||
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{{!-- Scripts for Members subscription --}}
|
||||
<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, " "));
|
||||
}
|
||||
</div>
|
||||
{{!-- /.viewport --}}
|
||||
|
||||
// Give the parameter a variable name
|
||||
var action = getParameterByName('action');
|
||||
|
||||
$(document).ready(function () {
|
||||
if (action == 'subscribe') {
|
||||
$('body').addClass("subscribe-success");
|
||||
}
|
||||
{{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.5.1.min.js"
|
||||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<script src="{{asset "built/casper.js"}}"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// Mobile Menu Trigger
|
||||
$('.gh-burger').click(function () {
|
||||
$('body').toggleClass('gh-head-open');
|
||||
});
|
||||
// FitVids - Makes video embeds responsive
|
||||
$(".gh-content").fitVids();
|
||||
});
|
||||
</script>
|
||||
|
||||
$('.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('');
|
||||
});
|
||||
});
|
||||
</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. --}}
|
||||
{{{block "scripts"}}}
|
||||
|
||||
{{!-- 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 outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}}
|
||||
{{ghost_foot}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -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}}
|
||||
{{!-- 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">
|
||||
<section class="outer error-content">
|
||||
<div class="inner">
|
||||
<section class="error-message">
|
||||
<h1 class="error-code">{{statusCode}}</h1>
|
||||
<p class="error-description">{{message}}</p>
|
||||
<a class="error-link" href="{{@site.url}}">Go to the front page →</a>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{#get "posts" limit="3" include="authors,tags"}}
|
||||
<div class="post-feed">
|
||||
{{#foreach posts}}
|
||||
{{> "post-card"}}
|
||||
{{!-- Given that people landing on this page didn't find what they
|
||||
were looking for, let's give them some alternative stuff to read. --}}
|
||||
<aside class="read-more-wrap outer">
|
||||
<div class="read-more inner">
|
||||
{{#get "posts" include="authors" limit="3" as |more_posts|}}
|
||||
{{#if more_posts}}
|
||||
{{#foreach more_posts}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/get}}
|
||||
</div>
|
||||
</main>
|
||||
</aside>
|
16
error.hbs
@ -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.
|
||||
You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in this file.
|
||||
|
||||
There are two error files in this theme, one for 404s and one for all other errors.
|
||||
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>
|
||||
@ -32,7 +40,7 @@ You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main id="site-main" class="site-main outer error-content">
|
||||
<main class="outer error-content">
|
||||
<div class="inner">
|
||||
|
||||
<section class="error-message">
|
||||
|
206
gulpfile.js
@ -1,5 +1,8 @@
|
||||
const {series, watch, src, dest, parallel} = require('gulp');
|
||||
const pump = require('pump');
|
||||
const path = require('path');
|
||||
const releaseUtils = require('@tryghost/release-utils');
|
||||
const inquirer = require('inquirer');
|
||||
|
||||
// gulp plugins and utils
|
||||
const livereload = require('gulp-livereload');
|
||||
@ -12,11 +15,14 @@ const fs = require('fs');
|
||||
|
||||
// postcss plugins
|
||||
const autoprefixer = require('autoprefixer');
|
||||
const colorFunction = require('postcss-color-function');
|
||||
const colorFunction = require('postcss-color-mod-function');
|
||||
const cssnano = require('cssnano');
|
||||
const customProperties = require('postcss-custom-properties');
|
||||
const easyimport = require('postcss-easy-import');
|
||||
|
||||
const REPO = 'TryGhost/Casper';
|
||||
const REPO_READONLY = 'TryGhost/Casper';
|
||||
const CHANGELOG_PATH = path.join(process.cwd(), '.', 'changelog.md');
|
||||
|
||||
function serve(done) {
|
||||
livereload.listen();
|
||||
done();
|
||||
@ -39,17 +45,14 @@ function hbs(done) {
|
||||
}
|
||||
|
||||
function css(done) {
|
||||
const processors = [
|
||||
easyimport,
|
||||
customProperties({preserve: false}),
|
||||
colorFunction(),
|
||||
autoprefixer(),
|
||||
cssnano()
|
||||
];
|
||||
|
||||
pump([
|
||||
src('assets/css/*.css', {sourcemaps: true}),
|
||||
postcss(processors),
|
||||
postcss([
|
||||
easyimport,
|
||||
colorFunction(),
|
||||
autoprefixer(),
|
||||
cssnano()
|
||||
]),
|
||||
dest('assets/built/', {sourcemaps: '.'}),
|
||||
livereload()
|
||||
], handleError(done));
|
||||
@ -70,147 +73,104 @@ function js(done) {
|
||||
}
|
||||
|
||||
function zipper(done) {
|
||||
const targetDir = 'dist/';
|
||||
const themeName = require('./package.json').name;
|
||||
const filename = themeName + '.zip';
|
||||
const filename = require('./package.json').name + '.zip';
|
||||
|
||||
pump([
|
||||
src([
|
||||
'**',
|
||||
'!node_modules', '!node_modules/**',
|
||||
'!dist', '!dist/**'
|
||||
'!dist', '!dist/**',
|
||||
'!yarn-error.log',
|
||||
'!yarn.lock',
|
||||
'!gulpfile.js'
|
||||
]),
|
||||
zip(filename),
|
||||
dest(targetDir)
|
||||
dest('dist/')
|
||||
], handleError(done));
|
||||
}
|
||||
|
||||
const cssWatcher = () => watch('assets/css/**', css);
|
||||
const jsWatcher = () => watch('assets/js/**', js);
|
||||
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
|
||||
const watcher = parallel(cssWatcher, hbsWatcher);
|
||||
const watcher = parallel(cssWatcher, jsWatcher, hbsWatcher);
|
||||
const build = series(css, js);
|
||||
const dev = series(build, serve, watcher);
|
||||
|
||||
exports.build = build;
|
||||
exports.zip = series(build, zipper);
|
||||
exports.default = dev;
|
||||
exports.default = series(build, serve, watcher);
|
||||
|
||||
// release imports
|
||||
const path = require('path');
|
||||
const releaseUtils = require('@tryghost/release-utils');
|
||||
|
||||
let config;
|
||||
try {
|
||||
config = require('./config');
|
||||
} catch (err) {
|
||||
config = null;
|
||||
}
|
||||
|
||||
const REPO = 'TryGhost/Casper';
|
||||
const USER_AGENT = 'Casper';
|
||||
const CHANGELOG_PATH = path.join(process.cwd(), '.', 'changelog.md');
|
||||
|
||||
const changelog = ({previousVersion}) => {
|
||||
const changelog = new releaseUtils.Changelog({
|
||||
changelogPath: CHANGELOG_PATH,
|
||||
folder: path.join(process.cwd(), '.')
|
||||
});
|
||||
|
||||
changelog
|
||||
.write({
|
||||
githubRepoPath: `https://github.com/${REPO}`,
|
||||
lastVersion: previousVersion
|
||||
})
|
||||
.sort()
|
||||
.clean();
|
||||
};
|
||||
|
||||
const previousRelease = () => {
|
||||
return releaseUtils
|
||||
.releases
|
||||
.get({
|
||||
userAgent: USER_AGENT,
|
||||
uri: `https://api.github.com/repos/${REPO}/releases`
|
||||
})
|
||||
.then((response) => {
|
||||
if (!response || !response.length) {
|
||||
console.log('No releases found. Skipping');
|
||||
return;
|
||||
}
|
||||
let prevVersion = response[0].tag_name || response[0].name;
|
||||
console.log(`Previous version ${prevVersion}`);
|
||||
return prevVersion;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* `yarn ship` will trigger `postship` task.
|
||||
*
|
||||
* [optional] For full automation
|
||||
*
|
||||
* `GHOST=2.10.1,2.10.0 yarn ship`
|
||||
* First value: Ships with Ghost
|
||||
* Second value: Compatible with Ghost/GScan
|
||||
*
|
||||
* You can manually run in case the task has thrown an error.
|
||||
*
|
||||
* `npm_package_version=0.5.0 gulp release`
|
||||
*/
|
||||
const release = () => {
|
||||
exports.release = async () => {
|
||||
// @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
|
||||
var packageJSON = JSON.parse(fs.readFileSync('./package.json'));
|
||||
let packageJSON = JSON.parse(fs.readFileSync('./package.json'));
|
||||
const newVersion = packageJSON.version;
|
||||
let shipsWithGhost = '{version}';
|
||||
let compatibleWithGhost = '2.10.0';
|
||||
const ghostEnvValues = process.env.GHOST || null;
|
||||
|
||||
if (ghostEnvValues) {
|
||||
shipsWithGhost = ghostEnvValues.split(',')[0];
|
||||
compatibleWithGhost = ghostEnvValues.split(',')[1];
|
||||
|
||||
if (!compatibleWithGhost) {
|
||||
compatibleWithGhost = '2.10.0';
|
||||
}
|
||||
}
|
||||
|
||||
if (!newVersion || newVersion === '') {
|
||||
console.log('Invalid version.');
|
||||
console.log(`Invalid version: ${newVersion}`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`\nDraft release for ${newVersion}.`);
|
||||
console.log(`\nCreating release for ${newVersion}...`);
|
||||
|
||||
if (!config || !config.github || !config.github.username || !config.github.token) {
|
||||
console.log('Please copy config.example.json and configure Github token.');
|
||||
const githubToken = process.env.GST_TOKEN;
|
||||
|
||||
if (!githubToken) {
|
||||
console.log('Please configure your environment with a GitHub token located in GST_TOKEN');
|
||||
return;
|
||||
}
|
||||
|
||||
return previousRelease()
|
||||
.then((previousVersion) => {
|
||||
changelog({previousVersion});
|
||||
try {
|
||||
const result = await inquirer.prompt([{
|
||||
type: 'input',
|
||||
name: 'compatibleWithGhost',
|
||||
message: 'Which version of Ghost is it compatible with?',
|
||||
default: '5.0.0'
|
||||
}]);
|
||||
|
||||
return releaseUtils
|
||||
.releases
|
||||
.create({
|
||||
draft: true,
|
||||
preRelease: false,
|
||||
tagName: newVersion,
|
||||
releaseName: newVersion,
|
||||
userAgent: USER_AGENT,
|
||||
uri: `https://api.github.com/repos/${REPO}/releases`,
|
||||
github: {
|
||||
username: config.github.username,
|
||||
token: config.github.token
|
||||
},
|
||||
content: [`**Ships with Ghost ${shipsWithGhost} Compatible with Ghost >= ${compatibleWithGhost}**\n\n`],
|
||||
changelogPath: CHANGELOG_PATH
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(`\nRelease draft generated: ${response.releaseUrl}\n`);
|
||||
});
|
||||
const compatibleWithGhost = result.compatibleWithGhost;
|
||||
|
||||
const releasesResponse = await releaseUtils.releases.get({
|
||||
userAgent: 'Casper',
|
||||
uri: `https://api.github.com/repos/${REPO_READONLY}/releases`
|
||||
});
|
||||
};
|
||||
|
||||
exports.release = release;
|
||||
if (!releasesResponse || !releasesResponse) {
|
||||
console.log('No releases found. Skipping...');
|
||||
return;
|
||||
}
|
||||
|
||||
let previousVersion = releasesResponse[0].tag_name || releasesResponse[0].name;
|
||||
console.log(`Previous version: ${previousVersion}`);
|
||||
|
||||
const changelog = new releaseUtils.Changelog({
|
||||
changelogPath: CHANGELOG_PATH,
|
||||
folder: path.join(process.cwd(), '.')
|
||||
});
|
||||
|
||||
changelog
|
||||
.write({
|
||||
githubRepoPath: `https://github.com/${REPO}`,
|
||||
lastVersion: previousVersion
|
||||
})
|
||||
.sort()
|
||||
.clean();
|
||||
|
||||
const newReleaseResponse = await releaseUtils.releases.create({
|
||||
draft: true,
|
||||
preRelease: false,
|
||||
tagName: 'v' + newVersion,
|
||||
releaseName: newVersion,
|
||||
userAgent: 'Casper',
|
||||
uri: `https://api.github.com/repos/${REPO}/releases`,
|
||||
github: {
|
||||
token: githubToken
|
||||
},
|
||||
content: [`**Compatible with Ghost ≥ ${compatibleWithGhost}**\n\n`],
|
||||
changelogPath: CHANGELOG_PATH
|
||||
});
|
||||
console.log(`\nRelease draft generated: ${newReleaseResponse.releaseUrl}\n`);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
130
index.hbs
@ -2,97 +2,53 @@
|
||||
{{!-- The tag above means: insert everything in this file
|
||||
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">
|
||||
<h1 class="site-title">
|
||||
{{#if @site.logo}}
|
||||
<img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" />
|
||||
{{else}}
|
||||
{{@site.title}}
|
||||
{{/if}}
|
||||
</h1>
|
||||
<h2 class="site-description">{{@site.description}}</h2>
|
||||
</div>
|
||||
<div class="site-header-content outer{{#match @custom.header_style "Left aligned"}} left-aligned{{/match}}{{#unless @custom.show_publication_cover}}{{#match @custom.header_style "Hidden"}} no-content{{/match}}{{/unless}}">
|
||||
|
||||
{{#if @custom.show_publication_cover}}
|
||||
{{#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="{{@site.title}}"
|
||||
/>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#match @custom.header_style "!=" "Hidden"}}
|
||||
<div class="site-header-inner inner">
|
||||
{{#match @custom.navigation_layout "Logo on cover"}}
|
||||
{{#if @site.logo}}
|
||||
<img class="site-logo" src="{{@site.logo}}" alt="{{@site.title}}">
|
||||
{{else}}
|
||||
<h1 class="site-title">{{@site.title}}</h1>
|
||||
{{/if}}
|
||||
{{/match}}
|
||||
{{#if @site.description}}
|
||||
<p class="site-description">{{@site.description}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{/match}}
|
||||
|
||||
</div>
|
||||
|
||||
{{!-- The main content area --}}
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner posts">
|
||||
|
||||
<div class="post-feed">
|
||||
{{#foreach posts}}
|
||||
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
|
||||
{{/foreach}}
|
||||
</div>
|
||||
<div class="inner posts">
|
||||
|
||||
<div class="post-feed">
|
||||
{{#foreach posts}}
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
|
||||
{{pagination}}
|
||||
|
||||
</div>
|
||||
</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}}
|
121
package.json
@ -2,10 +2,9 @@
|
||||
"name": "casper",
|
||||
"description": "A clean, minimal default theme for the Ghost publishing platform",
|
||||
"demo": "https://demo.ghost.io",
|
||||
"version": "3.0.2",
|
||||
"version": "5.4.5",
|
||||
"engines": {
|
||||
"ghost": ">=3.0.0",
|
||||
"ghost-api": "v3"
|
||||
"ghost": ">=5.0.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"screenshots": {
|
||||
@ -15,7 +14,8 @@
|
||||
"scripts": {
|
||||
"dev": "gulp",
|
||||
"zip": "gulp zip",
|
||||
"test": "gscan --v3 .",
|
||||
"test": "gscan .",
|
||||
"test:ci": "gscan --fatal --verbose .",
|
||||
"pretest": "gulp build",
|
||||
"preship": "yarn test",
|
||||
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
|
||||
@ -24,7 +24,7 @@
|
||||
"author": {
|
||||
"name": "Ghost Foundation",
|
||||
"email": "hello@ghost.org",
|
||||
"url": "https://ghost.org"
|
||||
"url": "https://ghost.org/"
|
||||
},
|
||||
"gpm": {
|
||||
"type": "theme",
|
||||
@ -45,20 +45,21 @@
|
||||
"bugs": "https://github.com/TryGhost/Casper/issues",
|
||||
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
||||
"devDependencies": {
|
||||
"@tryghost/release-utils": "0.3.2",
|
||||
"autoprefixer": "9.6.5",
|
||||
"beeper": "2.0.0",
|
||||
"cssnano": "4.1.10",
|
||||
"gscan": "3.0.0",
|
||||
"@tryghost/release-utils": "0.8.1",
|
||||
"autoprefixer": "10.4.7",
|
||||
"beeper": "2.1.0",
|
||||
"cssnano": "5.1.12",
|
||||
"gscan": "4.34.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-livereload": "4.0.2",
|
||||
"gulp-postcss": "8.0.0",
|
||||
"gulp-postcss": "9.0.1",
|
||||
"gulp-uglify": "3.0.2",
|
||||
"gulp-zip": "5.0.1",
|
||||
"postcss-color-function": "4.1.0",
|
||||
"postcss-custom-properties": "9.0.2",
|
||||
"postcss-easy-import": "3.0.0",
|
||||
"gulp-zip": "5.1.0",
|
||||
"inquirer": "8.2.4",
|
||||
"postcss": "8.2.13",
|
||||
"postcss-color-mod-function": "3.0.3",
|
||||
"postcss-easy-import": "4.0.0",
|
||||
"pump": "3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
@ -85,6 +86,94 @@
|
||||
"xl": {
|
||||
"width": 2000
|
||||
}
|
||||
},
|
||||
"card_assets": true,
|
||||
"custom": {
|
||||
"navigation_layout": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Logo on cover",
|
||||
"Logo in the middle",
|
||||
"Stacked"
|
||||
],
|
||||
"default": "Logo on cover"
|
||||
},
|
||||
"title_font": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Modern sans-serif",
|
||||
"Elegant serif"
|
||||
],
|
||||
"default": "Modern sans-serif"
|
||||
},
|
||||
"body_font": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Modern sans-serif",
|
||||
"Elegant serif"
|
||||
],
|
||||
"default": "Elegant serif"
|
||||
},
|
||||
"show_publication_cover": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"group": "homepage"
|
||||
},
|
||||
"header_style": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Center aligned",
|
||||
"Left aligned",
|
||||
"Hidden"
|
||||
],
|
||||
"default": "Center aligned",
|
||||
"group": "homepage"
|
||||
},
|
||||
"feed_layout": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Classic",
|
||||
"Grid",
|
||||
"List"
|
||||
],
|
||||
"default": "Classic",
|
||||
"group": "homepage"
|
||||
},
|
||||
"color_scheme": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Light",
|
||||
"Dark",
|
||||
"Auto"
|
||||
],
|
||||
"default": "Light"
|
||||
},
|
||||
"post_image_style": {
|
||||
"type": "select",
|
||||
"options": [
|
||||
"Wide",
|
||||
"Full",
|
||||
"Small",
|
||||
"Hidden"
|
||||
],
|
||||
"default": "Wide",
|
||||
"group": "post"
|
||||
},
|
||||
"email_signup_text": {
|
||||
"type": "text",
|
||||
"default": "Sign up for more like this.",
|
||||
"group": "post"
|
||||
},
|
||||
"show_recent_posts_footer": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"group": "post"
|
||||
}
|
||||
}
|
||||
},
|
||||
"renovate": {
|
||||
"extends": [
|
||||
"@tryghost:theme"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
62
page.hbs
@ -1,30 +1,21 @@
|
||||
{{!< default}}
|
||||
|
||||
{{!-- 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}}
|
||||
{{!-- Everything inside the #post block pulls data from the page --}}
|
||||
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner">
|
||||
<main id="site-main" class="site-main">
|
||||
<article class="article {{post_class}}">
|
||||
|
||||
<article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
|
||||
<header class="article-header gh-canvas">
|
||||
|
||||
<header class="post-full-header">
|
||||
<h1 class="post-full-title">{{title}}</h1>
|
||||
</header>
|
||||
<h1 class="article-title">{{title}}</h1>
|
||||
|
||||
{{#if feature_image}}
|
||||
<figure class="post-full-image">
|
||||
{{#if feature_image}}
|
||||
<figure class="article-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
|
||||
@ -32,34 +23,23 @@ into the {body} of the default.hbs template --}}
|
||||
{{img_url feature_image size="m"}} 600w,
|
||||
{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 800px) 400px,
|
||||
(max-width: 1170px) 1170px,
|
||||
2000px"
|
||||
sizes="(min-width: 1400px) 1400px, 92vw"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
/>
|
||||
{{#if feature_image_caption}}
|
||||
<figcaption>{{feature_image_caption}}</figcaption>
|
||||
{{/if}}
|
||||
</figure>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<section class="post-full-content">
|
||||
<div class="post-content">
|
||||
{{content}}
|
||||
</div>
|
||||
</section>
|
||||
</header>
|
||||
|
||||
</article>
|
||||
<section class="gh-content gh-canvas">
|
||||
{{content}}
|
||||
</section>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{/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}}
|
||||
{{/post}}
|
@ -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}}
|
@ -1 +1 @@
|
||||
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M16 0c8.837 0 16 7.163 16 16s-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0zm5.204 4.911h-3.546c-2.103 0-4.443.885-4.443 3.934.01 1.062 0 2.08 0 3.225h-2.433v3.872h2.509v11.147h4.61v-11.22h3.042l.275-3.81h-3.397s.007-1.695 0-2.187c0-1.205 1.253-1.136 1.329-1.136h2.054V4.911z" /></svg>
|
||||
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M23.9981 11.9991C23.9981 5.37216 18.626 0 11.9991 0C5.37216 0 0 5.37216 0 11.9991C0 17.9882 4.38789 22.9522 10.1242 23.8524V15.4676H7.07758V11.9991H10.1242V9.35553C10.1242 6.34826 11.9156 4.68714 14.6564 4.68714C15.9692 4.68714 17.3424 4.92149 17.3424 4.92149V7.87439H15.8294C14.3388 7.87439 13.8739 8.79933 13.8739 9.74824V11.9991H17.2018L16.6698 15.4676H13.8739V23.8524C19.6103 22.9522 23.9981 17.9882 23.9981 11.9991Z"/></svg>
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 531 B |
3
partials/icons/fire.hbs
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.49365 4.58752C3.53115 6.03752 2.74365 7.70002 2.74365 9.25002C2.74365 10.6424 3.29678 11.9778 4.28134 12.9623C5.26591 13.9469 6.60127 14.5 7.99365 14.5C9.38604 14.5 10.7214 13.9469 11.706 12.9623C12.6905 11.9778 13.2437 10.6424 13.2437 9.25002C13.2437 6.00002 10.9937 3.50002 9.16865 1.68127L6.99365 6.25002L4.49365 4.58752Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 538 B |
5
partials/icons/lock.hbs
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.25 6.875H3.75C3.40482 6.875 3.125 7.15482 3.125 7.5V16.25C3.125 16.5952 3.40482 16.875 3.75 16.875H16.25C16.5952 16.875 16.875 16.5952 16.875 16.25V7.5C16.875 7.15482 16.5952 6.875 16.25 6.875Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M7.1875 6.875V4.0625C7.1875 3.31658 7.48382 2.60121 8.01126 2.07376C8.53871 1.54632 9.25408 1.25 10 1.25C10.7459 1.25 11.4613 1.54632 11.9887 2.07376C12.5162 2.60121 12.8125 3.31658 12.8125 4.0625V6.875" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
<path d="M10 13.125C10.6904 13.125 11.25 12.5654 11.25 11.875C11.25 11.1846 10.6904 10.625 10 10.625C9.30964 10.625 8.75 11.1846 8.75 11.875C8.75 12.5654 9.30964 13.125 10 13.125Z" fill="currentColor"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 932 B |
1
partials/icons/search.hbs
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" width="20" height="20"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
|
After Width: | Height: | Size: 248 B |
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M30.063 7.313c-.813 1.125-1.75 2.125-2.875 2.938v.75c0 1.563-.188 3.125-.688 4.625a15.088 15.088 0 0 1-2.063 4.438c-.875 1.438-2 2.688-3.25 3.813a15.015 15.015 0 0 1-4.625 2.563c-1.813.688-3.75 1-5.75 1-3.25 0-6.188-.875-8.875-2.625.438.063.875.125 1.375.125 2.688 0 5.063-.875 7.188-2.5-1.25 0-2.375-.375-3.375-1.125s-1.688-1.688-2.063-2.875c.438.063.813.125 1.125.125.5 0 1-.063 1.5-.25-1.313-.25-2.438-.938-3.313-1.938a5.673 5.673 0 0 1-1.313-3.688v-.063c.813.438 1.688.688 2.625.688a5.228 5.228 0 0 1-1.875-2c-.5-.875-.688-1.813-.688-2.75 0-1.063.25-2.063.75-2.938 1.438 1.75 3.188 3.188 5.25 4.25s4.313 1.688 6.688 1.813a5.579 5.579 0 0 1 1.5-5.438c1.125-1.125 2.5-1.688 4.125-1.688s3.063.625 4.188 1.813a11.48 11.48 0 0 0 3.688-1.375c-.438 1.375-1.313 2.438-2.563 3.188 1.125-.125 2.188-.438 3.313-.875z"/></svg>
|
||||
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M23.954 4.569c-.885.389-1.83.654-2.825.775 1.014-.611 1.794-1.574 2.163-2.723-.951.555-2.005.959-3.127 1.184-.896-.959-2.173-1.559-3.591-1.559-2.717 0-4.92 2.203-4.92 4.917 0 .39.045.765.127 1.124C7.691 8.094 4.066 6.13 1.64 3.161c-.427.722-.666 1.561-.666 2.475 0 1.71.87 3.213 2.188 4.096-.807-.026-1.566-.248-2.228-.616v.061c0 2.385 1.693 4.374 3.946 4.827-.413.111-.849.171-1.296.171-.314 0-.615-.03-.916-.086.631 1.953 2.445 3.377 4.604 3.417-1.68 1.319-3.809 2.105-6.102 2.105-.39 0-.779-.023-1.17-.067 2.189 1.394 4.768 2.209 7.557 2.209 9.054 0 13.999-7.496 13.999-13.986 0-.209 0-.42-.015-.63.961-.689 1.8-1.56 2.46-2.548l-.047-.02z"/></svg>
|
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 752 B |
@ -1,7 +1,11 @@
|
||||
<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}}{{#match @custom.feed_layout "Classic"}}{{#is "home"}}{{#has index="0"}} post-card-large{{/has}}{{#has index="1,2"}} dynamic{{/has}}{{/is}}{{/match}}{{#match @custom.feed_layout "Grid"}} keep-ratio{{/match}}{{#match @custom.feed_layout "List"}}{{#is "home, paged"}} post-card-large{{/is}}{{/match}}{{#unless access}} post-access-{{visibility}}{{/unless}}">
|
||||
|
||||
{{#if feature_image}}
|
||||
<a class="post-card-image-link" href="{{url}}">
|
||||
|
||||
{{!-- 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="post-card-image"
|
||||
@ -9,61 +13,66 @@
|
||||
{{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, 700px"
|
||||
sizes="(max-width: 1000px) 400px, 800px"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
loading="lazy"
|
||||
/>
|
||||
|
||||
{{#unless access}}
|
||||
{{^has visibility="public"}}
|
||||
<div class="post-card-access">
|
||||
{{> "icons/lock"}}
|
||||
{{#has visibility="members"}}
|
||||
Members only
|
||||
{{else}}
|
||||
Paid-members only
|
||||
{{/has}}
|
||||
</div>
|
||||
{{/has}}
|
||||
{{/unless}}
|
||||
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
<div class="post-card-content">
|
||||
|
||||
<a class="post-card-content-link" href="{{url}}">
|
||||
|
||||
<header class="post-card-header">
|
||||
{{#if primary_tag}}
|
||||
<div class="post-card-tags">
|
||||
{{#primary_tag}}
|
||||
<div class="post-card-primary-tag">{{name}}</div>
|
||||
<span class="post-card-primary-tag">{{name}}</span>
|
||||
{{/primary_tag}}
|
||||
{{/if}}
|
||||
<h2 class="post-card-title">{{title}}</h2>
|
||||
{{#if featured}}
|
||||
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<h2 class="post-card-title">
|
||||
{{#unless access}}
|
||||
{{^has visibility="public"}}
|
||||
{{#unless feature_image}}
|
||||
{{> "icons/lock"}}
|
||||
{{/unless}}
|
||||
{{/has}}
|
||||
{{/unless}}
|
||||
{{title}}
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<section class="post-card-excerpt">
|
||||
{{#if feature_image}}
|
||||
<p>{{excerpt words="30"}}</p>
|
||||
{{else}}
|
||||
<p>{{excerpt words="44"}}</p>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
||||
{{#if excerpt}}
|
||||
<div class="post-card-excerpt">{{excerpt}}</div>
|
||||
{{/if}}
|
||||
</a>
|
||||
|
||||
<footer class="post-card-meta">
|
||||
<ul class="author-list">
|
||||
{{#foreach authors}}
|
||||
<li class="author-list-item">
|
||||
|
||||
<div class="author-name-tooltip">
|
||||
{{name}}
|
||||
</div>
|
||||
|
||||
{{#if profile_image}}
|
||||
<a href="{{url}}" class="static-avatar">
|
||||
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="{{url}}" class="static-avatar author-profile-image">{{> "icons/avatar"}}</a>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
<div class="post-card-byline-content">
|
||||
<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">•</span> {{reading_time}}</span>
|
||||
</div>
|
||||
<time class="post-card-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
|
||||
{{#if reading_time}}
|
||||
<span class="post-card-meta-length">{{reading_time}}</span>
|
||||
{{/if}}
|
||||
{{#if @site.comments_enabled}}
|
||||
{{comment_count}}
|
||||
{{/if}}
|
||||
</footer>
|
||||
|
||||
</div>{{!--/.post-card-content--}}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<div class="outer site-nav-main">
|
||||
<div class="inner">
|
||||
{{> "site-nav"}}
|
||||
</div>
|
||||
</div>
|
@ -1,32 +0,0 @@
|
||||
<nav class="site-nav">
|
||||
<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 class="site-nav-right">
|
||||
<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>
|
||||
{{#if @labs.members}}
|
||||
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
||||
{{else}}
|
||||
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</nav>
|
@ -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>
|
274
post.hbs
@ -1,92 +1,67 @@
|
||||
{{!< default}}
|
||||
|
||||
{{!-- 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}}
|
||||
{{!-- Everything inside the #post block pulls data from the post --}}
|
||||
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner">
|
||||
<main id="site-main" class="site-main">
|
||||
<article class="article {{post_class}} {{#match @custom.post_image_style "Full"}}image-full{{else match @custom.post_image_style "=" "Small"}}image-small{{/match}}">
|
||||
|
||||
<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}}
|
||||
<section class="post-full-tags">
|
||||
{{#primary_tag}}
|
||||
<div class="article-tag post-card-tags">
|
||||
{{#primary_tag}}
|
||||
<span class="post-card-primary-tag">
|
||||
<a href="{{url}}">{{name}}</a>
|
||||
{{/primary_tag}}
|
||||
</section>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{/primary_tag}}
|
||||
{{#if featured}}
|
||||
<span class="post-card-featured">{{> "icons/fire"}} Featured</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<h1 class="post-full-title">{{title}}</h1>
|
||||
<h1 class="article-title">{{title}}</h1>
|
||||
|
||||
{{#if custom_excerpt}}
|
||||
<p class="post-full-custom-excerpt">{{custom_excerpt}}</p>
|
||||
{{/if}}
|
||||
{{#if custom_excerpt}}
|
||||
<p class="article-excerpt">{{custom_excerpt}}</p>
|
||||
{{/if}}
|
||||
|
||||
<div class="post-full-byline">
|
||||
|
||||
<section class="post-full-byline-content">
|
||||
|
||||
<ul class="author-list">
|
||||
{{#foreach authors}}
|
||||
<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}}
|
||||
<a href="{{url}}" class="author-avatar">
|
||||
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a>
|
||||
{{/if}}
|
||||
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
|
||||
<section class="post-full-byline-meta">
|
||||
<h4 class="author-name">{{authors}}</h4>
|
||||
<div class="byline-meta-content">
|
||||
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
|
||||
<span class="byline-reading-time"><span class="bull">•</span> {{reading_time}}</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</section>
|
||||
<div class="article-byline">
|
||||
<section class="article-byline-content">
|
||||
|
||||
<ul class="author-list">
|
||||
{{#foreach authors}}
|
||||
<li class="author-list-item">
|
||||
{{#if profile_image}}
|
||||
<a href="{{url}}" class="author-avatar">
|
||||
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
|
||||
<div class="article-byline-meta">
|
||||
<h4 class="author-name">{{authors}}</h4>
|
||||
<div class="byline-meta-content">
|
||||
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
|
||||
{{#if reading_time}}
|
||||
<span class="byline-reading-time"><span class="bull">•</span> {{reading_time}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
{{#if feature_image}}
|
||||
<figure class="post-full-image">
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{#match @custom.post_image_style "!=" "Hidden"}}
|
||||
{{#if feature_image}}
|
||||
<figure class="article-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
|
||||
@ -94,121 +69,72 @@ into the {body} of the default.hbs template --}}
|
||||
{{img_url feature_image size="m"}} 600w,
|
||||
{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 800px) 400px,
|
||||
(max-width: 1170px) 1170px,
|
||||
2000px"
|
||||
sizes="(min-width: 1400px) 1400px, 92vw"
|
||||
src="{{img_url feature_image size="xl"}}"
|
||||
alt="{{title}}"
|
||||
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
||||
/>
|
||||
{{#if feature_image_caption}}
|
||||
<figcaption>{{feature_image_caption}}</figcaption>
|
||||
{{/if}}
|
||||
</figure>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/match}}
|
||||
|
||||
<section class="post-full-content">
|
||||
<div class="post-content">
|
||||
{{content}}
|
||||
</div>
|
||||
</section>
|
||||
</header>
|
||||
|
||||
{{!-- Email subscribe form at the bottom of the page --}}
|
||||
{{#if @labs.members}}
|
||||
{{> subscribe-form}}
|
||||
{{/if}}
|
||||
<section class="gh-content gh-canvas">
|
||||
{{content}}
|
||||
</section>
|
||||
|
||||
{{!--
|
||||
<section class="post-full-comments">
|
||||
If you want to embed comments, this is a good place to do it!
|
||||
</section>
|
||||
--}}
|
||||
{{#if comments}}
|
||||
<section class="article-comments gh-canvas">
|
||||
{{comments}}
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{{!-- Links to Previous/Next posts --}}
|
||||
<aside class="read-next outer">
|
||||
<div class="inner">
|
||||
<div class="read-next-feed">
|
||||
{{#if primary_tag}}
|
||||
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
||||
{{#if related_posts}}
|
||||
<article class="read-next-card">
|
||||
<header class="read-next-card-header">
|
||||
{{#../primary_tag}}
|
||||
<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>
|
||||
</li>
|
||||
{{/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}}
|
||||
{{/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}}
|
||||
{{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
|
||||
{{#if @site.members_enabled}}
|
||||
{{#unless @member}}
|
||||
{{#unless @site.comments_enabled}}
|
||||
{{#if access}}
|
||||
<section class="footer-cta outer">
|
||||
<div class="inner">
|
||||
{{#if @custom.email_signup_text}}<h2 class="footer-cta-title">{{@custom.email_signup_text}}</h2>{{/if}}
|
||||
<a class="footer-cta-button" href="#/portal" data-portal>
|
||||
<div class="footer-cta-input">Enter your email</div>
|
||||
<span>Subscribe</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</section>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{/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
|
||||
{{!-- Read more links, just above the footer --}}
|
||||
{{#if @custom.show_recent_posts_footer}}
|
||||
{{!-- The {#get} helper below fetches some of the latest posts here
|
||||
so that people have something else to read when they finish this one.
|
||||
|
||||
// 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
|
||||
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}}" limit="3" as |more_posts|}}
|
||||
|
||||
// Hover on avatar
|
||||
var hoverTimeout;
|
||||
$('.author-list-item').hover(function () {
|
||||
var $this = $(this);
|
||||
{{#if more_posts}}
|
||||
<aside class="read-more-wrap outer">
|
||||
<div class="read-more inner">
|
||||
{{#foreach more_posts}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</aside>
|
||||
{{/if}}
|
||||
|
||||
clearTimeout(hoverTimeout);
|
||||
{{/get}}
|
||||
{{/if}}
|
||||
|
||||
$('.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}}
|
||||
{{/post}}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"@tryghost:theme"
|
||||
],
|
||||
"travis": { "enabled": true },
|
||||
"node": {
|
||||
"supportPolicy": ["lts_latest"]
|
||||
}
|
||||
}
|
75
tag.hbs
@ -1,32 +1,55 @@
|
||||
{{!< default}}
|
||||
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
|
||||
|
||||
{{#tag}}
|
||||
<header class="site-archive-header">
|
||||
{{> site-header}}
|
||||
{{> header-background background=feature_image}} {{!--Special header-image.hbs partial to generate the background image--}}
|
||||
<div class="inner site-header-content">
|
||||
<h1 class="site-title">{{name}}</h1>
|
||||
<h2 class="site-description">
|
||||
{{#if description}}
|
||||
{{description}}
|
||||
{{else}}
|
||||
A collection of {{plural ../pagination.total empty='posts' singular='% post' plural='% posts'}}
|
||||
{{/if}}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{{/tag}}
|
||||
|
||||
{{!-- The main content area --}}
|
||||
<main id="site-main" class="site-main outer">
|
||||
<div class="inner posts">
|
||||
<div class="post-feed">
|
||||
{{#foreach posts}}
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
<div class="inner posts">
|
||||
<div class="post-feed">
|
||||
|
||||
{{#tag}}
|
||||
<section class="post-card post-card-large">
|
||||
|
||||
{{#if feature_image}}
|
||||
<div class="post-card-image-link">
|
||||
{{!-- 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="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}}"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="post-card-content">
|
||||
<div class="post-card-content-link">
|
||||
<header class="post-card-header">
|
||||
<h2 class="post-card-title">{{name}}</h2>
|
||||
</header>
|
||||
<div class="post-card-excerpt">
|
||||
{{#if description}}
|
||||
{{description}}
|
||||
{{else}}
|
||||
A collection of {{plural ../pagination.total empty='zero posts' singular='% post' plural='% posts'}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
{{/tag}}
|
||||
|
||||
{{#foreach posts}}
|
||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||
{{> "post-card"}}
|
||||
{{/foreach}}
|
||||
|
||||
</div>
|
||||
|
||||
{{pagination}}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|