mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
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.
23 lines
937 B
HTML
23 lines
937 B
HTML
{{ define "header" }}{{ partial "page-header.html" . }}{{ end }}
|
|
{{ define "main" }}
|
|
<div class="flex-l mt2 mw8 center">
|
|
<article class="center cf pv5 ph3 ph4-ns mw7">
|
|
<header>
|
|
<p class="f6 b helvetica tracked">
|
|
{{ humanize .Section | upper }}
|
|
</p>
|
|
<h1 class="f1">
|
|
{{ .Title }}
|
|
</h1>
|
|
</header>
|
|
{{ $cpadding := $.Param "page_padding" | default ($.Param "default_padding") }}
|
|
{{ $cscale := $.Param "page_scale" | default ($.Param "default_scale") | default "f4" }}
|
|
{{ $calign := $.Param "page_align" | default ($.Param "default_align") }}
|
|
{{ $ccolor := $.Param "page_color" | default ($.Param "default_color") | default "mid-gray" }}
|
|
<div class="nested-copy-line-height lh-copy {{ $cpadding }} {{ $cscale }} {{ $calign }} nested-links nested-img {{ $ccolor }}">
|
|
{{ .Content }}
|
|
</div>
|
|
</article>
|
|
</div>
|
|
{{ end }}
|