mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-22 23:37:53 +00:00
theme: add migration layer #891
This commit is contained in:
parent
f490174e4b
commit
c5db84c5db
19 changed files with 21 additions and 14 deletions
|
@ -1,3 +1,3 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}
|
||||
@import "{{ printf "%s-%s.css%s" .prefix .light $assetBusting }}" screen and (prefers-color-scheme: light);
|
||||
@import "{{ printf "%s-%s.css%s" .prefix .dark $assetBusting }}" screen and (prefers-color-scheme: dark);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}
|
||||
@import "{{ printf "theme-%s.css%s" .themevariant.identifier $assetBusting }}";
|
||||
@import "{{ printf "chroma-%s.css%s" .themevariant.chroma $assetBusting }}";
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}
|
||||
@import "{{ printf "format-print.css%s" $assetBusting }}";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}
|
||||
/* Styles to make Swagger-UI fit into our theme */
|
||||
|
||||
@import "{{ printf "fonts.css%s" $assetBusting }}";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . -}}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . -}}
|
||||
/* this file is here for compatiblity with older installations
|
||||
use theme-relearn-light instead */
|
||||
@import "{{ printf "theme-relearn-light.css%s" $assetBusting }}";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
<span class="github-buttons"></span>
|
||||
<p>Built with <a href="https://github.com/McShelby/hugo-theme-relearn" title="love"><i class="fas fa-heart"></i></a> by <a href="https://gohugo.io/">Hugo</a></p>
|
||||
<script>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
{{- partial "custom-comments.html" . }}
|
||||
</div>
|
||||
{{- block "menu" . }}{{ end }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
<script src="{{"js/clipboard.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
{{- partial "dependencies.html" (dict "page" . "location" "footer") }}
|
||||
|
|
|
@ -125,7 +125,7 @@ Chroma auto run:
|
|||
{{- end }}
|
||||
|
||||
{{- with resources.Get "css/variant.css" }}
|
||||
{{- $assetBusting := partialCached "relearn/assetbusting.hugo" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.hugo" . }}
|
||||
{{- $variantcontent := print `@import "variables.css` $assetBusting `";` "\n\n" .Content }}
|
||||
{{- range $page.Site.Params.boxStyle }}
|
||||
{{- $identifier := upper .identifier }}
|
||||
|
|
2
layouts/partials/assetbusting.hugo
Normal file
2
layouts/partials/assetbusting.hugo
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- warnf "DEPRECATED partial 'assetbusting.hugo' used, use 'assetbusting.gotmpl' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#700" }}
|
||||
{{- partial "assetbusting.gotmpl" . }}
|
|
@ -2,7 +2,7 @@
|
|||
{{- $location := .location }}
|
||||
{{- if eq $location "footer" }}
|
||||
{{- with $page }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
{{- $init := "{}" }}
|
||||
{{- if isset .Params "mathjaxinitialize" }}
|
||||
{{- $init = .Params.mathJaxInitialize }}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{- $location := .location }}
|
||||
{{- if eq $location "footer" }}
|
||||
{{- with $page }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
<script src="{{"js/d3/d3-color.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
<script src="{{"js/d3/d3-dispatch.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
<script src="{{"js/d3/d3-drag.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{{- $location := .location }}
|
||||
{{- if eq $location "footer" }}
|
||||
{{- with $page }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
<script src="{{"js/js-yaml.min.js" | relURL}}{{ $assetBusting }}" defer></script>
|
||||
{{- $urlOpenapi := "" }}
|
||||
{{- $relOpenapi := "" }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
{{- $faviconMatch := false }}
|
||||
{{- $svg := dict "ext" "svg" "type" "type=\"image/svg+xml\"" }}
|
||||
{{- $png := dict "ext" "png" "type" "type=\"image/png\"" }}
|
||||
|
|
1
layouts/partials/page-meta.hugo
Normal file
1
layouts/partials/page-meta.hugo
Normal file
|
@ -0,0 +1 @@
|
|||
{{- warnf "DEPRECATED partial 'page-meta.hugo' used, delete it from your templates; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#700" }}
|
2
layouts/partials/pageHelper/title.hugo
Normal file
2
layouts/partials/pageHelper/title.hugo
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- warnf "DEPRECATED partial 'pageHelper/title.hugo' used, use 'title.gotmpl' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#700" }}
|
||||
{{- partial "title.gotmpl" . }}
|
2
layouts/partials/relLangPrettyUglyURL.hugo
Normal file
2
layouts/partials/relLangPrettyUglyURL.hugo
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{- warnf "DEPRECATED partial 'relLangPrettyUglyURL.hugo' used, use 'permalink.gotmpl' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#700" }}
|
||||
{{- partial "permalink.gotmpl" . }}
|
|
@ -1,5 +1,5 @@
|
|||
{{- if not .Site.Params.disableSearch }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
{{- $link := "" }}
|
||||
{{- with .Site.Home.OutputFormats.Get "json" }}
|
||||
{{- warnf "UNSUPPORTED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{{- else }}
|
||||
{{- warnf "WARNING no key `relearnOutputFormat` found in page store, set one by providing the file `layouts/_default/view/storeOutputFormat.<MYOUTPUTFORMAT>.html` for your self-defined output format; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }}
|
||||
{{- end }}
|
||||
{{- $assetBusting := partialCached "_relearn/assetbusting.gotmpl" . }}
|
||||
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
||||
{{- /* https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use */}}
|
||||
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="{{"css/fontawesome-all.min.css" | relURL}}{{ $assetBusting }}" rel="stylesheet"></noscript>
|
||||
<link href="{{"css/nucleus.css" | relURL}}{{ $assetBusting }}" rel="stylesheet">
|
||||
|
|
Loading…
Reference in a new issue