adjust subtitle html; remove redundant style

This commit is contained in:
loikein 2023-04-23 19:55:52 +01:00
parent b9805c3fbe
commit 95a0068d52
9 changed files with 52 additions and 74 deletions

View file

@ -0,0 +1,4 @@
.brand {
padding-top: 1rem;
padding-bottom: 1rem;
}

View file

@ -1,18 +0,0 @@
header.brand {
margin-top: 0.5em;
}
/* Main brand title */
header.brand h1 {
margin: 0 0 0.5em 0;
font-weight: 400;
font-size: 3em;
}
header.brand h2 {
margin: 1rem 0;
}
header.brand hr {
// border-color: rgb(152, 152, 146);
}

View file

@ -1,8 +1,8 @@
nav.menu {
.menu {
margin: 1.4rem 0;
}
nav.menu ul {
.menu ul {
list-style: none;
display: block;
padding: 0;
@ -12,19 +12,13 @@ nav.menu ul {
width: 87.5%;
}
nav.menu li {
.menu li {
display: inline-block;
margin-right: 1rem;
}
nav.menu li a {
.menu li a {
text-decoration: none;
letter-spacing: 0.05em;
text-transform: uppercase;
}
nav.menu li a:hover,
nav.menu li a:active,
nav.menu li a:focus {
// background: inherit;
}

View file

@ -1,17 +1,17 @@
// VENDOR
@import "vendor/tufte.scss";
// Tufte
@import "tufte";
// OUR CODE
// Additional styles for Hugo
@import "general";
/// PAGES
/// Pages
@import "pages/footer";
/// COMPONENTS
/// Components
@import "components/code-highlight";
@import "components/toc";
@import "components/nav";
@import "components/header";
@import "components/brand";
@import "components/meta";
// Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout
@ -19,4 +19,4 @@
@import "syntax/highlight-dark.scss"
{{ else }}
@import "syntax/highlight-light.scss"
{{ end }}
{{ end }}

View file

@ -96,14 +96,14 @@ h3 {
line-height: 1;
}
p.author, p.date {
.author, .date {
font-size: 1.4rem;
font-weight: 400;
margin: 1rem auto 1rem 0;
line-height: 1;
}
p.subtitle {
.subtitle {
font-style: italic;
margin-top: 1rem;
margin-bottom: 1rem;
@ -130,7 +130,11 @@ section {
padding-bottom: 1rem;
}
section.page-list .content-title:first-child {
.page-list .content-title {
margin-top: 4.2rem;
}
.page-list .content-title:first-child {
margin-top: 1.4rem;
}
@ -154,25 +158,24 @@ p {
}
/* Chapter Epigraphs */
div.epigraph {
.epigraph {
margin: 3em 0;
}
div.epigraph > blockquote {
.epigraph > blockquote {
margin-top: 3em;
margin-bottom: 3em;
}
div.epigraph > blockquote,
div.epigraph > blockquote > p {
.epigraph > blockquote {
font-style: italic;
}
div.epigraph > blockquote > footer {
.epigraph > blockquote > footer {
font-style: normal;
}
div.epigraph > blockquote > footer > cite {
.epigraph > blockquote > footer > cite {
font-style: italic;
}
@ -373,7 +376,7 @@ pre.code {
clear: both;
}
span.newthought {
.newthought {
font-variant: small-caps;
font-size: 1.2em;
}

View file

@ -1,3 +0,0 @@
@import 'normalize/variables';
@import 'normalize/vertical-rhythm';
@import 'normalize/normalize-mixin';

View file

@ -1,5 +1,5 @@
{{ define "main" }}
<article id="main">
<article id="main" class="home-page">
{{ partial "brand.html" . }}
{{ with .Content }}
<section>

View file

@ -1,6 +1,6 @@
<header class="brand">
<h1>{{ .Site.Title}}</h1>
<h2 class="subtitle">{{ .Site.Params.subtitle }}</h2>
<p class="subtitle">{{ .Site.Params.subtitle }}</p>
{{ partial "nav.html" . }}
<hr />
</header>

View file

@ -1,39 +1,37 @@
<section>
<h1 class="content-title">
{{ if .IsNode }}
{{ .Title }}
{{ else }}
{{ .Title }}{{ if .Draft }} :: Draft {{end}}
{{ end }}
{{- if .IsNode -}}
{{- .Title -}}
{{- else -}}
{{- .Title -}}{{- if .Draft -}} :: Draft {{- end -}}
{{- end -}}
</h1>
{{ if .IsPage }}
{{ if .Params.subtitle }}
<h3 class=subtitle>{{ .Params.subtitle }}</h3>
{{ end }}
{{- if .IsPage -}}
{{- if .Params.subtitle -}}
<p class=subtitle>{{ .Params.subtitle }}</p>
{{- end -}}
{{ if or (eq .Type "post") (.Params.meta) }}
{{- if or (eq .Type "post") (.Params.meta) -}}
<span class="content-meta">
{{ if .Params.author }}
{{- if .Params.author -}}
<p class="author">{{ .Params.author }}</p>
{{ end }}
{{- end -}}
{{ if not .Params.hidedate }}
{{- if not .Params.hidedate -}}
<p class="date">{{ .Date.Format "2006-01-02" }}</p>
{{end }}
{{- end -}}
{{ if not .Params.hidereadtime }}
{{ .ReadingTime }} min read
{{ end }}
{{- if not .Params.hidereadtime -}}
<span>{{ .ReadingTime }} min read&nbsp;</span>
{{- end -}}
{{ if .Params.categories }}
{{ range .Params.categories }}
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
{{ end }}
{{- range .Params.categories -}}
<a href="{{ "/categories/" | absURL }}{{ . | urlize }}">{{ . }}</a>&nbsp;
{{- end -}}
</span>
{{ end }}
{{ end }}
{{- end -}}
{{- end -}}
</section>