Skip to content

Commit

Permalink
feat: improve script blocks readability
Browse files Browse the repository at this point in the history
  • Loading branch information
clemcode authored and Flosciante committed Aug 3, 2022
1 parent d26aa77 commit e003e8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const placeItems = computed(() => {
})
const rowsNumber = computed(() => {
return [theme.value.footer.navigation, theme.value.footer.title, theme.value.footer.socials, theme.value.footer.socials?.message.length].reduce((acc, val) => {
const footer = theme.value.footer
return [footer.navigation, footer.title, footer.socials, footer.socials?.message.length].reduce((acc, val) => {
return acc + (val ? 1 : 0)
}, 0)
})
Expand Down
6 changes: 1 addition & 5 deletions components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
const { navigation } = useContent()
const theme = useTheme()
const hasHeader = computed(() => {
return theme.value.header
})
const placeItems = computed(() => {
switch (theme.value.header.position) {
case 'left':
Expand All @@ -22,7 +18,7 @@ const placeItems = computed(() => {

<template>
<header
v-if="hasHeader"
v-if="theme.header"
class="relative"
>
<ColorModeSwitch class="absolute top-6 md:top-8" :class="{'right-0' : theme.header.position === 'left'}" />
Expand Down

0 comments on commit e003e8e

Please sign in to comment.