-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autoimport global components, tailwinds configuration and css cha…
…nges
- Loading branch information
José Luis Pereira
committed
Jun 30, 2022
1 parent
c3c6469
commit 52fc0cc
Showing
33 changed files
with
323 additions
and
121 deletions.
There are no files selected for viewing
This file contains hidden or 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,6 +1,16 @@ | ||
| const fs = require('fs') | ||
| const { | ||
| userTailwindConfigPath, | ||
| defaultTailwindConfigPath | ||
| } = require('./src/constants/configPaths') | ||
|
|
||
| module.exports = { | ||
| plugins: { | ||
| tailwindcss: {}, | ||
| tailwindcss: { | ||
| config: fs.existsSync(userTailwindConfigPath) | ||
| ? userTailwindConfigPath | ||
| : defaultTailwindConfigPath | ||
| }, | ||
| autoprefixer: {}, | ||
| }, | ||
| } |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ | |
| } | ||
| body { | ||
| @apply bg-gray-100; | ||
| @apply dark:bg-gray-900; | ||
| } | ||
This file contains hidden or 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 hidden or 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 contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <template> | ||
| <div class="shadow-sm bg-white print:shadow-none print:border-0 dark:bg-gray-800"> | ||
| <slot /> | ||
| </div> | ||
| </template> |
2 changes: 1 addition & 1 deletion
2
src/components/Card/CardContent.vue → src/components/Card/VCardContent.vue
This file contains hidden or 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,5 @@ | ||
| <template> | ||
| <div class="p-4"> | ||
| <div class="p-4 dark:text-slate-400"> | ||
| <slot /> | ||
| </div> | ||
| </template> |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <template> | ||
| <div class="text-fonts-500 p-4 uppercase text-sm dark:text-slate-200"> | ||
| <slot /> | ||
| </div> | ||
| </template> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| <template> | ||
| <button | ||
| v-if="themeMode === themeModes.dark" | ||
| type="button" | ||
| @click="themeMode = themeModes.light" | ||
| > | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| class="h-6 w-6" | ||
| fill="none" | ||
| viewBox="0 0 24 24" | ||
| stroke="currentColor" | ||
| stroke-width="2" | ||
| > | ||
| <path | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" | ||
| /> | ||
| </svg> | ||
| </button> | ||
|
|
||
| <button | ||
| v-else | ||
| type="button" | ||
| @click="themeMode = themeModes.dark" | ||
| > | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| class="h-6 w-6 text-slate-400 hover:text-slate-500 dark:hover:text-slate-300" | ||
| fill="none" | ||
| viewBox="0 0 24 24" | ||
| stroke="currentColor" | ||
| stroke-width="2" | ||
| > | ||
| <path | ||
| stroke-linecap="round" | ||
| stroke-linejoin="round" | ||
| d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" | ||
| /> | ||
| </svg> | ||
| </button> | ||
| </template> | ||
|
|
||
| <script setup> | ||
| import { watch, ref } from 'vue' | ||
| const themeModes = { | ||
| dark: 'dark', | ||
| light: 'light' | ||
| } | ||
| const themeMode = ref(null) | ||
| if ( | ||
| localStorage.theme === 'dark' || | ||
| (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) | ||
| ) { | ||
| themeMode.value = 'dark' | ||
| } else { | ||
| themeMode.value = 'light' | ||
| } | ||
| watch( | ||
| themeMode, | ||
| (value, oldValue) => { | ||
| document.documentElement.classList.add(value) | ||
| document.documentElement.classList.remove(oldValue) | ||
| localStorage.setItem('theme', value) | ||
| }, | ||
| { immediate: true } | ||
| ) | ||
| </script> |
This file contains hidden or 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
Oops, something went wrong.