summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorUser Mms <mms@voyager.local>2024-10-25 22:59:34 +0200
committerUser Mms <mms@voyager.local>2024-10-25 22:59:34 +0200
commit792972d14a5b375ca8eb786855125f92b4248d83 (patch)
tree84eeff67a0359114cd625047aca506171f114ded /layouts
parentf41501862b342cb3f322d16b1549183d91f10494 (diff)
feat: trek is back
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/ep-table.html38
-rw-r--r--layouts/star-trek/baseof.html13
-rw-r--r--layouts/star-trek/list.html2
-rw-r--r--layouts/star-trek/redirect.html9
-rw-r--r--layouts/star-trek/single.html2
5 files changed, 37 insertions, 27 deletions
diff --git a/layouts/shortcodes/ep-table.html b/layouts/shortcodes/ep-table.html
index 59448a1..5614cb3 100644
--- a/layouts/shortcodes/ep-table.html
+++ b/layouts/shortcodes/ep-table.html
@@ -1 +1,37 @@
-{{ .Inner }}
+{{- $caption := .Inner }}
+{{- $page := .Page }}
+{{- $site := .Site }}
+
+{{ with $file := .Get 0 }}
+{{ with resources.Get $file}}
+{{ with . | transform.Unmarshal }}
+<table class="eptab">
+ <tr>
+ <th scope="col">Air date</th>
+ <th scope="col">Ep#</th>
+ <th scope="col">Prod#</th>
+ <th scope="col">Title</th>
+ </tr>
+ {{ range .episodes }}
+
+ {{ $detailUrl := where site.RegularPages "Params.episode_id" .Episode }}
+
+ <tr>
+ <td>{{ .USRelDate }}</td>
+ <td>{{ .Episode }}</td>
+ <td>{{ .ProductionNo }}</td>
+ <td>
+ {{ if $detailUrl}}
+ <a href="{{ (index $detailUrl 0).Permalink }}">{{ .Title }}</a>
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </td>
+ </tr>
+</tr>
+{{ end }}
+</table>
+{{ end }}
+{{ end }}
+{{ end }}
+
diff --git a/layouts/star-trek/baseof.html b/layouts/star-trek/baseof.html
deleted file mode 100644
index 70884b1..0000000
--- a/layouts/star-trek/baseof.html
+++ /dev/null
@@ -1,13 +0,0 @@
-{{ block "main" . }}
-{{ end }}
-
-<!DOCTYPE html>
-<html>
- <head>
- <title>{{ .Title }}</title>
- <link rel="canonical" href="/unix-history/"/>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <meta http-equiv="refresh" content="0; url=https://startrek.crys.site/{{ replace .RelPermalink "/star-trek/" ""}}"/>
- </head>
-
-</html>
diff --git a/layouts/star-trek/list.html b/layouts/star-trek/list.html
deleted file mode 100644
index e4e4a83..0000000
--- a/layouts/star-trek/list.html
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ define "main" }}
-{{ end }}
diff --git a/layouts/star-trek/redirect.html b/layouts/star-trek/redirect.html
deleted file mode 100644
index 599d57b..0000000
--- a/layouts/star-trek/redirect.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>{{ .Title }}</title>
- <link rel="canonical" href="/unix-history/"/>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <meta http-equiv="refresh" content="0; url=/unix-history/#{{ .Page.Params.link }}"/>
- </head>
-</html>
diff --git a/layouts/star-trek/single.html b/layouts/star-trek/single.html
deleted file mode 100644
index e4e4a83..0000000
--- a/layouts/star-trek/single.html
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ define "main" }}
-{{ end }}