Testing new list format

This commit is contained in:
Dorian Wood 2021-05-02 17:51:34 -04:00
parent 84e2201641
commit 0a526bfc96
7 changed files with 31 additions and 36 deletions

View File

@ -1,3 +1,3 @@
{{ partial "head.html" . }} {{ define "main" }}
<p> Well. Looks like we can't find the page you were looking for. One of us (probably me) typed something wrong. If it was me, send me an email so I can fix it please.</p> <p> Well. Looks like we can't find the page you were looking for. One of us (probably me) typed something wrong. If it was me, send me an email so I can fix it please.</p>
{{ partial "footer.html" . }} {{ end }}

View File

@ -3,13 +3,10 @@
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
<section id="list"> <section id="list">
{{- range first 10 .Data.Pages }} {{- range .Data.Pages }}
<a href="{{ .Permalink }}" class="button">
<section class="list-item"> <section class="list-item">
<a href="{{- .Permalink }}" class="button"><h2>{{ .Title }}</h2></a> {{ .Date.Format "2006-01-02" }} <a href="{{- .Permalink }}">{{ .Title }}</a>
{{ .Plain | truncate 500 | htmlUnescape | safeHTML }}
</section> </section>
</a>
{{- end }} {{- end }}
</section> </section>
{{ end }} {{ end }}

View File

@ -0,0 +1,15 @@
{{ define "title" }}
{{ .Title }}
{{ end }}
{{ define "main" }}
<main class="main-content">
{{ .Content }}
</main>
<section id="list">
{{- range .Data.Pages }}
<section class="list-item">
<a href="{{- .Permalink }}">{{ .Title }}</a>
</section>
{{- end }}
</section>
{{ end }}

View File

@ -1,17 +0,0 @@
{{ define "title" }}
{{ .Title }}
{{ end }}
{{ define "main" }}
<main class="main-content">
{{ .Content }}
</main>
<section id="projects">
{{- range first 10 .Data.Pages }}
<a href="{{ .Permalink }}" class="button">
<section class="project-tile">
<a href="{{- .Permalink }}" class="button"><h2>{{ .Title }}</h2></a>
</section>
</a>
{{- end }}
</section>
{{ end }}

View File

@ -133,21 +133,21 @@ h4 {
} }
#list { #list {
display: flex; /* display: flex; */
flex-wrap: wrap; /* flex-wrap: wrap; */
justify-content: space-evenly; /* justify-content: space-evenly; */
} }
.list-item{ .list-item{
max-width: 25em; /* max-width: 25em; */
margin: 1em; margin: .25em;
padding: 1em; padding: .25em;
border-width: 2px; /* border-width: 2px; */
border-style: solid; /* border-style: solid; */
border-color: var(--accent); /* border-color: var(--accent); */
border-radius: 20px; /* border-radius: 20px; */
/* box-shadow: 1em 1em var(--highlight); */ /* /\* box-shadow: 1em 1em var(--highlight); *\/ */
color: var(--color); /* color: var(--color); */
} }
.button { .button {