Commit 21b57e3f authored by Ken Shibata's avatar Ken Shibata
Browse files

optimizations

parent 14d7fd05
Pipeline #309939654 passed with stages
in 8 minutes and 41 seconds
......@@ -4,9 +4,7 @@
<file url="file://$PROJECT_DIR$/nsssac/layouts/shortcodes/objs.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/_default/list.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/assets.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/float.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/menu.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/search.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/settings.html" dialect="HTML" />
<file url="file://$PROJECT_DIR$/nsssac/themes/plain/layouts/partials/sidebar.html" dialect="HTML" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
......@@ -3,3 +3,5 @@ title = "Approved by House"
date = "1970-01-01T00:00:00"
draft = false
+++
The following objects have been approved by the [House of Reps](/about/house).
......@@ -3,3 +3,5 @@ title = "Approved by Senate"
date = "1970-01-01T00:00:00"
draft = false
+++
The following objects have been approved by the [Senate](/about/senate).
+++
title = "Senate"
date = "1970-01-01T00:00:00"
draft = false
authors = ["Ken Shibata"]
+++
The Senate is the body composed of Association Senators, Appointed Senators and the Executive.
\ No newline at end of file
......@@ -65,6 +65,6 @@
</script>
<noscript>
{{ partial "icon.html" "mdi-alert" }}
{{ partialCached "icon.html" "mdi-alert" }}
JavaScript is required to show the current day.
</noscript>
\ No newline at end of file
......@@ -9,7 +9,7 @@
{{ with $.Get "noActions" }}{{ else }}
{{ if ne .url nil }}
<a href="{{ .url }}" aria-label="view the source document">
{{ partial "icon.html" "mdi-eye" }}View
{{ partialCached "icon.html" "mdi-eye" }}View
</a>
<br>
<iframe width="100%" height="400rem" src="{{ .url }}">This part requires iframes.</iframe>
......@@ -57,7 +57,7 @@
{{ $lastStaff := sub (len .staff) 1 }}
{{ range $i, $staff := .staff }}
<a href="mailto:{{ $staff }}">
{{ partial "icon.html" "mdi-email" }}
{{ partialCached "icon.html" "mdi-email" }}
{{ $staff }}
</a>
{{ if ne $i $lastStaff }}<br/>{{ end }}
......
......@@ -87,13 +87,13 @@
<td><!-- Actions -->
{{ if ne $details false }}
<a href="{{ $id }}-{{ $i }}" aria-label="view the source document">
{{ partial "icon.html" "mdi-text-long" }}{{ i18n "details" }}
{{ partialCached "icon.html" "mdi-text-long" }}{{ i18n "details" }}
</a>
<br/>
{{ end }}
{{ if ne .url nil }}
<a href="{{ .url }}" aria-label="view the source document">
{{ partial "icon.html" "mdi-eye" }}{{ i18n "view" }}
{{ partialCached "icon.html" "mdi-eye" }}{{ i18n "view" }}
</a>
{{ end }}
</td>
......@@ -128,7 +128,7 @@
{{ $name = printf "%s %s" $name .}}
{{ else }}
{{ range $icon := $type.icons }}
{{ partial "icon.html" $icon }}
{{ partialCached "icon.html" $icon }}
{{ end }}
{{ $name = printf "%s %s" $name $type.name}}
{{ end }}
......@@ -182,7 +182,7 @@
{{ $lastStaff := sub (len .staff) 1 }}
{{ range $i, $staff := .staff }}
<a href="mailto:{{ $staff }}">
{{ partial "icon.html" "mdi-email" }}
{{ partialCached "icon.html" "mdi-email" }}
{{ $staff }}
</a>
{{ if ne $i $lastStaff }}<br/>{{ end }}
......
......@@ -3,13 +3,13 @@
The page <span id="url">you requested</span> was not found.
This page may have been moved or deleted (although Gone would make more sense).
You can try checking out the links below:<br />
{{ partial "links.html" . }}
{{ partialCached "links.html" . }}
</p>
<button onclick="window.history.back()">
{{ partial "icon.html" "mdi-chevron-left" }}Go Back
{{ partialCached "icon.html" "mdi-chevron-left" }}Go Back
</button>
<button onclick="window.location = {{ .Site.BaseURL }}">
{{ partial "icon.html" "mdi-home" }}Go Home
{{ partialCached "icon.html" "mdi-home" }}Go Home
</button>
<script>
document.getElementById("url").innerText = window.location.href;
......
......@@ -4,7 +4,7 @@
<img class="w3-round-large" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" title="{{ .Title }}" width="100%">
<figcaption>
<a href="{{ .Destination | safeURL }}">
{{ partial "icon.html" "mdi-eye" }} View Image
{{ partialCached "icon.html" "mdi-eye" }} View Image
</a><br />
{{ .Title }}
</figcaption><!-- using figcaption instead of overlay since it might be better for screen readers? idk -->
......@@ -12,7 +12,7 @@
<img class="w3-round-large" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" width="100%">
<figcaption>
<a href="{{ .Destination | safeURL }}">
{{ partial "icon.html" "mdi-eye" }} View Image
{{ partialCached "icon.html" "mdi-eye" }} View Image
</a>
</figcaption>
{{ end }}
......
......@@ -9,8 +9,8 @@
{{ partial "metadata.html" . }}
{{ block "main" . }}{{ end }}
</main>
{{ partial "search.html" . }}
{{ partialCached "float.html" . }}
{{ partial "menu.html" .}}
{{ partial "assets.html" . }}
{{ partialCached "assets.html" . }}
</body>
</html>
......@@ -31,7 +31,7 @@
{{ $name = printf "%s %s" $name .}}
{{ else }}
{{ range $icon := $type.icons }}
{{ partial "icon.html" $icon }}
{{ partialCached "icon.html" $icon }}
{{ end }}
{{ $name = printf "%s %s" $name $type.name}}
{{ end }}
......@@ -81,7 +81,7 @@
{{ $name = printf "%s %s" $name .}}
{{ else }}
{{ range $icon := $type.icons }}
{{ partial "icon.html" $icon }}
{{ partialCached "icon.html" $icon }}
{{ end }}
{{ $name = printf "%s %s" $name $type.name}}
{{ end }}
......@@ -95,42 +95,9 @@
</td>
{{ end }}
<td>
<details>
<summary></summary>
{{ $page.Summary }}{{ if $page.Truncated }}&hellip;{{ end }}
</details>
{{ $page.Summary }}{{ if $page.Truncated }}&hellip;{{ end }}
</td>
</tr>
{{ end }}
</table>
{{/* <ul class="w3-bar" id="pages-list" style="overflow-y: hidden; overflow-x: auto;">*/}}
{{/* {{ range $i, $page := .Pages }}*/}}
{{/* <li class="w3-bar w3-bar-item" id="pages-page-{{ $i }}" style="width: 50%;">*/}}
{{/* <div class="w3-bar-item" style="width: 80%;">*/}}
{{/* <a href="{{ $page.Permalink }}"><h2>{{ $page.Title }}</h2></a>*/}}
{{/* {{ $page.Date.Format .Site.Params.timeFmt }}<br/>*/}}
{{/* <div class="w3-bar">*/}}
{{/* <div class="w3-bar-item">{{ partial "icon.html" "mdi-tag-multiple" }}Tags</div>*/}}
{{/* {{ range ($page.GetTerms "tags") }}*/}}
{{/* <a class="w3-bar-item" href="{{ .Permalink | safeURL }}">{{ .LinkTitle }}</a>*/}}
{{/* {{ end }}*/}}
{{/* </div>*/}}
{{/* <details id="pages-page-{{ $i }}-detail">*/}}
{{/* <summary>*/}}
{{/* Summary*/}}
{{/* </summary>*/}}
{{/* {{ $page.Summary }}{{ if $page.Truncated }}&hellip;{{ end }}*/}}
{{/* </details>*/}}
{{/* </div>*/}}
{{/* <div class="w3-bar-item" style="width: 20%;">*/}}
{{/* {{ with $cover := index ($page.Resources.Match "cover.**") 0 }}*/}}
{{/* <img src="{{ $cover.Permalink }}" alt="cover image for {{ $page.Title }}">*/}}
{{/* {{ end }}*/}}
{{/* </div>*/}}
{{/* </li>*/}}
{{/* {{ end }}*/}}
{{/* </ul>*/}}
{{ end }}
<div id="menu-float">
<a class="w3-bar-item w3-right" id="menu-toggle" href="#menu" onclick="toggleMenu()">
{{ partial "icon.html" "mdi-menu" }}
{{ partialCached "icon.html" "mdi-menu" }}
{{ i18n "menu" }}
</a>
</div>
......
......@@ -8,12 +8,12 @@
<!-- Menu -->
{{ range .Site.Menus.main }}
<a style="width: 50%;" href="{{ .URL }}" aria-label="{{ .Title }}"
title="{{ .Title }}">{{ partial "icon.html" .Pre }} {{ .Name }}</a>
title="{{ .Title }}">{{ partialCached "icon.html" .Pre }} {{ .Name }}</a>
{{ end }}
</nav>
<!-- All Translations -->
<span class="iconify" data-icon="mdi-translate"><make /span>
<span class="iconify" data-icon="mdi-translate"></span>
{{ i18n "all-translations" }}
<ul>
{{ range $.Site.Home.AllTranslations }}
......@@ -21,25 +21,25 @@
{{ end }}
</ul>
<!-- Last changed -->
<!-- Last changed -->
{{ with .Site.LastChange }}
{{ partial "icon.html" "mdi-clock" }}
{{ partial "icon.html" "mdi-source-branch-refresh" }}
{{ partialCached "icon.html" "mdi-clock" }}
{{ partialCached "icon.html" "mdi-source-branch-refresh" }}
<abbr aria-label="Site last change time" title='{{ dateFormat "2006-01-02T15:04:05.999999999Z07:00" . }}'>
{{ dateFormat $.Site.Params.timeFmt . }}
</abbr><br/>
{{ end }}
<!-- Build time -->
{{ partial "icon.html" "mdi-clock" }}
{{ partial "icon.html" "mdi-hammer-wrench" }}
{{ partialCached "icon.html" "mdi-clock" }}
{{ partialCached "icon.html" "mdi-hammer-wrench" }}
<abbr aria-label="Site build time" title='{{ now.Format "2006-01-02T15:04:05.999999999Z07:00" }}'>
{{ now.Format $.Site.Params.timeFmt }}
</abbr><br/>
<!-- Tip? -->
<!-- Tip? -->
{{ if .Site.Params.tip }}
{{ partial "icon.html" "mdi-source-branch-sync" }}
{{ partialCached "icon.html" "mdi-source-branch-sync" }}
Pipeline <a href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/pipelines/{{ .Site.Params.ci_pipeline_id }}">#{{ .Site.Params.ci_pipeline_id }}</a>
<br/>
<a aria-label="GitLab CI Pipeline Status" href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/pipelines"><img
......@@ -53,15 +53,15 @@
{{ with .GitInfo }}
<details>
<summary>
{{ partial "icon.html" "mdi-git" }}
{{ partialCached "icon.html" "mdi-git" }}
<abbr title="{{ .Hash }}">{{ .AbbreviatedHash }}</abbr>
<a style="font-family: monospace;"
href="https://github.com/nsssac/nsssac.github.io/commit/{{ .Hash }}">
{{ partial "icon.html" "mdi-github" }}
{{ partialCached "icon.html" "mdi-github" }}
</a>
<a style="font-family: monospace;"
href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/commit/{{ .Hash }}">
{{ partial "icon.html" "mdi-gitlab" }}
{{ partialCached "icon.html" "mdi-gitlab" }}
</a>
</summary>
Commit by
......@@ -79,14 +79,56 @@
{{ with .Site.Copyright }}{{ . }} • {{ end }}
<!-- User defined links -->
{{ partial "links.html" . }}
{{ partialCached "links.html" . }}
<!-- Attribution -->
Site and <a href="https://gohugo.io">Hugo</a> theme Plain by
<a href="https://gitlab.com/colourdelete">Ken Shibata • <code>colourdelete</code></a>
and
<a href="https://gitlab.com/twotxh"><span style="font-family: monospace;">twotxh</span></a>.
{{ partial "settings.html" . }}
<div id="settings">
<h3>{{ partialCached "icon.html" "mdi-cog" }}{{ i18n "settings" }}</h3>
<div class="w3-half">
<label>
{{ partialCached "icon.html" "mdi-brightness-6" }}Theme
<select id="select-theme" aria-label="Select Theme" onchange="updateTheme()">
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label>
</div>
<div class="w3-half">
<label for="anim-delay-input">
{{ partialCached "icon.html" "mdi-transition" }}
{{ i18n "anim-len" }}
</label>
<input id="anim-delay-input">
<button onclick="setAnimDelay(null)">
{{ partialCached "icon.html" "mdi-check" }}
Apply
</button>
</div>
<div class="w3-half">
<label>
{{ i18n "hover-details-open" }}
<input id="hover-details-open-input" type="checkbox" onchange="updateHoverDetailsOpenInput()">
</label>
<script>
let hoverDetailsOpen = localStorage.getItem('hover-details-open') === 'yes';
function updateHoverDetailsOpenInput() {
hoverDetailsOpen = document.getElementById('hover-details-open-input').checked;
if (hoverDetailsOpen) {
localStorage.setItem('hover-details-open', 'yes');
} else {
localStorage.setItem('hover-details-open', 'no');
}
}
</script>
</div>
</div>
</div>
<script>
function menuLayout() {
......
......@@ -12,13 +12,13 @@
{{ with .File }}
<div class="w3-bar-item">
<a href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/blob/master/nsssac/content/{{ .Path }}">
{{ partial "icon.html" "mdi-eye" }}
{{ partialCached "icon.html" "mdi-eye" }}
{{ i18n "view-page" }}
</a>
</div>
<div class="w3-bar-item">
<a href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/edit/master/nsssac/content/{{ .Path }}">
{{ partial "icon.html" "mdi-eye" }}
{{ partialCached "icon.html" "mdi-eye" }}
{{ i18n "edit-page" }}
</a>
</div>
......@@ -30,7 +30,7 @@
<div class="w3-bar">
{{ if .IsTranslated }}
<div class="w3-bar-item">
{{ partial "icon.html" "mdi-translate" }}
{{ partialCached "icon.html" "mdi-translate" }}
{{ i18n "translations" }}
</div>
{{ range .Translations }}
......@@ -78,7 +78,7 @@
<a href="{{ $fmt.Permalink | safeURL }}" aria-label='{{ i18n " alt-format" }}: {{ $type }}'>
{{ if in $type "application/rss" }}
<!-- Special case for RSS (icon) -->
{{ partial "icon.html" "mdi-rss" }}
{{ partialCached "icon.html" "mdi-rss" }}
RSS
{{ else }}
<code>{{ $type }}</code>
......@@ -105,7 +105,7 @@
{{ $name = printf "%s %s" $name .}}
{{ else }}
{{ range $icon := $type.icons }}
{{ partial "icon.html" $icon }}
{{ partialCached "icon.html" $icon }}
{{ end }}
{{ $name = printf "%s %s" $name $type.name}}
{{ end }}
......@@ -129,7 +129,7 @@
{{ $name = printf "%s %s" $name .}}
{{ else }}
{{ range $icon := $type.icons }}
{{ partial "icon.html" $icon }}
{{ partialCached "icon.html" $icon }}
{{ end }}
{{ $name = printf "%s %s" $name $type.name}}
{{ end }}
......
<div>
<h3>{{ partial "icon.html" "mdi-cog" }}{{ i18n "settings" }}</h3>
<div class="w3-half">
<label>
{{ partial "icon.html" "mdi-brightness-6" }}Theme
<select id="select-theme" aria-label="Select Theme" onchange="updateTheme()">
<option value="light">Light</option>
<option value="dark">Dark</option>
</select>
</label>
</div>
<div class="w3-half">
<label for="anim-delay-input">
{{ partial "icon.html" "mdi-transition" }}
{{ i18n "anim-len" }}
</label>
<input id="anim-delay-input">
<button onclick="setAnimDelay(null)">
{{ partial "icon.html" "mdi-check" }}
Apply
</button>
</div>
<div class="w3-half">
<label>
{{ i18n "hover-details-open" }}
<input id="hover-details-open-input" type="checkbox" onchange="updateHoverDetailsOpenInput()">
</label>
<script>
hoverDetailsOpen = localStorage.getItem('hover-details-open') === 'yes';
function updateHoverDetailsOpenInput() {
hoverDetailsOpen = document.getElementById('hover-details-open-input').checked;
if (hoverDetailsOpen) {
localStorage.setItem('hover-details-open', 'yes');
} else {
localStorage.setItem('hover-details-open', 'no');
}
}
</script>
</div>
</div>
<aside id="sidenav">
<a id="sidenav-close" href="javascript:void(0)" onclick="navClose()">
{{ partial "icon.html" "mdi-menu" }}
Menu
</a>
<a id="sidenav-open" href="javascript:void(0)" onclick="navOpen()">
{{ partial "icon.html" "mdi-menu" }}
Menu
</a>
<section id="sidenav-section" style="margin: 0; padding: 0;">
<nav>
<!-- Menu -->
{{ range .Site.Menus.main }}
<a href="{{ .URL }}" aria-label="{{ .Title }}" title="{{ .Title }}">{{ .Pre | safeHTML }} {{ .Name }}</a>
{{ end }}
<!-- Settings -->
{{ partial "settings.html" . }}
</nav>
</section>
<!-- Table of Contents / ToC -->
<section id="toc">
<h2>Contents</h2>
{{ .Page.TableOfContents }}
</section>
<!-- Site metadata -->
<section id="info">
<!-- Last changed -->
{{ with .Site.LastChange }}
{{ partial "icon.html" "mdi-clock" }}
<abbr title='{{ dateFormat "2006-01-02T15:04:05.999999999Z07:00" . }}'>
{{ dateFormat $.Site.Params.timeFmt . }}
</abbr><br /><br />
{{ end }}
<!-- Git info -->
{{ with .GitInfo }}
<details>
<summary>
{{ partial "icon.html" "mdi-git" }}
<abbr title="{{ .Hash }}">{{ .AbbreviatedHash }}</abbr>
<a style="font-family: monospace;" href="https://github.com/nsssac/nsssac.github.io/commit/{{ .Hash }}">
{{ partial "icon.html" "mdi-github" }}
</a>
<a style="font-family: monospace;" href="https://gitlab.com/nsssac/nsssac.gitlab.io/-/commit/{{ .Hash }}">
{{ partial "icon.html" "mdi-gitlab" }}
</a>
</summary>
Commit by
<a href="mailto:{{ .AuthorEmail }}">{{ .AuthorName }}</a>
on
<abbr title='{{ dateFormat "2006-01-02T15:04:05.999999999Z07:00" .AuthorDate }}'>
{{ dateFormat $.Site.Params.timeFmt .AuthorDate }}
</abbr>
<blockquote>{{ .Subject }}</blockquote>
</details>
<br />
{{ end }}
<!-- Copyright blah blah -->
{{ with .Site.Copyright }}{{ .Site.Copyright }} • {{ end }}
<!-- User defined links -->
{{ partial "links.html" . }}
<!-- Attribution -->
Site and <a href="https://gohugo.io">Hugo</a> theme Plain by
<a href="https://gitlab.com/colourdelete">Ken Shibata • <code>colourdelete</code></a>
and
<a href="https://gitlab.com/twotxh"><span style="font-family: monospace;">twotxh</span></a>.
</section>
</aside>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment