mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +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>
|
||||
{{- 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>
|
||||
{{- partial "custom-footer.html" . }}
|
||||
</body>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
}
|
||||
}
|
||||
@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 {
|
||||
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 }}
|
||||
<aside id="sidebar" class="default-animation{{ if $showvisitedlinks }} showVisitedLinks{{ end }}">
|
||||
{{- $currentNode := . }}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
{{- range .Site.Params.custom_css }}
|
||||
<link href="{{(printf "%s" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
||||
{{- end }}
|
||||
<style>
|
||||
{{- if .Site.Params.disableInlineCopyToClipBoard }}
|
||||
<style>
|
||||
:not(pre) > code.copy-to-clipboard-code + span.copy-to-clipboard-button {
|
||||
display: none;
|
||||
}
|
||||
|
@ -25,10 +25,22 @@
|
|||
border-top-right-radius: 2px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
{{- end }}
|
||||
</style>
|
||||
{{- end }}
|
||||
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></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 }}
|
||||
{{- range $themevariants }}
|
||||
{{- $quotedthemevariants = $quotedthemevariants | append (printf "\"%s\"" .) }}
|
||||
|
|
Loading…
Reference in a new issue