mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 11:25:26 +01:00 
			
		
		
		
	Move noscript elements to head
				
					
				
			- Should fix search engines picking up elements inside noscript
This commit is contained in:
		| @@ -113,7 +113,48 @@ | ||||
| {{ end -}} | ||||
| {{- range .AllTranslations -}} | ||||
| <link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" /> | ||||
| {{ end }} | ||||
| {{ end -}} | ||||
|  | ||||
| <noscript> | ||||
|     <style> | ||||
|         #theme-toggle, | ||||
|         .top-link { | ||||
|             display: none; | ||||
|         } | ||||
|  | ||||
|     </style> | ||||
|     {{- if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark")) }} | ||||
|     <style> | ||||
|         @media (prefers-color-scheme: dark) { | ||||
|             :root { | ||||
|                 --theme: #1d1e20; | ||||
|                 --entry: #2e2e33; | ||||
|                 --primary: rgba(255, 255, 255, 0.84); | ||||
|                 --secondary: rgba(255, 255, 255, 0.56); | ||||
|                 --tertiary: rgba(255, 255, 255, 0.16); | ||||
|                 --content: rgba(255, 255, 255, 0.74); | ||||
|                 --hljs-bg: #2e2e33; | ||||
|                 --code-bg: #37383e; | ||||
|                 --border: #333; | ||||
|             } | ||||
|  | ||||
|             .list { | ||||
|                 background: var(--theme); | ||||
|             } | ||||
|  | ||||
|             .list:not(.dark)::-webkit-scrollbar-track { | ||||
|                 background: 0 0; | ||||
|             } | ||||
|  | ||||
|             .list:not(.dark)::-webkit-scrollbar-thumb { | ||||
|                 border-color: var(--theme); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|     </style> | ||||
|     {{- end }} | ||||
| </noscript> | ||||
|  | ||||
| {{- partial "extend_head.html" . -}} | ||||
|  | ||||
| {{- /* Misc */}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange