diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-21 17:57:36 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-21 17:57:36 +0900 |
| commit | c0a92547c6aca4d604df51a85e6afda9710798fd (patch) | |
| tree | 5a9575cc5f1be28725495a5199134002efd18dd6 | |
| parent | da6069fab18eef1764e5dee7c3b554810fa21f5c (diff) | |
created content/, created layouts/
| -rw-r--r-- | content/recordings/index.md | 5 | ||||
| -rw-r--r-- | layouts/recordings/recordings-plain.html | 77 |
2 files changed, 82 insertions, 0 deletions
diff --git a/content/recordings/index.md b/content/recordings/index.md new file mode 100644 index 0000000..33e3f43 --- /dev/null +++ b/content/recordings/index.md @@ -0,0 +1,5 @@ +--- +title: "Daily Notes" +url: "/recordings/" +layout: "recordings-plain" +--- diff --git a/layouts/recordings/recordings-plain.html b/layouts/recordings/recordings-plain.html new file mode 100644 index 0000000..1b1b82b --- /dev/null +++ b/layouts/recordings/recordings-plain.html @@ -0,0 +1,77 @@ +<!doctype html> +<meta charset="utf-8" /> +<title>{{ .Title }}</title> +<meta name="viewport" content="width=device-width, initial-scale=1" /> +<style> + body { + font-family: + system-ui, + Segoe UI, + Roboto, + Apple SD Gothic Neo, + AppleGothic, + sans-serif; + max-width: 900px; + margin: 32px auto; + padding: 0 16px; + } + h1 { + margin-bottom: 12px; + } + ul { + line-height: 1.9; + } + a { + text-decoration: none; + } + a:hover { + text-decoration: underline; + } + video { + width: 100%; + height: auto; + margin: 12px 0; + } + .meta { + color: #666; + margin-top: 4px; + } +</style> + +<h1>Recordings</h1> + +<div id="player" style="display: none"> + <video id="video" controls preload="metadata"></video> + <div id="meta" class="meta"></div> +</div> + +<ul id="list"> + {{ range .Resources.Match "*.{mp4,mov}" }} + <li> + <a href="{{ .RelPermalink }}" data-name="{{ .Name }}" class="vid"> + {{ .Name }} + </a> + </li> + {{ else }} + <li>No recordings found.</li> + {{ end }} +</ul> + +<script> + document.addEventListener("DOMContentLoaded", () => { + const list = document.getElementById("list"); + const wrap = document.getElementById("player"); + const video = document.getElementById("video"); + const meta = document.getElementById("meta"); + list.addEventListener("click", (e) => { + const a = e.target.closest("a.vid"); + if (!a) return; + e.preventDefault(); + video.src = a.getAttribute("href"); + video.play().catch(() => {}); + wrap.style.display = ""; + const name = a.dataset.name || video.src.split("/").pop(); + meta.textContent = name; + }); + }); +</script> |
