paragraph only after first list item...

This commit is contained in:
Marcell Mars 2020-08-21 16:20:02 +02:00
parent 2e29830ba0
commit 9cb68e45d5
8 changed files with 134 additions and 62 deletions

View File

@ -21,5 +21,5 @@ disableKinds = ["RSS", "sitemap"]
[markup]
[markup.tableOfContents]
endLevel=4
ordered = false
ordered = true
startLevel = 1

View File

@ -421,15 +421,6 @@ template {
url('../fonts/great-vibes-v7-latin-ext_latin-regular.svg#GreatVibes') format('svg'); /* Legacy iOS */
}
/* preflight */
ol,
ul {
list-style: none;
margin: 0;
padding: 0;
}
body {
font-family: 'Vollkorn', serif;
font-weight: 400;
@ -470,7 +461,7 @@ body {
margin-bottom: 4rem;
}
li, .toc, .has, .afterhas, .aftertoc {
.has, .afterhas {
font-style: italic;
font-size: 1.4rem;
}
@ -485,13 +476,37 @@ li, .toc, .has, .afterhas, .aftertoc {
.leftcolumn {
grid-column: 1;
display: grid;
grid-template-columns: auto 1fr;
padding-right: 1.2rem;
position: relative;
}
.toc {
grid-column: 1;
#TableOfContents {
position: relative;
margin-left: -2rem;
margin-top: -1.5rem;
}
#TableOfContents li {
list-style: decimal inside;
padding-left: 0.5rem;
color: rgba(0, 0, 0, 0.4);
margin: 0;
padding: 0;
}
#TableOfContents li a {
font-family: 'Vollkorn';
font-size: 1.4rem;
font-weight: 500;
font-style: normal;
}
#TableOfContents > ol:first-child > li:first-child> a::after {
content: "¶";
color: rgba(0, 0, 0, 0.2);
font-size: 1.3em;
position: absolute;
margin-top: -0.3em;
top: 0;
}
.rightcolumn {
@ -507,6 +522,7 @@ li, .toc, .has, .afterhas, .aftertoc {
.content {
margin-top: 4rem;
padding-left: 3rem;
padding-right: 6rem;
}
/*
a::after {
@ -533,27 +549,22 @@ a:hover {
cursor: pointer;
}
#TableOfContents {
margin-left: -0.5em;
}
#TableOfContents li {
padding-left: 0.5em;
font-size: 1.3rem;
}
h1 {
display: none;
}
h2 {
font-weight: 500;
font-size: 1.6rem;
}
h2 {
h3 {
font-weight: 500;
font-size: 1.5rem;
}
h3 {
h4 {
font-weight: 500;
font-size: 1.4rem;
}
@ -577,3 +588,66 @@ blockquote {
background-color: white;
z-index: 10;
}
.topicbar {
display: none;
}
h2 + p:first-letter {
font-family: "Great Vibes", cursive;
color: rgba(0, 0, 0, 0.8);
font-size: 1.5em;
line-height: 0;
}
.hx {
position: relative;
}
.hpar {
position: absolute;
font-size: 1.7em;
font-style: normal;
color: rgba(0, 0, 0, 0.1);
top: 0;
margin-top: -0.4em;
}
body {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
h4 {counter-reset: h5}
h5 {counter-reset: h6}
h2:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h2;
content: counter(h2) ". "
}
h3:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h3;
content: counter(h2) "." counter(h3) ". "
}
h4:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h4;
content: counter(h2) "." counter(h3) "." counter(h4) ". "
}
h5:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h5;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "
}
h6:before {
color: rgba(0, 0, 0, 0.4);
counter-increment: h6;
content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". "
}
h2.nocount:before, h3.nocount:before, h4.nocount:before, h5.nocount:before, h6.nocount:before { content: ""; counter-increment: none }

View File

@ -15,7 +15,11 @@
</div>
{{ end }}
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{$currentNode := . }}
<h1>{{ .Title }}</h1>
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -4,14 +4,9 @@
<div class="grid">
<div class="leftcolumn">
<div class="toc">
<span class="sup">Table of Contents</span>
</div>
<div class="aftertoc">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
<div class="has">

View File

@ -28,6 +28,7 @@
{{ $currentSession := . }}
<link rel='stylesheet' href='{{ .Site.Home.RelPermalink }}css/svelte.css'>
<script defer src='{{ .Site.Home.RelPermalink }}js/svelte.js'></script>
<script defer src='{{ .Site.Home.RelPermalink }}js/sandpoints.js'></script>
<title>{{ block "title" . }}{{- .Title }} - {{ .Site.Title -}}{{ end }}</title>
</head>

View File

@ -1,12 +1,20 @@
{{ $currentSession := . }}
{{ if not .IsHome }}
<div class="header">
<a href="{{ .Site.Home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ substr $.Site.Home.Title 0 1 }}</span><i>{{ substr $.Site.Home.Title 1 }}</i></a>
{{ end }}
{{ $currentSession := . }}
{{ if not .IsHome }}
<div class="header">
<a href="{{ .Site.Home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ substr $.Site.Home.Title 0 1 }}</span><i>{{ substr $.Site.Home.Title 1 }}</i></a>
{{ end }}
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
<i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i>
{{ end }}
{{ end }}
{{ if eq .File.Dir "topic/" }}
<span class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
<i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i>
{{ end }}
{{ end }}
{{ if eq .File.Dir "session/" }}
<span class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
</div>

View File

@ -4,14 +4,9 @@
<div class="grid">
<div class="leftcolumn">
<div class="toc">
<span class="sup">Table of Contents</span>
</div>
<div class="aftertoc">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
<div class="has">

View File

@ -4,14 +4,9 @@
<div class="grid">
<div class="leftcolumn">
<div class="toc">
<span class="sup">Table of Contents</span>
</div>
<div class="aftertoc">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<div class="rightcolumn">
<div class="has">