mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 20:14:58 +00:00
Make first commit to homepage branch
This commit is contained in:
1 parent
d5f2560d11
commit
38a9ffaac1
4 files changed
+20
-2
No files matched your search
@@ -3,4 +3,8 @@
|
|||||||
<script>try{Typekit.load({ async: true });}catch(e){}</script>
|
<script>try{Typekit.load({ async: true });}catch(e){}</script>
|
||||||
{{if .Site.Params.usefontawesome}}
|
{{if .Site.Params.usefontawesome}}
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{ if .IsHome }}
|
||||||
|
<link rel="stylesheet" href="{{ "css/homepage.min.css" | relURL }}">
|
||||||
|
{{ end }}
|
||||||
+12
-1
@@ -16,6 +16,7 @@ const pump = require('pump');
|
|||||||
const rename = require("gulp-rename");
|
const rename = require("gulp-rename");
|
||||||
const sass = require('gulp-sass');
|
const sass = require('gulp-sass');
|
||||||
const sassfiles = "./scss/**/*.scss";
|
const sassfiles = "./scss/**/*.scss";
|
||||||
|
const sassfileshp = "./scss/**/homepage/*.scss";
|
||||||
const sourcemaps = require('gulp-sourcemaps');
|
const sourcemaps = require('gulp-sourcemaps');
|
||||||
const uglify = require('gulp-uglify');
|
const uglify = require('gulp-uglify');
|
||||||
|
|
||||||
@@ -37,6 +38,15 @@ gulp.task('sass', function() {
|
|||||||
.pipe(gulp.dest('../static/css'));
|
.pipe(gulp.dest('../static/css'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('homepage', function() {
|
||||||
|
gulp.src(sassfileshp)
|
||||||
|
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
|
||||||
|
.pipe(prefix('last 2 versions', '> 1%', 'ie 10', 'Android 2', 'Firefox ESR'))
|
||||||
|
.pipe(plumber())
|
||||||
|
.pipe(rename('homepage.min.css'))
|
||||||
|
.pipe(gulp.dest('../static/css'));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task("image-resize", () => {
|
gulp.task("image-resize", () => {
|
||||||
return gulp.src("../source-images/*.{jpg,png,jpeg,gif}")
|
return gulp.src("../source-images/*.{jpg,png,jpeg,gif}")
|
||||||
.pipe(imagemin())
|
.pipe(imagemin())
|
||||||
@@ -82,8 +92,9 @@ gulp.task('scripts', function(cb) {
|
|||||||
* - Watchs for file changes for images, scripts and sass/css
|
* - Watchs for file changes for images, scripts and sass/css
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
gulp.task('default', ['sass', 'scripts', 'image-resize'], function() {
|
gulp.task('default', ['sass', 'scripts', 'image-resize', 'homepage'], function() {
|
||||||
gulp.watch('scss/**/*.scss', ['sass']);
|
gulp.watch('scss/**/*.scss', ['sass']);
|
||||||
|
gulpt.watch('scss/**/homepage/*.{sass,scss}', ['homepage']);
|
||||||
gulp.watch('js/**/*.js', ['scripts']);
|
gulp.watch('js/**/*.js', ['scripts']);
|
||||||
gulp.watch('../source-images/*', ['image-resize']);
|
gulp.watch('../source-images/*', ['image-resize']);
|
||||||
});
|
});
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
"homepage": "https://github.com/dope/gulp-starter",
|
"homepage": "https://github.com/dope/gulp-starter",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-preset-es2015": "^6.18.0",
|
"babel-preset-es2015": "^6.18.0",
|
||||||
|
"bulma": "^0.3.2",
|
||||||
"concurrent-transform": "^1.0.0",
|
"concurrent-transform": "^1.0.0",
|
||||||
"gulp": "^3.8.8",
|
"gulp": "^3.8.8",
|
||||||
"gulp-autoprefixer": "^1.0.1",
|
"gulp-autoprefixer": "^1.0.1",
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
@import '../scss/variables';
|
||||||
|
@import '../node_modules/bulma/sass/bulma';
|
||||||
Reference in new issue
Block a user