-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Hossein Mirazimi <[email protected]> Co-authored-by: Hossein Mirazimi <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Anthony Fu <[email protected]> Co-authored-by: Daniel Roe <[email protected]> Co-authored-by: Sébastien Chopin <[email protected]>
- Loading branch information
1 parent
08e8c59
commit c4df5d9
Showing
26 changed files
with
254 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,58 @@ | ||
<script setup> | ||
useSeoMeta({ | ||
title: 'Nuxt Color Mode', | ||
description: 'Demo of using @nuxtjs/color-mode for Nuxt, supporting dark mode and custom colors', | ||
}) | ||
</script> | ||
|
||
<template> | ||
<NuxtLayout> | ||
<div class="container mx-auto text-center p-14"> | ||
<NuxtLogo class="inline-block pb-5" /> | ||
<ColorModePicker /> | ||
<NuxtPage /> | ||
</NuxtLayout> | ||
<p class="p-4 rounded-lg bg-[--bg-secondary] text-[--color-secondary] inline-block"> | ||
Demo based on <a href="https://color-mode.nuxtjs.org">@nuxtjs/color-mode</a> module. | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<style lang="postcss"> | ||
:root { | ||
--color: #243746; | ||
--color-primary: #158876; | ||
--color-secondary: #0e2233; | ||
--bg: #f3f5f4; | ||
--bg-secondary: #fff; | ||
--border-color: #ddd; | ||
} | ||
.dark-mode { | ||
--color: #ebf4f1; | ||
--color-primary: #41b38a; | ||
--color-secondary: #fdf9f3; | ||
--bg: #091a28; | ||
--bg-secondary: #071521; | ||
--border-color: #0d2538; | ||
} | ||
.sepia-mode { | ||
--color: #433422; | ||
--color-secondary: #504231; | ||
--bg: #f1e7d0; | ||
--bg-secondary: #eae0c9; | ||
--border-color: #ded0bf; | ||
} | ||
body { | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
background-color: var(--bg); | ||
color: var(--color); | ||
transition: background-color .3s; | ||
} | ||
a { | ||
color: var(--color-primary); | ||
text-decoration: underline; | ||
} | ||
p { | ||
@apply p-5; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.