Ading layout for hugo / dhcp24

This commit is contained in:
L3D 2024-10-30 21:48:20 +01:00
parent e0a238ab20
commit 33bb102695
Signed by: L3D
GPG Key ID: CD08445BFF4313D1
12 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ block "metaincludes" . }}
{{ partial "redirect.html" .Params }}
{{ end }}
<title>{{ .Site.Title }}</title>
{{ block "cssdependencyincludes" . }}
<!-- Fork-awesome -->
<link href="{{ "/fork-awesome/css/fork-awesome.min.css" | relURL }}" rel="stylesheet" type="text/css">
{{ end }}
{{ block "cssincludes" . }}
{{ $options := dict "targetPath" "default.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/default.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ $configData := dict "workerBaseURL" .Site.Params.workerBaseURL "scheduleURL" .Site.Params.scheduleURL "scheduleFetchInterval" .Site.Params.scheduleFetchInterval "twitterURL" .Site.Params.twitterURL "twitterFetchInterval" .Site.Params.twitterFetchInterval "mastodonURL" .Site.Params.mastodonURL "mastodonFetchInterval" .Site.Params.mastodonFetchInterval "musicURL" .Site.Params.musicURL "musicFetchInterval" .Site.Params.musicFetchInterval "cmsURL" .Site.Params.cmsURL "cmsFetchInterval" .Site.Params.cmsFetchInterval }}
{{ $configjs := resources.Get "/js/custom/core/config.js" | js.Build (dict "params" $configData) | resources.Fingerprint }}
<script src="{{ $configjs.Permalink }}" integrity="{{ $configjs.Data.Integrity }}"></script>
{{ block "jsworkerincludes" . }}
<!-- Just publish asset by calling .Permalink but without including it here. -->
<!-- Web worker will be loaded by main JS later. -->
{{ $fetchworkerjs := resources.Get "/js/custom/core/generic_fetch_worker.js" }}
<!-- <script src="{{ $fetchworkerjs.Permalink }}" integrity="DO-NOT-USE-HERE"></script> -->
{{ end }}
</head>
<body>
{{ block "main" . }}
<main id="main">
<!-- Dynamic content inserted here -->
</main>
{{ end }}
{{ block "jsdependencyincludes" . }}
{{ $luxon := resources.Get "/js/luxon/luxon.min.js" | resources.Fingerprint }}
<script src="{{ $luxon.Permalink }}" integrity="{{ $luxon.Data.Integrity }}"></script>
{{ $preact := resources.Get "/js/preact/preact.min.js" | resources.Fingerprint }}
<script src="{{ $preact.Permalink }}" integrity="{{ $preact.Data.Integrity }}"></script>
{{ $htm := resources.Get "/js/htm/htm.js" | resources.Fingerprint }}
<script src="{{ $htm.Permalink }}" integrity="{{ $htm.Data.Integrity }}"></script>
{{ end }}
{{ block "jsincludes" . }}
{{ end }}
</body>
</html>

53
layouts/index.html Normal file
View File

@ -0,0 +1,53 @@
{{ define "main" }}
<h1 class="header">:HugInfo:</h1>
<div class="content">
<h2>Static Information Endpoints:</h2>
<ul>
{{ range .Pages }}
{{ if not .Params.redirect }}
<li class="infopointitem">
<span class="fa fa-hand-o-right bullet"></span><b>{{ .Title }}:</b><a class="infopoint" href="{{ .RelPermalink }}">{{ .RelPermalink }}</a>
</li>
{{ end }}
{{ end }}
</ul>
<h2>Redirecting Information Endpoints:</h2>
<ul>
{{ range .Pages }}
{{ if .Params.redirect }}
<li class="infopointitem">
<span class="fa fa-hand-o-right bullet"></span>
<span>
<b>{{ .Title }}:</b><a class="infopoint" href="{{ .RelPermalink }}">{{ .RelPermalink }}</a>
{{ with .Params.redirect }}
<div class="redirect">
<div>Configured redirect:</div>
<ul>
<li>Target: <a class="infopoint" href="{{ .targetURL }}">{{ .targetURL }}</a></li>
<li>Delay: {{ .delay }}s</li>
</ul>
</div>
{{ end }}
</span>
</li>
{{ end }}
{{ end }}
</ul>
</div>
{{ end }}
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "_index.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/core/_index.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsworkerincludes" }}{{ end }}
{{ define "jsdependencyincludes" }}{{ end }}
{{ define "jsincludes" }}{{ end }}

View File

@ -0,0 +1,3 @@
{{ with .redirect }}
<meta http-equiv="refresh" content="{{ .delay }};url={{ .targetURL }}" />
{{ end }}

View File

@ -0,0 +1,20 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "schedule-hall1.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/schedule-hall1.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "schedule-hall1.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/schedule-hall1.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}
{{ define "main" }}
<img class="header" src="{{ .Site.BaseURL }}/header.svg">
<main id="main">
<!-- Dynamic content inserted here -->
</main>
<div id="clock"></div>
{{ end }}

View File

@ -0,0 +1,20 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "schedule.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/schedule.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "schedule.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/schedule.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}
{{ define "main" }}
<img class="header" src="{{ .Site.BaseURL }}/header.svg">
<main id="main">
<!-- Dynamic content inserted here -->
</main>
<div id="clock"></div>
{{ end }}

View File

@ -0,0 +1,18 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "speaker-info-hall1.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/speaker-info-hall1.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "speaker-info-hall1.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/speaker-info-hall1.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}
{{ define "main" }}
<main id="main">
<!-- Dynamic content inserted here -->
</main>
{{ end }}

View File

@ -0,0 +1,18 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "talk-info-hall1.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/talk-info-hall1.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "talk-info-hall1.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/talk-info-hall1.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}
{{ define "main" }}
<main id="main">
<!-- Dynamic content inserted here -->
</main>
{{ end }}

View File

@ -0,0 +1,19 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "upcoming-talk-hall1.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/upcoming-talk-hall1.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "upcoming-talk-hall1.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/upcoming-talk-hall1.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}
{{ define "main" }}
<img class="header" src="{{ .Site.BaseURL }}/header.svg">
<main id="main">
<!-- Dynamic content inserted here -->
</main>
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "default.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/voc-schedule.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "voc-schedule-hall1.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/voc-schedule-hall1.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "default.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/voc-schedule.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "voc-schedule.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/voc-schedule.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "default.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/voc-speaker.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "voc-speaker.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/voc-speaker.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}

View File

@ -0,0 +1,12 @@
{{ define "cssincludes" }}
{{ $options := dict "targetPath" "default.css" "outputStyle" "compressed" "enableSourceMap" false -}}
{{ $style := resources.Get "/css/custom/nodes/voc-talks.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint -}}
<link rel="stylesheet" href="{{ $style.Permalink }}" />
{{ end }}
{{ define "jsincludes" }}
{{ $externals := slice "htm" "preact" "luxon" }}
{{ $buildOptions := dict "targetPath" "voc-talks.js" "externals" $externals }}
{{ $nodejs := resources.Get "/js/custom/nodes/voc-talks.js" | js.Build $buildOptions | resources.Fingerprint }}
<script src="{{ $nodejs.Permalink }}" integrity="{{ $nodejs.Data.Integrity }}" type="module"></script>
{{ end }}