Skip to content
Permalink
Browse files

Add LESS and Gulp process

  • Loading branch information...
picturepan2 committed May 13, 2017
1 parent 7766af2 commit ca210275a96d8eacfabaaeef730a38778e194282
@@ -0,0 +1,30 @@
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": false,
"leading-zero": false,
"quotes": "double",
"sort-order-fallback": "abc",
"space-before-colon": "",
"space-after-colon": " ",
"space-before-combinator": " ",
"space-after-combinator": " ",
"space-between-declarations": "\n",
"space-before-opening-brace": " ",
"space-after-opening-brace": "\n",
"space-after-selector-delimiter": "\n",
"space-before-selector-delimiter": "",
"space-before-closing-brace": "\n",
"strip-spaces": true,
"tab-size": true,
"unitless-zero": true,
"sort-order": [[
"$variable",
"$include",
"$import"
]]
}
@@ -0,0 +1,7 @@
.idea/
node_modules/
demo/
.*
!.gitignore
!.gitattributes
!.csscomb.json
BIN -167 KB (84%) assets/affinity-desktop.png
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,42 @@
var gulp = require('gulp');
var less = require('gulp-less');
var cleancss = require('gulp-clean-css');
var csscomb = require('gulp-csscomb');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var LessPluginAutoPrefix = require('less-plugin-autoprefix');

var autoprefix= new LessPluginAutoPrefix({ browsers: ["last 4 versions"] });

gulp.task('watch', function() {
gulp.watch('./**/*.less', ['build']);
});

gulp.task('build', function() {
gulp.src('./src/less/*.less')
.pipe(less({
plugins: [autoprefix]
}))
.pipe(csscomb())
.pipe(gulp.dest('./src/css'));
});

gulp.task('minify', function() {
gulp.src('./src/css/*.css')
.pipe(concat('affinity.css'))
.pipe(cleancss())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('./assets'));
gulp.src('./src/js/*.js')
.pipe(concat('affinity.js'))
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('./assets'));
});

gulp.task('default', ['build']);
@@ -1,48 +1,50 @@
{
"author": {
"email": "showfom@gmail.com",
"name": "Showfom Guo",
"url": "https://sb.sb/ghost-theme-affinity/"
},
"demo": "https://ghost.demo.sb/affinity/",
"description": "Affinity is a clean, minimal, modern and responsive theme that focus on content for Ghost.",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean-css": "^3.0.3",
"gulp-csscomb": "^3.0.8",
"gulp-less": "^3.3.0",
"gulp-rename": "^1.2.2",
"less-plugin-autoprefix": "^1.5.1"
},
"engines": {
"ghost": ">=0.9.0 <1.0.0"
},
"gpm": {
"categories": [
"Minimal",
"Clean",
"Responsive",
"Modern",
"Magzine",
"Personal Blogs"
],
"type": "theme"
},
"keywords": [
"affinity",
"spectre",
"showfom",
"theme"
"author": {
"email": "showfom@gmail.com",
"name": "Showfom Guo",
"url": "https://sb.sb/ghost-theme-affinity/"
},
"demo": "https://ghost.demo.sb/affinity/",
"description": "Affinity is a clean, minimal, modern and responsive theme that focus on content for Ghost.",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-clean-css": "^3.2.0",
"gulp-concat": "^2.6.1",
"gulp-csscomb": "^3.0.8",
"gulp-less": "^3.3.0",
"gulp-rename": "^1.2.2",
"gulp-uglify": "^2.1.2",
"less-plugin-autoprefix": "^1.5.1"
},
"engines": {
"ghost": ">=0.9.0 <1.0.0"
},
"gpm": {
"categories": [
"Minimal",
"Clean",
"Responsive",
"Modern",
"Magzine",
"Personal Blogs"
],
"license": "MIT",
"name": "Affinity",
"repository": {
"type": "git",
"url": "https://github.com/Showfom/Affinity.git"
},
"screenshots": {
"desktop": "assets/affinity-desktop.png",
"mobile": "assets/affinity-desktop.png"
},
"version": "1.0.0"
"type": "theme"
},
"keywords": [
"affinity",
"spectre",
"showfom",
"theme"
],
"license": "MIT",
"name": "Affinity",
"repository": {
"type": "git",
"url": "https://github.com/Showfom/Affinity.git"
},
"screenshots": {
"desktop": "assets/affinity-desktop.png",
"mobile": "assets/affinity-desktop.png"
},
"version": "1.0.0"
}
@@ -222,6 +222,10 @@
border: 0;
border-top: .1rem solid #eee;
}
.content-post .content-post-body img {
height: auto;
max-width: 100%;
}
.content-post .content-post-author {
border-top: .1rem solid #eee;
margin-top: 4rem;
@@ -479,7 +483,7 @@ http://zenorocha.mit-license.org
height: auto;
}
}
@media screen and (max-width: 480px) {
@media screen and (max-width: 640px) {
.section {
-ms-flex-direction: column;
flex-direction: column;
@@ -500,7 +500,7 @@ mark {
background: #ffe9b3;
border-radius: .2rem;
color: #404040;
display: inline-block;
display: inline;
line-height: 1;
padding: .3rem .4rem;
vertical-align: baseline;
@@ -511,7 +511,7 @@ kbd {
border-radius: .2rem;
box-shadow: 0 .1rem 0 rgba(51, 51, 51, .2);
color: #333;
display: inline-block;
display: inline;
line-height: 1;
padding: .3rem .4rem;
vertical-align: baseline;
@@ -1157,7 +1157,7 @@ input.disabled + .form-icon {
background: #dbdbdb;
border-radius: .2rem;
color: #4d4d4d;
display: inline-block;
display: inline;
line-height: 1;
padding: .3rem .4rem;
vertical-align: baseline;
@@ -1182,10 +1182,11 @@ code {
background: #fdf4f4;
border-radius: .2rem;
color: #e06870;
display: inline-block;
display: inline;
line-height: 1;
padding: .3rem .4rem;
vertical-align: baseline;
word-break: break-all;
}
pre {
border-radius: .2rem;

0 comments on commit ca21027

Please sign in to comment.
You can’t perform that action at this time.