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 e392a52 commit f37c33f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
9 changes: 5 additions & 4 deletions config/header.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
logo_url:
background_class: bg-[#89a741]
link_class: text-white
links:
header_logo_url: http://orthoptera.speciesfile.org/HomePage/Orthoptera/img_Logo/SiteLogo.jpg
header_logo_text: Orthoptera Species File
header_class: bg-[#89a741]
header_link_class: text-white
header_links:
- label: Home
link: /

Expand Down
29 changes: 14 additions & 15 deletions src/components/Layout/LayoutHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
px-2
sm:px-4
py-2.5
rounded
border-b
dark:border-b-slate-800
dark:bg-slate-900
Expand All @@ -16,21 +15,21 @@
align-middle
flex
items-center"
:class="background_class"
:class="header_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"
class="flex items-center"
:class="header_link_class"
>
<img
v-if="logo"
v-if="header_logo_url"
class="mr-3 h-10"
:src="logo_url"
:src="header_logo_url"
>
<span v-else>
{{ project_name }}
<span>
{{ header_logo_text }}
</span>
</a>

Expand Down Expand Up @@ -70,13 +69,13 @@
<nav class="text-sm leading-6 font-semibold text-slate-700 dark:text-slate-200">
<ul class="flex space-x-8">
<li
v-for="(item, index) in links"
v-for="(item, index) in header_links"
:key="index"
>
<router-link
:to="item.link"
class="hover:text-sky-500 dark:hover:text-sky-400"
:class="link_class"
:class="header_link_class"
>
{{ item.label }}
</router-link>
Expand All @@ -96,11 +95,11 @@
import SwitchTheme from '../SwitchTheme.vue'
const {
logo,
links,
project_name,
background_class,
link_class
header_class,
header_link_class,
header_links,
header_logo_text,
header_logo_url
} = __APP_ENV__
</script>
4 changes: 2 additions & 2 deletions src/components/SwitchTheme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6 text-slate-400 hover:text-primary-500 dark:hover:text-slate-300"
:class="link_class"
:class="header_link_class"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
Expand All @@ -47,7 +47,7 @@
import { watch, ref } from 'vue'
const {
link_class
header_link_class
} = __APP_ENV__
const themeModes = {
Expand Down

0 comments on commit f37c33f

Please sign in to comment.