From 7fd4e080838cc3e7b2ccfcae590ce92eaf1de853 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 7 Oct 2017 09:00:03 +0100 Subject: [PATCH 1/4] WIP --- assets/less/main.less | 25 +++ gulpfile.config.js | 4 +- gulpfile.js | 14 +- package.json | 2 + source/_includes/nav.html.twig | 2 +- yarn.lock | 352 ++++++++++++++++++++++++++++++++- 6 files changed, 380 insertions(+), 19 deletions(-) create mode 100644 assets/less/main.less diff --git a/assets/less/main.less b/assets/less/main.less new file mode 100644 index 00000000..0e023f21 --- /dev/null +++ b/assets/less/main.less @@ -0,0 +1,25 @@ +@import "node_modules/tachyons-less/less/_colors"; + +@blue: #0678be; + +@import "node_modules/ftachyons-less/tachyons"; + +p, +li, +td { + a { + color: @blue; + } +} + +.nav-item { + .black-70; + .dib; + .f6; + .link; + .ml2; +} + +.nav-item--active { + .black; +} diff --git a/gulpfile.config.js b/gulpfile.config.js index c9fb4643..14bb51bc 100644 --- a/gulpfile.config.js +++ b/gulpfile.config.js @@ -5,8 +5,8 @@ module.exports = function (plugins) { browsers: ["last 2 versions", "> 5%"], cascade: false }, - sourceDir: "assets/sass", - pattern: "/**/*.sass", + sourceDir: "assets/less", + pattern: "/**/*.less", purifyCss: [ 'source/**/*.html', 'source/**/*.md', diff --git a/gulpfile.js b/gulpfile.js index c897e34b..a8388d28 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,7 @@ app.sass = function (sourceFiles, outputFile) { .pipe(plugins.plumber()) .pipe(plugins.if(!config.production, plugins.sourcemaps.init())) .pipe(plugins.sassGlob()) - .pipe(plugins.sass()) + .pipe(plugins.less()) .pipe(plugins.autoprefixer(config.sass.autoprefixer)) .pipe(plugins.concat(outputFile)) .pipe(plugins.if(config.production, plugins.purifycss(config.sass.purifyCss))) @@ -51,15 +51,15 @@ gulp.task('fonts', function () { gulp.task('styles', function () { app.sass([ 'node_modules/font-awesome/css/font-awesome.css', - config.sass.sourceDir + '/main.sass' + config.sass.sourceDir + '/main.less' ], 'main.css'); - app.sass([ - 'node_modules/prismjs/themes/prism-twilight.css', - config.sass.sourceDir + '/post.sass' - ], 'post.css') + // app.sass([ + // 'node_modules/prismjs/themes/prism-twilight.css', + // config.sass.sourceDir + '/post.sass' + // ], 'post.css') - app.sass(config.sass.sourceDir + '/talk.sass', 'talk.css'); + // app.sass(config.sass.sourceDir + '/talk.sass', 'talk.css'); }); gulp.task('scripts', function () { diff --git a/package.json b/package.json index 493f2000..960eff72 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "gulp-clean-css": "^3.7.0", "gulp-concat": "^2.6.1", "gulp-if": "^2.0.2", + "gulp-less": "^3.3.2", "gulp-load-plugins": "^1.5.0", "gulp-plumber": "^1.1.0", "gulp-purifycss": "^0.2.0", @@ -18,6 +19,7 @@ "gulp-util": "^3.0.8", "jquery.2": "^1.0.0", "prismjs": "^1.6.0", + "tachyons-less": "^1.0.4", "tachyons-sass": "^4.7.4" } } diff --git a/source/_includes/nav.html.twig b/source/_includes/nav.html.twig index 80f9fe9c..a58d1ead 100644 --- a/source/_includes/nav.html.twig +++ b/source/_includes/nav.html.twig @@ -18,7 +18,7 @@