Update themes/mytheme/layouts/partials/header.html
This commit is contained in:
		
							parent
							
								
									60f2f31692
								
							
						
					
					
						commit
						732568b090
					
				| 
						 | 
				
			
			@ -6,6 +6,9 @@
 | 
			
		|||
<script>
 | 
			
		||||
    if (localStorage.getItem("pref-theme") === "dark") {
 | 
			
		||||
        document.body.classList.add('dark');
 | 
			
		||||
        {{- if site.Params.label.icon_inv }}
 | 
			
		||||
            document.getElementById('main-logo').src = "{{site.Params.label.icon}}";
 | 
			
		||||
        {{- end }}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			@ -14,6 +17,9 @@
 | 
			
		|||
<script>
 | 
			
		||||
    if (localStorage.getItem("pref-theme") === "light") {
 | 
			
		||||
        document.body.classList.remove('dark')
 | 
			
		||||
        {{- if site.Params.label.icon_inv }}
 | 
			
		||||
            document.getElementById('main-logo').src = "{{site.Params.label.icon_inv}}";
 | 
			
		||||
        {{- end }}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue