remove sub module theme and add our own theme
This commit is contained in:
16
themes/tse/layouts/404.html
Normal file
16
themes/tse/layouts/404.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ define "main" }}
|
||||
<main class="content page-template 404" role="main">
|
||||
<article class="post page">
|
||||
<header class="post-header">
|
||||
<a id="blog-logo" href="{{ "/" | relURL }}">
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
</header>
|
||||
<h1 class="post-title">404 - Page Not Found</h1>
|
||||
<section class="post-content">
|
||||
Give it another try:
|
||||
<a href="{{ "/" | relURL }}" alt="Homepage">Back to the homepage</a>.
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
30
themes/tse/layouts/_default/baseof.html
Normal file
30
themes/tse/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- partial "footer.html" . -}}
|
||||
|
||||
<!-- We do need jQuery to be loaded before HugoScroll script -->
|
||||
|
||||
{{ $scriptJquery := resources.Get "js/jquery-3.6.3.min.js" }}
|
||||
|
||||
<!-- The main JavaScript files for HugoScroll -->
|
||||
{{ $scriptIndex := resources.Get "js/index.js" }}
|
||||
{{ $scriptPolyfill := resources.Get "js/css-vars-ponyfill.min.js" }}
|
||||
{{ $js := slice $scriptJquery $scriptIndex $scriptPolyfill | resources.Concat "js/script.js" | resources.Minify | resources.Fingerprint }}
|
||||
|
||||
<script src="{{ $js.RelPermalink }}" integrity="{{ $js.Data.Integrity }}" ></script>
|
||||
|
||||
<!-- activate css-vars-ponyfill.min.js -->
|
||||
<script>cssVars();</script>
|
||||
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_body.html into
|
||||
your local /layouts/partials-directory -->
|
||||
{{- partial "custom_body.html" . -}}
|
||||
</body>
|
||||
</html>
|
||||
159
themes/tse/layouts/_default/index.html
Normal file
159
themes/tse/layouts/_default/index.html
Normal file
@@ -0,0 +1,159 @@
|
||||
{{ define "main" }}
|
||||
{{ $headless := .GetPage "./homepage" }}
|
||||
{{ $sections := $headless.Resources.ByType "page" }}
|
||||
{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }}
|
||||
{{ $content := where (where $sections "Params.external" "==" nil) "Params.detailed_page_homepage_content" "ne" false }}
|
||||
{{ $translations := .Page.AllTranslations }}
|
||||
|
||||
<!-- Welcome screen that scrolls out of view -->
|
||||
{{ if not .Params.header_use_video }}
|
||||
{{ with $img := resources.Get .Params.header_image }}
|
||||
{{ $image_options := $.Site.Params.image_options | default "webp q90 lanczos photo" -}}
|
||||
<style>
|
||||
/* Default cover for larger screens, converted to webp */
|
||||
{{- with $img.Resize ( printf "%dx%d %s" $img.Width $img.Height $image_options ) -}}
|
||||
#site-head.withCenteredImage {
|
||||
background-image: url('{{- .RelPermalink -}}');
|
||||
}
|
||||
{{- end -}}
|
||||
|
||||
/*
|
||||
Lower resolutions, uncropped. Aimed at desktop users.
|
||||
We set __both__ max-width and max-height to make sure the image is never upscaled.
|
||||
*/
|
||||
{{ range $width := slice 1920 1600 1366 }}
|
||||
{{- with $img.Resize ( printf "%dx %s" $width $image_options ) }}
|
||||
@media (max-width: {{- .Width -}}px) and (max-height: {{- .Height -}}px) {
|
||||
#site-head.withCenteredImage { background-image: url('{{- .RelPermalink -}}'); }
|
||||
}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
/*
|
||||
Lower resolutions, cropped to portrait. Useful for mobile. For "tall" displays (screen ratio < image ratio)
|
||||
the "cover" algorithm first resizes the image to match the screen height, then __crops__ it to match the width.
|
||||
We mimic this by resizing to height=1024, and then cropping to various widths. We set "max-height" to
|
||||
ensure the height is never upscaled, but also max-aspect-ratio to ensure that each image is used in "tall-enough"
|
||||
displays, in which our cropping would happen anyways!
|
||||
*/
|
||||
{{- $img_temp := $img.Resize "x1024 q100" -}}/* high quality temporary image, to be cropped later */
|
||||
{{ range $width := slice 900 600 360 }}
|
||||
{{- with $img_temp.Crop ( printf "%dx1024 center %s" $width $image_options ) }}
|
||||
@media (max-height: {{- .Height -}}px) and (max-aspect-ratio: {{ .Width }} / {{ .Height }}) {
|
||||
#site-head.withCenteredImage { background-image: url('{{- .RelPermalink -}}'); }
|
||||
}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</style>
|
||||
{{ end }}
|
||||
<header id="site-head" class="withCenteredImage">
|
||||
{{ else }}
|
||||
<header id="site-head">
|
||||
{{ end }}
|
||||
|
||||
<div class="vertical">
|
||||
|
||||
{{ if .Params.header_use_video }}
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_header_video.html into
|
||||
your local /layouts/partials-directory -->
|
||||
{{- partial "custom_header_video.html" . -}}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div id="top-banner" class="inner">
|
||||
{{ $num_lang := len $translations }}
|
||||
{{ if and (gt $num_lang 1) $.Site.Params.language_menu }}
|
||||
<div id="site-languages" class="inner">
|
||||
{{ range $translations }}
|
||||
{{ $lang_title := .Lang | strings.ToUpper }}
|
||||
{{ if eq .Lang $.Lang }}
|
||||
{{ if $.Site.Params.show_current_lang }}
|
||||
<span class='btn-lang active'>
|
||||
{{ $img_lang_temp := (printf "images/lang-%s-100.png" .Lang) }}
|
||||
{{ with resources.Get $img_lang_temp }}
|
||||
<img id="flag-logo" alt="" src="{{ .RelPermalink }}" />{{ end }}
|
||||
{{ $lang_title }}</span>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<a class='btn-lang' href='{{ .RelPermalink }}'>{{ $img_lang_temp := (printf "images/lang-%s-100.png" .Lang) }}
|
||||
{{ with resources.Get $img_lang_temp }}
|
||||
<img id="flag-logo" alt="" src="{{ .RelPermalink }}" />{{ end }} {{ $lang_title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div id="site-menu" class="inner">
|
||||
{{ range where $sections ".Params.header_menu" "eq" true }}
|
||||
{{ $button_title := .Title }}
|
||||
{{ with .Params.header_menu_title }}{{ $button_title = . }}{{ end }}
|
||||
|
||||
{{ if isset .Params "detailed_page_path" }}
|
||||
<a class='btn site-menu' href='{{ .Params.detailed_page_path | relURL }}'>{{ $button_title }}</a>
|
||||
{{ else }}
|
||||
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<a class='btn site-menu' data-title-anchor='{{ anchorize $fnav_title }}' href='#{{ anchorize $fnav_title }}'>{{ $button_title }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="site-head-content" class="inner">
|
||||
|
||||
{{ if .Site.Params.title_guard }}<div class="title-and-description-guard">{{ end }}
|
||||
{{ with resources.Get .Params.header_logo }}<img id="blog-logo" alt="" src="{{ .RelPermalink }}" />{{ end }}
|
||||
|
||||
{{ with .Params.header_subheadline }}<h2 class="blog-description">{{ . | safeHTML }}</h2>{{ end }}
|
||||
{{ with .Params.header_subsubheadline }}<h3 class="blog-description">{{ . | safeHTML }}</h3>{{ end }}
|
||||
|
||||
{{ if .Site.Params.title_guard }}</div>{{ end }}
|
||||
|
||||
{{ with (index $content 0) }}
|
||||
{{ $first_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $first_title = . }}{{ end }}
|
||||
<a id='header-arrow' href="#{{- anchorize $first_title -}}" aria-label="Go to first section"><i class="fa fa-angle-down"></i></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="content" role="main">
|
||||
<!-- Render sticky left navigation menu -->
|
||||
<div class='fixed-nav'>
|
||||
{{ if eq .Params.nav_to_top_weight "first" }}
|
||||
{{ $fnav_title := "Start" }}{{ with .Params.nav_to_top_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<a class='fn-item' item_index='{{ 0 }}' href='./#site-head'>{{ $fnav_title | safeHTML }}</a>
|
||||
{{ end }}
|
||||
{{ $last_index_val := 0 }}
|
||||
{{ range $index_val, $elem_val := $content }}
|
||||
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<a class='fn-item' item_index='{{ (add $index_val 1) }}' href='#{{ anchorize $fnav_title }}'>{{ $fnav_title | safeHTML }}</a>
|
||||
{{ $last_index_val = $index_val }}
|
||||
{{ end }}
|
||||
{{ if eq .Params.nav_to_top_weight "last" }}
|
||||
{{ $fnav_title := "Start" }}{{ with .Params.nav_to_top_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<a class='fn-item' item_index='{{ (add $last_index_val 2) }}' href='./#site-head'>{{ $fnav_title | safeHTML }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<!-- Render single-page content -->
|
||||
{{ range $index_val, $elem_val := $content }}
|
||||
{{ if .Title }}
|
||||
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
|
||||
<div class='post-holder{{ if and (ne .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} dark{{ else if and (eq .Site.Params.invertSectionColors true) (modBool $index_val 2) }} dark{{ end }}'>
|
||||
<article id='{{ anchorize $fnav_title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $content) }}last{{ end }}'>
|
||||
<header class="post-header">
|
||||
<h2 class="post-title">{{ .Title | emojify | safeHTML }}</h2>
|
||||
</header>
|
||||
<section class="post-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
<div class='post-after{{ if and (ne .Site.Params.invertSectionColors true) (modBool $index_val 2) }} light{{ else if and (eq .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} light{{ end }}'></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ end }}
|
||||
0
themes/tse/layouts/_default/list.html
Normal file
0
themes/tse/layouts/_default/list.html
Normal file
15
themes/tse/layouts/_default/single.html
Normal file
15
themes/tse/layouts/_default/single.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<main class="content page-template page-{{ .Slug }}">
|
||||
<article class="post page">
|
||||
<header class="post-header">
|
||||
{{ with .Parent }}
|
||||
<a id="back-to-main-page" href="{{ .RelPermalink | relLangURL }}"><i class="fa fa-chevron-left" aria-hidden="true"></i> {{ or .Title .Site.Title }}</a>
|
||||
{{ end }}
|
||||
</header>
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<section class="post-content">
|
||||
{{ .Content }}
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
4
themes/tse/layouts/partials/custom_body.html
Normal file
4
themes/tse/layouts/partials/custom_body.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_body.html into
|
||||
your local /layouts/partials-directory.
|
||||
Its content will appear before the closing </body>-tag -->
|
||||
4
themes/tse/layouts/partials/custom_head.html
Normal file
4
themes/tse/layouts/partials/custom_head.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_head.html into
|
||||
your local /layouts/partials-directory.
|
||||
Its content will appear before the closing </head>-tag -->
|
||||
14
themes/tse/layouts/partials/custom_header_video.html
Normal file
14
themes/tse/layouts/partials/custom_header_video.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_head_video.html into
|
||||
your local /layouts/partials-directory.
|
||||
Its content will appear after the site-head/vertical section.
|
||||
This can be used to inject a video as an alternative background.
|
||||
Full example below: -->
|
||||
|
||||
<!--
|
||||
<video class="background-video" id="background-video" playsinline="" autoplay="true" muted="" loop="" poster="some_poster_jpg">
|
||||
<source src="some_webm_video" type="video/webm">
|
||||
<source src="some_mp4_video" type="video/mp4">
|
||||
<source src="some_mov_video" type="video/mov">
|
||||
</video>
|
||||
-->
|
||||
40
themes/tse/layouts/partials/footer.html
Normal file
40
themes/tse/layouts/partials/footer.html
Normal file
@@ -0,0 +1,40 @@
|
||||
{{ $headless := .Site.GetPage "/homepage" }}
|
||||
{{ $sections := $headless.Resources.ByType "page" }}
|
||||
{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }}
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="inner">
|
||||
{{ if ne .Site.Params.footer.showFooterLinks false }}
|
||||
<section class="links">
|
||||
<ol>
|
||||
{{ range where $sections ".Params.footer_menu" "eq" true }}
|
||||
<li>
|
||||
<a href="{{ relLangURL .Params.detailed_page_path }}">{{ .Params.footer_menu_title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</section>
|
||||
<hr />
|
||||
{{ end }}
|
||||
|
||||
{{ if ne .Site.Params.footer.showContactIcons false }}
|
||||
<section class="icons">
|
||||
{{ range .Site.Params.contacts }}
|
||||
<a href="{{ .url | safeURL }}" aria-label='{{ i18n "{{ .label }}" }}'><i class="{{ .icon }}"></i></a>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.copyright }}
|
||||
<section class="copyright">{{ . | safeHTML }}</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if ne .Params.enableGitInfo false }}
|
||||
{{- if $.GitInfo -}}
|
||||
<section>
|
||||
version: {{ .Lastmod.Format "2006-01-02" }} | #{{ .GitInfo.AbbreviatedHash }}
|
||||
</section>
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</footer>
|
||||
47
themes/tse/layouts/partials/head.html
Normal file
47
themes/tse/layouts/partials/head.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
||||
{{ if and site.Params.combine_page_and_site_title .Title .Site.Title }}
|
||||
<title>{{ .Title | plainify }} | {{ .Site.Title | plainify }}</title>
|
||||
{{ else }}
|
||||
{{ with or .Title .Site.Title | plainify }}
|
||||
<title>{{ . }}</title>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with resources.Get .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ .RelPermalink }}" type="{{ .MediaType.Type }}" />{{ end }}
|
||||
|
||||
{{ with or .Description .Site.Params.description | plainify }}
|
||||
<meta name="description" content="{{ . }}"
|
||||
/>{{ end }}
|
||||
{{ with or (delimit .Keywords ", ") .Site.Params.meta.keywords }}
|
||||
<meta name="keywords" content="{{ . }}"
|
||||
/>{{ end }}
|
||||
<meta name="referrer" content="no-referrer-when-downgrade" />
|
||||
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
{{ $stylesheetNormalize := resources.Get "css/normalize.css" }}
|
||||
{{ $stylesheetFA := resources.Get "css/fontawesome/fontawesome.min.css" }}
|
||||
{{ $stylesheetFABrands := resources.Get "css/fontawesome/brands.min.css" }}
|
||||
{{ $stylesheetFASolid := resources.Get "css/fontawesome/solid.min.css" }}
|
||||
{{ $stylesheetFonts := resources.Get "css/fonts.css" }}
|
||||
{{ $stylesheetGeneric := resources.Get "css/generic.css" }}
|
||||
|
||||
{{ $stylesheetScreen := ( resources.Get "css/_index.scss" | css.Sass ) }}
|
||||
|
||||
{{ $stylesheet := slice $stylesheetNormalize $stylesheetFA $stylesheetFABrands $stylesheetFASolid $stylesheetFonts $stylesheetGeneric $stylesheetScreen | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $stylesheet.RelPermalink }}" type="text/css" integrity="{{ $stylesheet.Data.Integrity }}" />
|
||||
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
{{ template "_internal/schema.html" . }}
|
||||
|
||||
<!-- A partial to be overwritten by the user.
|
||||
Simply place a custom_head.html into
|
||||
your local /layouts/partials-directory -->
|
||||
{{- partial "custom_head.html" . -}}
|
||||
|
||||
0
themes/tse/layouts/partials/header.html
Normal file
0
themes/tse/layouts/partials/header.html
Normal file
3
themes/tse/layouts/shortcodes/contact_list.html
Normal file
3
themes/tse/layouts/shortcodes/contact_list.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ range .Site.Params.contacts }}
|
||||
<p><i class="{{ .icon }}"></i> <a href="{{ .url | safeURL }}">{{ .value }}</a></p>
|
||||
{{ end }}
|
||||
1
themes/tse/layouts/shortcodes/email.html
Normal file
1
themes/tse/layouts/shortcodes/email.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ .Site.Params.contact.email }}
|
||||
1
themes/tse/layouts/shortcodes/extlink.html
Normal file
1
themes/tse/layouts/shortcodes/extlink.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ with .Get "href" }}<a href="{{ . }}" target="_blank">{{ end }}{{ with .Get "icon" }}<i class="{{ . }}"></i> {{ end }}{{ with .Get "text" }}{{ . }}</a>{{ end }}
|
||||
5
themes/tse/layouts/shortcodes/icon.html
Normal file
5
themes/tse/layouts/shortcodes/icon.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ if .Get "brand" }}
|
||||
{{ with .Get "name" }}<i class="fa-brands fa-{{ . }}"></i>{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Get "name" }}<i class="fa fa-{{ . }}"></i>{{ end }}
|
||||
{{ end }}
|
||||
1
themes/tse/layouts/shortcodes/phone.html
Normal file
1
themes/tse/layouts/shortcodes/phone.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ .Site.Params.contact.phone }}
|
||||
2
themes/tse/layouts/shortcodes/rawhtml.html
Normal file
2
themes/tse/layouts/shortcodes/rawhtml.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!-- raw html -->
|
||||
{{.Inner}}
|
||||
Reference in New Issue
Block a user