consolidate layouts

This commit is contained in:
Joshua Goins 2022-12-27 22:34:31 -05:00
parent cae38d5e53
commit 4fe9627f14
34 changed files with 262 additions and 495 deletions

View file

@ -12,7 +12,6 @@ and moving onto basic grammar and counting (hence why the rest of this sentence
### Links
* [Resume](/resume) - hire me!
* [Mastodon](https://mastodon.art/@redstrate) - my microblogging... blog
* [sourcehut](https://sr.ht/~redstrate) - lovely code forge containing my lovely code
* [Newgrounds](https://redstrate.newgrounds.com/) - collection of my recent art

View file

@ -10,7 +10,7 @@ arttags:
![
Two young girls are facing towards the viewer. The one on the left has blond hair, and doing a peace sign. The other girl is laughing and laying her hands on her skirt. They're in the street, with a stone wall and houses in the distance.
](/art/after-school.webp)
## Commentary
### Commentary
This was sitting in sketch form for a few years, and I finally decided to color it. I quite like the expressions the two are making :-)

View file

@ -10,7 +10,7 @@ arttags:
![
A young woman is walking along a mountain path. She has long brown hair, dark eyes and pale skin. She is wearing dark clothes, with golden accents and holding a long sword. While she is making eye contact with the viewer, she is keeping a slight smirk.
](/art/after-the-rain.webp)
## Commentary
### Commentary
Who is this mysterious sword maiden, and where is she going next? I love how the background turned out in this piece.

View file

View file

@ -10,7 +10,7 @@ arttags:
![
A bunny girl is looking at the viewer, and pulling back a bow towards something behind them. She has dark brown hair, long ears, greenish eyes and pale skin. Behind is her is a dense, untamed forest. She is wearing dark clothing, adorned by brass and greenish hues.
](/art/bard.webp)
## Commentary
### Commentary
This is a full painting I did of my FFXIV character. Overall, I'm pretty happy with how this turned out, but the background isn't fantastic. At the time, I didn't know that filter masks were a thing in Krita, so I ended up pushing it back to Procreate and doing the finishing touches there.

View file

@ -12,7 +12,7 @@ arttags:
![
From left to right: Asuka, Rei, and Mari are standing on top of a dark blue sky. Asuka has one hand on her hip, and making eye contact. Rei is looking up and is holding her elbow. Mari has a hand above her chest. Asuka has orange-brown hair, and a red plugsuit. Rei has pale blue hair, and a dark blue plugsuit. Mari has brown hair, and a bright pink plugsuit.
](/art/eva-girls.webp)
## Commentary
### Commentary
This is one of my more complex pieces in 2021, and I spent many hours toiling away on it. I like the end result, but I kind of wish I slapped some shading on it...

View file

@ -10,7 +10,7 @@ arttags:
![
A painting of a road split by a two track railway crossing. there are numerous power lines, cables and road signs littering the roadside. there is a sidewalk visible in part of the frame, but no one is on it. there are visible cars and non-descript buildings in the distance.
](/art/goinghome.webp)
## Commentary
### Commentary
My last painting of 2022 (I think). Based on a real photo :-)

View file

@ -12,7 +12,7 @@ A young succubus is opening up the door to her apartment. She has pale blue hair
She has four arms, one of which is turning the knob to the door. Another two hands are holding grocery bags, and the last
is inside of her jacket pocket. She is wearing a red jacket, and dark gray shorts.
](/art/grocery-shopping.webp)
## Commentary
### Commentary
This is the first proper "finished" drawing of Merume. I love multiarm designs so I finally broke down and came up with
a concept for her. Her initial name was going to be Meru, but a quick google search showed another succubus under

View file

@ -10,7 +10,7 @@ arttags:
![
A blonde-haired knight is looking at the viewer. She is leaning on her trusty sword, and has some chestplates and basic armor on.
](/art/knight.webp)
## Commentary
### Commentary
Looks like this knight is ready for anything! It doesn't look like her legs are very protected though...

View file

@ -11,7 +11,7 @@ arttags:
![
Female Byleth is in a swimsuit, a dark bikini with an extra belt and holding a knife. She is looking down at the viewer. She has dark blue hair, pale skin and bright blue eyes. She has a flower tucked in her hair.
](/art/mari-and-asuka.webp)
## Commentary
### Commentary
This is my first proper painted character piece, and I'm pretty happy with how it turned out still. Why does she need a knife on the beach though?

View file

@ -12,7 +12,7 @@ A woman sits against a fence, looking at the viewer. She has golden hair, a crow
white armor adorned with black and neon green accents. Her hair is flowing in the wind, and she is currently sat against
a fence on a bridge. In the background is the rest of the town, sitting above the sea of clouds.
](/art/mythra.webp)
## Commentary
### Commentary
I always wanted to draw some Xenoblade Chronicles 2 fan art, but unfortunately it took a
while before I got around to it! This is Mythra, while she's standing around in Torigoth.

