diff --git a/src/components/NavbarButtons.vue b/src/components/NavbarButtons.vue new file mode 100644 index 00000000..cbb56315 --- /dev/null +++ b/src/components/NavbarButtons.vue @@ -0,0 +1,108 @@ + + + + + \ No newline at end of file diff --git a/src/layouts/base.layout.vue b/src/layouts/base.layout.vue index 4a2883dd..295ef5b1 100644 --- a/src/layouts/base.layout.vue +++ b/src/layouts/base.layout.vue @@ -2,13 +2,14 @@ import { NIcon } from 'naive-ui'; import { h, ref, type Component } from 'vue'; import { RouterLink, useRoute } from 'vue-router'; -import { Heart, BrandGithub, BrandTwitter, Moon, Sun, Menu2, Home2, InfoCircle } from '@vicons/tabler' +import { Heart, Menu2, Home2 } from '@vicons/tabler' import { toolsByCategory } from '@/tools'; import SearchBar from '../components/SearchBar.vue'; import { useStyleStore } from '@/stores/style.store'; import HeroGradient from '../assets/hero-gradient.svg?component' import { useThemeVars } from 'naive-ui' import MenuLayout from '../components/MenuLayout.vue' +import NavbarButtons from '../components/NavbarButtons.vue' const themeVars = useThemeVars() const activeKey = ref(null) @@ -19,14 +20,14 @@ const makeLabel = (text: string, to: string) => () => h(RouterLink, { to }, { de const makeIcon = (icon: Component) => () => h(NIcon, null, { default: () => h(icon) }) const m = toolsByCategory.map(category => ({ - label: category.name, - key: category.name, - type: 'group', - children: category.components.map(({ name, path, icon }) => ({ - label: makeLabel(name, path), - icon: makeIcon(icon), - key: name - })) + label: category.name, + key: category.name, + type: 'group', + children: category.components.map(({ name, path, icon }) => ({ + label: makeLabel(name, path), + icon: makeIcon(icon), + key: name + })) })) @@ -58,71 +59,7 @@ const m = toolsByCategory.map(category => ({ v-if="styleStore.isSmallScreen" justify="center" > - - - - - - - - - - - - - - - + ({ @@ -283,68 +165,64 @@ const m = toolsByCategory.map(category => ({ // } .sider-content { - padding-top: 160px; - padding-bottom: 200px; + padding-top: 160px; + padding-bottom: 200px; } .hero-wrapper { - position: absolute; - display: block; + position: absolute; + display: block; + position: absolute; + left: 0; + width: 100%; + z-index: 10; + overflow: hidden; + + .gradient { + margin-top: -65px; + } + + .text-wrapper { position: absolute; left: 0; width: 100%; - z-index: 10; - overflow: hidden; + text-align: center; + top: 16px; + color: #fff; - .gradient { - margin-top: -65px; + .title { + font-size: 25px; + font-weight: 600; } - .text-wrapper { - position: absolute; - left: 0; - width: 100%; - text-align: center; - top: 16px; - color: #fff; - - .title { - font-size: 25px; - font-weight: 600; - } - - .divider { - width: 50px; - height: 2px; - border-radius: 4px; - background-color: v-bind('themeVars.primaryColor'); - margin: 0 auto 5px; - } - - .subtitle { - font-size: 16px; - } + .divider { + width: 50px; + height: 2px; + border-radius: 4px; + background-color: v-bind('themeVars.primaryColor'); + margin: 0 auto 5px; } + + .subtitle { + font-size: 16px; + } + } } .navigation { - display: flex; - align-items: center; - justify-content: center; - flex-direction: row; + display: flex; + align-items: center; + justify-content: center; + flex-direction: row; - &>*:not(:first-child) { - margin-left: 10px; - - .isSmallScreen & { - margin-left: 5px; - } - } + &>*:not(:last-child) { + margin-right: 5px; + } - .search-bar { - // width: 100%; - flex-grow: 1; - } + .search-bar { + // width: 100%; + flex-grow: 1; + } } - \ No newline at end of file + \ No newline at end of file