move scope to single/list body

This commit is contained in:
la Fleur 2020-11-17 18:30:20 +01:00
parent 4c8c6b24c6
commit db089ff385
5 changed files with 46 additions and 21 deletions

View File

@ -17,6 +17,14 @@ a:visited {
.path { .path {
display: inline; display: inline;
} }
.hero {
padding: 3em 0;
text-align: center;
.title {
font-weight: bold;
font-size: 3em;
}
}
body { body {
background-color: white; background-color: white;
@ -28,6 +36,7 @@ header {
padding-top: 1em; padding-top: 1em;
background-color: #9f5470; background-color: #9f5470;
background-color: pink; background-color: pink;
background: linear-gradient(to top right, rgba(232, 97, 9, 1), rgba(237, 94, 174, 1));
color: white; color: white;
a { a {
color: white; color: white;
@ -65,15 +74,13 @@ header {
align-items: baseline; align-items: baseline;
justify-content: space-around; justify-content: space-around;
max-width: 1200px; max-width: 1200px;
padding-bottom: 8em; .exposed {
span.exposed { font-weight: bold;
-webkit-animation: exposed 1s ease forwards; font-size: 1.3em;
position: absolute;
top: 4rem;
} }
@keyframes exposed { @keyframes exposed {
from { position: relative; top: 0; } from { position: relative; top: 0; }
to { position: absolute; top: 4rem; } to { position: absolute; top: 5rem; }
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
margin: auto; margin: auto;

View File

@ -1,5 +1,16 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
<div class="hero">
{{ partial "scope.html" . }}
</div>
{{ with .Params.intro }}
<div class="intro">
{{ . }}
</div>
{{ end }}
<ul> <ul>
{{ range .Pages }} {{ range .Pages }}
<li> <li>
@ -7,10 +18,15 @@
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
{{ with .Content }}
<section> <section>
{{ .TableOfContents }}
<div class="content">
{{ with .Content }}
{{ . }} {{ . }}
</section>
{{ end }} {{ end }}
</div>
</section>
</main> </main>
{{ end }} {{ end }}

View File

@ -1,9 +1,11 @@
{{ define "main" }} {{ define "main" }}
<main> <main>
<h1 class="post-title">
{{ .Title | markdownify }} <div class="hero">
</h1> {{ partial "scope.html" . }}
<div class="post-content"> </div>
<div class="content">
{{- with .Content -}} {{- with .Content -}}
<div> <div>
{{ . }} {{ . }}

View File

@ -1,4 +1,3 @@
{{ $currentPage := . }}
<header> <header>
<div class="title-bar"> <div class="title-bar">
{{ with resources.Get "img/titre-blanc.png" }} {{ with resources.Get "img/titre-blanc.png" }}
@ -17,9 +16,12 @@
</div> </div>
</div> </div>
<nav> <nav>
{{ $currentPage := . }}
{{ range $.Site.Sections }} {{ range $.Site.Sections }}
{{ if eq $currentPage.Section .Section }} {{ if eq $currentPage.Section .Section }}
{{ partial "scope.html" $currentPage }} <a href="{{ .Permalink }}" class="exposed">
{{ .Title | markdownify }}
</a>
{{ else }} {{ else }}
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">
{{ .Title | markdownify }} {{ .Title | markdownify }}
@ -28,4 +30,3 @@
{{ end }} {{ end }}
</nav> </nav>
</header> </header>

View File

@ -1,6 +1,5 @@
<span class="exposed"> {{- template "scoper" .Parent -}}<span class="title">{{ .Title }}</span>
{{- template "scoper" .Parent -}} <span class="title">{{ .Title }}</span>
</span>
{{- define "scoper" -}} {{- define "scoper" -}}
{{- if not .IsHome -}} {{- if not .IsHome -}}
{{- template "scoper" .Parent }}<a href="{{ .RelPermalink }}">{{ .Title }}</a> > {{ end -}} {{- template "scoper" .Parent }}<a href="{{ .RelPermalink }}">{{ .Title }}</a> > {{ end -}}