Skip to content

Commit

Permalink
refine sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Germey committed Sep 30, 2023
1 parent 9b851f6 commit 813fd94
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
28 changes: 23 additions & 5 deletions src/components/common/Navigator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="sidebar">
<div class="top">
<div v-for="(link, linkIndex) in links" :key="linkIndex" class="link">
<el-button @click="$router.push(link.route)">
<font-awesome-icon icon="fa-solid fa-question" />
<el-button class="button" @click="$router.push(link.route)">
<font-awesome-icon :icon="link.icon" />
</el-button>
</div>
</div>
Expand All @@ -30,13 +30,13 @@ export default defineComponent({
route: {
name: ROUTE_CHAT_INDEX
},
icon: 'fa-question'
icon: 'fa-regular fa-comment'
},
{
route: {
name: 'midjourney-index'
},
icon: 'fa-question'
icon: 'fa-solid fa-palette'
}
]
};
Expand All @@ -48,10 +48,28 @@ export default defineComponent({
.sidebar {
display: flex;
flex-direction: column;
align-items: flex-end;
align-items: center;
.top {
display: flex;
flex-direction: column;
padding-top: 10px;
.link {
width: 40px;
height: 40px;
margin-bottom: 10px;
// border-radius: 5px;
.button {
width: 40px;
height: 40px;
border-radius: 10px;
border: none;
background-color: var(--el-bg-color-page);
&:hover,
&:focus {
background-color: var(--el-button-hover-bg-color);
}
}
}
}
.bottom {
display: flex;
Expand Down
5 changes: 3 additions & 2 deletions src/layouts/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export default defineComponent({
display: flex;
flex-direction: row;
.left {
width: 50px;
width: 60px;
height: 100%;
background-color: aqua;
// background-color: aqua;
border-right: 1px solid var(--el-border-color);
}
.main {
height: 100%;
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/font-awesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import {
faMicrophone as faSolidMicrophone,
faStop as faSolidStop,
faPalette as faSolidPalette,
faBars as faSolidBars,
faGear as faSolidGear,
faRotateRight as faSolidRotateRight,
Expand Down Expand Up @@ -45,3 +46,4 @@ library.add(faRegularPaperPlane);
library.add(faRegularComment);
library.add(faSolidArrowRightFromBracket);
library.add(faSolidTrash);
library.add(faSolidPalette);

0 comments on commit 813fd94

Please sign in to comment.