Skip to content

Commit

Permalink
fix: header fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Aug 1, 2023
1 parent 796bc8e commit 19b8bb3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
23 changes: 11 additions & 12 deletions components/forum-post/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ const { data: forum, isLoading: forumIsLoading } = useForum(props.forumId)
</script>

<template>
<header class="header flex items-center justify-between border-b-1 border-b-$surface-border border-b-solid px6 py4">
<Skeleton v-if="groupIsLoading || forumIsLoading" height="20px" width="30%" />
<header class="header flex items-center border-b-1 border-b-$surface-border border-b-solid px6 py4">
<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>

<Skeleton v-if="groupIsLoading || forumIsLoading" height="20px" width="30%" />
<Transition v-else-if="group && forum" appear>
<span flex="~ gap3 items-center">
<NuxtLink to="../../..">
{{ group.name }}
<strong>
{{ group.name }}
</strong>
</NuxtLink>
<span>
/
Expand All @@ -41,15 +49,6 @@ const { data: forum, isLoading: forumIsLoading } = useForum(props.forumId)
</small>
</span>
</Transition>

<div flex items-center gap3>
<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>
</div>
</header>
</template>

Expand Down
23 changes: 12 additions & 11 deletions components/forum/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,21 @@ function createPost() {
</form>
</Dialog>

<header class="header flex items-center justify-between border-b-1 border-b-$surface-border border-b-solid px6 py4">
<Skeleton v-if="groupIsLoading || forumIsLoading" height="20px" width="30%" />
<header class="header flex items-center border-b-1 border-b-$surface-border border-b-solid px6 py4">
<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>

<Skeleton v-if="groupIsLoading || forumIsLoading" height="20px" width="30%" />
<Transition v-else-if="group && forum" appear>
<span flex="~ gap3 items-center">
<NuxtLink to="../..">
{{ group.name }}
<strong>
{{ group.name }}
</strong>
</NuxtLink>
<span>
/
Expand All @@ -112,15 +120,8 @@ function createPost() {
</span>
</Transition>

<div flex items-center gap3>
<div flex flex-1 items-center gap3>
<Button :pt="{ root: { style: 'padding: 6px !important' } }" size="small" outlined type="button" label="New post" @click="formData.visible = true" />

<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>
</div>
</header>
</template>
Expand Down
20 changes: 11 additions & 9 deletions components/group/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ const { data: group, isLoading: groupIsLoading } = useGroup(props.groupId)
</script>

<template>
<header class="header flex items-center justify-between border-b-1 border-b-$surface-border border-b-solid px6 py4">
<header class="header flex items-center border-b-1 border-b-$surface-border border-b-solid px6 py4">
<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>

<Skeleton v-if="groupIsLoading" height="20px" width="30%" />
<Transition v-else-if="group" appear>
<span>
{{ group.name }}
<strong>
{{ group.name }}
</strong>
{{ " " }}
<small>
{{ group.description }}
</small>
</span>
</Transition>

<div md:hidden>
<Button text size="small" :pt="{ root: { style: 'padding: 0 !important' } }" @click="visible = !visible">
<div v-if="visible" class="text-xl" i-tabler-layout-sidebar-left-collapse />
<div v-else class="text-xl" i-tabler-layout-sidebar-left-expand />
</Button>
</div>
</header>
</template>

0 comments on commit 19b8bb3

Please sign in to comment.