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; margin: 1.4rem 0;
} }
nav.menu ul { .menu ul {
list-style: none; list-style: none;
display: block; display: block;
padding: 0; padding: 0;
@ -12,19 +12,13 @@ nav.menu ul {
width: 87.5%; width: 87.5%;
} }
nav.menu li { .menu li {
display: inline-block; display: inline-block;
margin-right: 1rem; margin-right: 1rem;
} }
nav.menu li a { .menu li a {
text-decoration: none; text-decoration: none;
letter-spacing: 0.05em; letter-spacing: 0.05em;
text-transform: uppercase; 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 // Tufte
@import "vendor/tufte.scss"; @import "tufte";
// OUR CODE // Additional styles for Hugo
@import "general"; @import "general";
/// PAGES /// Pages
@import "pages/footer"; @import "pages/footer";
/// COMPONENTS /// Components
@import "components/code-highlight"; @import "components/code-highlight";
@import "components/toc"; @import "components/toc";
@import "components/nav"; @import "components/nav";
@import "components/header"; @import "components/brand";
@import "components/meta"; @import "components/meta";
// Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout // Look at this https://gohugo.io/hugo-pipes/resource-from-template/#readout

View file

@ -96,14 +96,14 @@ h3 {
line-height: 1; line-height: 1;
} }
p.author, p.date { .author, .date {
font-size: 1.4rem; font-size: 1.4rem;
font-weight: 400; font-weight: 400;
margin: 1rem auto 1rem 0; margin: 1rem auto 1rem 0;
line-height: 1; line-height: 1;
} }
p.subtitle { .subtitle {
font-style: italic; font-style: italic;
margin-top: 1rem; margin-top: 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
@ -130,7 +130,11 @@ section {
padding-bottom: 1rem; 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; margin-top: 1.4rem;
} }
@ -154,25 +158,24 @@ p {
} }
/* Chapter Epigraphs */ /* Chapter Epigraphs */
div.epigraph { .epigraph {
margin: 3em 0; margin: 3em 0;
} }
div.epigraph > blockquote { .epigraph > blockquote {
margin-top: 3em; margin-top: 3em;
margin-bottom: 3em; margin-bottom: 3em;
} }
div.epigraph > blockquote, .epigraph > blockquote {
div.epigraph > blockquote > p {
font-style: italic; font-style: italic;
} }
div.epigraph > blockquote > footer { .epigraph > blockquote > footer {
font-style: normal; font-style: normal;
} }
div.epigraph > blockquote > footer > cite { .epigraph > blockquote > footer > cite {
font-style: italic; font-style: italic;
} }
@ -373,7 +376,7 @@ pre.code {
clear: both; clear: both;
} }
span.newthought { .newthought {
font-variant: small-caps; font-variant: small-caps;
font-size: 1.2em; 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" }} {{ define "main" }}
<article id="main"> <article id="main" class="home-page">
{{ partial "brand.html" . }} {{ partial "brand.html" . }}
{{ with .Content }} {{ with .Content }}
<section> <section>

View file

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

View file

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