diff --git a/assets/sass/_root.scss b/assets/sass/_root.scss index 2aa6faa8..0a31fd37 100644 --- a/assets/sass/_root.scss +++ b/assets/sass/_root.scss @@ -1,3 +1,4 @@ +$breakout: $gutters !default; $max-page-width: $max-content-width !default; :root { @@ -23,11 +24,12 @@ $max-page-width: $max-content-width !default; --radius-#{$name}: #{$radius}; } + --breakout: #{$breakout}; + --gutters-reverse: #{$gutters-reverse}; + --gutters: #{$gutters}; --heading-line-height: #{$heading-line-height}; + --indent-amount: #{$indent-amount}; --max-content-width: #{$max-content-width}; - --max-page-width: #{$max-page-width}; --max-line-width: #{$max-line-width}; - --gutters: #{$gutters}; - --gutters-reverse: #{$gutters-reverse}; - --indent-amount: #{$indent-amount}; + --max-page-width: #{$max-page-width}; } diff --git a/assets/sass/_variables.scss b/assets/sass/_variables.scss index 78651041..0933e0aa 100644 --- a/assets/sass/_variables.scss +++ b/assets/sass/_variables.scss @@ -147,6 +147,10 @@ $max-line-width: 70ch; $gutters: calc(5px + 1.5625vw); $gutters-reverse: calc(0px - (5px + 1.5625vw)); +// Breakout amount. +// How much should the "breakout" be. Defaults to gutters value. +// $breakout: calc(5px + 1.5625vw); + // The amount lists, blockquotes and comments are indented. // Use like this: var(--indent-amount) $indent-amount: 2rem; diff --git a/assets/sass/_zen.scss b/assets/sass/_zen.scss index 19c112f4..bfd2daab 100644 --- a/assets/sass/_zen.scss +++ b/assets/sass/_zen.scss @@ -47,13 +47,13 @@ label { // Article and content. -article > .content, +article, aside { - ul { + & > ul { @extend %ul-straight-left; } - ol { + & > ol { @extend %ol-straight-left; } } @@ -212,7 +212,7 @@ figure { // Form -.content { +main { input, textarea { &:not(:placeholder-shown):valid { diff --git a/assets/sass/base/forms/_forms.scss b/assets/sass/base/forms/_forms.scss index 48111a35..3fee1bda 100644 --- a/assets/sass/base/forms/_forms.scss +++ b/assets/sass/base/forms/_forms.scss @@ -5,11 +5,6 @@ form { // Add vertical rhythm margins. @include margin-block(1); - - // Set max text line width in main for readability. - .main & { - max-width: var(--max-line-width); - } } input, @@ -28,6 +23,14 @@ label { } } +// Set max text line width in main for readability. +input, +label, +textarea, +select { + max-width: var(--max-line-width); +} + fieldset { border: 1px solid var(--color-border); } diff --git a/assets/sass/base/grouping/_grouping.scss b/assets/sass/base/grouping/_grouping.scss index f1a401b3..f43cbb2c 100644 --- a/assets/sass/base/grouping/_grouping.scss +++ b/assets/sass/base/grouping/_grouping.scss @@ -74,7 +74,7 @@ hr { p { // Add vertical rhythm margins. - @include margin-block(.75); + @include margin-block(.375 .75); // Set max text line width in main for readability. .main & { diff --git a/assets/sass/base/headings/_headings.scss b/assets/sass/base/headings/_headings.scss index c5f185a6..300d065a 100644 --- a/assets/sass/base/headings/_headings.scss +++ b/assets/sass/base/headings/_headings.scss @@ -15,7 +15,7 @@ h5, %h5, h6, %h6 { - @include margin-block(1 .5, 'em'); + @include margin-block(1 0, 'em'); color: var(--color-headings); font-family: var(--ff-headings); font-weight: var(--fw-headings); diff --git a/assets/sass/components/box/_box.scss b/assets/sass/components/box/_box.scss index a805fedf..1ea12210 100644 --- a/assets/sass/components/box/_box.scss +++ b/assets/sass/components/box/_box.scss @@ -44,6 +44,10 @@ width: fit-content; } + &--gutter { + padding-inline: var(--gutters); + } + &--inverted { @extend %link-inverted; background: var(--color-border); @@ -51,7 +55,7 @@ // Make sure headings etc. also gets inverted. * { - color: inherit; + color: var(--color-text-bg); } } diff --git a/assets/sass/components/cards/_cards.scss b/assets/sass/components/cards/_cards.scss index d56566cf..2a622f01 100644 --- a/assets/sass/components/cards/_cards.scss +++ b/assets/sass/components/cards/_cards.scss @@ -23,6 +23,10 @@ grid-column: span 2; } + &--gutter { + padding-inline: var(--gutters); + } + &--inverted { @extend %link-inverted; background: var(--color-border); diff --git a/assets/sass/components/stretch/_stretch.scss b/assets/sass/components/stretch/_stretch.scss deleted file mode 100644 index 8a22de9f..00000000 --- a/assets/sass/components/stretch/_stretch.scss +++ /dev/null @@ -1,12 +0,0 @@ -// Stretch content to the page edge. -// -// Requeried: Set max-page-width to a larger value than max-content-width. - -.stretch, -%stretch { - width: 100%; - - .main & { - max-width: none; - } -} diff --git a/assets/sass/layouts/_layouts.scss b/assets/sass/layouts/_layouts.scss index 2733b2ec..b7058486 100644 --- a/assets/sass/layouts/_layouts.scss +++ b/assets/sass/layouts/_layouts.scss @@ -25,20 +25,35 @@ } @if $max-page-width > $max-content-width { + &__navigation > * { + max-width: var(--max-content-width); + + @include respond-to(s) { + margin-inline: auto; + } + } + &__main { + display: grid; + grid-template-columns: + [stretch-start] minmax(var(--gutters), 1fr) + [breakout-start] minmax(0, var(--breakout)) + [content-start] min(100% - var(--gutters) * 2, var(--max-content-width)) [content-end] + minmax(0, var(--breakout)) [breakout-end] + minmax(var(--gutters), 1fr) [stretch-end]; padding-inline: 0; - } - &__navigation > *, - &__main > * { - max-width: var(--max-content-width); + & > :not(.breakout, .stretch) { + grid-column: content; + } - &:not(.stretch) { - padding-inline: var(--gutters); + & > .breakout { + grid-column: breakout; } - @include respond-to(s) { - margin-inline: auto; + & > .stretch { + grid-column: stretch; + padding-inline: var(--gutters); } } } diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index fba8c6f7..2bbce848 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -54,7 +54,6 @@ @import 'components/meta/meta'; @import 'components/responsive-video/responsive-video'; @import 'components/spacing/spacing'; -@import 'components/stretch/stretch'; @import 'components/tables/tables'; @import 'components/tags/tags'; @import 'components/visually-hidden/visually-hidden'; diff --git a/layouts/_default/card.html b/layouts/_default/card.html index d3ff31d0..83055811 100644 --- a/layouts/_default/card.html +++ b/layouts/_default/card.html @@ -2,7 +2,5 @@

{{ .Title }}

-

{{ .Summary }}

-
diff --git a/layouts/_default/full.html b/layouts/_default/full.html index 7c79080e..afd20894 100644 --- a/layouts/_default/full.html +++ b/layouts/_default/full.html @@ -3,7 +3,6 @@

{{ .Title }}

{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}} -
+ {{ .Content }} -
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 43ed71b7..549c3fc0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,11 +4,7 @@

