Move works to theme
This commit is contained in:
@ -1,36 +0,0 @@
|
|||||||
{{- $work := .work }}
|
|
||||||
{{- $works := .works }}
|
|
||||||
{{- $creators := .creators }}
|
|
||||||
{{- /* This is really ugly, but alas, it is precisely what we need. */ -}}
|
|
||||||
<dt><a href="{{ $work.url }}">{{ $work.title }}</a> <span class="author">by
|
|
||||||
{{ range $k, $author := $work.authors }}
|
|
||||||
{{- if index $creators $author }}<a href="{{ index $creators $author }}" target="_blank">{{ $author | markdownify }}</a>{{ else }}{{ $author | markdownify }}{{ end }}
|
|
||||||
{{- if ne (add $k 1) ($work.authors | len) }}, {{ end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- range $contributor := $work.contributors }},
|
|
||||||
{{ if index $creators $contributor }}<a href="{{ index $creators $contributor }}" target="_blank">{{ $contributor | markdownify }}</a>{{ else }}{{ $contributor | markdownify }}{{ end }}
|
|
||||||
<small>(contributor)</small>
|
|
||||||
{{- end }}
|
|
||||||
</span></dt>
|
|
||||||
<dd>
|
|
||||||
{{ $work.description | markdownify }}
|
|
||||||
<ul class="meta">
|
|
||||||
{{- if $work.type }}<li><em>Type:</em> {{ $work.type }}</li>{{- end }}
|
|
||||||
<li><em>Characters and dates:</em>
|
|
||||||
{{- range $k, $v := $work.years }}
|
|
||||||
{{ index $work.characters $k }} — {{ $v }}
|
|
||||||
{{- if ne (add $k 1) ($work.years | len) }}, {{- end }}
|
|
||||||
{{- end }}</li>
|
|
||||||
{{- if $work.cw }}<li><em>CWs:</em> {{ $work.cw }}</li>{{- end }}
|
|
||||||
{{- if $work.spoilers }}<li><em>Spoilers:</em> {{ $work.spoilers | markdownify }}</li>{{- end }}
|
|
||||||
</ul>
|
|
||||||
{{- $subworks := where $works "parent" "eq" $work.title }}
|
|
||||||
{{- if gt (len $subworks) 0 }}
|
|
||||||
<h3>Associated works</h3>
|
|
||||||
<dl>
|
|
||||||
{{- range $subwork := where $works "parent" "eq" $work.title }}
|
|
||||||
{{ partial "work.html" (dict "work" $subwork "works" $works "creators" $creators) }}
|
|
||||||
{{- end }}
|
|
||||||
</dl>
|
|
||||||
{{- end }}
|
|
||||||
</dd>
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
{{- $works := index hugo.Data (.Get "corpus") }}
|
|
||||||
{{- $collections := index hugo.Data (.Get "collections") }}
|
|
||||||
{{- $creators := index hugo.Data (.Get "creators") }}
|
|
||||||
<section class="works">
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
{{- range $work := sort (where (where $works "collection" nil) "parent" nil) "title" "asc" }}
|
|
||||||
{{ partial "work.html" (dict "work" $work "works" $works "creators" $creators) }}
|
|
||||||
{{- end }}
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
{{- range $collection := $collections }}
|
|
||||||
<h2>{{ $collection.title }}</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
{{- range $work := where $works "collection" $collection.id }}
|
|
||||||
{{ partial "work.html" (dict "work" $work "works" $works "creators" $creators) }}
|
|
||||||
{{- end }}
|
|
||||||
</dl>
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
</section>
|
|
||||||
@ -200,36 +200,11 @@ main.story .author, main.story .character, main.story h3 {
|
|||||||
margin-left: 1.5rem;
|
margin-left: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.works {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
.works dt {
|
.works dt {
|
||||||
background: rgba(127, 127, 127, 0.2);
|
|
||||||
background: linear-gradient(135deg, transparent 0.5rem, rgba(127, 127, 127, 0.2) 0) top left;
|
background: linear-gradient(135deg, transparent 0.5rem, rgba(127, 127, 127, 0.2) 0) top left;
|
||||||
margin: 0;
|
|
||||||
padding: 0 0 0.25rem 1rem;
|
|
||||||
text-decoration: none;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.works .author {
|
|
||||||
font-size: 14pt;
|
|
||||||
font-style: italic;
|
|
||||||
opacity: 0.75;
|
|
||||||
}
|
}
|
||||||
.works dd {
|
.works dd {
|
||||||
background-color: rgba(127, 127, 127, 0.1);
|
|
||||||
background: linear-gradient(315deg, transparent 0.5rem, rgba(127, 127, 127, 0.1) 0) bottom right;
|
background: linear-gradient(315deg, transparent 0.5rem, rgba(127, 127, 127, 0.1) 0) bottom right;
|
||||||
margin: 0 0 2rem 0;
|
|
||||||
padding: 0.25rem 1rem 0.25rem 2rem;
|
|
||||||
font-size: 16pt;
|
|
||||||
}
|
|
||||||
.works h2 {
|
|
||||||
margin-top: 4rem;
|
|
||||||
}
|
|
||||||
.works .meta {
|
|
||||||
font-size: 14pt;
|
|
||||||
list-style-type: none;
|
|
||||||
padding-top: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
|
|||||||
Submodule themes/maddybook updated: 4ecbb595ec...818f87bdda
Reference in New Issue
Block a user