mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2025-07-12 16:56:06 +00:00
Compare commits
35 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
6
.github/workflows/deploy-theme.yml
vendored
6
.github/workflows/deploy-theme.yml
vendored
@ -1,14 +1,14 @@
|
||||
name: Deploy Theme
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: TryGhost/action-deploy-theme@v1.2.1
|
||||
- uses: TryGhost/action-deploy-theme@v1.4.1
|
||||
with:
|
||||
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
|
||||
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
|
||||
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -10,6 +10,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- run: yarn
|
||||
- run: yarn test:ci
|
||||
|
@ -1,2 +1,2 @@
|
||||
!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);
|
||||
!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,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
@ -2263,9 +2263,9 @@ Usage (In Ghost editor):
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
margin-top: 14px;
|
||||
color: color-mod(var(--midgrey) l(-10%));
|
||||
color: var(--darkgrey);
|
||||
font-size: 1.5rem;
|
||||
font-weight: 400;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.post-full-content .kg-bookmark-icon {
|
||||
@ -2289,6 +2289,8 @@ Usage (In Ghost editor):
|
||||
line-height: 1.5em;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: color-mod(var(--midgrey) l(-10%));
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
@ -2584,7 +2586,7 @@ Usage (In Ghost editor):
|
||||
/* 10. Subscribe Message and Overlay
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
.subscribe-success-message {
|
||||
.subscribe-notification {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@ -2598,17 +2600,41 @@ Usage (In Ghost editor):
|
||||
transform: translateY(-175%);
|
||||
}
|
||||
|
||||
.subscribe-notification.subscribe-failure-message {
|
||||
background: var(--red);
|
||||
}
|
||||
|
||||
.subscribe-success .subscribe-success-message {
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.subscribe-success-message.close {
|
||||
.subscribe-failure .subscribe-failure-message {
|
||||
visibility: visible;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.subscribe-notification.close {
|
||||
visibility: hidden;
|
||||
transition: all 1.35s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
transform: translateY(-175%);
|
||||
}
|
||||
|
||||
.subscribe-notification .subscribe-close-button {
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.subscribe-notification .subscribe-close-button:before,
|
||||
.subscribe-notification .subscribe-close-button:after {
|
||||
top: 31px;
|
||||
right: 20px;
|
||||
width: 18px;
|
||||
height: 2px;
|
||||
}
|
||||
|
||||
.subscribe-close-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -2988,6 +3014,11 @@ Usage (In Ghost editor):
|
||||
border-top-color: color-mod(var(--darkmode) l(+8%));
|
||||
}
|
||||
|
||||
.post-full-content hr:after {
|
||||
background: color-mod(var(--darkmode) l(+8%));
|
||||
box-shadow: var(--darkmode) 0 0 0 5px;
|
||||
}
|
||||
|
||||
.post-full-content figcaption {
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
@ -3016,6 +3047,10 @@ Usage (In Ghost editor):
|
||||
box-shadow: 0 0 1px rgba(255,255,255,0.9);
|
||||
}
|
||||
|
||||
.post-full-content input {
|
||||
color: color-mod(var(--midgrey) l(-30%));
|
||||
}
|
||||
|
||||
.kg-bookmark-title {
|
||||
color: #fff;
|
||||
}
|
||||
|
21
default.hbs
21
default.hbs
@ -42,10 +42,14 @@
|
||||
|
||||
{{!-- The big email subscribe modal content --}}
|
||||
{{#if @labs.members}}
|
||||
<div class="subscribe-success-message">
|
||||
<a class="subscribe-close" href="javascript:;"></a>
|
||||
<div class="subscribe-notification subscribe-success-message">
|
||||
<a class="subscribe-close-button" href="javascript:;"></a>
|
||||
You've successfully subscribed to {{@site.title}}!
|
||||
</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">
|
||||
<a class="subscribe-close-overlay" href="#"></a>
|
||||
@ -102,14 +106,19 @@
|
||||
|
||||
// Give the parameter a variable name
|
||||
var action = getParameterByName('action');
|
||||
var success = getParameterByName('success');
|
||||
|
||||
$(document).ready(function () {
|
||||
if (action == 'subscribe') {
|
||||
$('body').addClass("subscribe-success");
|
||||
if (action == 'subscribe' && (success === null || success === 'true')) {
|
||||
$('body').addClass('subscribe-success');
|
||||
}
|
||||
|
||||
$('.subscribe-success-message .subscribe-close').click(function () {
|
||||
$('.subscribe-success-message').addClass('close');
|
||||
if (action == 'subscribe' && success === 'false') {
|
||||
$('body').addClass('subscribe-failure');
|
||||
}
|
||||
|
||||
$('.subscribe-notification .subscribe-close-button').click(function () {
|
||||
$('.subscribe-notification').addClass('close');
|
||||
});
|
||||
|
||||
// Reset form on opening subscrion overlay
|
||||
|
11
package.json
11
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.1.0",
|
||||
"version": "3.1.2",
|
||||
"engines": {
|
||||
"ghost": ">=3.0.0",
|
||||
"ghost-api": "v3"
|
||||
@ -46,18 +46,19 @@
|
||||
"bugs": "https://github.com/TryGhost/Casper/issues",
|
||||
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
|
||||
"devDependencies": {
|
||||
"@tryghost/release-utils": "0.6.3",
|
||||
"autoprefixer": "9.8.6",
|
||||
"@tryghost/release-utils": "0.6.8",
|
||||
"autoprefixer": "10.0.2",
|
||||
"beeper": "2.0.0",
|
||||
"cssnano": "4.1.10",
|
||||
"gscan": "3.5.5",
|
||||
"gscan": "3.6.0",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-livereload": "4.0.2",
|
||||
"gulp-postcss": "8.0.0",
|
||||
"gulp-postcss": "9.0.0",
|
||||
"gulp-uglify": "3.0.2",
|
||||
"gulp-zip": "5.0.2",
|
||||
"inquirer": "7.3.3",
|
||||
"postcss": "8.1.7",
|
||||
"postcss-color-mod-function": "3.0.3",
|
||||
"postcss-easy-import": "3.0.0",
|
||||
"pump": "3.0.0"
|
||||
|
Reference in New Issue
Block a user