Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

Commit 6ba06b3

Browse files
authored
Merge pull request #7 from Showfom/add-less-gulp
Add less gulp
2 parents 7766af2 + b7ed586 commit 6ba06b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4354
-61
lines changed

.csscomb.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"remove-empty-rulesets": true,
3+
"always-semicolon": true,
4+
"color-case": "lower",
5+
"block-indent": " ",
6+
"color-shorthand": true,
7+
"element-case": "lower",
8+
"eof-newline": false,
9+
"leading-zero": false,
10+
"quotes": "double",
11+
"sort-order-fallback": "abc",
12+
"space-before-colon": "",
13+
"space-after-colon": " ",
14+
"space-before-combinator": " ",
15+
"space-after-combinator": " ",
16+
"space-between-declarations": "\n",
17+
"space-before-opening-brace": " ",
18+
"space-after-opening-brace": "\n",
19+
"space-after-selector-delimiter": "\n",
20+
"space-before-selector-delimiter": "",
21+
"space-before-closing-brace": "\n",
22+
"strip-spaces": true,
23+
"tab-size": true,
24+
"unitless-zero": true,
25+
"sort-order": [[
26+
"$variable",
27+
"$include",
28+
"$import"
29+
]]
30+
}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea/
2+
node_modules/
3+
demo/
4+
.*
5+
!.gitignore
6+
!.gitattributes
7+
!.csscomb.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Affinity is built with ToC (table of contents) and pagination support without Gh
2020
* jQuery ToC and Pagination by [@JixunMoe](https://jixun.moe/)
2121

2222
### CSS Framework
23-
* spectre.css [https://picturepan2.github.io/spectre/](https://picturepan2.github.io/spectre/)
23+
* Spectre.css [https://picturepan2.github.io/spectre/](https://picturepan2.github.io/spectre/)
2424

2525
## Author
2626
* [@Showfom](https://github.com/Showfom)

assets/affinity-desktop.png

-167 KB
Loading

assets/affinity.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/affinity.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
var gulp = require('gulp');
2+
var less = require('gulp-less');
3+
var cleancss = require('gulp-clean-css');
4+
var csscomb = require('gulp-csscomb');
5+
var concat = require('gulp-concat');
6+
var rename = require('gulp-rename');
7+
var uglify = require('gulp-uglify');
8+
var LessPluginAutoPrefix = require('less-plugin-autoprefix');
9+
10+
var autoprefix= new LessPluginAutoPrefix({ browsers: ["last 4 versions"] });
11+
12+
gulp.task('watch', function() {
13+
gulp.watch('./**/*.less', ['build', 'minify']);
14+
});
15+
16+
gulp.task('build', function() {
17+
gulp.src('./src/less/*.less')
18+
.pipe(less({
19+
plugins: [autoprefix]
20+
}))
21+
.pipe(csscomb())
22+
.pipe(gulp.dest('./src/css'));
23+
});
24+
25+
gulp.task('minify', function() {
26+
gulp.src('./src/css/*.css')
27+
.pipe(concat('affinity.css'))
28+
.pipe(cleancss())
29+
.pipe(rename({
30+
suffix: '.min'
31+
}))
32+
.pipe(gulp.dest('./assets'));
33+
gulp.src('./src/js/*.js')
34+
.pipe(concat('affinity.js'))
35+
.pipe(uglify())
36+
.pipe(rename({
37+
suffix: '.min'
38+
}))
39+
.pipe(gulp.dest('./assets'));
40+
});
41+
42+
gulp.task('default', ['build']);

package.json

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,50 @@
11
{
2-
"author": {
3-
"email": "showfom@gmail.com",
4-
"name": "Showfom Guo",
5-
"url": "https://sb.sb/ghost-theme-affinity/"
6-
},
7-
"demo": "https://ghost.demo.sb/affinity/",
8-
"description": "Affinity is a clean, minimal, modern and responsive theme that focus on content for Ghost.",
9-
"devDependencies": {
10-
"gulp": "^3.9.1",
11-
"gulp-clean-css": "^3.0.3",
12-
"gulp-csscomb": "^3.0.8",
13-
"gulp-less": "^3.3.0",
14-
"gulp-rename": "^1.2.2",
15-
"less-plugin-autoprefix": "^1.5.1"
16-
},
17-
"engines": {
18-
"ghost": ">=0.9.0 <1.0.0"
19-
},
20-
"gpm": {
21-
"categories": [
22-
"Minimal",
23-
"Clean",
24-
"Responsive",
25-
"Modern",
26-
"Magzine",
27-
"Personal Blogs"
28-
],
29-
"type": "theme"
30-
},
31-
"keywords": [
32-
"affinity",
33-
"spectre",
34-
"showfom",
35-
"theme"
2+
"author": {
3+
"email": "showfom@gmail.com",
4+
"name": "Showfom Guo",
5+
"url": "https://sb.sb/ghost-theme-affinity/"
6+
},
7+
"demo": "https://ghost.demo.sb/affinity/",
8+
"description": "Affinity is a clean, minimal, modern and responsive theme that focus on content for Ghost.",
9+
"devDependencies": {
10+
"gulp": "^3.9.1",
11+
"gulp-clean-css": "^3.2.0",
12+
"gulp-concat": "^2.6.1",
13+
"gulp-csscomb": "^3.0.8",
14+
"gulp-less": "^3.3.0",
15+
"gulp-rename": "^1.2.2",
16+
"gulp-uglify": "^2.1.2",
17+
"less-plugin-autoprefix": "^1.5.1"
18+
},
19+
"engines": {
20+
"ghost": ">=0.9.0 <1.0.0"
21+
},
22+
"gpm": {
23+
"categories": [
24+
"Minimal",
25+
"Clean",
26+
"Responsive",
27+
"Modern",
28+
"Magzine",
29+
"Personal Blogs"
3630
],
37-
"license": "MIT",
38-
"name": "Affinity",
39-
"repository": {
40-
"type": "git",
41-
"url": "https://github.com/Showfom/Affinity.git"
42-
},
43-
"screenshots": {
44-
"desktop": "assets/affinity-desktop.png",
45-
"mobile": "assets/affinity-desktop.png"
46-
},
47-
"version": "1.0.0"
31+
"type": "theme"
32+
},
33+
"keywords": [
34+
"affinity",
35+
"spectre",
36+
"showfom",
37+
"theme"
38+
],
39+
"license": "MIT",
40+
"name": "Affinity",
41+
"repository": {
42+
"type": "git",
43+
"url": "https://github.com/Showfom/Affinity.git"
44+
},
45+
"screenshots": {
46+
"desktop": "assets/affinity-desktop.png",
47+
"mobile": "assets/affinity-desktop.png"
48+
},
49+
"version": "1.0.0"
4850
}

partials/loop.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
</div>
1414
</header>
1515
<section class="card-body">
16-
{{excerpt words="18"}}
16+
<div class="card-body-text">
17+
{{excerpt words="18"}}
18+
</div>
1719
</section>
1820
<footer class="card-footer">
1921
<time class="post-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time>

src/css/screen.css

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,14 @@
145145
-ms-flex: 1 1 auto;
146146
flex: 1 1 auto;
147147
font-size: 1.3rem;
148-
height: 6rem;
149148
line-height: 2rem;
150-
overflow: hidden;
151149
padding: 2rem 1.5rem 0 1.5rem;
152150
}
151+
.content-cards .card-body .card-body-text {
152+
line-height: 2rem;
153+
max-height: 4rem;
154+
overflow: hidden;
155+
}
153156
.content-cards .card-footer {
154157
color: #ccc;
155158
-ms-flex: 0 0 auto;
@@ -222,6 +225,10 @@
222225
border: 0;
223226
border-top: .1rem solid #eee;
224227
}
228+
.content-post .content-post-body img {
229+
height: auto;
230+
max-width: 100%;
231+
}
225232
.content-post .content-post-author {
226233
border-top: .1rem solid #eee;
227234
margin-top: 4rem;
@@ -273,7 +280,7 @@
273280
margin-bottom: 1rem;
274281
}
275282
.isso-postbox .textarea-wrapper .textarea {
276-
min-height: 6rem;
283+
min-height: 8em;
277284
}
278285
.isso-postbox .textarea-wrapper .textarea,
279286
.isso-postbox .auth-section .input-wrapper input {
@@ -479,7 +486,7 @@ http://zenorocha.mit-license.org
479486
height: auto;
480487
}
481488
}
482-
@media screen and (max-width: 480px) {
489+
@media screen and (max-width: 640px) {
483490
.section {
484491
-ms-flex-direction: column;
485492
flex-direction: column;
@@ -531,6 +538,17 @@ http://zenorocha.mit-license.org
531538
.section .section-content .content-post .toc ul {
532539
margin-bottom: 0;
533540
}
541+
.section .section-content .auth-section {
542+
-ms-flex-direction: column;
543+
flex-direction: column;
544+
}
545+
.section .section-content .auth-section .input-wrapper,
546+
.section .section-content .auth-section .post-action {
547+
-ms-flex: 1 1 100%;
548+
flex: 1 1 100%;
549+
padding-right: 0;
550+
width: 100%;
551+
}
534552
.section .section-footer {
535553
position: static;
536554
width: 100%;

0 commit comments

Comments
 (0)