diff --git a/assets/scss/components/brand.scss b/assets/scss/components/brand.scss new file mode 100644 index 0000000..7fdb514 --- /dev/null +++ b/assets/scss/components/brand.scss @@ -0,0 +1,4 @@ +.brand { + padding-top: 1rem; + padding-bottom: 1rem; +} diff --git a/assets/scss/components/header.scss b/assets/scss/components/header.scss deleted file mode 100644 index 8a4c555..0000000 --- a/assets/scss/components/header.scss +++ /dev/null @@ -1,18 +0,0 @@ -header.brand { - margin-top: 0.5em; -} - -/* Main brand title */ -header.brand h1 { - margin: 0 0 0.5em 0; - font-weight: 400; - font-size: 3em; -} - -header.brand h2 { - margin: 1rem 0; -} - -header.brand hr { - // border-color: rgb(152, 152, 146); -} diff --git a/assets/scss/components/nav.scss b/assets/scss/components/nav.scss index 60c3644..605a0e6 100644 --- a/assets/scss/components/nav.scss +++ b/assets/scss/components/nav.scss @@ -1,8 +1,8 @@ -nav.menu { +.menu { margin: 1.4rem 0; } -nav.menu ul { +.menu ul { list-style: none; display: block; padding: 0; @@ -12,19 +12,13 @@ nav.menu ul { width: 87.5%; } -nav.menu li { +.menu li { display: inline-block; margin-right: 1rem; } -nav.menu li a { +.menu li a { text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; } - -nav.menu li a:hover, -nav.menu li a:active, -nav.menu li a:focus { - // background: inherit; -} diff --git a/assets/scss/hugo-tufte.scss b/assets/scss/hugo-tufte.scss index 03d6290..c26f8ac 100644 --- a/assets/scss/hugo-tufte.scss +++ b/assets/scss/hugo-tufte.scss @@ -1,17 +1,17 @@ -// VENDOR -@import "vendor/tufte.scss"; +// Tufte +@import "tufte"; -// OUR CODE +// Additional styles for Hugo @import "general"; -/// PAGES +/// Pages @import "pages/footer"; -/// COMPONENTS +/// Components @import "components/code-highlight"; @import "components/toc"; @import "components/nav"; -@import "components/header"; +@import "components/brand"; @import "components/meta"; // Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout @@ -19,4 +19,4 @@ @import "syntax/highlight-dark.scss" {{ else }} @import "syntax/highlight-light.scss" -{{ end }} \ No newline at end of file +{{ end }} diff --git a/assets/scss/vendor/tufte.scss b/assets/scss/tufte.scss similarity index 97% rename from assets/scss/vendor/tufte.scss rename to assets/scss/tufte.scss index f82151d..272232d 100644 --- a/assets/scss/vendor/tufte.scss +++ b/assets/scss/tufte.scss @@ -96,14 +96,14 @@ h3 { line-height: 1; } -p.author, p.date { +.author, .date { font-size: 1.4rem; font-weight: 400; margin: 1rem auto 1rem 0; line-height: 1; } -p.subtitle { +.subtitle { font-style: italic; margin-top: 1rem; margin-bottom: 1rem; @@ -130,7 +130,11 @@ section { padding-bottom: 1rem; } -section.page-list .content-title:first-child { +.page-list .content-title { + margin-top: 4.2rem; +} + +.page-list .content-title:first-child { margin-top: 1.4rem; } @@ -154,25 +158,24 @@ p { } /* Chapter Epigraphs */ -div.epigraph { +.epigraph { margin: 3em 0; } -div.epigraph > blockquote { +.epigraph > blockquote { margin-top: 3em; margin-bottom: 3em; } -div.epigraph > blockquote, -div.epigraph > blockquote > p { +.epigraph > blockquote { font-style: italic; } -div.epigraph > blockquote > footer { +.epigraph > blockquote > footer { font-style: normal; } -div.epigraph > blockquote > footer > cite { +.epigraph > blockquote > footer > cite { font-style: italic; } @@ -373,7 +376,7 @@ pre.code { clear: both; } -span.newthought { +.newthought { font-variant: small-caps; font-size: 1.2em; } diff --git a/assets/scss/vendor/_normalize.scss b/assets/scss/vendor/_normalize.scss deleted file mode 100644 index fd669eb..0000000 --- a/assets/scss/vendor/_normalize.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import 'normalize/variables'; -@import 'normalize/vertical-rhythm'; -@import 'normalize/normalize-mixin'; diff --git a/layouts/index.html b/layouts/index.html index 6d56339..622e814 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ define "main" }} -
+
{{ partial "brand.html" . }} {{ with .Content }}
diff --git a/layouts/partials/brand.html b/layouts/partials/brand.html index dfe0c7a..eaebca6 100644 --- a/layouts/partials/brand.html +++ b/layouts/partials/brand.html @@ -1,6 +1,6 @@

{{ .Site.Title}}

-

{{ .Site.Params.subtitle }}

+

{{ .Site.Params.subtitle }}

{{ partial "nav.html" . }}
diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html index 03cdc70..37b1247 100644 --- a/layouts/partials/content.header.html +++ b/layouts/partials/content.header.html @@ -1,39 +1,37 @@

- {{ if .IsNode }} - {{ .Title }} - {{ else }} - {{ .Title }}{{ if .Draft }} :: Draft {{end}} - {{ end }} + {{- if .IsNode -}} + {{- .Title -}} + {{- else -}} + {{- .Title -}}{{- if .Draft -}} :: Draft {{- end -}} + {{- end -}}

-{{ if .IsPage }} - {{ if .Params.subtitle }} -

{{ .Params.subtitle }}

- {{ end }} +{{- if .IsPage -}} + {{- if .Params.subtitle -}} +

{{ .Params.subtitle }}

+ {{- end -}} - {{ if or (eq .Type "post") (.Params.meta) }} + {{- if or (eq .Type "post") (.Params.meta) -}} - {{ end }} -{{ end }} + {{- end -}} +{{- end -}}