Use consistent styling for hero-section titles (#406)

Closes #405
This commit is contained in:
Patrice Chalin 2020-09-18 16:42:17 -04:00 committed by GitHub
parent 2866d908e0
commit 8afd98ac89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 24 deletions

View File

@ -36,6 +36,7 @@
"codegen",
"grpc",
"helloworld",
"markdownify",
"proto",
"protobuf",
"protos",

View File

@ -1,3 +1,4 @@
{{/* cSpell:ignore URL's */}}
{{ define "title" -}}
404 Page not found – {{ site.Title -}}
{{ end -}}
@ -9,7 +10,7 @@
<section class="hero is-primary has-background-image">
<div class="hero-body">
<div class="container has-text-centered">
<p class="title is-size-1 is-size-2-mobile has-text-weight-bold">
<p class="title is-size-1 is-size-2-mobile">
Page not found
</p>
<p class="subtitle is-size-3 is-size-4-mobile has-text-grey-lighter has-text-weight-medium">

View File

@ -7,33 +7,33 @@
<section class="hero is-medium is-primary has-background-image">
<div class="hero-body">
<div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-bold{{ if or $desc $attr }} is-spaced{{ end }}">
{{ $title }}
<p class="title is-size-1 is-size-2-mobile{{ if or $desc $attr }} is-spaced{{ end }}">
{{- $title -}}
</p>
{{ with $attr }}
{{- with $attr -}}
<p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light">
{{ . }}
{{- . -}}
</p>
{{ end }}
{{- end -}}
{{ with $desc }}
{{- with $desc -}}
<p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light">
{{ . }}
{{- . -}}
</p>
{{ end }}
{{- end -}}
{{ with $date }}
{{ with $date -}}
<p class="is-size-4 is-size-mobile has-text-weight-bold">
<span class="icon has-margin-right has-text-grey-lighter">
<i class="fas fa-calendar-alt"></i>
</span>
{{- . -}}
</p>
{{ end }}
{{- end -}}
{{ with $authors }}
{{ $numAuthors := len . }}
{{ with $authors -}}
{{ $numAuthors := len . -}}
<br />
<p class="hero__author subtitle is-size-4 is-size-5-mobile">
@ -52,9 +52,9 @@
{{ with .position }}, {{ . | markdownify }}{{ end }}{{ if $notLast }}; {{ end -}}
{{- end -}}
</p>
{{ end }}
{{ end -}}
{{ with $author }}
{{ with $author -}}
<br />
<p class="hero__author subtitle is-size-4 is-size-5-mobile">

View File

@ -1,8 +1,8 @@
<section class="hero is-medium is-primary has-background-image">
<div class="hero-body">
<div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-bold">
{{ .Title }}
<p class="title is-size-1 is-size-2-mobile">
{{- .Title -}}
</p>
</div>
</div>

View File

@ -1,17 +1,17 @@
{{ $title := .Title }}
{{ $desc := .Params.description | markdownify }}
{{ $title := .Title -}}
{{ $desc := .Params.description | markdownify -}}
<section class="hero is-medium is-primary has-background-image">
<div class="hero-body">
<div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-light{{ if $desc }} is-spaced{{ end }}">
{{ $title }}
<p class="title is-size-1 is-size-2-mobile{{ if $desc }} is-spaced{{ end }}">
{{- $title -}}
</p>
{{ with $desc }}
{{- with $desc -}}
<p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light">
{{ . }}
{{- . -}}
</p>
{{ end }}
{{ end -}}
</div>
</div>
</section>