Skip to content

Commit

Permalink
Update header config
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Aug 9, 2022
1 parent f7b15db commit 6e564b1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/header.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
logo_url:
background_class: bg-[#89a741]
link_class: text-white
links:
- label: Home
link: /
Expand Down
7 changes: 6 additions & 1 deletion src/components/Layout/LayoutHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
align-middle
flex
items-center"
:class="background_class"
>
<div class="container flex flex-wrap justify-between items-center mx-auto dark:text-slate-200 font-medium">
<a
href="/"
class="flex"
:class="link_class"
>
<img
v-if="logo"
Expand Down Expand Up @@ -74,6 +76,7 @@
<router-link
:to="item.link"
class="hover:text-sky-500 dark:hover:text-sky-400"
:class="link_class"
>
{{ item.label }}
</router-link>
Expand All @@ -95,7 +98,9 @@ import SwitchTheme from '../SwitchTheme.vue'
const {
logo,
links,
project_name
project_name,
background_class,
link_class
} = __APP_ENV__
</script>
7 changes: 6 additions & 1 deletion src/components/SwitchTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
>
<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"
class="h-6 w-6 text-slate-400 hover:text-primary-500 dark:hover:text-slate-300"
:class="link_class"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
Expand All @@ -45,6 +46,10 @@
<script setup>
import { watch, ref } from 'vue'
const {
link_class
} = __APP_ENV__
const themeModes = {
dark: 'dark',
light: 'light'
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx,md}",
"./pages/*.{vue,md}",
"./config/*.yml",
],

darkMode: 'class',
Expand Down

0 comments on commit 6e564b1

Please sign in to comment.