From 679dd1c1f6265227cc9db60c55d83f8eaf8f72b4 Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Sat, 17 Dec 2022 01:30:27 +0100 Subject: [PATCH] refactor(menu): improve support button --- src/layouts/base.layout.vue | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/layouts/base.layout.vue b/src/layouts/base.layout.vue index 23e23d22..aa7ef8f0 100644 --- a/src/layouts/base.layout.vue +++ b/src/layouts/base.layout.vue @@ -7,7 +7,7 @@ import { toolsByCategory } from '@/tools'; import { useStyleStore } from '@/stores/style.store'; import { config } from '@/config'; import MenuIconItem from '@/components/MenuIconItem.vue'; -import type { ITool } from '@/tools/tool'; +import type { Tool } from '@/tools/tools.types'; import SearchBar from '../components/SearchBar.vue'; import HeroGradient from '../assets/hero-gradient.svg?component'; import MenuLayout from '../components/MenuLayout.vue'; @@ -19,8 +19,8 @@ const styleStore = useStyleStore(); const version = config.app.version; const commitSha = config.app.lastCommitSha.slice(0, 7); -const makeLabel = (tool: ITool) => () => h(RouterLink, { to: tool.path }, { default: () => tool.name }); -const makeIcon = (tool: ITool) => () => h(MenuIconItem, { tool }); +const makeLabel = (tool: Tool) => () => h(RouterLink, { to: tool.path }, { default: () => tool.name }); +const makeIcon = (tool: Tool) => () => h(MenuIconItem, { tool }); const menuOptions: MenuGroupOption[] = toolsByCategory.map((category) => ({ label: category.name, @@ -145,9 +145,12 @@ const menuOptions: MenuGroupOption[] = toolsByCategory.map((category) => ({ href="https://github.com/sponsors/CorentinTh" rel="noopener" target="_blank" + class="support-button" + :bordered="false" > Buy me a coffee - + + ❤ Support IT Tools development ! @@ -170,6 +173,19 @@ const menuOptions: MenuGroupOption[] = toolsByCategory.map((category) => ({ // background-size: @size @size; // } +.support-button { + background: rgb(37, 99, 108); + background: linear-gradient(48deg, rgba(37, 99, 108, 1) 0%, rgba(59, 149, 111, 1) 60%, rgba(20, 160, 88, 1) 100%); + color: #fff; + transition: all ease 0.2s; + + &:hover { + color: #fff; + padding-left: 30px; + padding-right: 30px; + } +} + .footer { text-align: center; color: #838587;