View file

@ -10,7 +10,7 @@ arttags:
An office worker lady looks at the viewer. She has a can of a non-descript drink in one hand, and another one underneath her thigh.
She is wearing an unbuttoned collared shirt, and a short black shirt. She's in a red booth, and in front of a table. An incandescent light is flooding the room with an orange glow.
](/art/office-date.webp)
## Commentary
### Commentary
This is actually a much older piece, but I touched it up to make it look more "modern" and fit in with the rest of my work. It looks like she might be a little intoxicated!

View file

@ -10,7 +10,7 @@ arttags:
![
Two rocket boosters, currently firing at full thrust. The ship is trying to avoid orbital collision.
](/art/orbit-correction.webp)
## Commentary
### Commentary
This is something a bit different from what I usually do, which is a rocket! Technically, it's really just two giant boosters.
Based off of the same one in the Rebuild of Evangelion 3.0 opening, which is probably one of my favorite sequences (ever).

View file

@ -10,7 +10,7 @@ arttags:
![
Female Byleth is in a swimsuit, a dark bikini with an extra belt and holding a knife. She is looking down at the viewer. She has dark blue hair, pale skin and bright blue eyes. She has a flower tucked in her hair.
](/art/summer-byleth.webp)
## Commentary
### Commentary
This is my first proper painted character piece, and I'm pretty happy with how it turned out still. Why does she need a knife on the beach though?

View file

@ -12,7 +12,7 @@ arttags:
![
Mari, Asuka and Rei are on the beach. These three girls from left to right have brown hair, orange and blue hair with varying hues of pale skin. Mari is wearing a white bikini, Asuka some form of one piece and Rei is wearing a two-piece swimsuit. Mari is playing with Asuka's hair, which is causing Asuka some embarrassment.
](/art/summer-eva-girls.webp)
## Commentary
### Commentary
I drew this while on a trip, and I thought it was about time to do a summer-themed Evangelion drawing! Mari is of course having some fun with Asuka!

View file

@ -11,7 +11,7 @@ Three different drawings of the same girl. She has brown hair, pale skin and dar
crop top, and some baggy gray sweatpants. On the left she is pointing at her leg, and standing the other leg. On the right, she is
stretching one of her arms. In the last one, she is looking down at the viewer.
](/art/workingout.webp)
## Commentary
### Commentary
This is a recreation of a sketch I did in 2020, where I tried to do it in my "new style". I actually really liked how this turned out, all of the poses and faces turned out cute!

View file

@ -1,34 +0,0 @@
---
title: "Resume"
---
https://redstrate.com | josh@redstrate.com
Self-committed and experienced programmer that can use multiple languages, various tools and self-taught experience to accomplish tasks ranging from low-level reverse engineering up to creating fully functioning game engines. Most proficient in systems programming languages such as C and C++.
Currently looking for an internship.
## Education
* AA from Florida State College of Jacksonville, 2018-2021.
* University of North Florida, since 2021 - expected to graduate in 2023.
## Technical Skills
To be written :-)
## Portfolio and Artifacts
More of my projects are accessible at https://redstrate.com/projects. Below is only a small selection.
### Prism: https://redstrate.com/projects/prism
Game engine which can render on top of the custom implemented RHI (Render Hardware Interface) which currently has Vulkan and Metal backends. The game engine also has several other subsystems, such as input handling, material compilation and asset pipelines. This engine differs from my previous ones as it is built with scalability in mind, and can even on lower end systems such as a phone. Some interesting effects are implemented that are typically found in most modern game engines, including physically based rendering, SMAA for anti-aliasing and PCSS for shadows.
### Silica Viewer: https://redstrate.com/projects/silica-viewer
Written to fill my own niche of viewing art canvases from a proprietary art program that only runs on iOS devices called Procreate. Initial software was implemented using knowledge gleaned from other open source projects (credited in the repository) but quickly evolved into a much more complex application, involving replicating the original Procreate drawing engine including clipping layers, rendering masks and blending modes. An existing PSD writing library (called PSDWriter) was modified in order to support the more complex feature set I needed. The app is also currently published on the macOS App Store.
### Trinity: https://redstrate.com/projects/trinity
Also written to fill a niche with a nice looking Matrix client that copied Discord's interface. Does not use any pre-existing Matrix library, and was written solely on the Matrix specification. Originally written in 2018, but I revived it in 2022 by implementing some basic end-to-end encryption support which involved using libolm - a cryptography library.

