Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: optimize header #28

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions playground/src/components/Header.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<template>
<header fcc py-4 pr>
<h1 text-4xl fw-600 text-transparent bg-clip-text bg-gradient-to-r from-purple to-red fcc gap-2>
<img inline-block w-10 src="/logo.svg" alt="logo">
<span>
Magic Color
</span>
</h1>
<header pt-2 sticky fcc top-0 z-1>
<hgroup w="85%" nav-bg fcc py-6>
<h1 text-4xl fw-600 text-transparent bg-clip-text bg-gradient-to-r from-purple to-red fcc gap-2>
<img inline-block w-10 src="/logo.svg" alt="logo">
<span>
Magic Color
</span>
</h1>

<div pa right-10 fcc gap-2>
<button i-carbon-switch-layer-2 icon-btn title="Built-In Colors" @click="togglePanel()" />
<button
i-carbon-light
dark:i-carbon-moon
icon-btn
title="Toggle Color Mode"
@click="toggleDark()"
/>
<a
i-carbon-logo-github icon-btn
href="https://github.com/zyyv/magic-color"
target="_blank"
title="GitHub"
/>
</div>
<div pa right-10 fcc gap-6>
<button i-carbon-switch-layer-2 icon-btn title="Built-In Colors" @click="togglePanel()" />
<button
i-carbon-light
dark:i-carbon-moon
icon-btn
title="Toggle Color Mode"
@click="toggleDark()"
/>
<a
i-carbon-logo-github icon-btn
href="https://github.com/zyyv/magic-color"
target="_blank"
title="GitHub"
/>
</div>
</hgroup>
</header>
</template>
1 change: 1 addition & 0 deletions playground/uno.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig({
'btn': 'inline-flex items-center justify-center w-full h-12 rd-md',
'btn-outline': 'btn b bg-transparent',
'btn-ghost': 'btn bg-transparent transition',
'nav-bg': 'backdrop-blur-12 rd-2 shadow-xl bg-primary-bg/45',
},
presets: [
presetUseful({
Expand Down
Loading