This commit is contained in:
Joshua Goins 2023-04-12 23:35:57 -04:00
parent cbed3a91e8
commit 6fd782c676
9 changed files with 1194 additions and 7 deletions

BIN
assets/3d/lantern.glb Normal file

Binary file not shown.

Binary file not shown.

BIN
assets/3d/sakura.glb Normal file

Binary file not shown.

View file

@ -57,27 +57,30 @@ menu:
- name: 'Art' - name: 'Art'
url: '/art' url: '/art'
weight: 2 weight: 2
- name: '3D'
url: '/3D'
weight: 3
- name: 'Music' - name: 'Music'
url: '/music' url: '/music'
weight: 3 weight: 4
- name: 'Software' - name: 'Software'
url: '/software' url: '/software'
weight: 4 weight: 5
- name: 'Videos' - name: 'Videos'
url: 'https://tube.ryne.moe/@redchannel' url: 'https://tube.ryne.moe/@redchannel'
weight: 5 weight: 6
- name: 'Downloads' - name: 'Downloads'
url: '/downloads' url: '/downloads'
weight: 6 weight: 7
- name: 'Links' - name: 'Links'
url: '/links' url: '/links'
weight: 7 weight: 8
- name: 'Guestbook' - name: 'Guestbook'
url: '/guestbook' url: '/guestbook'
weight: 8 weight: 9
- name: 'About' - name: 'About'
url: '/about' url: '/about'
weight: 9 weight: 10
footer: footer:
- name: 'Blog Feed' - name: 'Blog Feed'
url: '/blog/index.xml' url: '/blog/index.xml'

6
content/3d/_index.md Normal file
View file

@ -0,0 +1,6 @@
---
title: 3D
layout: 3d-gallery
summary: My personal art gallery.
json: "3d"
---

37
data/3d.json Normal file
View file

@ -0,0 +1,37 @@
{
"categories": [
{
"name": "Uncategorized",
"description": "Test",
"years": [
{
"year": 2016,
"pieces": [
{
"title": "Lantern",
"filename": "lantern.glb"
}
]
},
{
"year": 2022,
"pieces": [
{
"title": "Sakura",
"filename": "sakura.glb"
}
]
},
{
"year": 2023,
"pieces": [
{
"title": "Planet Express Ship",
"filename": "planet-express-ship.glb"
}
]
}
]
}
]
}

View file

@ -431,3 +431,8 @@ pre {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
model-viewer {
width: 640px;
height: 480px;
}

1102
themes/red/assets/js/model-viewer.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,34 @@
{{ define "main" }}
<h2>{{ .Title }}</h2>
<hr>
{{ .Content }}
{{ $art := (index site.Data ($.Param "json")) }}
{{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
{{ range $art.categories }}
<h3>{{ .name }}</h3>
<p>{{ .description }}</p>
{{ range sort .years "year" "desc" }}
<h4>{{ .year }}</h4>
<div class="gallery">
{{ range .pieces }}
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
{{ with resources.Get $full }}
<model-viewer src="{{ .RelPermalink }}" shadow-intensity="1" camera-controls touch-action="pan-y"></model-viewer>
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
{{ $site := resources.Get "js/model-viewer.min.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | minify | fingerprint | resources.PostProcess }}
{{ end }}
<script type="module" src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ end }}