Add guest art

This commit is contained in:
Joshua Goins 2023-07-02 22:24:51 -04:00
parent 961eeb75e7
commit 000f851bc4
26 changed files with 168 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -2,7 +2,7 @@
title: Art title: Art
layout: art layout: art
summary: My personal art gallery. summary: My personal art gallery.
new_banner: new_banner: A new section has been added, Guest Art!
commissions: true commissions: true
aliases: aliases:
- /gallery - /gallery

View file

@ -0,0 +1,4 @@
---
title: Guest Art
layout: guestart
---

View file

@ -0,0 +1,10 @@
---
artist: "SnickerPuffs"
date: 2023-06-27
layout: art-detail
filename: /art/guest-juritta1.webp
slug: guest-juritta1
characters:
- Juritta
---
Draw avatar above you challenge: https://knockout.chat/thread/634/15#post-1839973

View file

@ -0,0 +1,10 @@
---
artist: "Vulpeculas"
date: 2023-07-02
layout: art-detail
filename: /art/guest-juritta2.webp
slug: guest-juritta2
characters:
- Juritta
---
Artfight Attack: https://artfight.net/attack/4145358.revenge-w-juritta-3

View file

@ -0,0 +1,10 @@
---
artist: "nikkiwaffle"
date: 2023-07-02
layout: art-detail
filename: /art/guest-swordswoman1.webp
slug: guest-swordswoman1
characters:
- Mysterious Swordswoman
---
Artfight Attack: https://artfight.net/attack/4178441.awawa

View file

@ -0,0 +1,10 @@
---
artist: "GrumpySeaFoam"
date: 2023-07-02
layout: art-detail
filename: /art/guest-swordswoman2.webp
slug: guest-swordswoman2
characters:
- Mysterious Swordswoman
---
Artfight Attack: https://artfight.net/attack/4178956.mysterious-swordswoman

View file

@ -4,6 +4,6 @@
"sketchmarch2", "sketchmarch2",
"gamingforone" "gamingforone"
], ],
"new-banner": "", "new-banner": "A new section has been added, Guest Art!",
"commissions": true "commissions": true
} }

View file

