mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2025-07-13 09:16:06 +00:00
Compare commits
164 Commits
Author | SHA1 | Date | |
---|---|---|---|
a6a5d1eba1 | |||
fa8cc4cf2e | |||
e4faa3141a | |||
1e0e813931 | |||
0d1cf89cc0 | |||
9ac38156da | |||
fc8cf0b2f4 | |||
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 | |||
c82e1cb035 | |||
065849105b | |||
a1fc6090d2 | |||
68b0270ed5 |
9
.github/workflows/deploy-theme.yml
vendored
9
.github/workflows/deploy-theme.yml
vendored
@ -1,14 +1,15 @@
|
|||||||
name: Deploy Theme
|
name: Deploy Theme
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v2
|
||||||
- uses: TryGhost/action-deploy-theme@v1.2.0
|
- uses: TryGhost/action-deploy-theme@v1.4.1
|
||||||
with:
|
with:
|
||||||
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
||||||
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
|
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
|
||||||
|
15
.github/workflows/test.yml
vendored
Normal file
15
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Test
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- 'renovate/*'
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: yarn
|
||||||
|
- run: yarn test:ci
|
11
.travis.yml
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
2
LICENSE
@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2013-2019 Ghost Foundation
|
Copyright (c) 2013-2021 Ghost Foundation
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation
|
obtaining a copy of this software and associated documentation
|
||||||
|
@ -12,7 +12,7 @@ The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the la
|
|||||||
|
|
||||||
Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.
|
Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.
|
||||||
|
|
||||||
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/api/handlebars-themes/) which explains every possible Handlebars helper and template.
|
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/themes/) which explains every possible Handlebars helper and template.
|
||||||
|
|
||||||
**The main files are:**
|
**The main files are:**
|
||||||
|
|
||||||
@ -54,8 +54,7 @@ yarn zip
|
|||||||
# PostCSS Features Used
|
# 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.
|
- 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 Mod](https://github.com/jonathantneal/postcss-color-mod-function)
|
||||||
- [Color Function](https://github.com/postcss/postcss-color-function)
|
|
||||||
|
|
||||||
|
|
||||||
# SVG Icons
|
# SVG Icons
|
||||||
@ -67,4 +66,4 @@ You can add your own SVG icons in the same manner.
|
|||||||
|
|
||||||
# Copyright & License
|
# Copyright & License
|
||||||
|
|
||||||
Copyright (c) 2013-2019 Ghost Foundation - Released under the [MIT license](LICENSE).
|
Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE).
|
||||||
|
@ -4,6 +4,6 @@ Potential security vulnerabilities can be reported directly us at `security@ghos
|
|||||||
|
|
||||||
The full, up-to-date details of our security policy and procedure can always be found in our documentation:
|
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/
|
https://ghost.org/docs/security/
|
||||||
|
|
||||||
Please refer to this before emailing us. Thanks for helping make Ghost safe for everyone 🙏.
|
Please refer to this before emailing us. Thanks for helping make Ghost safe for everyone 🙏.
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
!function(n){"use strict";n.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("div");r.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',t.appendChild(r.childNodes[1])}return e&&n.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var t=n(this).find(e.join(","));(t=(t=t.not("object object")).not(r)).each(function(){var e=n(this);if(!(0<e.parents(r).length||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var t=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var i="fitvid"+n.fn.fitVids._count;e.attr("name",i),n.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),e.removeAttr("height").removeAttr("width")}})})},n.fn.fitVids._count=0}(window.jQuery||window.Zepto),function(e,t){t.addEventListener("DOMContentLoaded",function(){t.querySelectorAll(".kg-gallery-image img").forEach(function(e){var t=e.closest(".kg-gallery-image"),i=e.attributes.width.value/e.attributes.height.value;t.style.flex=i+" 1 0%"})})}(window,document),function(t,i){var r=i.querySelector("link[rel=next]");if(r){var n=i.querySelector(".post-feed");if(n){var o=300,s=!1,a=!1,d=t.scrollY,l=t.innerHeight,c=i.documentElement.scrollHeight;t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("resize",v),h()}}function u(){if(404===this.status)return t.removeEventListener("scroll",f),void t.removeEventListener("resize",v);this.response.querySelectorAll(".post-card").forEach(function(e){n.appendChild(i.importNode(e,!0))});var e=this.response.querySelector("link[rel=next]");e?r.href=e.href:(t.removeEventListener("scroll",f),t.removeEventListener("resize",v)),c=i.documentElement.scrollHeight,a=s=!1}function e(){if(!a)if(d+l<=c-o)s=!1;else{a=!0;var e=new t.XMLHttpRequest;e.responseType="document",e.addEventListener("load",u),e.open("GET",r.href),e.send(null)}}function h(){s||t.requestAnimationFrame(e),s=!0}function f(){d=t.scrollY,h()}function v(){l=t.innerHeight,c=i.documentElement.scrollHeight,h()}}(window,document),function(s,a){s.Casper||(s.Casper={}),s.Casper.stickyNavTitle=function(e){var t=a.querySelector(e.navSelector),i=a.querySelector(e.titleSelector),r=s.scrollY,n=!1;function o(){i.getBoundingClientRect().top+s.scrollY+(i.offsetHeight+35)<=r?t.classList.add(e.activeClass):t.classList.remove(e.activeClass),n=!1}s.addEventListener("scroll",function(){r=s.scrollY,function(){n||requestAnimationFrame(o);n=!0}()},{passive:!0}),o()}}(window,document);
|
!function(o){"use strict";o.fn.fitVids=function(e){var t,i,n={customSelector:null,ignore:null};return document.getElementById("fit-vids-style")||(t=document.head||document.getElementsByTagName("head")[0],(i=document.createElement("div")).innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',t.appendChild(i.childNodes[1])),e&&o.extend(n,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&e.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);e=o(this).find(e.join(","));(e=(e=e.not("object object")).not(r)).each(function(){var e,t,i=o(this);0<i.parents(r).length||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length||(i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16)),e=("object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height())/(isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10)),i.attr("name")||(t="fitvid"+o.fn.fitVids._count,i.attr("name",t),o.fn.fitVids._count++),i.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),i.removeAttr("height").removeAttr("width"))})})},o.fn.fitVids._count=0}(window.jQuery||window.Zepto),function(e){e.addEventListener("DOMContentLoaded",function(){e.querySelectorAll(".kg-gallery-image img").forEach(function(e){var t=e.closest(".kg-gallery-image"),e=e.attributes.width.value/e.attributes.height.value;t.style.flex=e+" 1 0%"})})}((window,document)),function(t,i){var r,n,o,s,a,d,l,c=i.querySelector("link[rel=next]");function u(){if(404===this.status)return t.removeEventListener("scroll",f),void t.removeEventListener("resize",v);this.response.querySelectorAll(".post-card").forEach(function(e){r.appendChild(i.importNode(e,!0))});var e=this.response.querySelector("link[rel=next]");e?c.href=e.href:(t.removeEventListener("scroll",f),t.removeEventListener("resize",v)),l=i.documentElement.scrollHeight,s=o=!1}function e(){var e;s||(a+d<=l-n?o=!1:(s=!0,(e=new t.XMLHttpRequest).responseType="document",e.addEventListener("load",u),e.open("GET",c.href),e.send(null)))}function h(){o||t.requestAnimationFrame(e),o=!0}function f(){a=t.scrollY,h()}function v(){d=t.innerHeight,l=i.documentElement.scrollHeight,h()}!c||(r=i.querySelector(".post-feed"))&&(s=o=!(n=300),a=t.scrollY,d=t.innerHeight,l=i.documentElement.scrollHeight,t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("resize",v),h())}(window,document),function(s,a){s.Casper||(s.Casper={}),s.Casper.stickyNavTitle=function(e){var t=a.querySelector(e.navSelector),i=a.querySelector(e.titleSelector),r=s.scrollY,n=!1;function o(){i.getBoundingClientRect().top+s.scrollY+(i.offsetHeight+35)<=r?t.classList.add(e.activeClass):t.classList.remove(e.activeClass),n=!1}s.addEventListener("scroll",function(){r=s.scrollY,n||requestAnimationFrame(o),n=!0},{passive:!0}),o()}}(window,document);
|
||||||
//# sourceMappingURL=casper.js.map
|
//# sourceMappingURL=casper.js.map
|
File diff suppressed because one or more lines are too long
@ -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}
|
:root{--blue:#3eb0ef;--green:#a4d037;--purple:#ad26b4;--yellow:#fecd35;--red:#f05230;--darkgrey:#15171a;--midgrey:#738a94;--lightgrey:#c5d2d9;--whitegrey:#e5eff5;--pink:#fa3a57;--brown:#a3821a;--darkmode:#1a1c20}a,abbr,acronym,address,applet,article,aside,audio,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{max-width:100%}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{box-sizing:inherit}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn,em,i{font-style:italic}h1{margin:.67em 0;font-size:2em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}mark{background-color:#fdffb6}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;color:inherit;font:inherit}button{overflow:visible;border:none}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input:focus{outline:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{padding:0;border:0}textarea{overflow:auto}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}html{overflow-y:scroll;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body,html{overflow-x:hidden}body{color:#303a3e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1.6rem;line-height:1.6em;font-weight:400;font-style:normal;letter-spacing:0;text-rendering:optimizeLegibility;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on}::-moz-selection{text-shadow:none;background:#cbeafb}::selection{text-shadow:none;background:#cbeafb}hr{position:relative;display:block;width:100%;margin:2.5em 0 3.5em;padding:0;height:1px;border:0;border-top:1px solid #e4eaed}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{margin:0;padding:0;border:0}textarea{resize:vertical}blockquote,dl,ol,p,ul{margin:0 0 1.5em}ol,ul{padding-left:1.3em;padding-right:1.5em}ol ol,ol ul,ul ol,ul ul{margin:.5em 0 1em}ul{list-style:disc}ol{list-style:decimal}ol,ul{max-width:100%}li{margin:.5em 0;padding-left:.3em;line-height:1.6em}dt{float:left;margin:0 20px 0 0;width:120px;color:var(--darkgrey);font-weight:500;text-align:right}dd{margin:0 0 5px;text-align:left}blockquote{margin:1.5em 0;padding:0 1.6em;border-left:.5em solid var(--whitegrey)}blockquote p{margin:.8em 0;font-size:1.2em;font-weight:300}blockquote small{display:inline-block;margin:.8em 0 .8em 1.5em;font-size:.9em;opacity:.8}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:400}a{color:#26a6ed;text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.15;font-weight:600;text-rendering:optimizeLegibility}h1{margin:0 0 .5em;font-size:5.5rem;font-weight:600}@media (max-width:500px){h1{font-size:2.2rem}}h2{margin:1.5em 0 .5em;font-size:2.2rem}@media (max-width:500px){h2{font-size:1.8rem}}h3{margin:1.5em 0 .5em;font-size:1.8rem;font-weight:500}@media (max-width:500px){h3{font-size:1.7rem}}h4{margin:1.5em 0 .5em;font-size:1.6rem;font-weight:500}h5,h6{margin:1.5em 0 .5em;font-size:1.4rem;font-weight:500}
|
||||||
/*# sourceMappingURL=global.css.map */
|
/*# sourceMappingURL=global.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
|||||||
--whitegrey: #e5eff5;
|
--whitegrey: #e5eff5;
|
||||||
--pink: #fa3a57;
|
--pink: #fa3a57;
|
||||||
--brown: #a3821a;
|
--brown: #a3821a;
|
||||||
--darkmode: color(var(--darkgrey) l(+2%));
|
--darkmode: color-mod(var(--darkgrey) l(+2%));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset
|
/* Reset
|
||||||
@ -281,7 +281,7 @@ html {
|
|||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
color: color(var(--midgrey) l(-30%));
|
color: color-mod(var(--midgrey) l(-30%));
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
@ -298,7 +298,7 @@ body {
|
|||||||
|
|
||||||
::selection {
|
::selection {
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
background: color(var(--blue) lightness(+30%));
|
background: color-mod(var(--blue) lightness(+30%));
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
@ -309,7 +309,7 @@ hr {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-top: 1px solid color(var(--lightgrey) l(+10%));
|
border-top: 1px solid color-mod(var(--lightgrey) l(+10%));
|
||||||
}
|
}
|
||||||
|
|
||||||
audio,
|
audio,
|
||||||
@ -416,7 +416,7 @@ blockquote cite a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: color(var(--blue) l(-5%));
|
color: color-mod(var(--blue) l(-5%));
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -12,6 +12,8 @@
|
|||||||
<div class="site-header-content author-header">
|
<div class="site-header-content author-header">
|
||||||
{{#if profile_image}}
|
{{#if profile_image}}
|
||||||
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
|
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
|
||||||
|
{{else}}
|
||||||
|
<span class="author-profile-image">{{> "icons/avatar"}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="author-header-content">
|
<div class="author-header-content">
|
||||||
<h1 class="site-title">{{name}}</h1>
|
<h1 class="site-title">{{name}}</h1>
|
||||||
@ -47,7 +49,7 @@
|
|||||||
<div class="inner posts">
|
<div class="inner posts">
|
||||||
|
|
||||||
<div class="post-feed">
|
<div class="post-feed">
|
||||||
{{#foreach posts}}
|
{{#foreach posts visibility="all"}}
|
||||||
|
|
||||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||||
{{> "post-card"}}
|
{{> "post-card"}}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"github": {
|
"github": {
|
||||||
"username": "<username>",
|
|
||||||
"token": "<gh-personal-access-token>"
|
"token": "<gh-personal-access-token>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
30
default.hbs
30
default.hbs
@ -33,7 +33,7 @@
|
|||||||
<a href="{{@site.url}}">Latest Posts</a>
|
<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.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}}
|
{{#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>
|
<a href="https://ghost.org/" target="_blank" rel="noopener">Ghost</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
@ -42,13 +42,18 @@
|
|||||||
|
|
||||||
{{!-- The big email subscribe modal content --}}
|
{{!-- The big email subscribe modal content --}}
|
||||||
{{#if @labs.members}}
|
{{#if @labs.members}}
|
||||||
<div class="subscribe-success-message">
|
<div class="subscribe-notification subscribe-success-message">
|
||||||
<a class="subscribe-close" href="javascript:;"></a>
|
<a class="subscribe-close-button" href="javascript:;"></a>
|
||||||
You've successfully subscribed to {{@site.title}}!
|
You've successfully subscribed to {{@site.title}}!
|
||||||
</div>
|
</div>
|
||||||
|
<div class="subscribe-notification subscribe-failure-message">
|
||||||
|
<a class="subscribe-close-button" href="javascript:;"></a>
|
||||||
|
Could not sign up! Invalid sign up link.
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="subscribe" class="subscribe-overlay">
|
<div id="subscribe" class="subscribe-overlay">
|
||||||
<a class="subscribe-close" href="#"></a>
|
<a class="subscribe-close-overlay" href="#"></a>
|
||||||
|
<a class="subscribe-close-button" href="#"></a>
|
||||||
<div class="subscribe-overlay-content">
|
<div class="subscribe-overlay-content">
|
||||||
{{#if @site.logo}}
|
{{#if @site.logo}}
|
||||||
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
|
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
|
||||||
@ -79,8 +84,8 @@
|
|||||||
|
|
||||||
{{!-- jQuery, required for fitvids --}}
|
{{!-- jQuery, required for fitvids --}}
|
||||||
<script
|
<script
|
||||||
src="https://code.jquery.com/jquery-3.4.1.min.js"
|
src="https://code.jquery.com/jquery-3.5.1.min.js"
|
||||||
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
|
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
|
||||||
crossorigin="anonymous">
|
crossorigin="anonymous">
|
||||||
</script>
|
</script>
|
||||||
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
|
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
|
||||||
@ -101,14 +106,19 @@
|
|||||||
|
|
||||||
// Give the parameter a variable name
|
// Give the parameter a variable name
|
||||||
var action = getParameterByName('action');
|
var action = getParameterByName('action');
|
||||||
|
var success = getParameterByName('success');
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
if (action == 'subscribe') {
|
if (action == 'subscribe' && (success === null || success === 'true')) {
|
||||||
$('body').addClass("subscribe-success");
|
$('body').addClass('subscribe-success');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.subscribe-success-message .subscribe-close').click(function () {
|
if (action == 'subscribe' && success === 'false') {
|
||||||
$('.subscribe-success-message').addClass('close');
|
$('body').addClass('subscribe-failure');
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.subscribe-notification .subscribe-close-button').click(function () {
|
||||||
|
$('.subscribe-notification').addClass('close');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset form on opening subscrion overlay
|
// Reset form on opening subscrion overlay
|
||||||
|
211
gulpfile.js
211
gulpfile.js
@ -1,5 +1,8 @@
|
|||||||
const {series, watch, src, dest, parallel} = require('gulp');
|
const {series, watch, src, dest, parallel} = require('gulp');
|
||||||
const pump = require('pump');
|
const pump = require('pump');
|
||||||
|
const path = require('path');
|
||||||
|
const releaseUtils = require('@tryghost/release-utils');
|
||||||
|
const inquirer = require('inquirer');
|
||||||
|
|
||||||
// gulp plugins and utils
|
// gulp plugins and utils
|
||||||
const livereload = require('gulp-livereload');
|
const livereload = require('gulp-livereload');
|
||||||
@ -12,11 +15,14 @@ const fs = require('fs');
|
|||||||
|
|
||||||
// postcss plugins
|
// postcss plugins
|
||||||
const autoprefixer = require('autoprefixer');
|
const autoprefixer = require('autoprefixer');
|
||||||
const colorFunction = require('postcss-color-function');
|
const colorFunction = require('postcss-color-mod-function');
|
||||||
const cssnano = require('cssnano');
|
const cssnano = require('cssnano');
|
||||||
const customProperties = require('postcss-custom-properties');
|
|
||||||
const easyimport = require('postcss-easy-import');
|
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) {
|
function serve(done) {
|
||||||
livereload.listen();
|
livereload.listen();
|
||||||
done();
|
done();
|
||||||
@ -39,17 +45,14 @@ function hbs(done) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function css(done) {
|
function css(done) {
|
||||||
const processors = [
|
|
||||||
easyimport,
|
|
||||||
customProperties({preserve: false}),
|
|
||||||
colorFunction(),
|
|
||||||
autoprefixer(),
|
|
||||||
cssnano()
|
|
||||||
];
|
|
||||||
|
|
||||||
pump([
|
pump([
|
||||||
src('assets/css/*.css', {sourcemaps: true}),
|
src('assets/css/*.css', {sourcemaps: true}),
|
||||||
postcss(processors),
|
postcss([
|
||||||
|
easyimport,
|
||||||
|
colorFunction(),
|
||||||
|
autoprefixer(),
|
||||||
|
cssnano()
|
||||||
|
]),
|
||||||
dest('assets/built/', {sourcemaps: '.'}),
|
dest('assets/built/', {sourcemaps: '.'}),
|
||||||
livereload()
|
livereload()
|
||||||
], handleError(done));
|
], handleError(done));
|
||||||
@ -70,18 +73,17 @@ function js(done) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function zipper(done) {
|
function zipper(done) {
|
||||||
const targetDir = 'dist/';
|
const filename = require('./package.json').name + '.zip';
|
||||||
const themeName = require('./package.json').name;
|
|
||||||
const filename = themeName + '.zip';
|
|
||||||
|
|
||||||
pump([
|
pump([
|
||||||
src([
|
src([
|
||||||
'**',
|
'**',
|
||||||
'!node_modules', '!node_modules/**',
|
'!node_modules', '!node_modules/**',
|
||||||
'!dist', '!dist/**'
|
'!dist', '!dist/**',
|
||||||
|
'!yarn-error.log'
|
||||||
]),
|
]),
|
||||||
zip(filename),
|
zip(filename),
|
||||||
dest(targetDir)
|
dest('dist/')
|
||||||
], handleError(done));
|
], handleError(done));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,128 +91,97 @@ const cssWatcher = () => watch('assets/css/**', css);
|
|||||||
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
|
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
|
||||||
const watcher = parallel(cssWatcher, hbsWatcher);
|
const watcher = parallel(cssWatcher, hbsWatcher);
|
||||||
const build = series(css, js);
|
const build = series(css, js);
|
||||||
const dev = series(build, serve, watcher);
|
|
||||||
|
|
||||||
exports.build = build;
|
exports.build = build;
|
||||||
exports.zip = series(build, zipper);
|
exports.zip = series(build, zipper);
|
||||||
exports.default = dev;
|
exports.default = series(build, serve, watcher);
|
||||||
|
|
||||||
// release imports
|
exports.release = () => {
|
||||||
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 = () => {
|
|
||||||
// @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/
|
// @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/
|
||||||
// require(./package.json) can run into caching issues, this re-reads from file everytime on release
|
// require(./package.json) can run into caching issues, this re-reads from file everytime on release
|
||||||
var packageJSON = JSON.parse(fs.readFileSync('./package.json'));
|
var packageJSON = JSON.parse(fs.readFileSync('./package.json'));
|
||||||
const newVersion = packageJSON.version;
|
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 === '') {
|
if (!newVersion || newVersion === '') {
|
||||||
console.log('Invalid version.');
|
console.log(`Invalid version: ${newVersion}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`\nDraft release for ${newVersion}.`);
|
console.log(`\nCreating release for ${newVersion}...`);
|
||||||
|
|
||||||
if (!config || !config.github || !config.github.username || !config.github.token) {
|
let config;
|
||||||
|
try {
|
||||||
|
config = require('./config');
|
||||||
|
} catch (err) {
|
||||||
|
config = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!config || !config.github || !config.github.token) {
|
||||||
console.log('Please copy config.example.json and configure Github token.');
|
console.log('Please copy config.example.json and configure Github token.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
return previousRelease()
|
let compatibleWithGhost;
|
||||||
.then((previousVersion) => {
|
|
||||||
changelog({previousVersion});
|
|
||||||
|
|
||||||
return releaseUtils
|
return inquirer.prompt([{
|
||||||
.releases
|
type: 'input',
|
||||||
.create({
|
name: 'compatibleWithGhost',
|
||||||
draft: true,
|
message: 'Which version of Ghost is it compatible with?',
|
||||||
preRelease: false,
|
default: '3.0.0'
|
||||||
tagName: newVersion,
|
}])
|
||||||
releaseName: newVersion,
|
.then(result => {
|
||||||
userAgent: USER_AGENT,
|
compatibleWithGhost = result.compatibleWithGhost;
|
||||||
uri: `https://api.github.com/repos/${REPO}/releases`,
|
return Promise.resolve();
|
||||||
github: {
|
})
|
||||||
username: config.github.username,
|
.then(() => releaseUtils.releases.get({
|
||||||
token: config.github.token
|
userAgent: 'Casper',
|
||||||
},
|
uri: `https://api.github.com/repos/${REPO_READONLY}/releases`
|
||||||
content: [`**Ships with Ghost ${shipsWithGhost} Compatible with Ghost >= ${compatibleWithGhost}**\n\n`],
|
}))
|
||||||
changelogPath: CHANGELOG_PATH
|
.then((response) => {
|
||||||
})
|
if (!response || !response.length) {
|
||||||
.then((response) => {
|
console.log('No releases found. Skipping...');
|
||||||
console.log(`\nRelease draft generated: ${response.releaseUrl}\n`);
|
return;
|
||||||
});
|
}
|
||||||
|
|
||||||
|
let previousVersion = response[0].tag_name || response[0].name;
|
||||||
|
console.log(`Previous version: ${previousVersion}`);
|
||||||
|
return Promise.resolve(previousVersion);
|
||||||
|
})
|
||||||
|
.then((previousVersion) => {
|
||||||
|
const changelog = new releaseUtils.Changelog({
|
||||||
|
changelogPath: CHANGELOG_PATH,
|
||||||
|
folder: path.join(process.cwd(), '.')
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
exports.release = release;
|
changelog
|
||||||
|
.write({
|
||||||
|
githubRepoPath: `https://github.com/${REPO}`,
|
||||||
|
lastVersion: previousVersion
|
||||||
|
})
|
||||||
|
.sort()
|
||||||
|
.clean();
|
||||||
|
|
||||||
|
return Promise.resolve();
|
||||||
|
})
|
||||||
|
.then(() => releaseUtils.releases.create({
|
||||||
|
draft: true,
|
||||||
|
preRelease: false,
|
||||||
|
tagName: newVersion,
|
||||||
|
releaseName: newVersion,
|
||||||
|
userAgent: 'Casper',
|
||||||
|
uri: `https://api.github.com/repos/${REPO}/releases`,
|
||||||
|
github: {
|
||||||
|
token: config.github.token
|
||||||
|
},
|
||||||
|
content: [`**Compatible with Ghost ≥ ${compatibleWithGhost}**\n\n`],
|
||||||
|
changelogPath: CHANGELOG_PATH
|
||||||
|
}))
|
||||||
|
.then((response) => {
|
||||||
|
console.log(`\nRelease draft generated: ${response.releaseUrl}\n`);
|
||||||
|
return Promise.resolve();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -25,7 +25,7 @@ into the {body} of the default.hbs template --}}
|
|||||||
<div class="inner posts">
|
<div class="inner posts">
|
||||||
|
|
||||||
<div class="post-feed">
|
<div class="post-feed">
|
||||||
{{#foreach posts}}
|
{{#foreach posts visibility="all"}}
|
||||||
|
|
||||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||||
{{> "post-card"}}
|
{{> "post-card"}}
|
||||||
@ -47,7 +47,7 @@ into the {body} of the default.hbs template --}}
|
|||||||
// Dropping the scroll event and using only a raf loop results in smoother
|
// Dropping the scroll event and using only a raf loop results in smoother
|
||||||
// scrolling but continuous processing even when not scrolling
|
// scrolling but continuous processing even when not scrolling
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
var nav = document.querySelector('.site-nav-main .site-nav');
|
var nav = document.querySelector('.site-nav-main .site-nav');
|
||||||
var feed = document.querySelector('.post-feed');
|
var feed = document.querySelector('.post-feed');
|
||||||
|
|
||||||
|
26
package.json
26
package.json
@ -2,7 +2,7 @@
|
|||||||
"name": "casper",
|
"name": "casper",
|
||||||
"description": "A clean, minimal default theme for the Ghost publishing platform",
|
"description": "A clean, minimal default theme for the Ghost publishing platform",
|
||||||
"demo": "https://demo.ghost.io",
|
"demo": "https://demo.ghost.io",
|
||||||
"version": "3.0.1",
|
"version": "3.1.3",
|
||||||
"engines": {
|
"engines": {
|
||||||
"ghost": ">=3.0.0",
|
"ghost": ">=3.0.0",
|
||||||
"ghost-api": "v3"
|
"ghost-api": "v3"
|
||||||
@ -15,7 +15,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "gulp",
|
"dev": "gulp",
|
||||||
"zip": "gulp zip",
|
"zip": "gulp zip",
|
||||||
"test": "gscan --v3 .",
|
"test": "gscan .",
|
||||||
|
"test:ci": "gscan --fatal --verbose .",
|
||||||
"pretest": "gulp build",
|
"pretest": "gulp build",
|
||||||
"preship": "yarn test",
|
"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",
|
"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 +25,7 @@
|
|||||||
"author": {
|
"author": {
|
||||||
"name": "Ghost Foundation",
|
"name": "Ghost Foundation",
|
||||||
"email": "hello@ghost.org",
|
"email": "hello@ghost.org",
|
||||||
"url": "https://ghost.org"
|
"url": "https://ghost.org/"
|
||||||
},
|
},
|
||||||
"gpm": {
|
"gpm": {
|
||||||
"type": "theme",
|
"type": "theme",
|
||||||
@ -45,19 +46,20 @@
|
|||||||
"bugs": "https://github.com/TryGhost/Casper/issues",
|
"bugs": "https://github.com/TryGhost/Casper/issues",
|
||||||
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tryghost/release-utils": "0.3.2",
|
"@tryghost/release-utils": "0.6.12",
|
||||||
"autoprefixer": "9.6.5",
|
"autoprefixer": "10.2.5",
|
||||||
"beeper": "2.0.0",
|
"beeper": "2.1.0",
|
||||||
"cssnano": "4.1.10",
|
"cssnano": "4.1.10",
|
||||||
"gscan": "3.0.0",
|
"gscan": "3.6.1",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"gulp-concat": "^2.6.1",
|
"gulp-concat": "2.6.1",
|
||||||
"gulp-livereload": "4.0.2",
|
"gulp-livereload": "4.0.2",
|
||||||
"gulp-postcss": "8.0.0",
|
"gulp-postcss": "9.0.0",
|
||||||
"gulp-uglify": "3.0.2",
|
"gulp-uglify": "3.0.2",
|
||||||
"gulp-zip": "5.0.1",
|
"gulp-zip": "5.1.0",
|
||||||
"postcss-color-function": "4.1.0",
|
"inquirer": "8.0.0",
|
||||||
"postcss-custom-properties": "9.0.2",
|
"postcss": "8.2.8",
|
||||||
|
"postcss-color-mod-function": "3.0.3",
|
||||||
"postcss-easy-import": "3.0.0",
|
"postcss-easy-import": "3.0.0",
|
||||||
"pump": "3.0.0"
|
"pump": "3.0.0"
|
||||||
},
|
},
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
{{img_url feature_image size="l"}} 1000w,
|
{{img_url feature_image size="l"}} 1000w,
|
||||||
{{img_url feature_image size="xl"}} 2000w"
|
{{img_url feature_image size="xl"}} 2000w"
|
||||||
sizes="(max-width: 1000px) 400px, 700px"
|
sizes="(max-width: 1000px) 400px, 700px"
|
||||||
|
loading="lazy"
|
||||||
src="{{img_url feature_image size="m"}}"
|
src="{{img_url feature_image size="m"}}"
|
||||||
alt="{{title}}"
|
alt="{{title}}"
|
||||||
/>
|
/>
|
||||||
|
@ -1,32 +1,44 @@
|
|||||||
<nav class="site-nav">
|
<nav class="site-nav">
|
||||||
<div class="site-nav-left">
|
<div class="site-nav-left-wrapper">
|
||||||
{{#if @site.logo}}
|
<div class="site-nav-left">
|
||||||
<a class="site-nav-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
|
{{#if @site.logo}}
|
||||||
{{else}}
|
<a class="site-nav-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
|
||||||
<a class="site-nav-logo" href="{{@site.url}}">{{@site.title}}</a>
|
{{else}}
|
||||||
{{/if}}
|
<a class="site-nav-logo" href="{{@site.url}}">{{@site.title}}</a>
|
||||||
<div class="site-nav-content">
|
|
||||||
{{#if @site.navigation}}
|
|
||||||
{{navigation}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#is "post"}}
|
<div class="site-nav-content">
|
||||||
<span class="nav-post-title {{#unless @site.logo}}dash{{/unless}}">{{post.title}}</span>
|
{{#if @site.navigation}}
|
||||||
{{/is}}
|
{{navigation}}
|
||||||
|
{{/if}}
|
||||||
|
{{#is "post"}}
|
||||||
|
<span class="nav-post-title {{#unless @site.logo}}dash{{/unless}}">{{post.title}}</span>
|
||||||
|
{{/is}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="site-nav-right">
|
<div class="site-nav-right">
|
||||||
<div class="social-links">
|
{{#if @site.secondary_navigation}}
|
||||||
{{#if @site.facebook}}
|
{{navigation type="secondary"}}
|
||||||
<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}}
|
{{else}}
|
||||||
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
<div class="social-links">
|
||||||
|
{{#if @site.facebook}}
|
||||||
|
<a class="social-link social-link-fb" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
|
||||||
|
{{/if}}
|
||||||
|
{{#if @site.twitter}}
|
||||||
|
<a class="social-link social-link-tw" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{#unless @labs.members}}
|
||||||
|
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
||||||
|
{{/unless}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if @labs.members}}
|
||||||
|
{{#unless @member}}
|
||||||
|
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
||||||
|
{{else}}
|
||||||
|
<a class="subscribe-button" href="#/portal/account">Account</a>
|
||||||
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"@tryghost:theme"
|
"@tryghost:theme"
|
||||||
],
|
]
|
||||||
"travis": { "enabled": true },
|
|
||||||
"node": {
|
|
||||||
"supportPolicy": ["lts_latest"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
2
tag.hbs
2
tag.hbs
@ -23,7 +23,7 @@
|
|||||||
<main id="site-main" class="site-main outer">
|
<main id="site-main" class="site-main outer">
|
||||||
<div class="inner posts">
|
<div class="inner posts">
|
||||||
<div class="post-feed">
|
<div class="post-feed">
|
||||||
{{#foreach posts}}
|
{{#foreach posts visibility="all"}}
|
||||||
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
||||||
{{> "post-card"}}
|
{{> "post-card"}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
Reference in New Issue
Block a user