Add commissions and statistics button to the main art page
This commit is contained in:
parent
17d5684d7f
commit
748873e068
9 changed files with 59 additions and 9 deletions
BIN
assets/commissions.png
Normal file
BIN
assets/commissions.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
BIN
assets/stats.png
Normal file
BIN
assets/stats.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Stats"
|
||||
title: "Statistics"
|
||||
layout: "art-stats"
|
||||
show_detail_pane: false
|
||||
---
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"commissions": true,
|
||||
"commissions": false,
|
||||
"featured": [
|
||||
"altswimsuit",
|
||||
"commission-midnighto51",
|
||||
|
|
|
@ -819,10 +819,10 @@ model-viewer {
|
|||
margin: 5px;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 5px;
|
||||
display: inline-grid;
|
||||
text-decoration: none;
|
||||
background-color: var(--background-tertiary);
|
||||
box-shadow: var(--shadow);
|
||||
position: relative;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
|
@ -874,3 +874,20 @@ model-viewer {
|
|||
#character-container {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.commission-button-text {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: var(--background-primary);
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#commission-open {
|
||||
color: green;
|
||||
}
|
||||
|
||||
#commission-closed {
|
||||
color: red;
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
{{ $.Scratch.Set "header-name" "Most Drawn Characters" }}
|
||||
{{ partial "fake-heading.html" $ }}
|
||||
|
||||
<ol>
|
||||
{{ range first 10 (index site.Taxonomies "characters").ByCount }}
|
||||
<div id="character-container" class="generic-con">
|
||||
{{ range first 4 (index site.Taxonomies "characters").ByCount }}
|
||||
{{ $year := .Page.Title }}
|
||||
{{ $num := .Count }}
|
||||
<a class="character" href="/art/characters/{{ urlize $year }}"><img class="gallery-img" width=256 height=256 src="{{ $.Site.Params.image_host }}/chars/{{ urlize $year }}.jpg"/><span>{{ $year }}<br>({{ $num }} artworks)</span></a>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
{{ $.Scratch.Set "header-name" "# of Artworks by Year" }}
|
||||
{{ partial "fake-heading.html" $ }}
|
||||
|
|
|
@ -62,6 +62,21 @@
|
|||
{{ .Scratch.Set "link" .RelPermalink }}
|
||||
{{ partial "art-fancy-button" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $.Site.GetPage "/commission" }}
|
||||
{{ .Scratch.Set "title" .Title }}
|
||||
{{ .Scratch.Set "img" "commissions.png" }}
|
||||
{{ .Scratch.Set "link" .RelPermalink }}
|
||||
{{ .Scratch.Set "commissions" true }}
|
||||
{{ partial "art-fancy-button" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ with $.Site.GetPage "/art/stats" }}
|
||||
{{ .Scratch.Set "title" .Title }}
|
||||
{{ .Scratch.Set "img" "stats.png" }}
|
||||
{{ .Scratch.Set "link" .RelPermalink }}
|
||||
{{ partial "art-fancy-button" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
{{ $img := .Scratch.Get "img" }}
|
||||
{{ $title := .Scratch.Get "title" }}
|
||||
{{ $link := .Scratch.Get "link" }}
|
||||
{{ $commissions := .Scratch.Get "commissions" }}
|
||||
|
||||
{{ with resources.Get $img }}
|
||||
<a class="art-fancy-button" href="{{ $link }}">
|
||||
<div style="display: inline-grid">
|
||||
<p>{{ $title }}</p>
|
||||
<img src="{{ .RelPermalink }}" width=400 height=150 />
|
||||
</div>
|
||||
|
||||
{{ if $commissions }}
|
||||
{{ $art_config := index $.Site.Data "art-config" }}
|
||||
{{ if $art_config.commissions }}
|
||||
<span class="commission-button-text" id="commission-open">OPEN</span>
|
||||
{{ else }}
|
||||
<span class="commission-button-text" id="commission-closed">CLOSED</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<strong>Could not find {{ $img }}!</strong>
|
||||
|
|
|
@ -1,2 +1,8 @@
|
|||
<a class="art-sidebar-button" href="/art/stats">Statistics</a>
|
||||
<a class="art-sidebar-button" href="/commission">Commission Info</a>
|
||||
|
||||
{{ $art_config := index $.Site.Data "art-config" }}
|
||||
{{ if $art_config.commissions }}
|
||||
<a class="art-sidebar-button" href="/commission">Commissions</a>
|
||||
{{ else }}
|
||||
<a class="art-sidebar-button" href="/commission">Commissions (CLOSED)</a>
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Reference in a new issue