From 733a34f19d4b916e4855e3626962b50ab12a433f Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 19 Aug 2017 00:28:44 +0100 Subject: [PATCH] Split stylesheets --- assets/sass/{pages/_about.sass => about.sass} | 0 assets/sass/{pages/_blog.sass => blog.sass} | 2 -- .../_experience.sass => experience.sass} | 7 ++----- assets/sass/main.sass | 8 -------- assets/sass/{pages/_post.sass => post.sass} | 0 .../{pages/_project.sass => project.sass} | 3 ++- assets/sass/{pages/_talk.sass => talk.sass} | 3 +++ .../_testimonials.sass => testimonials.sass} | 0 gulpfile.js | 19 +++++++++++++++---- source/_layouts/default.html.twig | 2 +- source/_layouts/post.html.twig | 4 ++++ source/_layouts/project.html.twig | 4 ++++ source/_layouts/talk.html.twig | 4 ++++ source/blog.html | 4 ++++ source/experience.html.twig | 4 ++++ source/index.md | 5 +++++ source/testimonials.html.twig | 4 ++++ 17 files changed, 52 insertions(+), 21 deletions(-) rename assets/sass/{pages/_about.sass => about.sass} (100%) rename assets/sass/{pages/_blog.sass => blog.sass} (74%) rename assets/sass/{pages/_experience.sass => experience.sass} (77%) rename assets/sass/{pages/_post.sass => post.sass} (100%) rename assets/sass/{pages/_project.sass => project.sass} (70%) rename assets/sass/{pages/_talk.sass => talk.sass} (62%) rename assets/sass/{pages/_testimonials.sass => testimonials.sass} (100%) diff --git a/assets/sass/pages/_about.sass b/assets/sass/about.sass similarity index 100% rename from assets/sass/pages/_about.sass rename to assets/sass/about.sass diff --git a/assets/sass/pages/_blog.sass b/assets/sass/blog.sass similarity index 74% rename from assets/sass/pages/_blog.sass rename to assets/sass/blog.sass index 671624e2..7ec9953b 100644 --- a/assets/sass/pages/_blog.sass +++ b/assets/sass/blog.sass @@ -1,10 +1,8 @@ .page--blog__list ul.posts - //list-style: none margin-bottom: 2em margin-left: 0 margin-top: 0 - //padding-left: 0 .post border-bottom: 1px solid #CCC diff --git a/assets/sass/pages/_experience.sass b/assets/sass/experience.sass similarity index 77% rename from assets/sass/pages/_experience.sass rename to assets/sass/experience.sass index 9ee361fb..a0146a41 100644 --- a/assets/sass/pages/_experience.sass +++ b/assets/sass/experience.sass @@ -1,8 +1,5 @@ -@import '../mixins' - -.experience-item - // margin-bottom: $padding-large-vertical * 3 - +clearfix +@import "node_modules/bulma/sass/utilities/initial-variables" +@import "node_modules/bulma/sass/utilities/mixins" .experience-item-website margin-bottom: 2px diff --git a/assets/sass/main.sass b/assets/sass/main.sass index 13a83134..6f65e373 100644 --- a/assets/sass/main.sass +++ b/assets/sass/main.sass @@ -19,11 +19,3 @@ $primary: $blue @import 'components/badges' @import 'components/footer' @import 'components/meetups' - -@import "pages/about" -@import "pages/blog" -@import "pages/experience" -@import "pages/post" -@import "pages/project" -@import "pages/talk" -@import "pages/testimonials" diff --git a/assets/sass/pages/_post.sass b/assets/sass/post.sass similarity index 100% rename from assets/sass/pages/_post.sass rename to assets/sass/post.sass diff --git a/assets/sass/pages/_project.sass b/assets/sass/project.sass similarity index 70% rename from assets/sass/pages/_project.sass rename to assets/sass/project.sass index 4a92b125..44b68114 100644 --- a/assets/sass/pages/_project.sass +++ b/assets/sass/project.sass @@ -1,4 +1,5 @@ -@import '../mixins' +@import "node_modules/bulma/sass/utilities/initial-variables" +@import "node_modules/bulma/sass/utilities/mixins" .project-company &.has-logo diff --git a/assets/sass/pages/_talk.sass b/assets/sass/talk.sass similarity index 62% rename from assets/sass/pages/_talk.sass rename to assets/sass/talk.sass index 76aa2d22..55af4694 100644 --- a/assets/sass/pages/_talk.sass +++ b/assets/sass/talk.sass @@ -1,3 +1,6 @@ +@import "node_modules/bulma/sass/utilities/initial-variables" +@import "node_modules/bulma/sass/utilities/mixins" + .talk-slides background: url('../images/loading.gif') no-repeat center min-height: 275px diff --git a/assets/sass/pages/_testimonials.sass b/assets/sass/testimonials.sass similarity index 100% rename from assets/sass/pages/_testimonials.sass rename to assets/sass/testimonials.sass diff --git a/gulpfile.js b/gulpfile.js index c2583a3c..b44a10bb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -49,15 +49,26 @@ gulp.task('fonts', function () { }); gulp.task('styles', function () { - return app.sass([ + app.sass([ 'node_modules/font-awesome/css/font-awesome.css', - 'node_modules/prismjs/themes/prism-twilight.css', config.sass.sourceDir + '/main.sass' - ], 'site.css'); + ], 'main.css'); + + app.sass([ + 'node_modules/prismjs/themes/prism-twilight.css', + config.sass.sourceDir + '/post.sass' + ], 'post.css') + + app.sass(config.sass.sourceDir + '/about.sass', 'about.css'); + app.sass(config.sass.sourceDir + '/blog.sass', 'blog.css'); + app.sass(config.sass.sourceDir + '/experience.sass', 'experience.css'); + app.sass(config.sass.sourceDir + '/project.sass', 'project.css'); + app.sass(config.sass.sourceDir + '/talk.sass', 'talk.css'); + app.sass(config.sass.sourceDir + '/testimonials.sass', 'testimonials.css'); }); gulp.task('scripts', function () { - return app.js([ + app.js([ 'node_modules/jquery/dist/jquery.js', 'node_modules/prismjs/prism.js', 'node_modules/prismjs/components/prism-{apacheconf,bsash,css,diff,ini,json,nginx,php,sass,scss,sql,less,twig,xml,yaml}.js', diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig index ae49bd9b..cb3a0167 100644 --- a/source/_layouts/default.html.twig +++ b/source/_layouts/default.html.twig @@ -13,7 +13,7 @@ {% include 'og' with { og: page.meta.og } %} - + {% block stylesheets '' %} {% for size in site.apple_touch_icon_sizes %} diff --git a/source/_layouts/post.html.twig b/source/_layouts/post.html.twig index 4f5dd97d..146ce0e8 100644 --- a/source/_layouts/post.html.twig +++ b/source/_layouts/post.html.twig @@ -10,3 +10,7 @@ {% include 'post/pager' %} {% include 'post/about-author' %} {% endblock %} + +{% block stylesheets %} + +{% endblock %} diff --git a/source/_layouts/project.html.twig b/source/_layouts/project.html.twig index 87e6a135..c7c424ff 100644 --- a/source/_layouts/project.html.twig +++ b/source/_layouts/project.html.twig @@ -11,3 +11,7 @@ {% include 'project/skills' %} {% include 'project/company' %} {% endblock %} + +{% block stylesheets %} + +{% endblock %} diff --git a/source/_layouts/talk.html.twig b/source/_layouts/talk.html.twig index 951a9897..72e7499e 100644 --- a/source/_layouts/talk.html.twig +++ b/source/_layouts/talk.html.twig @@ -46,3 +46,7 @@ } %} {% endblock %} + +{% block stylesheets %} + +{% endblock %} diff --git a/source/blog.html b/source/blog.html index 0d99a12f..28a6a06b 100644 --- a/source/blog.html +++ b/source/blog.html @@ -43,3 +43,7 @@ use: [posts] {% endblock %} {% block body_classes 'page--blog page--blog__list' %} + +{% block stylesheets %} + +{% endblock %} diff --git a/source/experience.html.twig b/source/experience.html.twig index 85782f61..2b9e2d19 100644 --- a/source/experience.html.twig +++ b/source/experience.html.twig @@ -47,3 +47,7 @@ redirect: {% endfor %} {% endblock %} + +{% block stylesheets %} + +{% endblock %} diff --git a/source/index.md b/source/index.md index a02481da..ce97ae52 100644 --- a/source/index.md +++ b/source/index.md @@ -49,6 +49,11 @@ I’m a webmaster and documentation maintainer for [Drupal.org][42], and a provi - IRC (freenode) - {{ site.irc.name }} {% endblock %} +{% block stylesheets %} + +{% endblock %} + + [1]: https://www.google.com/#q=opdavies [2]: https://www.drupal.org [3]: http://symfony.com diff --git a/source/testimonials.html.twig b/source/testimonials.html.twig index 386fc0b0..8c534b31 100644 --- a/source/testimonials.html.twig +++ b/source/testimonials.html.twig @@ -30,3 +30,7 @@ use: [posts] {% endblock %} {% block body_classes 'page--testimonials' %} + +{% block stylesheets %} + +{% endblock %}