mirror of
https://github.com/GenZmeY/casper-i18n.git
synced 2025-07-13 17:26:08 +00:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
de05d90fe9 | |||
978e54403c | |||
73bd9c630e | |||
9597a28320 | |||
461639886e | |||
7592ad182b | |||
97a522a037 | |||
25f12d760b | |||
4f78d99112 | |||
f5b7b45f2e | |||
d34ff1d32b | |||
73a1ab52da | |||
5ec77dfb31 | |||
269d2b5787 | |||
d1d0bca2d8 | |||
d92dda3523 |
17
.editorconfig
Normal file
17
.editorconfig
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.hbs]
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -13,9 +13,12 @@ results
|
|||||||
|
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
node_modules
|
node_modules
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
*.iml
|
*.iml
|
||||||
projectFilesBackup
|
projectFilesBackup
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
dist/
|
||||||
|
12
README.md
12
README.md
@ -34,12 +34,18 @@ One really neat trick is that you can also create custom one-off templates just
|
|||||||
|
|
||||||
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 and Gulp installed globally. After that, from the theme's root directory:
|
||||||
|
|
||||||
`$ npm install`
|
```bash
|
||||||
|
$ npm install
|
||||||
`$ gulp`
|
$ gulp
|
||||||
|
```
|
||||||
|
|
||||||
Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.
|
Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.
|
||||||
|
|
||||||
|
The `zip` Gulp task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ gulp zip
|
||||||
|
```
|
||||||
|
|
||||||
# PostCSS Features Used
|
# PostCSS Features Used
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -485,6 +485,7 @@ The first (most recent) post in the list is styled to be bigger than the others
|
|||||||
.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image-link {
|
.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image-link {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image {
|
.home-template .post-feed .post-card:nth-child(6n+1):not(.no-image) .post-card-image {
|
||||||
|
0
assets/screenshot-desktop.jpg
Executable file → Normal file
0
assets/screenshot-desktop.jpg
Executable file → Normal file
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
0
assets/screenshot-mobile.jpg
Executable file → Normal file
0
assets/screenshot-mobile.jpg
Executable file → Normal file
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
@ -22,15 +22,15 @@
|
|||||||
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} <span class="bull">•</span>
|
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} <span class="bull">•</span>
|
||||||
</div>
|
</div>
|
||||||
{{#if website}}
|
{{#if website}}
|
||||||
<a class="social-link social-link-wb" href="{{website}}" target="_blank">{{> "icons/website"}}</a>
|
<a class="social-link social-link-wb" href="{{website}}" target="_blank" rel="noopener">{{> "icons/website"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if twitter}}
|
{{#if twitter}}
|
||||||
<a class="social-link social-link-tw" href="{{twitter_url}}" target="_blank">{{> "icons/twitter"}}</a>
|
<a class="social-link social-link-tw" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if facebook}}
|
{{#if facebook}}
|
||||||
<a class="social-link social-link-fb" href="{{facebook_url}}" target="_blank">{{> "icons/facebook"}}</a>
|
<a class="social-link social-link-fb" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a class="social-link social-link-rss" href="http://cloud.feedly.com/#subscription/feed/{{url absolute="true"}}/rss/" target="_blank">{{> "icons/rss"}}</a>
|
<a class="social-link social-link-rss" href="http://cloud.feedly.com/#subscription/feed/{{url absolute="true"}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{{!-- Styles'n'Scripts --}}
|
{{!-- Styles'n'Scripts --}}
|
||||||
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
|
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
|
||||||
|
|
||||||
{{!-- This tag outputes SEO meta+structured data and other important settings --}}
|
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
|
||||||
{{ghost_head}}
|
{{ghost_head}}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@ -31,9 +31,9 @@
|
|||||||
<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> © {{date format="YYYY"}}</section>
|
<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> © {{date format="YYYY"}}</section>
|
||||||
<nav class="site-footer-nav">
|
<nav class="site-footer-nav">
|
||||||
<a href="{{@blog.url}}">Latest Posts</a>
|
<a href="{{@blog.url}}">Latest Posts</a>
|
||||||
{{#if @blog.facebook}}<a href="{{facebook_url @blog.facebook}}" target="_blank">Facebook</a>{{/if}}
|
{{#if @blog.facebook}}<a href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">Facebook</a>{{/if}}
|
||||||
{{#if @blog.twitter}}<a href="{{twitter_url @blog.twitter}}" target="_blank">Twitter</a>{{/if}}
|
{{#if @blog.twitter}}<a href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">Twitter</a>{{/if}}
|
||||||
<a href="https://ghost.org" target="_blank">Ghost</a>
|
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
18
gulpfile.js
18
gulpfile.js
@ -6,6 +6,7 @@ var livereload = require('gulp-livereload');
|
|||||||
var nodemon = require('gulp-nodemon');
|
var nodemon = require('gulp-nodemon');
|
||||||
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');
|
||||||
|
|
||||||
// postcss plugins
|
// postcss plugins
|
||||||
var autoprefixer = require('autoprefixer');
|
var autoprefixer = require('autoprefixer');
|
||||||
@ -36,7 +37,8 @@ gulp.task('css', function () {
|
|||||||
autoprefixer({browsers: ['last 2 versions']}),
|
autoprefixer({browsers: ['last 2 versions']}),
|
||||||
cssnano()
|
cssnano()
|
||||||
];
|
];
|
||||||
gulp.src('assets/css/*.css')
|
|
||||||
|
return gulp.src('assets/css/*.css')
|
||||||
.on('error', swallowError)
|
.on('error', swallowError)
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(postcss(processors))
|
.pipe(postcss(processors))
|
||||||
@ -49,6 +51,20 @@ gulp.task('watch', function () {
|
|||||||
gulp.watch('assets/css/**', ['css']);
|
gulp.watch('assets/css/**', ['css']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('zip', ['css'], function() {
|
||||||
|
var targetDir = 'dist/';
|
||||||
|
var themeName = require('./package.json').name;
|
||||||
|
var filename = themeName + '.zip';
|
||||||
|
|
||||||
|
return gulp.src([
|
||||||
|
'**',
|
||||||
|
'!node_modules', '!node_modules/**',
|
||||||
|
'!dist', '!dist/**'
|
||||||
|
])
|
||||||
|
.pipe(zip(filename))
|
||||||
|
.pipe(gulp.dest(targetDir));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('default', ['build'], function () {
|
gulp.task('default', ['build'], function () {
|
||||||
gulp.start('watch');
|
gulp.start('watch');
|
||||||
});
|
});
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"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.1.0",
|
"version": "2.1.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"ghost": ">=1.2.0"
|
"ghost": ">=1.2.0"
|
||||||
},
|
},
|
||||||
@ -43,6 +43,7 @@
|
|||||||
"gulp-sourcemaps": "1.6.0",
|
"gulp-sourcemaps": "1.6.0",
|
||||||
"gulp-util": "3.0.7",
|
"gulp-util": "3.0.7",
|
||||||
"gulp-watch": "4.3.8",
|
"gulp-watch": "4.3.8",
|
||||||
|
"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"
|
||||||
|
0
partials/icons/facebook.hbs
Executable file → Normal file
0
partials/icons/facebook.hbs
Executable file → Normal file
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
@ -14,16 +14,16 @@
|
|||||||
<div class="site-nav-right">
|
<div class="site-nav-right">
|
||||||
<div class="social-links">
|
<div class="social-links">
|
||||||
{{#if @blog.facebook}}
|
{{#if @blog.facebook}}
|
||||||
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank">{{> "icons/facebook"}}</a>
|
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if @blog.twitter}}
|
{{#if @blog.twitter}}
|
||||||
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank">{{> "icons/twitter"}}</a>
|
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{#if @labs.subscribers}}
|
{{#if @labs.subscribers}}
|
||||||
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
<a class="subscribe-button" href="#subscribe">Subscribe</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="rss-button" href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/" target="_blank">{{> "icons/rss"}}</a>
|
<a class="rss-button" href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
3
post.hbs
3
post.hbs
@ -101,7 +101,7 @@ into the {body} of the default.hbs template --}}
|
|||||||
<aside class="read-next outer">
|
<aside class="read-next outer">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="read-next-feed">
|
<div class="read-next-feed">
|
||||||
|
{{#if primary_tag}}
|
||||||
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
|
||||||
{{#if related_posts}}
|
{{#if related_posts}}
|
||||||
<article class="read-next-card"
|
<article class="read-next-card"
|
||||||
@ -132,6 +132,7 @@ into the {body} of the default.hbs template --}}
|
|||||||
</article>
|
</article>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/get}}
|
{{/get}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
|
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
|
||||||
{{#next_post}}
|
{{#next_post}}
|
||||||
|
Reference in New Issue
Block a user