Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ _pdf
.idea
vendor/
.bundle/
Gemfile.lock
Gemfile.lock
.hugo_build.lock
/public/
/resources/
81 changes: 81 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
{{- with .Params.redirect_to }}
<head>
<meta charset="utf-8">
<title>Redirecting&hellip;</title>
<link rel="canonical" href="{{ . | safeURL }}">
<script>location="{{ . | safeJS }}"</script>
<meta http-equiv="refresh" content="0; url={{ . | safeURL }}">
<meta name="robots" content="noindex">
</head>
<body>
<h1>Redirecting&hellip;</h1>
<a href="{{ . | safeURL }}">Click here if you are not redirected.</a>
</body>
{{- else }}
<head>
{{ partial "head.html" . }}
</head>
<body{{ if .IsHome }} class="landing-page"{{ end }}>
<header>
{{ partial "topnav.html" . }}
{{ partial "news_banner.html" (dict "page" . "onlanding" .IsHome) }}
</header>

{{- $isLanding := or .IsHome (eq .Layout "landing_page") -}}
{{- if $isLanding }}
<main>
{{ block "main" . }}{{ end }}
</main>
{{- else }}
{{- $hideSidebar := eq (.Param "hide_sidebar") true -}}
<div class="container page-content mb-5">
{{ if $hideSidebar }}
<main id="tg-sb-content">
{{ block "main" . }}{{ end }}
</main>
{{ else }}
<div class="row">
<aside class="col-md-3 mb-4 mb-md-0" id="tg-sb-sidebar">
{{ block "sidebar" . }}{{ partial "sidebar.html" . }}{{ end }}
</aside>
<main class="col-md-9" id="tg-sb-content">
{{ block "main" . }}{{ end }}
</main>
</div>
{{ end }}
</div>
{{- end }}

{{ partial "footer.html" . }}
{{ partial "scroll_to_top.html" . }}
{{ partial "google_analytics.html" . }}

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
<script src="{{ "js/customscripts.js" | relURL }}"></script>
{{ if .IsHome }}
<script src="{{ "js/github-queries.js" | relURL }}"></script>
<script src="{{ "js/news-collect.js" | relURL }}"></script>
{{ end }}
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll("table").forEach(function (table) {
table.classList.add("table", "table-striped", "table-hover", "table-bordered", "w-100");
var tableHead = table.querySelector("thead");
if (tableHead) {
tableHead.classList.add("table-primary");
}
if (table.parentElement && table.parentElement.classList.contains("table-responsive")) {
return;
}
var wrapper = document.createElement("div");
wrapper.className = "table-responsive w-100";
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
});
});
</script>
</body>
{{- end }}
</html>
13 changes: 13 additions & 0 deletions layouts/_default/default_print.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{ partial "head_print.html" . }}
</head>
<body class="{{ with .Params.type }}{{ . }} {{ end }}print">
<div class="container print-container">
<main class="print-content">
{{ .Content }}
</main>
</div>
</body>
</html>
34 changes: 34 additions & 0 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ define "main" }}
<section class="post-content">
<header class="post-header">
<h1 class="post-title-main">{{ .Title }}</h1>
</header>

{{ with .Params.summary }}
<div class="summary">{{ . | markdownify }}</div>
{{ end }}

<div class="row">
<div class="col-md-9">
{{ partial "toc.html" . }}
</div>
<div class="col-md-3">
{{ partial "edit_metadata.html" . }}
</div>
</div>

{{ .Content }}

{{ $pages := .RegularPages }}
{{ if $pages }}
<div class="list-pages mt-4">
{{ range $pages.ByTitle }}
<article class="mb-3">
<h2 class="h4"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ with .Params.summary }}<p>{{ . | markdownify }}</p>{{ end }}
</article>
{{ end }}
</div>
{{ end }}
</section>
{{ end }}
1 change: 1 addition & 0 deletions layouts/_default/none.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ .Content }}
32 changes: 32 additions & 0 deletions layouts/_default/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ define "main" }}
<article class="post-content">
<header class="post-header">
<h1 class="post-title-main">{{ .Title }}</h1>
</header>

{{ with .Params.summary }}
<div class="summary">{{ . | markdownify }}</div>
{{ end }}

<div class="row">
<div class="col-md-9">
{{ partial "toc.html" . }}
</div>
<div class="col-md-3">
{{ partial "edit_metadata.html" . }}
</div>
</div>

{{ .Content }}

{{ with .Params.tags }}
<div class="tags mt-4">
<b>Tags: </b>
{{ range . }}
<a href="{{ printf "tag_%s.html" . | relURL }}" class="btn btn-outline-secondary cursorNorm" role="button">{{ . }}</a>
{{ end }}
</div>
{{ end }}
{{ partial "breadcrumb.html" . }}
</article>
{{ end }}
21 changes: 21 additions & 0 deletions layouts/_default/page_print.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{ partial "head_print.html" . }}
</head>
<body class="{{ with .Params.type }}{{ . }} {{ end }}print">
<div class="container print-container">
<main class="print-content">
<div class="post-header">
<h1 class="post-title-main" id="{{ .RelPermalink | replaceRE "[^A-Za-z0-9_-]" "" }}">{{ .Title }}</h1>
</div>
<div class="post-content">
{{ with .Params.summary }}
<div class="summary">{{ . | markdownify }}</div>
{{ end }}
{{ .Content }}
</div>
</main>
</div>
</body>
</html>
32 changes: 32 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ define "main" }}
<article class="post-content">
<header class="post-header">
<h1 class="post-title-main">{{ .Title }}</h1>
</header>

{{ with .Params.summary }}
<div class="summary">{{ . | markdownify }}</div>
{{ end }}

<div class="row">
<div class="col-md-9">
{{ partial "toc.html" . }}
</div>
<div class="col-md-3">
{{ partial "edit_metadata.html" . }}
</div>
</div>

{{ .Content }}

{{ with .Params.tags }}
<div class="tags mt-4">
<b>Tags: </b>
{{ range . }}
<a href="{{ printf "tag_%s.html" . | relURL }}" class="btn btn-outline-secondary cursorNorm" role="button">{{ . }}</a>
{{ end }}
</div>
{{ end }}
{{ partial "breadcrumb.html" . }}
</article>
{{ end }}
Loading