View file

@ -43,7 +43,7 @@ def parse_art(title, year, date, original_filename, filename, file):
f.write(filename)
f.write('.webp)\n')
f.write('## Commentary\n')
f.write('### Commentary\n')
f.write(document.field('Description').required_string_value())
f.write('\n')

View file

@ -13,20 +13,17 @@
{{- end -}}
{{- with $img -}}
<figure>
<a href="{{ $img.RelPermalink }}" data-download="true">
{{ if eq .MediaType.SubType "svg" }}
<img class="article-img" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" />
{{ else }}
<img class="article-img" width="{{ $img.Width }}" height="{{ $img.Height }}" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" />
{{ end }}
</a>
<figure>
<a href="{{ $img.RelPermalink }}" data-download="true">
{{ if eq .MediaType.SubType "svg" }}
<img class="article-img" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" />
{{ else }}
<img class="article-img" width="{{ $img.Width }}" height="{{ $img.Height }}" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" />
{{ end }}
</a>
<figcaption>{{ $.Text | safeHTML }}</figcaption>
</figure>
<figcaption>{{ $.Text | safeHTML }}</figcaption>
</figure>
{{- else -}}
<em>Unable to find image {{ $url }}!</em>
<em>Unable to find image {{ $url }}!</em>
{{- end -}}

View file

@ -2,7 +2,7 @@
<h2>{{ .Title }}</h2>
<div>
{{ .Content }}
{{ .Content }}
</div>
<table>
@ -14,40 +14,31 @@
</time>
</td>
</tr>
{{ with .Params.arttags }}
<tr>
<th>Tags</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/tags/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
<tr>
<th>Tags</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/tags/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
{{ end }}
{{ with .Params.characters }}
<tr>
<th>Characters</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/characters/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
<tr>
<th>Characters</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/characters/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
{{ end }}
</table>
<h3>Comments</h3>
<script
data-isso="//comments.redstrate.com/"
data-isso-title=""
data-isso-avatar="false"
data-isso-vote="false"
data-isso-reveal-on-click="5"
src="//comments.redstrate.com/js/embed.min.js" async crossorigin></script>
<section id="isso-thread" data-title="{{ .Title }}" data-isso-id="{{ .File.ContentBaseName }}">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
{{ partial "comments" . }}
{{ end }}

View file

@ -7,110 +7,13 @@
<p>If you wish to follow me when I post new art, you can follow me on <a href="https://mastodon.art/@redstrate">Mastodon</a>, <a href="https://www.pixiv.net/en/users/58118005" >Pixiv</a>, <a href="https://redstrate.newgrounds.com/">Newgrounds</a> or my <a href="/art/index.xml">Art RSS Feed!</a></p>
{{ $paginator := .Paginate (where .Pages "Type" "art") 50 }}
{{ $paginator := .Paginate (where .Pages "Type" "art") }}
{{ if eq $paginator.PageNumber 1}}
<h3>Featured Artwork</h3>
<div class="gallery-con">
{{ range $.Param "featured" }}
<figure class="gallery-fig">
{{ $full := resources.Get (printf "art/%s" .filename) }}
{{ if $full }}
{{ partial "featured-art" . }}
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
{{ $month := 1 }}
{{ if .date }}
{{ $split := split .date "-" }}
{{ $month = index $split 0 }}
{{ end }}
{{ $path := printf "/art/%d/%.2d/%s" (int .year) (int $month) $filename_without_ext}}
<a href="{{ $path }}" aria-label="Click to view details">
{{ $title := .title }}
{{ with resources.Get (printf "art-thumbs/%s" .filename) }}
<img class="gallery-img" alt="{{ $title }}" width="128" height="128" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
</a>
<figcaption>
{{ with .title }}
"{{ . }}"
{{ end }}
</figcaption>
{{ else }}
<em>CANNOT FIND {{ .filename }}</em>
{{ end }}
</figure>
{{ end }}
</div>
<h3>Years</h3>
<div class="generic-con year-con">
{{ range $.Param "years" }}
{{ $year := . }}
<a href="/art/{{ . }}">
{{ $thumbp := printf "/year-thumbs/%s.webp" . }}
{{ with resources.Get $thumbp }}
<img width="512" height="256" alt="{{ $year }}" class="gallery-img article-img" src="{{ .RelPermalink }}">
{{ end }}
</a>
{{ end }}
</div>
{{ partial "art-years" . }}
{{ end }}
<div class="grid">
{{ range $paginator.Pages }}
{{ $full := resources.Get (printf "art/%s.webp" .Params.slug) }}
{{ if $full }}
{{ $filename_without_ext := .Params.slug }}
{{ $month := 1 }}
{{ $year := 1 }}
{{ if .Params.date }}
{{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ $year = index $split 3 }}
{{ end }}
<a href="{{ .Permalink }}">
{{ $path := printf "/art/%d/%.2d/%s" (int $year) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "art/%s.webp" .Params.slug)).Resize "300x" }}
{{ with $image }}
<img class="grid-item" width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
{{ else }}
</a>
<em>CANNOT FIND {{.Params.slug }}</em>
{{ end }}
{{ end }}
</div>
{{ with $paginator.Prev }}
<a href="{{ .URL }}">Prev</a>
{{ end }}
{{ with $paginator.Next }}
<a href="{{ .URL }}">Next</a>
{{ end }}
{{ $site := resources.Get "js/site.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ partial "art-gallery" . }}
{{ end }}

View file

@ -1,48 +1,3 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ $paginator := .Paginate (where .Pages "Type" "art") 50 }}
<div class="grid">
{{ range $paginator.Pages }}
{{ $pixiv_icon := resources.Get "pixiv.webp" }}
{{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
{{ $full := resources.Get (printf "art/%s.webp" .Params.slug) }}
{{ if $full }}
{{ $filename_without_ext := .Params.slug }}
{{ $month := 1 }}
{{ if .Params.date }}
{{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ end }}
<a href="{{ .Permalink }}">
{{ $path := printf "/art/%d/%.2d/%s" (int 2022) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "art/%s.webp" .Params.slug)).Resize "600x" }}
{{ with $image }}
<img class="grid-item" width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
{{ else }}
</a>
<em>CANNOT FIND {{.Params.slug }}</em>
{{ end }}
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
{{ $site := resources.Get "js/site.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ partial "art-tag" . }}
{{ end }}

View file

@ -1,55 +1,3 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ $paginator := .Paginate (where .Pages "Type" "art") 50 }}
<div class="grid">
{{ range $paginator.Pages }}
{{ $pixiv_icon := resources.Get "pixiv.webp" }}
{{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
{{ $full := resources.Get (printf "art/%s.webp" .Params.slug) }}
{{ if $full }}
{{ $filename_without_ext := .Params.slug }}
{{ $month := 1 }}
{{ if .Params.date }}
{{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ end }}
<a href="{{ .Permalink }}">
{{ $path := printf "/art/%d/%.2d/%s" (int 2022) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "art/%s.webp" .Params.slug)).Resize "600x" }}
{{ with $image }}
<img class="grid-item" width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
{{ else }}
</a>
<em>CANNOT FIND {{.Params.slug }}</em>
{{ end }}
{{ end }}
</div>
{{ template "_internal/pagination.html" . }}
<script>
imagesLoaded( document.querySelector('.grid'), function( instance ) {
console.log('all images are loaded');
var msnry = new Masonry( '.grid', {
itemSelector: '.grid-item',
columnWidth: 200,
fitWidth: true,
gutter: 10
});
});
</script>
{{ partial "art-tag" . }}
{{ end }}

