mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	built-in Chroma
This commit is contained in:
		| @@ -6,9 +6,9 @@ | ||||
|     <span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ site.Title }}</a></span> | ||||
|     {{- end }} | ||||
|     <span> | ||||
|         Powered by | ||||
|         - Powered by | ||||
|         <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> & | ||||
|         <a href="https://github.com/adityatelange/hugo-PaperMod/" rel="noopener" target="_blank">PaperMod</a> | ||||
|         <a href="https://github.com/Wonderfall/hugo-WonderMod/" rel="noopener" target="_blank">WonderMod</a> | ||||
|     </span> | ||||
| </footer> | ||||
| {{- end }} | ||||
|   | ||||
| @@ -51,13 +51,10 @@ | ||||
| {{- $media := (resources.Get "css/core/zmedia.css") }} | ||||
| {{- $license_css := (resources.Get "css/core/license.css") }} | ||||
| {{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} | ||||
|  | ||||
| {{- /* include `an-old-hope` if hljs is on */}} | ||||
| {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }} | ||||
| {{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }} | ||||
| {{- $commonHighlight := (resources.Get "css/common/chroma.css") }} | ||||
|  | ||||
| {{- /* order is important */}} | ||||
| {{- $core := (slice $theme_vars $reset $common $hljs $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} | ||||
| {{- $core := (slice $theme_vars $reset $common $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} | ||||
| {{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} | ||||
|  | ||||
| {{- /* bundle all required css */}} | ||||
| @@ -106,7 +103,6 @@ | ||||
|                 --secondary: rgb(155, 156, 157); | ||||
|                 --tertiary: rgb(65, 66, 68); | ||||
|                 --content: rgb(196, 196, 197); | ||||
|                 --hljs-bg: rgb(46, 46, 51); | ||||
|                 --code-bg: rgb(55, 56, 62); | ||||
|                 --border: rgb(51, 51, 51); | ||||
|             } | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} | ||||
| {{- $pages := .CurrentSection.RegularPages.ByTitle }} | ||||
| {{- if and (gt (len $pages) 1) (in $pages . ) }} | ||||
| <nav class="paginav"> | ||||
|   {{- with $pages.Next . }} | ||||
|   | ||||
| @@ -13,18 +13,6 @@ | ||||
| {{- end }} | ||||
| {{- end -}} | ||||
|  | ||||
| {{- /* Highlight.js */}} | ||||
| {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} | ||||
| {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} | ||||
| {{- if not site.Params.assets.disableFingerprinting }} | ||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }} | ||||
| <script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"></script> | ||||
| {{- else }} | ||||
| {{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }} | ||||
| <script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}"></script> | ||||
| {{- end }} | ||||
| {{- end }} | ||||
|  | ||||
| {{- /* PaperMod.js */}} | ||||
| {{- $scrollToTop := (not site.Params.disableScrollToTop | default .Params.disableScrollToTop ) }} | ||||
| {{- $themeToggle := (not site.Params.disableThemeToggle | default .Params.disableThemeToggle ) }} | ||||
|   | ||||
							
								
								
									
										4
									
								
								layouts/shortcodes/youtube.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								layouts/shortcodes/youtube.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| {{- $id := .Get "id" | default (.Get 0) -}} | ||||
| <div class="youtube-embed-div"> | ||||
|     <iframe src="https://www.youtube-nocookie.com/embed/{{ $id }}" class="youtube-embed-frame" allowfullscreen title="YouTube Video"></iframe> | ||||
| </div>   | ||||
		Reference in New Issue
	
	Block a user
	 Wonderfall
					Wonderfall