John Pursey a70c2a11f3 Add tachyons-style class overrides for layouts
This change adds overrides for text scale, color, alignment, and padding
in all layouts. This can be configured in site or page parameters, and
can target the default for all layouts (mostly useful for scale and
color), or for a specific layout (home, post, list, page, or terms).

The parameters are named in the following way: <type>_<style>:
- default_scale: Defines default scale for content (aka f5)
- default_color: Defines default color for content (aka mid-gray)
- default_padding: Defines default padding for content (aka ph*/pv*)
- default_align: Defines default alignment for content (aka tc/tj)

This can be overridden for "home", "post", "list", "page", or "terms" by
using instead of "default". If a type-specific style is not specified,
then it will fall back on "default", and if default is not specified, it
will fall back on the Ananke theme default.

Of course, theme users may put whatever classes they want in these
settings, but it still is valuable to specify what will be overridden
from the theme.
2021-12-12 10:15:24 -08:00

27 lines
1.1 KiB
HTML

{{ define "main" }}
{{ $data := .Data }}
<article class="cf pa3 pa4-m pa4-l">
{{ $cpadding := $.Param "terms_padding" | default ($.Param "default_padding") }}
{{ $cscale := $.Param "terms_scale" | default ($.Param "default_scale") | default "f4" }}
{{ $calign := $.Param "terms_align" | default ($.Param "default_align") }}
{{ $ccolor := $.Param "terms_color" | default ($.Param "default_color") | default "mid-gray" }}
<div class="measure-wide-l center {{ $cpadding }} {{ $cscale }} {{ $calign }} lh-copy nested-copy-line-height nested-links nested-img {{ $ccolor }}">
{{ .Content }}
</div>
</article>
<div class="mw8 center">
<section class="ph4">
{{ range $key, $value := .Data.Terms }}
<h2 class="f1">
<a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link blue hover-black">
{{ $.Data.Singular | humanize }}: {{ $key }}
</a>
</h2>
{{ range $value.Pages }}
{{ partial "summary.html" . }}
{{ end }}
{{ end }}
</section>
</div>
{{ end }}