View file

@ -6,31 +6,32 @@
<table class="w-full table-auto mt-4">
<tr>
{{ if and (.File) (in .File.Dir "software") }}
<th>Name</th>
<th>Description</th>
<th>Year Created</th>
<th>Name</th>
<th>Description</th>
<th>Year Created</th>
{{ else }}
<th>Title</th>
<th>Summary</th>
<th>Date</th>
<th>Title</th>
<th>Summary</th>
<th>Date</th>
{{ end }}
</tr>
{{ range .Data.Pages.ByDate.Reverse }}
<tr>
<td class="border-t"><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<tr>
<td class="border-t"><a href="{{ .RelPermalink }}">{{ .Title }}</a></td>
<td class="border-t">
{{ .Summary }}
</td>
<td class="border-t">
{{ .Summary }}
</td>
<td class="border-t">
{{ if and (.File) (in .File.Dir "software") }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format " 2006"}}</time>
{{ else }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format "Jan 2, 2006"}}</time>
{{ end }}
</td>
</tr>
<td class="border-t">
{{ if and (.File) (in .File.Dir "software") }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format " 2006"}}</time>
{{ else }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format "Jan 2, 2006"}}</time>
{{ end }}
</td>
</tr>
{{ end }}
</table>
{{ end }}

View file

@ -1,44 +1,38 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
<h2>{{ .Title }}</h2>
<table>
{{ with $.Param "source" }}
<tr>
<td>Source Code</td>
<td><a href='{{ . }}'>{{ . }}</a></td>
</tr>
{{ end }}
{{ with $.Param "license" }}
<tr>
<td>License</td>
<td>{{ . }}</td>
</tr>
{{ end }}
<tr>
<td>Year Created</td>
<td><time datetime='{{ .Date.Format "2006" }}'>{{ .Date.Format "2006"}}</time></td>
</tr>
<tr>
<td>Tags</td>
<td>
{{ $len := (len .Params.tags) }}
{{ range $index, $element := .Params.tags }}
<a href="/tags/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
</table>
<table>
{{ with $.Param "source" }}
<tr>
<td>Source Code</td>
<td><a href='{{ . }}'>{{ . }}</a></td>
</tr>
{{ end }}
{{ .Content }}
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ with $.Param "license" }}
<tr>
<td>License</td>
<td>{{ . }}</td>
</tr>
{{ end }}
<tr>
<td>Year Created</td>
<td><time datetime='{{ .Date.Format "2006" }}'>{{ .Date.Format "2006"}}</time></td>
</tr>
<tr>
<td>Tags</td>
<td>
{{ $len := (len .Params.tags) }}
{{ range $index, $element := .Params.tags }}
<a href="/tags/{{ lower . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
</table>
{{ .Content }}
{{ partial "related" . }}
{{ end }}

View file

