danielmochdotcom

Nikola site for www.danielmoch.com
git clone git://git.danielmoch.com/danielmochdotcom.git
Log | Files | Refs

commit 89c1a1a48bd7d597a692624fbc4b090cdfe55a4a
parent 99d3b0a6a6def47db67b521f12697a4b9770bbbd
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed, 17 Jul 2019 18:58:04 -0400

Convert site.css to site.scss

Diffstat:
M.gitignore | 1+
Mconf.py | 7+++++++
Dthemes/djmoch/assets/site.css | 159-------------------------------------------------------------------------------
Athemes/djmoch/sass/site.scss | 194+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/djmoch/sass/targets | 1+
Mthemes/djmoch/templates/base_helper.tmpl | 2+-
6 files changed, 204 insertions(+), 160 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -3,3 +3,4 @@ cache/ output/ state_data.json Pipfile.lock +plugins/ diff --git a/conf.py b/conf.py @@ -1352,6 +1352,13 @@ # those. # TEMPLATE_FILTERS = {} +# Compiler to process Sass files. +SASS_COMPILER = 'sassc' + +# A list of options to pass to the Sass compiler. +# Final command is: SASS_COMPILER SASS_OPTIONS file.s(a|c)ss +SASS_OPTIONS = ['-t', 'compressed'] + # Put in global_context things you want available on all your templates. # It can be anything, data, functions, modules, etc. GLOBAL_CONTEXT = { diff --git a/themes/djmoch/assets/site.css b/themes/djmoch/assets/site.css @@ -1,159 +0,0 @@ -.banner-title, .banner-subtitle, .page-subtitle, body -{ - font-family: "Open Sans"; -} -.page-title, h1, h2, h3 -{ - font-family: "Playfair Display"; -} -h1 -{ - font-size: 2.0em; -} -h2 -{ - font-size: 1.5em; -} -h3 -{ - font-size: 1.3em; -} -header li -{ - display: inline; -} -a -{ - color: #155799; -} -header a, -header a:hover, -header a:focus -{ - color: #000; -} -.subtle-link -{ - color: #000; -} -.banner -{ - background-color: #fff; - color: #000; - padding: 1rem 15px; -} -header img -{ - height: 25px; - padding-right: 10px; -} -body -{ - background-color: #fff; -} -.banner-title -{ - font-size: 2.6em; - margin-bottom: 0; - margin-top: 0; -} -.banner-subtitle -{ - padding: 0; - font-weight: lighter; -} -.content -{ - background-color: #fff; - text-align: justify; -} -@media (min-width: 992px) -{ - .content, .sidebar - { - margin: 1rem 2rem; - padding: 0 1rem; - padding-bottom: 1em; - } - .banner-subtitle - { - margin: 0 2rem; - padding: 0 1rem; - } -} -.page-title -{ - margin-bottom: 0; -} -.page-subtitle -{ - font-size: 1em; - margin-bottom: 2em; - margin-left: 2em; - margin-top: 0; -} -.page-body -{ - margin-bottom: 1em; -} -.no-padding -{ - padding: 0; -} -.no-margin -{ - margin: 0; -} -.postpromonav .tags li:first-child:before -{ - content: ""; -} -.metadata p:before, -.postpromonav .tags li:before, -.postlist .listdate:after, -.translationslist p:before { - content: " • "; -} -.postlist li { - margin-bottom: .33em; -} -.social-links { - margin: 1em 0; -} -.social-heading { - font-family: "Playfair Display"; - top: -0.9em; - position: absolute; - font-size: 0.8em; - margin: 0 0; -} -.sidebar p { - position: relative; - margin-bottom: 1.3em; -} -.social-link { - font-family: "Open Sans"; - font-size: 1.0em; - color: #000; - margin: 0 0; - font-weight: lighter; -} -.sidebar-section { - margin-bottom: 3.5em; -} -.sidebar-section ul { - list-style: none; - padding-left: 0; -} -.sidebar-image { - width: 60%; - display: block; - margin-left: auto; - margin-right: auto; - margin-bottom: 1.0em; - border-radius: 15px; -} -.footer { - text-align: right; - padding-top: 1em; -} diff --git a/themes/djmoch/sass/site.scss b/themes/djmoch/sass/site.scss @@ -0,0 +1,194 @@ +$body-font: "Open Sans"; +$heading-font: "Playfair Display"; +$theme-color: #155799; +$md-width: 992px; +$list-item-format: " • "; + +.banner-title, .banner-subtitle, .page-subtitle, body { + font-family: $body-font; +} + +.page-title, h1, h2, h3 { + font-family: $heading-font; +} + +h1 { + font-size: 2.0em; +} + +h2 { + font-size: 1.5em; +} + +h3 { + font-size: 1.3em; +} + +header { + li { + display: inline; + } + + a, a:hover, a:focus { + color: #000; + } + + img { + height: 25px; + padding-right: 10px; + } +} + +a { + color: $theme-color; +} + +.subtle-link { + color: #000; +} + +.banner { + background-color: #fff; + color: #000; + padding: 1rem 15px; +} + +body { + background-color: #fff; +} + +.banner-title { + font-size: 2.6em; + margin-bottom: 0; + margin-top: 0; +} + +.banner-subtitle { + padding: 0; + font-weight: lighter; +} + +.content { + background-color: #fff; + text-align: justify; +} +@media (min-width: $md-width) { + + .content, .sidebar + { + margin: 1rem 2rem; + padding: 0 1rem; + padding-bottom: 1em; + } + + .banner-subtitle + { + margin: 0 2rem; + padding: 0 1rem; + } +} + +.page-title { + margin-bottom: 0; +} + +.page-subtitle { + font-size: 1em; + margin-bottom: 2em; + margin-left: 2em; + margin-top: 0; +} + +.page-body { + margin-bottom: 1em; +} + +.no-padding { + padding: 0; +} + +.no-margin { + margin: 0; +} + +.postpromonav { + .tags { + li:first-child:before { + content: ""; + } + + li:before { + content: $list-item-format; + } + } +} + +.metadata p:before { + content: $list-item-format; +} + +.translationslist p:before { + content: $list-item-format; +} + +.postlist { + li { + margin-bottom: .33em; + } + + .postlist .listdate:after { + content: $list-item-format; + } +} + +.social-links { + margin: 1em 0; +} + +.social-heading { + font-family: $heading-font; + top: -0.9em; + position: absolute; + font-size: 0.8em; + margin: 0 0; +} + +.sidebar { + p { + position: relative; + margin-bottom: 1.3em; + } +} + +.social-link { + font-family: $body-font; + font-size: 1.0em; + color: #000; + margin: 0 0; + font-weight: lighter; +} + +.sidebar-section { + margin-bottom: 3.5em; +} + +.sidebar-section { + ul { + list-style: none; + padding-left: 0; + } +} + +.sidebar-image { + width: 60%; + display: block; + margin-left: auto; + margin-right: auto; + margin-bottom: 1.0em; + border-radius: 15px; +} + +.footer { + text-align: right; + padding-top: 1em; +} diff --git a/themes/djmoch/sass/targets b/themes/djmoch/sass/targets @@ -0,0 +1 @@ +site.scss diff --git a/themes/djmoch/templates/base_helper.tmpl b/themes/djmoch/templates/base_helper.tmpl @@ -97,7 +97,7 @@ lang="{{ lang }}"> <link href="/assets/open-sans.css" rel="stylesheet" type="text/css"> <link href="/assets/playfair-display.css" rel="stylesheet" type="text/css"> <link href="/assets/bootstrap.min.css" rel="stylesheet" type="text/css"> - <link href="/assets/site.css" rel="stylesheet" type="text/css"> + <link href="/assets/css/site.css" rel="stylesheet" type="text/css"> <link href="/assets/fontawesome.css" rel="stylesheet" type="text/css"> <link href="/assets/css/code.css" rel="stylesheet" type="text/css"> {% endmacro %}