mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-20 02:30:09 +00:00
theme: some restructuring
This commit is contained in:
parent
05fa313e59
commit
985eacea7e
4 changed files with 15 additions and 16 deletions
|
@ -33,12 +33,6 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<script>
|
|
||||||
window.T_Copy_to_clipboard = '{{ T "Copy-to-clipboard" | safeJS }}';
|
|
||||||
window.T_Copied_to_clipboard = '{{ T "Copied-to-clipboard" | safeJS }}';
|
|
||||||
window.T_Copy_link_to_clipboard = '{{ T "Copy-link-to-clipboard" | safeJS }}';
|
|
||||||
window.T_Link_copied_to_clipboard = '{{ T "Link-copied-to-clipboard" | safeJS }}';
|
|
||||||
</script>
|
|
||||||
<script src="{{"js/theme.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
<script src="{{"js/theme.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
||||||
{{- partial "custom-footer.html" . }}
|
{{- partial "custom-footer.html" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media all and (-ms-high-contrast:none) {
|
@media all and (-ms-high-contrast:none) {
|
||||||
/* IE11s understanding of positioning is weird at best */
|
{{ "/* IE11s understanding of positioning is weird at best */" | safeCSS }}
|
||||||
a#logo {
|
a#logo {
|
||||||
margin-top: -58px;
|
margin-top: -58px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
|
|
||||||
{{ "<!-- hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic: -->" | safeHTML }}
|
|
||||||
{{ "<!-- https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72 -->" | safeHTML }}
|
|
||||||
<script>
|
|
||||||
var index_url={{ "index.json" | relLangURL }};
|
|
||||||
var root_url="/";
|
|
||||||
var baseUri=root_url.replace(/\/$/, '');
|
|
||||||
</script>
|
|
||||||
{{- $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
{{- $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
||||||
<aside id="sidebar" class="default-animation{{ if $showvisitedlinks }} showVisitedLinks{{ end }}">
|
<aside id="sidebar" class="default-animation{{ if $showvisitedlinks }} showVisitedLinks{{ end }}">
|
||||||
{{- $currentNode := . }}
|
{{- $currentNode := . }}
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
{{- range .Site.Params.custom_css }}
|
{{- range .Site.Params.custom_css }}
|
||||||
<link href="{{(printf "%s" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
<link href="{{(printf "%s" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<style>
|
|
||||||
{{- if .Site.Params.disableInlineCopyToClipBoard }}
|
{{- if .Site.Params.disableInlineCopyToClipBoard }}
|
||||||
|
<style>
|
||||||
:not(pre) > code.copy-to-clipboard-code + span.copy-to-clipboard-button {
|
:not(pre) > code.copy-to-clipboard-code + span.copy-to-clipboard-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,22 @@
|
||||||
border-top-right-radius: 2px;
|
border-top-right-radius: 2px;
|
||||||
border-right-width: 1px;
|
border-right-width: 1px;
|
||||||
}
|
}
|
||||||
{{- end }}
|
|
||||||
</style>
|
</style>
|
||||||
|
{{- end }}
|
||||||
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
{{ "// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:" | safeJS }}
|
||||||
|
{{ "// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72" | safeJS }}
|
||||||
|
var index_url={{ "index.json" | relLangURL }};
|
||||||
|
var root_url="/";
|
||||||
|
var baseUri=root_url.replace(/\/$/, '');
|
||||||
|
{{ "// translations" | safeJS }}
|
||||||
|
window.T_Copy_to_clipboard = '{{ T "Copy-to-clipboard" | safeJS }}';
|
||||||
|
window.T_Copied_to_clipboard = '{{ T "Copied-to-clipboard" | safeJS }}';
|
||||||
|
window.T_Copy_link_to_clipboard = '{{ T "Copy-link-to-clipboard" | safeJS }}';
|
||||||
|
window.T_Link_copied_to_clipboard = '{{ T "Link-copied-to-clipboard" | safeJS }}';
|
||||||
|
{{ "// some further base stuff" | safeJS }}
|
||||||
|
var baseUriFull="{{ .Site.BaseURL | safeJS }}";
|
||||||
{{- $quotedthemevariants := slice }}
|
{{- $quotedthemevariants := slice }}
|
||||||
{{- range $themevariants }}
|
{{- range $themevariants }}
|
||||||
{{- $quotedthemevariants = $quotedthemevariants | append (printf "\"%s\"" .) }}
|
{{- $quotedthemevariants = $quotedthemevariants | append (printf "\"%s\"" .) }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue