mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2025-07-12 16:56:06 +00:00
Compare commits
73 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
2
.github/workflows/deploy-theme.yml
vendored
2
.github/workflows/deploy-theme.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: TryGhost/action-deploy-theme@v1.2.0
|
||||
- uses: TryGhost/action-deploy-theme@v1.2.1
|
||||
with:
|
||||
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
||||
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@v1
|
||||
- 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-2020 Ghost Foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
@ -67,4 +67,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-2020 Ghost Foundation - Released under the [MIT license](LICENSE).
|
||||
|
@ -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);var t=o(this).find(e.join(","));(t=(t=t.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"),i=e.attributes.width.value/e.attributes.height.value;t.style.flex=i+" 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,function(){n||requestAnimationFrame(o);n=!0}()},{passive:!0}),o()}}(window,document);
|
||||
//# sourceMappingURL=casper.js.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
@ -205,6 +205,7 @@ body {
|
||||
.site-home-header .site-description {
|
||||
font-size: 2.2rem;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
@ -249,7 +250,7 @@ body {
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.site-home-header .site-title {
|
||||
font-size: 3.2rem;
|
||||
font-size: 4.2rem;
|
||||
}
|
||||
|
||||
.site-home-header .site-description {
|
||||
@ -257,8 +258,19 @@ body {
|
||||
}
|
||||
|
||||
.site-archive-header .site-header-content {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
.site-archive-header .site-title {
|
||||
font-size: 4.2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.site-archive-header .no-image .site-header-content {
|
||||
padding: 12vw 0 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -280,11 +292,33 @@ body {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
overflow-y: hidden;
|
||||
overflow: hidden;
|
||||
height: 64px;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.site-nav-left-wrapper {
|
||||
position: relative;
|
||||
flex: 1 0 auto;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.site-header-background:not(.responsive-header-img) .site-nav-left-wrapper:after,
|
||||
.site-nav-main .site-nav-left-wrapper:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
width: 40px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.site-header-background:not(.responsive-header-img) .site-nav-left-wrapper:after,
|
||||
.site-nav-main .site-nav-left-wrapper:after {
|
||||
right: 0;
|
||||
background: linear-gradient(to right, color(var(--darkgrey) l(-5%) a(0)) 0%,color(var(--darkgrey) l(-5%)) 100%);
|
||||
}
|
||||
|
||||
.site-nav-left {
|
||||
flex: 1 0 auto;
|
||||
display: flex;
|
||||
@ -302,26 +336,8 @@ body {
|
||||
-ms-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.site-header-background:not(.responsive-header-img) .site-nav:after,
|
||||
.site-nav-main .site-nav:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
width: 40px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.site-header-background:not(.responsive-header-img) .site-nav:after,
|
||||
.site-nav-main .site-nav:after {
|
||||
right: 0;
|
||||
background: linear-gradient(to right, color(var(--darkgrey) l(-5%) a(0)) 0%,color(var(--darkgrey) l(-5%)) 100%);
|
||||
}
|
||||
|
||||
.nav li:last-of-type {
|
||||
.site-nav-left .nav li:last-of-type {
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Site Nav Hack Explanation (above):
|
||||
@ -448,24 +464,37 @@ The knock-on effect of this is ugly browser-scroll bars at the bottom, so 80px o
|
||||
}
|
||||
|
||||
.site-nav-right {
|
||||
flex-shrink: 0;
|
||||
flex: 0 1 auto;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.site-nav-right .nav {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.site-nav-right .nav a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.site-nav-right .nav a:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.site-nav-right .nav li:last-of-type a {
|
||||
margin-right: -12px;
|
||||
}
|
||||
|
||||
.social-links {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.social-links a:last-of-type {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
|
||||
.social-link {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
@ -500,10 +529,10 @@ The knock-on effect of this is ugly browser-scroll bars at the bottom, so 80px o
|
||||
|
||||
.subscribe-button {
|
||||
display: block;
|
||||
margin: 0 0 0 10px;
|
||||
padding: 4px 10px;
|
||||
border: #fff 1px solid;
|
||||
color: #fff;
|
||||
font-size: 1.2rem;
|
||||
line-height: 1em;
|
||||
border-radius: 10px;
|
||||
opacity: 0.8;
|
||||
@ -514,7 +543,12 @@ The knock-on effect of this is ugly browser-scroll bars at the bottom, so 80px o
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.site-nav-right .nav + .subscribe-button {
|
||||
margin-left: 24px;
|
||||
}
|
||||
|
||||
.rss-button {
|
||||
padding: 10px 8px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@ -1135,7 +1169,7 @@ Usage (In Ghost editor):
|
||||
.post-full-content blockquote {
|
||||
margin: 0 0 1.5em;
|
||||
padding: 0 1.5em;
|
||||
border-left: #3eb0ef 3px solid;
|
||||
border-left: color(var(--blue)) 3px solid;
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.post-full-content blockquote {
|
||||
@ -1386,7 +1420,8 @@ Usage (In Ghost editor):
|
||||
|
||||
.post-full-title {
|
||||
margin-top: 0.2em;
|
||||
font-size: 3.3rem;
|
||||
font-size: 4.2rem;
|
||||
line-height: 1.05em;
|
||||
}
|
||||
|
||||
.post-full-image {
|
||||
@ -1630,8 +1665,12 @@ Usage (In Ghost editor):
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.author-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.post-full-byline {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.post-full-byline-meta {
|
||||
@ -2035,6 +2074,7 @@ Usage (In Ghost editor):
|
||||
}
|
||||
|
||||
.post-full-content .kg-image {
|
||||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@ -2067,12 +2107,13 @@ Usage (In Ghost editor):
|
||||
}
|
||||
|
||||
.post-full-content figcaption {
|
||||
margin: 1.0em 0 0;
|
||||
margin: 1.0em auto 0;
|
||||
color: color(var(--midgrey) l(-10%));
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||
font-size: 75%;
|
||||
line-height: 1.5em;
|
||||
text-align: center;;
|
||||
text-align: center;
|
||||
max-width: 1040px;
|
||||
}
|
||||
|
||||
.kg-width-full figcaption {
|
||||
@ -2143,7 +2184,6 @@ Usage (In Ghost editor):
|
||||
|
||||
.kg-bookmark-card {
|
||||
width: 100%;
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
.kg-card + .kg-bookmark-card {
|
||||
@ -2316,6 +2356,10 @@ Usage (In Ghost editor):
|
||||
padding: 10vw 0 10px;
|
||||
}
|
||||
|
||||
.site-archive-header .author-header {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.site-archive-header .no-image .author-header {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
@ -2330,7 +2374,7 @@ Usage (In Ghost editor):
|
||||
.site-header-content .author-profile-image {
|
||||
z-index: 10;
|
||||
flex-shrink: 0;
|
||||
margin: 5px 0 0;
|
||||
margin: -4px 0 0;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
box-shadow: rgba(255,255,255,0.1) 0 0 0 6px;
|
||||
@ -2339,10 +2383,10 @@ Usage (In Ghost editor):
|
||||
.author-header-content .author-bio {
|
||||
z-index: 10;
|
||||
flex-shrink: 0;
|
||||
margin: 6px 0 -6px;
|
||||
margin: 6px 0 0;
|
||||
max-width: 46em;
|
||||
font-size: 2.0rem;
|
||||
line-height: 1.4em;
|
||||
line-height: 1.3em;
|
||||
font-weight: 400;
|
||||
opacity: 0.8;
|
||||
}
|
||||
@ -2357,6 +2401,7 @@ Usage (In Ghost editor):
|
||||
font-weight: 400;
|
||||
letter-spacing: 0.2px;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.author-header-content .social-link:first-of-type {
|
||||
@ -2386,14 +2431,10 @@ Usage (In Ghost editor):
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.author-social-link {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.author-social-link {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 10px 0;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.author-location + .author-stats:before,
|
||||
@ -2412,6 +2453,14 @@ Usage (In Ghost editor):
|
||||
color: var(--midgrey);
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.author-location,
|
||||
.author-stats,
|
||||
.author-stats + .author-social-link:first-of-type:before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.author-header {
|
||||
padding: 10px 0 0;
|
||||
@ -2422,23 +2471,31 @@ Usage (In Ghost editor):
|
||||
}
|
||||
|
||||
.author-header-content {
|
||||
margin-left: 20px;
|
||||
align-items: center;
|
||||
margin: 16px 0 0 0;
|
||||
}
|
||||
|
||||
.site-header-content .author-profile-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.author-header-content .author-bio {
|
||||
font-size: 1.8rem;
|
||||
line-height: 1.3em;
|
||||
letter-spacing: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.author-location,
|
||||
.author-stats {
|
||||
display: none;
|
||||
.author-header-content .author-meta {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.author-location + .author-stats:before,
|
||||
.author-stats + .author-social-link:before,
|
||||
.author-social-link + .author-social-link:before {
|
||||
display: inline;
|
||||
margin: 0 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2552,7 +2609,7 @@ Usage (In Ghost editor):
|
||||
transform: translateY(-175%);
|
||||
}
|
||||
|
||||
.subscribe-close {
|
||||
.subscribe-close-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@ -2561,33 +2618,44 @@ Usage (In Ghost editor):
|
||||
display: block;
|
||||
}
|
||||
|
||||
.subscribe-close:before {
|
||||
.subscribe-close-button {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
right: 20px;
|
||||
z-index: 2000;
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.subscribe-close-button:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
right: 25px;
|
||||
top: 20px;
|
||||
right: 4px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
width: 32px;
|
||||
height: 1px;
|
||||
background: #fff;
|
||||
opacity: 0.8;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.subscribe-close:after {
|
||||
.subscribe-close-button:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 32px;
|
||||
right: 25px;
|
||||
top: 20px;
|
||||
right: 4px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
width: 32px;
|
||||
height: 1px;
|
||||
background: #fff;
|
||||
opacity: 0.8;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.subscribe-close:hover {
|
||||
.subscribe-close-overlay:hover,
|
||||
.subscribe-close-button:hover {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@ -2597,7 +2665,7 @@ Usage (In Ghost editor):
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 9000;
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@ -2605,24 +2673,16 @@ Usage (In Ghost editor):
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease-in;
|
||||
pointer-events: none;
|
||||
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
.subscribe-overlay .subscribe-close:before,
|
||||
.subscribe-overlay .subscribe-close:after {
|
||||
top: 36px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.subscribe-overlay:target {
|
||||
z-index: 2001;
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.subscribe-overlay-content {
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
margin: 0 0 5vw 0;
|
||||
padding: 4vw;
|
||||
color: #fff;
|
||||
@ -2725,6 +2785,12 @@ Usage (In Ghost editor):
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.subscribe-overlay button {
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 11. Site Footer
|
||||
/* ---------------------------------------------------------- */
|
||||
@ -2846,7 +2912,8 @@ Usage (In Ghost editor):
|
||||
}
|
||||
|
||||
.site-main,
|
||||
.post-template .site-main {
|
||||
.post-template .site-main,
|
||||
.page-template .site-main {
|
||||
background: var(--darkmode);
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
<div class="site-header-content author-header">
|
||||
{{#if profile_image}}
|
||||
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
|
||||
{{else}}
|
||||
<span class="author-profile-image">{{> "icons/avatar"}}</span>
|
||||
{{/if}}
|
||||
<div class="author-header-content">
|
||||
<h1 class="site-title">{{name}}</h1>
|
||||
|
@ -1,6 +1,5 @@
|
||||
{
|
||||
"github": {
|
||||
"username": "<username>",
|
||||
"token": "<gh-personal-access-token>"
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,8 @@
|
||||
</div>
|
||||
|
||||
<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">
|
||||
{{#if @site.logo}}
|
||||
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
|
||||
|
173
gulpfile.js
173
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');
|
||||
@ -17,6 +20,10 @@ 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 +46,15 @@ function hbs(done) {
|
||||
}
|
||||
|
||||
function css(done) {
|
||||
const processors = [
|
||||
pump([
|
||||
src('assets/css/*.css', {sourcemaps: true}),
|
||||
postcss([
|
||||
easyimport,
|
||||
customProperties({preserve: false}),
|
||||
colorFunction(),
|
||||
autoprefixer(),
|
||||
cssnano()
|
||||
];
|
||||
|
||||
pump([
|
||||
src('assets/css/*.css', {sourcemaps: true}),
|
||||
postcss(processors),
|
||||
]),
|
||||
dest('assets/built/', {sourcemaps: '.'}),
|
||||
livereload()
|
||||
], handleError(done));
|
||||
@ -70,18 +75,17 @@ 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'
|
||||
]),
|
||||
zip(filename),
|
||||
dest(targetDir)
|
||||
dest('dist/')
|
||||
], handleError(done));
|
||||
}
|
||||
|
||||
@ -89,28 +93,63 @@ const cssWatcher = () => watch('assets/css/**', css);
|
||||
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
|
||||
const watcher = parallel(cssWatcher, 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');
|
||||
exports.release = () => {
|
||||
// @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'));
|
||||
const newVersion = packageJSON.version;
|
||||
|
||||
let config;
|
||||
try {
|
||||
if (!newVersion || newVersion === '') {
|
||||
console.log(`Invalid version: ${newVersion}`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`\nCreating release for ${newVersion}...`);
|
||||
|
||||
let config;
|
||||
try {
|
||||
config = require('./config');
|
||||
} catch (err) {
|
||||
} catch (err) {
|
||||
config = null;
|
||||
}
|
||||
}
|
||||
|
||||
const REPO = 'TryGhost/Casper';
|
||||
const USER_AGENT = 'Casper';
|
||||
const CHANGELOG_PATH = path.join(process.cwd(), '.', 'changelog.md');
|
||||
if (!config || !config.github || !config.github.token) {
|
||||
console.log('Please copy config.example.json and configure Github token.');
|
||||
return;
|
||||
}
|
||||
|
||||
const changelog = ({previousVersion}) => {
|
||||
let compatibleWithGhost;
|
||||
|
||||
return inquirer.prompt([{
|
||||
type: 'input',
|
||||
name: 'compatibleWithGhost',
|
||||
message: 'Which version of Ghost is it compatible with?',
|
||||
default: '3.0.0'
|
||||
}])
|
||||
.then(result => {
|
||||
compatibleWithGhost = result.compatibleWithGhost;
|
||||
return Promise.resolve();
|
||||
})
|
||||
.then(() => releaseUtils.releases.get({
|
||||
userAgent: 'Casper',
|
||||
uri: `https://api.github.com/repos/${REPO_READONLY}/releases`
|
||||
}))
|
||||
.then((response) => {
|
||||
if (!response || !response.length) {
|
||||
console.log('No releases found. Skipping...');
|
||||
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(), '.')
|
||||
@ -123,94 +162,28 @@ const changelog = ({previousVersion}) => {
|
||||
})
|
||||
.sort()
|
||||
.clean();
|
||||
};
|
||||
|
||||
const previousRelease = () => {
|
||||
return releaseUtils
|
||||
.releases
|
||||
.get({
|
||||
userAgent: USER_AGENT,
|
||||
uri: `https://api.github.com/repos/${REPO}/releases`
|
||||
return Promise.resolve();
|
||||
})
|
||||
.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/
|
||||
// require(./package.json) can run into caching issues, this re-reads from file everytime on release
|
||||
var 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.');
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`\nDraft release for ${newVersion}.`);
|
||||
|
||||
if (!config || !config.github || !config.github.username || !config.github.token) {
|
||||
console.log('Please copy config.example.json and configure Github token.');
|
||||
return;
|
||||
}
|
||||
|
||||
return previousRelease()
|
||||
.then((previousVersion) => {
|
||||
changelog({previousVersion});
|
||||
|
||||
return releaseUtils
|
||||
.releases
|
||||
.create({
|
||||
.then(() => releaseUtils.releases.create({
|
||||
draft: true,
|
||||
preRelease: false,
|
||||
tagName: newVersion,
|
||||
releaseName: newVersion,
|
||||
userAgent: USER_AGENT,
|
||||
userAgent: 'Casper',
|
||||
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`],
|
||||
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);
|
||||
});
|
||||
};
|
||||
|
||||
exports.release = release;
|
||||
|
18
package.json
18
package.json
@ -2,7 +2,7 @@
|
||||
"name": "casper",
|
||||
"description": "A clean, minimal default theme for the Ghost publishing platform",
|
||||
"demo": "https://demo.ghost.io",
|
||||
"version": "3.0.2",
|
||||
"version": "3.0.13",
|
||||
"engines": {
|
||||
"ghost": ">=3.0.0",
|
||||
"ghost-api": "v3"
|
||||
@ -15,7 +15,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",
|
||||
@ -45,19 +46,20 @@
|
||||
"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",
|
||||
"@tryghost/release-utils": "0.6.3",
|
||||
"autoprefixer": "9.8.5",
|
||||
"beeper": "2.0.0",
|
||||
"cssnano": "4.1.10",
|
||||
"gscan": "3.0.0",
|
||||
"gscan": "3.5.4",
|
||||
"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-uglify": "3.0.2",
|
||||
"gulp-zip": "5.0.1",
|
||||
"gulp-zip": "5.0.2",
|
||||
"inquirer": "7.3.2",
|
||||
"postcss-color-function": "4.1.0",
|
||||
"postcss-custom-properties": "9.0.2",
|
||||
"postcss-custom-properties": "9.1.1",
|
||||
"postcss-easy-import": "3.0.0",
|
||||
"pump": "3.0.0"
|
||||
},
|
||||
|
@ -10,6 +10,7 @@
|
||||
{{img_url feature_image size="l"}} 1000w,
|
||||
{{img_url feature_image size="xl"}} 2000w"
|
||||
sizes="(max-width: 1000px) 400px, 700px"
|
||||
loading="lazy"
|
||||
src="{{img_url feature_image size="m"}}"
|
||||
alt="{{title}}"
|
||||
/>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<nav class="site-nav">
|
||||
<div class="site-nav-left-wrapper">
|
||||
<div class="site-nav-left">
|
||||
{{#if @site.logo}}
|
||||
<a class="site-nav-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
|
||||
@ -14,7 +15,11 @@
|
||||
{{/is}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="site-nav-right">
|
||||
{{#if @site.secondary_navigation}}
|
||||
{{navigation type="secondary"}}
|
||||
{{else}}
|
||||
<div class="social-links">
|
||||
{{#if @site.facebook}}
|
||||
<a class="social-link social-link-fb" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
|
||||
@ -23,10 +28,13 @@
|
||||
<a class="social-link social-link-tw" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#unless @labs.members}}
|
||||
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
|
||||
{{#if @labs.members}}
|
||||
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
||||
{{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,9 +1,5 @@
|
||||
{
|
||||
"extends": [
|
||||
"@tryghost:theme"
|
||||
],
|
||||
"travis": { "enabled": true },
|
||||
"node": {
|
||||
"supportPolicy": ["lts_latest"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user