Move noscript elements to head
				
					
				
			- Should fix search engines picking up elements inside noscript
This commit is contained in:
		
							parent
							
								
									8021be2ddb
								
							
						
					
					
						commit
						4e9b04784b
					
				|  | @ -113,7 +113,48 @@ | ||||||
| {{ end -}} | {{ end -}} | ||||||
| {{- range .AllTranslations -}} | {{- range .AllTranslations -}} | ||||||
| <link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" /> | <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" . -}} | {{- partial "extend_head.html" . -}} | ||||||
| 
 | 
 | ||||||
| {{- /* Misc */}} | {{- /* Misc */}} | ||||||
|  |  | ||||||
|  | @ -38,45 +38,6 @@ | ||||||
| 
 | 
 | ||||||
| </script> | </script> | ||||||
| {{- end }} | {{- end }} | ||||||
| <noscript> |  | ||||||
|     <style type="text/css"> |  | ||||||
|         #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> |  | ||||||
| 
 | 
 | ||||||
| <header class="header"> | <header class="header"> | ||||||
|     <nav class="nav"> |     <nav class="nav"> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Aditya Telange
						Aditya Telange