mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
theme: add id to h1 elements #384
This commit is contained in:
parent
5971d3d5fa
commit
c7435b476b
5 changed files with 10 additions and 5 deletions
|
@ -30,7 +30,7 @@
|
|||
<main id="body-inner" class="chapter" tabindex="-1">
|
||||
<div class="flex-block-wrapper">
|
||||
<article class="default">
|
||||
<h1>{{ T "title-404" }}</h1>
|
||||
<h1 id="{{ T "title-404" | urlize }}">{{ T "title-404" }}</h1>
|
||||
<p></p>
|
||||
<p>{{ T "message-404" }}</p>
|
||||
<p></p>
|
||||
|
|
|
@ -3,7 +3,12 @@
|
|||
<article>
|
||||
{{- $page := . }}
|
||||
|
||||
<h1>{{ if eq .Kind "term" }}{{ .Data.Singular | humanize }} {{ default "::" .Site.Params.titleSeparator }} {{ end }}{{ .Title }}</h1>
|
||||
{{- $title := "" }}
|
||||
{{- if eq .Kind "term" }}
|
||||
{{- $title = printf "%s %s " (.Data.Singular | humanize) (default "::" .Site.Params.titleSeparator) }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s%s" $title .Title }}
|
||||
<h1 id="{{ $title | urlize }}">{{ $title }}</h1>
|
||||
<ul>
|
||||
{{- range .Data.Terms.Alphabetical }}
|
||||
{{- $len := 0 }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- with $page }}
|
||||
<article class="chapter">
|
||||
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div>
|
||||
<h1>{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
|
||||
{{ $content | safeHTML }}
|
||||
<footer class="footline">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{- $content := .content }}
|
||||
{{- with $page }}
|
||||
<article class="default">
|
||||
{{ partial "heading-pre.html" . }}<h1>{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
|
||||
{{ $content | safeHTML }}
|
||||
<footer class="footline">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{- $content := .content }}
|
||||
{{- with $page }}
|
||||
<article class="home">
|
||||
{{ partial "heading-pre.html" . }}<h1>{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
{{ partial "heading-pre.html" . }}<h1 id="{{ .Title | urlize }}">{{ .Title }}</h1>{{ partial "heading-post.html" . }}
|
||||
|
||||
{{ $content | safeHTML }}
|
||||
<footer class="footline">
|
||||
|
|
Loading…
Reference in a new issue