@ -1,5 +1,6 @@
{ {
"changes": [ "changes": [
"2023-07-02: Added recent Art Fight attacks, and Guest Art pages.",
"2023-06-27: Added PS2 blog post, added Asuka thumbnail art.", "2023-06-27: Added PS2 blog post, added Asuka thumbnail art.",
"2023-06-26: Added a new blog post, improved tags/categories and added them to Blog & Software!", "2023-06-26: Added a new blog post, improved tags/categories and added them to Blog & Software!",
"2023-06-12: Added a changelog, updated some of the pages stylings. Hello!" "2023-06-12: Added a changelog, updated some of the pages stylings. Hello!"

View file

@ -0,0 +1,8 @@
{
"characters": [
"Juritta"
],
"date": "2023-06-27",
"artist": "SnickerPuffs",
"description": "Draw avatar above you challenge: https://knockout.chat/thread/634/15#post-1839973"
}

View file

@ -0,0 +1,8 @@
{
"characters": [
"Juritta"
],
"date": "2023-07-02",
"artist": "Vulpeculas",
"description": "Artfight Attack: https://artfight.net/attack/4145358.revenge-w-juritta-3"
}

View file

@ -0,0 +1,9 @@
{
"characters": [
"Mysterious Swordswoman"
],
"date": "2023-07-02",
"artist": "nikkiwaffle",
"description": "Artfight Attack: https://artfight.net/attack/4178441.awawa"
}

View file

@ -0,0 +1,9 @@
{
"characters": [
"Mysterious Swordswoman"
],
"date": "2023-07-02",
"artist": "GrumpySeaFoam",
"description": "Artfight Attack: https://artfight.net/attack/4178956.mysterious-swordswoman"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -7,7 +7,7 @@ def write_field(f, key, value):
f.write(key + ": " + value + "\n") f.write(key + ": " + value + "\n")
def parse_art_json(output_directory, filename, json_file, threed = False, animation = False): def parse_art_json(output_directory, filename, json_file, threed = False, animation = False, guest = False):
print(filename) print(filename)
json_data = json.load(json_file) json_data = json.load(json_file)
@ -20,7 +20,11 @@ def parse_art_json(output_directory, filename, json_file, threed = False, animat
else: else:
year = int(json_data["date"]) year = int(json_data["date"])
base_directory = os.path.join(art_output_directory, str(year)) directory = str(year)
if guest:
directory = "guest"
base_directory = os.path.join(art_output_directory, directory)
if not os.path.exists(base_directory): if not os.path.exists(base_directory):
os.mkdir(base_directory) os.mkdir(base_directory)
@ -30,6 +34,9 @@ def parse_art_json(output_directory, filename, json_file, threed = False, animat
if "title" in json_data: if "title" in json_data:
write_field(f, 'title', "\"{}\"".format(json_data["title"])) write_field(f, 'title', "\"{}\"".format(json_data["title"]))
if "artist" in json_data:
write_field(f, 'artist', "\"{}\"".format(json_data["artist"]))
if "date" in json_data: if "date" in json_data:
if "-" in json_data["date"]: if "-" in json_data["date"]:
write_field(f, 'date', json_data["date"]) write_field(f, 'date', json_data["date"])
@ -107,6 +114,7 @@ art_data_directory = '../art'
threed_data_directory = '../3d' threed_data_directory = '../3d'
animation_data_directory = '../animation' animation_data_directory = '../animation'
art_output_directory = '../content/art' art_output_directory = '../content/art'
guest_art_data_directory = '../guestart'
shutil.rmtree(art_output_directory) shutil.rmtree(art_output_directory)
os.mkdir(art_output_directory) os.mkdir(art_output_directory)
@ -287,3 +295,26 @@ with open(art_output_directory + '/stats/_index.md', 'w') as f:
f.write(' num: ' + str(num) + '\n') f.write(' num: ' + str(num) + '\n')
f.write('---\n') f.write('---\n')
# guest art
os.mkdir(art_output_directory + "/guest")
with open(art_output_directory + '/guest/_index.md', 'w') as f:
f.write('---\n')
write_field(f, 'title', 'Guest Art')
write_field(f, 'layout', 'guestart')
f.write('---\n')
for filename in os.listdir(guest_art_data_directory):
f = os.path.join(guest_art_data_directory, filename)
if os.path.isfile(f):
filename_without_ext = os.path.splitext(filename)[0]
if filename_without_ext == ".DS_Store" or filename_without_ext == ".directory":
continue
with open(f, "r") as file:
year, characters, tags = parse_art_json(art_output_directory, filename_without_ext, file, False, False, True)

View file

@ -6,3 +6,12 @@ imagesLoaded(document.querySelector('.grid'), function(instance) {
gutter: '.gutter-sizer' gutter: '.gutter-sizer'
}); });
}); });
imagesLoaded(document.querySelector('.second-grid'), function(instance) {
new Masonry('.second-grid', {
itemSelector: '.grid-item',
columnWidth: '.grid-sizer',
percentPosition: true,
gutter: '.gutter-sizer'
});
});

View file

@ -55,6 +55,15 @@
</tr> </tr>
{{ end }} {{ end }}
{{ with .Params.artist }}
<tr>
<th>Artist</th>
<td>
{{ . }}
</td>
</tr>
{{ end }}
{{ with .Params.program }} {{ with .Params.program }}
<tr> <tr>
<th>Program</th> <th>Program</th>

View file

@ -36,6 +36,7 @@
<a class="art-button" href="/art/characters">Characters</a> <a class="art-button" href="/art/characters">Characters</a>
<a class="art-button" href="/art/tags">Tags</a> <a class="art-button" href="/art/tags">Tags</a>
<a class="art-button" href="/art/stats">Stats</a> <a class="art-button" href="/art/stats">Stats</a>
<a class="art-button" href="/art/guest">Guest Art</a>
{{ if $.Params.commissions }} {{ if $.Params.commissions }}
<a class="art-button" href="/commission">Commissions</a> <a class="art-button" href="/commission">Commissions</a>

View file

@ -0,0 +1,14 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
<hr>
{{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }}
{{ if eq $paginator.PageNumber 1}}
<p>This is a collection of guest art made by other artists. The artist is listed in the details page of the artwork!</p>
<p>If you draw one of my characters, it will be featured on this page! If you want me to remove it for any reason (or maybe I forgot to add yours), please <a href="/contact">contact me</a>.</p>
{{ end }}
{{ partial "art-gallery" . }}
{{ end }}

View file

@ -1,14 +1,35 @@
{{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }} {{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }}
{{ $guest := false }}
<div class="grid"> <div class="grid">
<div class="grid-sizer"></div> <div class="grid-sizer"></div>
<div class="gutter-sizer"></div> <div class="gutter-sizer"></div>
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ if in .File.Dir "art/guest" }}
{{ $guest = true }}
{{ else }}
{{ partial "render-art" . }} {{ partial "render-art" . }}
{{ end }} {{ end }}
{{ end }}
</div> </div>
{{ if $guest }}
<h3>Guest Art</h3>
<hr/>
<div class="second-grid">
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
{{ range $paginator.Pages }}
{{ if in .File.Dir "art/guest" }}
{{ partial "render-art" . }}
{{ end }}
{{ end }}
</div>
{{ end }}
<div style="text-align: center;"> <div style="text-align: center;">
{{ with $paginator.Prev }} {{ with $paginator.Prev }}