{{ .Title }}

-{{ with .Content -}} -
-{{ . }} -
-{{ end -}} +{{ .Content }} {{ $paginator := .Paginate (.Pages) -}} {{ range $paginator.Pages -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 559b4a03..fe2142d9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,15 +6,12 @@

{ {{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}} {{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}} -
+ {{ .Content }} -
-
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}} {{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}} -
{{ end -}} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 9b9ad48e..a7da3922 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,9 +1,7 @@
-

{{ .Title }}

+

{{ .Title }}

{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
-

{{ .Summary }}

-
diff --git a/layouts/index.html b/layouts/index.html index 846a1f48..2833818a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,11 +2,7 @@ {{ define "main" -}}
-{{ with .Content -}} -
-{{ . }} -
-{{ end -}} +{{ .Content }} {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}} {{ $paginator := .Paginate $pages -}} diff --git a/layouts/micro/list.html b/layouts/micro/list.html index a4a58147..10e34989 100644 --- a/layouts/micro/list.html +++ b/layouts/micro/list.html @@ -3,11 +3,7 @@

Micro posts

-{{ with .Content -}} -
-{{ . }} -
-{{ end -}} +{{ .Content }} {{ $paginator := .Paginate (.Pages) -}} {{ range $paginator.Pages -}} diff --git a/layouts/micro/single.html b/layouts/micro/single.html index b4835dd9..0b9d6d32 100644 --- a/layouts/micro/single.html +++ b/layouts/micro/single.html @@ -3,13 +3,10 @@

{{ .Title }}

-

-{{ partial "author-date" . }} -

+

{{ partial "author-date" . }}

-
+ {{ .Content }} -
{{ end -}} diff --git a/layouts/micro/summary.html b/layouts/micro/summary.html index 6020b8eb..2e00991e 100644 --- a/layouts/micro/summary.html +++ b/layouts/micro/summary.html @@ -1,11 +1,8 @@
-

-{{ partial "author-date" . }} -

+

{{ partial "author-date" . }}

-
+ {{ .Content }} -
diff --git a/layouts/podcast/full.html b/layouts/podcast/full.html index e817f2ea..a31cf450 100644 --- a/layouts/podcast/full.html +++ b/layouts/podcast/full.html @@ -3,8 +3,8 @@

{{ .Title }}

{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}} + {{ partial "podcast.html" . -}} -
+ {{ .Content }} -
diff --git a/layouts/podcast/single.html b/layouts/podcast/single.html index 7924da72..55ba41d8 100644 --- a/layouts/podcast/single.html +++ b/layouts/podcast/single.html @@ -6,10 +6,10 @@

{ {{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}} {{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}} + {{ partial "podcast.html" . -}} -
+ {{ .Content }} -
{{ end -}} diff --git a/layouts/taxonomy/summary.html b/layouts/taxonomy/summary.html index 18593fb2..aa3d555f 100644 --- a/layouts/taxonomy/summary.html +++ b/layouts/taxonomy/summary.html @@ -1,6 +1,4 @@

{{ .Title }} ({{ .Data.Pages.Len }})

-

{{ .Description }}

-