@ -1,106 +1,26 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ if in .File.Dir "blog" }}
<p>
Posted on
<time datetime="{{ .Page.Lastmod.Format "Mon Jan 10 17:13:38 2020 -0700" }}" class="text-muted">
{{ $.Date.Format "January 02, 2006" }}
</time>
(Updated on
<time datetime="{{ .Page.Lastmod.Format "Mon Jan 10 17:13:38 2020 -0700" }}" class="text-muted">
{{ $.Page.Lastmod.Format "January 02, 2006" }}
</time>)
</p>
<p>
Posted on
<time datetime="{{ .Page.Lastmod.Format "Mon Jan 10 17:13:38 2020 -0700" }}" class="text-muted">
{{ $.Date.Format "January 02, 2006" }}
</time>
(Updated on
<time datetime="{{ .Page.Lastmod.Format "Mon Jan 10 17:13:38 2020 -0700" }}" class="text-muted">
{{ $.Page.Lastmod.Format "January 02, 2006" }}
</time>)
</p>
{{ end }}
<div>
{{ .Content }}
{{ .Content }}
</div>
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ partial "related" . }}
{{ if in .File.Dir "blog" }}
<h3>Comments</h3>
<script
data-isso="//comments.redstrate.com/"
data-isso-title=""
data-isso-avatar="false"
data-isso-vote="false"
data-isso-reveal-on-click="5"
src="//comments.redstrate.com/js/embed.min.js" async crossorigin></script>
<section id="isso-thread" data-title="{{ .Title }}" data-isso-id="{{ .File.ContentBaseName }}">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
{{ end }}
{{ with .Params.comments }}
<h3>Mastodon Comments</h3>
<p>I <a href="https://{{ .host }}/@{{ .username }}/{{ .id }}">posted this</a> to my Mastodon! You can use any Fediverse account (Mastodon, Pleroma, etc) to <a class="button" href="https://{{ .host }}/interact/{{ .id }}?type=reply">reply</a>.</p>
<p id="mastodon-comments-list"><button id="load-comment">Load comments</button></p>
<noscript><p>You need JavaScript to view the comments.</p></noscript>
{{ $domscript := resources.Get "js/purify.min.js" }}
<script src="{{ $domscript.Permalink }}" type="text/javascript"></script>
<script type="text/javascript">
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}
document.getElementById("load-comment").addEventListener("click", function() {
document.getElementById("load-comment").innerHTML = "Loading";
fetch('https://{{ .host }}/api/v1/statuses/{{ .id }}/context')
.then(function(response) {
return response.json();
})
.then(function(data) {
if(data['descendants'] &&
Array.isArray(data['descendants']) &&
data['descendants'].length > 0) {
document.getElementById('mastodon-comments-list').innerHTML = "";
data['descendants'].forEach(function(reply) {
reply.account.display_name = escapeHtml(reply.account.display_name);
reply.account.emojis.forEach(emoji => {
reply.account.display_name = reply.account.display_name.replace(`:${emoji.shortcode}:`,
`<img src="${escapeHtml(emoji.static_url)}" alt="Emoji ${emoji.shortcode}" height="20" width="20" />`);
});
mastodonComment =
`<div class="mastodon-comment">
<div class="avatar">
<img src="${escapeHtml(reply.account.avatar_static)}" height=60 width=60 alt="">
</div>
<div class="content">
<div class="author">
<a href="${reply.account.url}" rel="nofollow">
<span>${reply.account.display_name}</span>
<span class="disabled">${escapeHtml(reply.account.acct)}</span>
</a>
<a class="date" href="${reply.uri}" rel="nofollow">
${reply.created_at.substr(0, 10)}
</a>
</div>
<div class="mastodon-comment-content">${reply.content}</div>
</div>
</div>`;
document.getElementById('mastodon-comments-list').appendChild(DOMPurify.sanitize(mastodonComment, {'RETURN_DOM_FRAGMENT': true}));
});
} else {
document.getElementById('mastodon-comments-list').innerHTML = "<p>Not comments found</p>";
}
});
});
</script>
{{ partial "comments" . }}
{{ end }}
{{ end }}

View file

@ -0,0 +1,49 @@
{{ $paginator := .Paginate (where .Pages "Type" "art") }}
<div class="grid">
{{ range $paginator.Pages }}
{{ $full := resources.Get (printf "art/%s.webp" .Params.slug) }}
{{ if $full }}
{{ $filename_without_ext := .Params.slug }}
{{ $month := 1 }}
{{ $year := 1 }}
{{ if .Params.date }}
{{ $split := split .Params.date "-" }}
{{ $month = index $split 0 }}
{{ $year = index $split 3 }}
{{ end }}
<a href="{{ .Permalink }}">
{{ $path := printf "/art/%d/%.2d/%s" (int $year) (int $month) $filename_without_ext}}
{{ $title := .Params.title }}
{{ $image := (resources.Get (printf "art/%s.webp" .Params.slug)).Resize "300x" }}
{{ with $image }}
<img class="grid-item" width="{{ .Width }}" height="{{ .Height }}" alt="{{ $title }}" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
{{ else }}
</a>
<em>CANNOT FIND {{.Params.slug }}</em>
{{ end }}
{{ end }}
</div>
{{ with $paginator.Prev }}
<a href="{{ .URL }}">Prev</a>
{{ end }}
{{ with $paginator.Next }}
<a href="{{ .URL }}">Next</a>
{{ end }}
{{ $site := resources.Get "js/site.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>

View file

@ -0,0 +1,5 @@
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ partial "art-gallery" . }}

