Shopify themes, liquid, logos, and UX
I make a new stylesheet in the Assets category:
"zz-mode-example.css"
I need to point to this stylesheet with href here:
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-example.css" />
what do I put in href="_____________________"
-----------
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-dark.css" />
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-light.css" />
<link id="theme" rel="stylesheet"
type="text/css" href="zz-mode-brown.css" />
<script>
function toggleTheme(value) {
sheets[0].href = value;
}
</script>
<body>
<button class="mode-dark-button" onclick="toggleTheme('zz-mode-dark.css')">
Dark
</button>
<button class="mode-light-button" onclick="toggleTheme('zz-mode-light.css')">
Light
</button>
<button class="mode-brown-button" onclick="toggleTheme('zz-mode-brown.css')">
Brown
</button>
</body>
Hi @Mirokuwu,
If you want to get CSS file in Assets you can use following code:
<link id="theme" rel="stylesheet" type="text/css" href="{{ 'zz-mode-example.css' | asset_url }}" />
Hope it helps!
Hi Mirokuwu,
NightTheme makes it easy to add dark mode to your Shopify store, keeping customers engaged even in low light.
Why Choose NightTheme?
🚀 Don’t miss out—install NightTheme today and enhance your customers’ shopping experience! 🔗 Try it now!
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024