-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from os-checker/ui/topbar
feat(TopBar): 顶部栏 - 按钮 - 主页、问题文件树、使用说明、主题切换
- Loading branch information
Showing
8 changed files
with
87 additions
and
91 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,5 +1,5 @@ | ||
<template> | ||
<div> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
</div> | ||
</NuxtLayout> | ||
</template> |
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 was deleted.
Oops, something went wrong.
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,59 @@ | ||
<template> | ||
<div style="display: flex;"> | ||
|
||
<div class="topBarLeft"> | ||
|
||
<NuxtLink to="/"> | ||
<Button title="主页" icon="pi pi-home" /> | ||
</NuxtLink> | ||
|
||
<NuxtLink to="/file-tree"> | ||
<Button title="问题文件树" icon="pi pi-sitemap" /> | ||
</NuxtLink> | ||
|
||
</div> | ||
|
||
<div class="topBarRight"> | ||
|
||
<Button title="使用说明" icon="pi pi-question" severity="info" as="a" target="_blank" rel="noopener" | ||
href="https://github.com/os-checker/os-checker.github.io/wiki/%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E" /> | ||
|
||
<DarkMode /> | ||
|
||
</div> | ||
|
||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.topBarLeft, | ||
.topBarRight { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
padding: 0.25rem 0.8rem; | ||
/* 允许子元素换行 */ | ||
justify-content: space-between; | ||
/* 允许项目换行 */ | ||
flex-wrap: wrap; | ||
/* 指定项目之间的间隔 */ | ||
gap: 0.5rem; | ||
/* 垂直居中所有子元素 */ | ||
height: 55px; | ||
/* 容器的高度 */ | ||
--p-button-sm-padding-x: 0.8rem; | ||
} | ||
.topBarLeft { | ||
justify-content: flex-start; | ||
/* 子元素从左往右排列 */ | ||
} | ||
.topBarRight { | ||
display: flex; | ||
/* 子元素在容器内靠右对齐 */ | ||
justify-content: flex-end; | ||
/* 子元素在容器内靠右对齐 */ | ||
margin-left: auto; | ||
} | ||
</style> |
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> | ||
<TopBar /> | ||
|
||
<slot /> | ||
</div> | ||
</template> |
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