View file

@ -0,0 +1,12 @@
<h3>Years</h3>
<div class="generic-con year-con">
{{ range $.Param "years" }}
{{ $year := . }}
<a href="/art/{{ . }}">
{{ $thumbp := printf "/year-thumbs/%s.webp" . }}
{{ with resources.Get $thumbp }}
<img width="512" height="256" alt="{{ $year }}" class="gallery-img article-img" src="{{ .RelPermalink }}">
{{ end }}
</a>
{{ end }}
</div>

View file

@ -0,0 +1,17 @@
<h3>Comments</h3>
{{ if hugo.IsProduction }}
<script
data-isso="//comments.redstrate.com/"
data-isso-title=""
data-isso-avatar="false"
data-isso-vote="false"
data-isso-reveal-on-click="5"
src="//comments.redstrate.com/js/embed.min.js" async crossorigin></script>
<section id="isso-thread" data-title="{{ .Title }}" data-isso-id="{{ .File.ContentBaseName }}">
<noscript>Javascript needs to be activated to view comments.</noscript>
</section>
{{ else }}
<p>Comments are disabled in development mode.</p>
{{ end }}

View file

@ -0,0 +1,43 @@
<h3>Featured Artwork</h3>
<div class="gallery-con">
{{ with .Site.GetPage "/art" }}
{{ range .Param "featured" }}
<figure class="gallery-fig">
{{ $full := resources.Get (printf "art/%s" .filename) }}
{{ if $full }}
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
{{ $month := 1 }}
{{ if .date }}
{{ $split := split .date "-" }}
{{ $month = index $split 0 }}
{{ end }}
{{ $path := printf "/art/%d/%.2d/%s" (int .year) (int $month) $filename_without_ext}}
<a href="{{ $path }}" aria-label="Click to view details">
{{ $title := .title }}
{{ with resources.Get (printf "art-thumbs/%s" .filename) }}
<img class="gallery-img" alt="{{ $title }}" width="128" height="128" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
</a>
<figcaption>
{{ with .title }}
"{{ . }}"
{{ end }}
</figcaption>
{{ else }}
<em>CANNOT FIND {{ .filename }}</em>
{{ end }}
</figure>
{{ end }}
{{ end }}
</div>

View file

@ -0,0 +1,9 @@
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}

View file

@ -1,43 +1 @@
<h3>Featured Artwork</h3>
<div class="gallery-con">
{{ with .Site.GetPage "/art" }}
{{ range .Param "featured" }}
<figure class="gallery-fig">
{{ $full := resources.Get (printf "art/%s" .filename) }}
{{ if $full }}
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
{{ $month := 1 }}
{{ if .date }}
{{ $split := split .date "-" }}
{{ $month = index $split 0 }}
{{ end }}
{{ $path := printf "/art/%d/%.2d/%s" (int .year) (int $month) $filename_without_ext}}
<a href="{{ $path }}" aria-label="Click to view details">
{{ $title := .title }}
{{ with resources.Get (printf "art-thumbs/%s" .filename) }}
<img class="gallery-img" alt="{{ $title }}" width="128" height="128" src="{{ .Permalink }}"/>
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
</a>
<figcaption>
{{ with .title }}
"{{ . }}"
{{ end }}
</figcaption>
{{ else }}
<em>CANNOT FIND {{ .filename }}</em>
{{ end }}
</figure>
{{ end }}
{{ end }}
</div>
{{ partial "featured-art" }}

View file

@ -1,9 +1,9 @@
<script
data-isso="//comments.redstrate.com/"
data-isso-title=""
data-isso-avatar="false"
data-isso-vote="false"
src="//comments.redstrate.com/js/embed.min.js" crossorigin async></script>
data-isso="//comments.redstrate.com/"
data-isso-title=""
data-isso-avatar="false"
data-isso-vote="false"
src="//comments.redstrate.com/js/embed.min.js" crossorigin async></script>
<section id="isso-thread" data-title="Guestbook" data-isso-id="/guestbook">
<noscript>Javascript needs to be activated to view comments.</noscript>