-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make all screens mobile compatable with layout header
- Loading branch information
1 parent
36d0352
commit 175602d
Showing
10 changed files
with
75 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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,24 +1,22 @@ | ||
<template> | ||
<header class="flex h-12 items-center justify-between border-b py-2.5 pl-5"> | ||
<div class="left-header flex max-w-[60%] items-center gap-2"> | ||
<slot name="left-header" /> | ||
</div> | ||
<div class="flex items-center gap-2 px-5"> | ||
<slot name="right-header" class="flex items-center gap-2" /> | ||
</div> | ||
</header> | ||
<Teleport to="#app-header" v-if="showHeader"> | ||
<slot> | ||
<header class="flex h-10.5 items-center justify-between py-[7px] pl-5"> | ||
<div class="flex items-center gap-2 max-w-[50%]"> | ||
<slot name="left-header" /> | ||
</div> | ||
<div class="flex items-center gap-2"> | ||
<slot name="right-header" class="flex items-center gap-2" /> | ||
</div> | ||
</header> | ||
</slot> | ||
</Teleport> | ||
</template> | ||
|
||
<script setup> | ||
import { onMounted } from "vue"; | ||
onMounted(() => { | ||
const leftHeader = document.querySelector(".left-header"); | ||
const currentRoute = leftHeader.querySelector('[aria-current="page"]'); | ||
currentRoute.classList.add("truncate"); | ||
import { ref, nextTick } from "vue"; | ||
const showHeader = ref(false); | ||
const span = currentRoute.querySelector("span"); | ||
span.classList.add("truncate"); | ||
nextTick(() => { | ||
showHeader.value = true; | ||
}); | ||
</script> |
This file contains 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,7 @@ | ||
<template> | ||
<div class="flex border-b pr-5"> | ||
<div id="app-header" class="flex-1"></div> | ||
</div> | ||
</template> | ||
|
||
<script setup></script> |
This file contains 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 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 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 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 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 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 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 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