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

View File

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

View File

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

View File

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

View File

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