mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2025-07-13 17:26:08 +00:00
Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
36971db512 | |||
bfcab7172f | |||
fce92d6cf1 | |||
d48178fde9 | |||
6f4fe840b3 | |||
8a9efb5ef1 | |||
04854967a8 | |||
fa18115aa6 | |||
ae192a9fff | |||
78993720fd | |||
676e17bd13 | |||
67e595741c | |||
7a88c88ea2 | |||
a0e42e0599 | |||
dc3bb316c7 | |||
7380ed0291 | |||
ecaf3d921f | |||
89ea6c5872 | |||
9d803067a4 | |||
0ea375643b | |||
f31957bd0d | |||
36841d4624 | |||
d41fcbbc8a | |||
5d318225f5 | |||
9b56779ca6 | |||
1bf2cdb52a | |||
f67caaba5c |
6
.travis.yml
Normal file
6
.travis.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
language: node_js
|
||||||
|
sudo: false
|
||||||
|
node_js:
|
||||||
|
- "8"
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ One really neat trick is that you can also create custom one-off templates just
|
|||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
Casper styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need Node and Gulp installed globally. After that, from the theme's root directory:
|
Casper styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/), [Yarn](https://yarnpkg.com/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ yarn install
|
$ yarn install
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -815,6 +815,7 @@ The first (most recent) post in the list is styled to be bigger than the others
|
|||||||
|
|
||||||
.post-full-content a {
|
.post-full-content a {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
word-break: break-word;
|
||||||
box-shadow: var(--blue) 0 -1px 0 inset;
|
box-shadow: var(--blue) 0 -1px 0 inset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -842,6 +843,7 @@ The first (most recent) post in the list is styled to be bigger than the others
|
|||||||
display: block;
|
display: block;
|
||||||
margin: 1.5em auto;
|
margin: 1.5em auto;
|
||||||
max-width: 1040px;
|
max-width: 1040px;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
@media (max-width: 1040px) {
|
@media (max-width: 1040px) {
|
||||||
.post-full-content img,
|
.post-full-content img,
|
||||||
@ -881,8 +883,9 @@ Usage (In Ghost editor):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Override third party iframe styles */
|
||||||
.post-full-content iframe {
|
.post-full-content iframe {
|
||||||
margin: 0 auto;
|
margin: 0 auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-full-content blockquote {
|
.post-full-content blockquote {
|
||||||
@ -912,6 +915,10 @@ Usage (In Ghost editor):
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-full-content p code {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
.post-full-content pre {
|
.post-full-content pre {
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
margin: 1.5em 0 3em;
|
margin: 1.5em 0 3em;
|
||||||
@ -932,7 +939,7 @@ Usage (In Ghost editor):
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-full-content pre code * {
|
.post-full-content pre code :not(span) {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1826,20 +1833,6 @@ Usage (In Ghost editor):
|
|||||||
max-width: 920px;
|
max-width: 920px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For Ghost 1.0 */
|
|
||||||
.kg-card-markdown {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
max-width: 920px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-template .kg-card-markdown > p:first-child {
|
|
||||||
font-size: 1.25em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
}
|
|
||||||
/* ^ .kg-card-markdown will be will disappear in Ghost 2.0 */
|
|
||||||
|
|
||||||
.post-template .post-content > p:first-child {
|
.post-template .post-content > p:first-child {
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
line-height: 1.5em;
|
line-height: 1.5em;
|
||||||
@ -1862,48 +1855,77 @@ Usage (In Ghost editor):
|
|||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-content figcaption {
|
.post-full-content figure {
|
||||||
|
margin: 1.5em 0 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-full-content figure img {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-full-content figcaption {
|
||||||
|
margin: 1.0em 0 0;
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
line-height: 1.6em;
|
line-height: 1.6em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kg-image-card {
|
.kg-width-full figcaption {
|
||||||
margin: 0 0 1.5em;
|
padding: 0 1.5em;
|
||||||
}
|
|
||||||
|
|
||||||
.kg-image-card figcaption {
|
|
||||||
margin: -1.0em 0 1.5em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.kg-embed-card {
|
.kg-embed-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 1.5em 0 3em;
|
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kg-embed-card figcaption {
|
|
||||||
margin: 0.5em 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.kg-embed-card .fluid-width-video-wrapper {
|
.kg-embed-card .fluid-width-video-wrapper {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.kg-image-full + figcaption {
|
|
||||||
padding: 0 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 1040px) {
|
@media (max-width: 1040px) {
|
||||||
.post-full-content .kg-width-full .kg-image {
|
.post-full-content .kg-width-full .kg-image {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.kg-gallery-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
max-width: 1040px;
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kg-gallery-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kg-gallery-image img {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kg-gallery-row:not(:first-of-type) {
|
||||||
|
margin: 0.75em 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kg-gallery-image:not(:first-of-type) {
|
||||||
|
margin: 0 0 0 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kg-gallery-card + .kg-image-card.kg-width-wide,
|
||||||
|
.kg-gallery-card + .kg-gallery-card,
|
||||||
|
.kg-image-card.kg-width-wide + .kg-gallery-card,
|
||||||
|
.kg-image-card.kg-width-wide + .kg-image-card.kg-width-wide {
|
||||||
|
margin: -2.25em 0 3em;
|
||||||
|
}
|
||||||
|
|
||||||
/* 8. Author Template
|
/* 8. Author Template
|
||||||
/* ---------------------------------------------------------- */
|
/* ---------------------------------------------------------- */
|
||||||
|
12
default.hbs
12
default.hbs
@ -55,6 +55,18 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||||
|
images.forEach(function (image) {
|
||||||
|
var container = image.closest('.kg-gallery-image');
|
||||||
|
var width = image.attributes.width.value;
|
||||||
|
var height = image.attributes.height.value;
|
||||||
|
var ratio = width / height;
|
||||||
|
container.style.flex = ratio + ' 1 0%';
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
{{!-- jQuery + Fitvids, which makes all video embeds responsive --}}
|
{{!-- jQuery + Fitvids, which makes all video embeds responsive --}}
|
||||||
<script
|
<script
|
||||||
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
src="https://code.jquery.com/jquery-3.2.1.min.js"
|
||||||
|
@ -6,6 +6,8 @@ var livereload = require('gulp-livereload');
|
|||||||
var postcss = require('gulp-postcss');
|
var postcss = require('gulp-postcss');
|
||||||
var sourcemaps = require('gulp-sourcemaps');
|
var sourcemaps = require('gulp-sourcemaps');
|
||||||
var zip = require('gulp-zip');
|
var zip = require('gulp-zip');
|
||||||
|
var uglify = require('gulp-uglify');
|
||||||
|
var filter = require('gulp-filter');
|
||||||
|
|
||||||
// postcss plugins
|
// postcss plugins
|
||||||
var autoprefixer = require('autoprefixer');
|
var autoprefixer = require('autoprefixer');
|
||||||
@ -55,11 +57,16 @@ gulp.task('zip', ['css'], function () {
|
|||||||
var themeName = require('./package.json').name;
|
var themeName = require('./package.json').name;
|
||||||
var filename = themeName + '.zip';
|
var filename = themeName + '.zip';
|
||||||
|
|
||||||
|
var jsFilter = filter(['**/*.js'], {restore: true});
|
||||||
|
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'**',
|
'**',
|
||||||
'!node_modules', '!node_modules/**',
|
'!node_modules', '!node_modules/**',
|
||||||
'!dist', '!dist/**'
|
'!dist', '!dist/**'
|
||||||
])
|
])
|
||||||
|
.pipe(jsFilter)
|
||||||
|
.pipe(uglify())
|
||||||
|
.pipe(jsFilter.restore)
|
||||||
.pipe(zip(filename))
|
.pipe(zip(filename))
|
||||||
.pipe(gulp.dest(targetDir));
|
.pipe(gulp.dest(targetDir));
|
||||||
});
|
});
|
||||||
|
15
package.json
15
package.json
@ -2,9 +2,9 @@
|
|||||||
"name": "casper",
|
"name": "casper",
|
||||||
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
|
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
|
||||||
"demo": "https://demo.ghost.io",
|
"demo": "https://demo.ghost.io",
|
||||||
"version": "2.4.0",
|
"version": "2.6.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"ghost": ">=1.2.0"
|
"ghost": ">=2.0.0"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"screenshots": {
|
"screenshots": {
|
||||||
@ -13,7 +13,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "gulp",
|
"dev": "gulp",
|
||||||
"zip": "gulp zip"
|
"zip": "gulp zip",
|
||||||
|
"test": "gscan ."
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Ghost Foundation",
|
"name": "Ghost Foundation",
|
||||||
@ -29,7 +30,8 @@
|
|||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ghost",
|
"ghost",
|
||||||
"theme"
|
"theme",
|
||||||
|
"ghost-theme"
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -40,6 +42,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "6.3.6",
|
"autoprefixer": "6.3.6",
|
||||||
"cssnano": "3.7.1",
|
"cssnano": "3.7.1",
|
||||||
|
"gscan": "^2.0.0",
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-livereload": "3.8.1",
|
"gulp-livereload": "3.8.1",
|
||||||
"gulp-postcss": "6.1.1",
|
"gulp-postcss": "6.1.1",
|
||||||
@ -49,7 +52,9 @@
|
|||||||
"gulp-zip": "4.0.0",
|
"gulp-zip": "4.0.0",
|
||||||
"postcss-color-function": "2.0.1",
|
"postcss-color-function": "2.0.1",
|
||||||
"postcss-custom-properties": "5.0.1",
|
"postcss-custom-properties": "5.0.1",
|
||||||
"postcss-easy-import": "1.0.1"
|
"postcss-easy-import": "1.0.1",
|
||||||
|
"gulp-filter": "5.1.0",
|
||||||
|
"gulp-uglify": "3.0.1"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"posts_per_page": 25
|
"posts_per_page": 25
|
||||||
|
2
page.hbs
2
page.hbs
@ -27,7 +27,9 @@ into the {body} of the default.hbs template --}}
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<section class="post-full-content">
|
<section class="post-full-content">
|
||||||
|
<div class="post-content">
|
||||||
{{content}}
|
{{content}}
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{!-- Everything inside the #author tags pulls data from the author --}}
|
{{!-- Everything inside the #author tags pulls data from the author --}}
|
||||||
{{#author}}
|
{{#primary_author}}
|
||||||
|
|
||||||
<section class="author-card">
|
<section class="author-card">
|
||||||
{{#if profile_image}}
|
{{#if profile_image}}
|
||||||
@ -20,4 +20,4 @@
|
|||||||
<a class="author-card-button" href="{{url}}">Read More</a>
|
<a class="author-card-button" href="{{url}}">Read More</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{/author}}
|
{{/primary_author}}
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
{{> "icons/facebook"}}
|
{{> "icons/facebook"}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<progress class="progress" value="0">
|
<progress id="reading-progress" class="progress" value="0">
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<span class="progress-bar"></span>
|
<span class="progress-bar"></span>
|
||||||
</div>
|
</div>
|
||||||
|
2
post.hbs
2
post.hbs
@ -143,7 +143,7 @@ $(document).ready(function () {
|
|||||||
$postContent.fitVids();
|
$postContent.fitVids();
|
||||||
// End fitVids
|
// End fitVids
|
||||||
|
|
||||||
var progressBar = document.querySelector('progress');
|
var progressBar = document.querySelector('#reading-progress');
|
||||||
var header = document.querySelector('.floating-header');
|
var header = document.querySelector('.floating-header');
|
||||||
var title = document.querySelector('.post-full-title');
|
var title = document.querySelector('.post-full-title');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user