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", "codegen",
"grpc", "grpc",
"helloworld", "helloworld",
"markdownify",
"proto", "proto",
"protobuf", "protobuf",
"protos", "protos",

View File

@ -1,3 +1,4 @@
{{/* cSpell:ignore URL's */}}
{{ define "title" -}} {{ define "title" -}}
404 Page not found – {{ site.Title -}} 404 Page not found – {{ site.Title -}}
{{ end -}} {{ end -}}
@ -9,7 +10,7 @@
<section class="hero is-primary has-background-image"> <section class="hero is-primary has-background-image">
<div class="hero-body"> <div class="hero-body">
<div class="container has-text-centered"> <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 Page not found
</p> </p>
<p class="subtitle is-size-3 is-size-4-mobile has-text-grey-lighter has-text-weight-medium"> <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"> <section class="hero is-medium is-primary has-background-image">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-bold{{ if or $desc $attr }} is-spaced{{ end }}"> <p class="title is-size-1 is-size-2-mobile{{ if or $desc $attr }} is-spaced{{ end }}">
{{ $title }} {{- $title -}}
</p> </p>
{{ with $attr }} {{- with $attr -}}
<p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light"> <p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light">
{{ . }} {{- . -}}
</p> </p>
{{ end }} {{- end -}}
{{ with $desc }} {{- with $desc -}}
<p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light"> <p class="subtitle is-size-3 is-size-4-mobile has-text-weight-light">
{{ . }} {{- . -}}
</p> </p>
{{ end }} {{- end -}}
{{ with $date }} {{ with $date -}}
<p class="is-size-4 is-size-mobile has-text-weight-bold"> <p class="is-size-4 is-size-mobile has-text-weight-bold">
<span class="icon has-margin-right has-text-grey-lighter"> <span class="icon has-margin-right has-text-grey-lighter">
<i class="fas fa-calendar-alt"></i> <i class="fas fa-calendar-alt"></i>
</span> </span>
{{- . -}} {{- . -}}
</p> </p>
{{ end }} {{- end -}}
{{ with $authors }} {{ with $authors -}}
{{ $numAuthors := len . }} {{ $numAuthors := len . -}}
<br /> <br />
<p class="hero__author subtitle is-size-4 is-size-5-mobile"> <p class="hero__author subtitle is-size-4 is-size-5-mobile">
@ -52,9 +52,9 @@
{{ with .position }}, {{ . | markdownify }}{{ end }}{{ if $notLast }}; {{ end -}} {{ with .position }}, {{ . | markdownify }}{{ end }}{{ if $notLast }}; {{ end -}}
{{- end -}} {{- end -}}
</p> </p>
{{ end }} {{ end -}}
{{ with $author }} {{ with $author -}}
<br /> <br />
<p class="hero__author subtitle is-size-4 is-size-5-mobile"> <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"> <section class="hero is-medium is-primary has-background-image">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<p class="title is-size-1 is-size-2-mobile has-text-weight-bold"> <p class="title is-size-1 is-size-2-mobile">
{{ .Title }} {{- .Title -}}
</p> </p>
</div> </div>
</div> </div>

View File

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