diff --git a/content/art/_index.md b/content/art/_index.md index d5fd8fc..44381e7 100644 --- a/content/art/_index.md +++ b/content/art/_index.md @@ -2,6 +2,8 @@ title: Art layout: art summary: My personal art gallery. +new_banner: You can now vote on artwork! +commissions: true aliases: - /gallery featured: diff --git a/data/art-config.json b/data/art-config.json index b49ee86..bf19c11 100644 --- a/data/art-config.json +++ b/data/art-config.json @@ -3,5 +3,7 @@ "gamingforone", "goinghome", "orbit-correction" - ] + ], + "new-banner": "You can now vote on artwork!", + "commissions": true } diff --git a/scripts/gen_art.py b/scripts/gen_art.py index b2b37c8..af93001 100644 --- a/scripts/gen_art.py +++ b/scripts/gen_art.py @@ -93,6 +93,8 @@ year_stats = {} total_art = 0 character_stats = {} tag_stats = {} +new_banner = "" +comissions_enabled = False for filename in os.listdir(art_data_directory): f = os.path.join(art_data_directory, filename) @@ -140,6 +142,11 @@ with open('../data/art-config.json', 'r') as f: featured_pieces = json_data["featured"] + if "new-banner" in json_data: + new_banner = json_data["new-banner"] + + comissions_enabled = json_data["commissions"] + with open(art_output_directory + '/_index.md', 'w') as f: f.write('---\n') @@ -148,6 +155,9 @@ with open(art_output_directory + '/_index.md', 'w') as f: write_field(f, 'summary', 'My personal art gallery.') + write_field(f, 'new_banner', new_banner) + write_field(f, 'commissions', str(comissions_enabled).lower()) + f.write('aliases:\n') f.write('- /gallery\n') diff --git a/themes/red/assets/css/site.css b/themes/red/assets/css/site.css index e45fb7d..3bfaf9e 100644 --- a/themes/red/assets/css/site.css +++ b/themes/red/assets/css/site.css @@ -407,8 +407,15 @@ pre { height: 50px; line-height: 50px; text-align: center; - border: 1px solid black; + border: 1px outset black; border-radius: 5px; margin-top: 10px; margin-bottom: 10px; +} + +.new-banner { + border: 1px outset black; + border-radius: 5px; + padding: 5px; + text-align: center; } \ No newline at end of file diff --git a/themes/red/layouts/_default/art.html b/themes/red/layouts/_default/art.html index 6185606..194f9f3 100644 --- a/themes/red/layouts/_default/art.html +++ b/themes/red/layouts/_default/art.html @@ -6,6 +6,10 @@ {{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }} {{ if eq $paginator.PageNumber 1}} + {{ with $.Params.new_banner }} +
+ {{ end }} +Welcome to my art gallery! I have saved my art since 2016, and this site contains the most complete archive of my work.
Contains risque art, so you should probably not view this on a work computer. @@ -23,6 +27,10 @@ Characters Tags Stats + + {{ if $.Params.commissions }} + Commissions + {{ end }} {{ end }}