update notes page

This commit is contained in:
yequari 2024-09-19 18:27:07 -07:00
parent ec87e4ab7d
commit d7077c187d
2 changed files with 22 additions and 53 deletions

View File

@ -1,26 +1,23 @@
{{ define "main" }} {{ define "main" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ .Content }} {{ .Content }}
<section class="content posts h-feed hfeed notes-list"> <section class="content posts h-feed hfeed">
{{ $taxonomy := "tags" }}
{{ $section := "notes" }}
{{ range $term, $weightedPages := index site.Taxonomies $taxonomy }}
{{ $termPage := site.GetPage (printf "%s/%s" $taxonomy $term) }}
{{ $termPages := where $weightedPages "Page.Section" $section }}
{{ $amount := $termPages.Len }}
{{ if gt $amount 0 }}
<section class="notes-tag">
<h2>{{ $termPage.LinkTitle }}</h2>
<ul> <ul>
{{ range sort $termPages "Page.Title" }} <li class="note-item"><h2>Title</h2><h2>Tags</h2></li>
<li> {{ range (where .Site.RegularPages.ByTitle "Section" "notes") }}
<li class="note-item">
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ $taxonomy := "tags" }}
{{ with .GetTerms $taxonomy }}
<span>
{{ range $k, $_ := . -}}
{{ if $k }}, {{ end }}
<a class="tag" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{- end }}
{{ end }}
</span>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>
</section>
{{ end }}
{{ end }}
</section> </section>
{{ end }} {{ end }}

View File

@ -1,30 +1,3 @@
.notes-list {
display: flex;
flex-flow: row wrap;
}
.notes-tag {
flex: 1 3 250px;
margin: 10px;
padding: 0 10px;
}
/**/
/* .notes-tag h2 { */
/* background: white; */
/* margin: 0; */
/* padding: 0.3rem 0.5rem; */
/* } */
/**/
.notes-tag ul {
padding-bottom: 2em;
list-style-type: disc;
margin: 0;
}
/**/
/* .notes-tag ul li { */
/* padding-top: 0.3em; */
/* } */
:root { :root {
--avatar-width: 50px; --avatar-width: 50px;
--avatar-padding: calc(var(--avatar-width) / 10); --avatar-padding: calc(var(--avatar-width) / 10);
@ -82,17 +55,16 @@
font-size: 1.1rem; font-size: 1.1rem;
} }
li.note-item {
display: flex;
justify-content: space-between;
}
.index-content { .index-content {
grid-row: 1 / 2; grid-row: 1 / 2;
grid-column: 1 / span 6; grid-column: 1 / span 6;
} }
/* .index-status { */
/* margin-top: -15vh; */
/* grid-row: 1 / 2; */
/* grid-column: 1 / 2; */
/* } */
.index-social { .index-social {
grid-row: 2 / 3; grid-row: 2 / 3;
grid-column: 9 / span 2; grid-column: 9 / span 2;