Skip to content

Commit a76a83f

Browse files
committed
fix: update header styling in Layout.vue and improve conditional class binding in PageContent.vue for better responsiveness and visual consistency
1 parent e1b179d commit a76a83f

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

packages/nimiq-vitepress-theme/src/layout/Layout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ const isMobileOrTablet = breakpoints.smaller('lg')
7070
<MobileNav fixed bottom-0 />
7171
</template>
7272
<template v-else>
73-
<header fixed inset-x-0 top-0 z-10 bg-neutral-0 f-h-xl flex="~ gap-32" f-px-xl f-py-sm>
73+
<header z-1000 fixed inset-x-0 top-0 border="b-1 neutral-400" shadow bg-neutral-0 f-h-xl flex="~ gap-32" f-px-xl f-py-sm>
7474
<Logo />
7575
<CommandMenu max-w-320 ml-auto />
7676
<nav flex="~ items-center gap-32">
7777
<a v-for="module in modules" :key="module.text" shrink-0 :href="withBase(module.defaultPageLink)">
7878
{{ module.text }}</a>
7979
</nav>
8080
</header>
81-
<PageContent f-pt-xl />
81+
<Content f-pt-xl />
8282
</template>
8383
</div>
8484
</template>

packages/nimiq-vitepress-theme/src/layout/PageContent.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ const { showSourceCode, showCopyMarkdown, editUrl, sourceCodeUrl, sourceCodeLabe
1818
</script>
1919

2020
<template>
21-
<div f-px-lg :class="showSecondarySidebar ? 'xl:f-pr-xs xl:f-pl-xl' : 'xl:f-px-xl'" f-pt-sm f="$px $px-min-48 $px-max-72" pb="f-xl xl:sm" flex="~ gap-16" relative h-full>
21+
<div
22+
:class="{
23+
'xl:f-pr-xs xl:f-pl-xl': showSecondarySidebar,
24+
'xl:f-px-xl': !showSecondarySidebar,
25+
}" f-pt-sm f="$px $px-min-48 $px-max-72" pb="f-xl xl:sm" flex="~ gap-16" relative h-full
26+
>
2227
<div flex="~ col" h-full flex-1 max-w-full>
2328
<div v-if="showBreadcrumbs || showSourceCode || showCopyMarkdown" f-pb-lg flex="~ items-center justify-between">
2429
<ul v-if="showBreadcrumbs" flex="~ items-center gap-12">
@@ -31,12 +36,19 @@ const { showSourceCode, showCopyMarkdown, editUrl, sourceCodeUrl, sourceCodeLabe
3136
<div v-else />
3237

3338
<div v-if="showSourceCode || showCopyMarkdown" flex="~ items-center gap-8 sm:gap-12">
34-
<button v-if="showCopyMarkdown" nq-pill-tertiary outline="~ 1.5 neutral-500" translate-y-0 shadow-none un-text="f-2xs neutral-900 copied:white" rounded-4 copied:bg-green flex="~ row gap-4" :data-state="copied ? '' : undefined" @click="copyMarkdownContent">
39+
<button
40+
v-if="showCopyMarkdown" nq-pill-tertiary outline="~ 1.5 neutral-500" translate-y-0 shadow-none
41+
un-text="f-2xs neutral-900 copied:white" rounded-4 copied:bg-green flex="~ row gap-4"
42+
:data-state="copied ? '' : undefined" @click="copyMarkdownContent"
43+
>
3544
<div i-nimiq:copy copied:i-nimiq:checkmark />
3645
<span>{{ copied ? 'Copied!' : 'Copy MD' }}</span>
3746
</button>
3847

39-
<a v-if="showSourceCode" :href="sourceCodeUrl" target="_blank" rel="noopener" rounded-4 nq-pill-tertiary outline="~ 1.5 neutral-500" nq-arrow un-text="f-2xs neutral-900" flex="~ row gap-4">
48+
<a
49+
v-if="showSourceCode" :href="sourceCodeUrl" target="_blank" rel="noopener" rounded-4 nq-pill-tertiary
50+
outline="~ 1.5 neutral-500" nq-arrow un-text="f-2xs neutral-900" flex="~ row gap-4"
51+
>
4052
<div i-nimiq:logos-github-mono op-80 />
4153
<span class="hidden sm:inline">{{ sourceCodeLabel }}</span>
4254
</a>
@@ -53,7 +65,10 @@ const { showSourceCode, showCopyMarkdown, editUrl, sourceCodeUrl, sourceCodeLabe
5365
Suggest changes on this page
5466
</a>
5567
<p text-neutral-700 font-normal italic>
56-
Built with the <a href="https://onmax.github.io/nimiq-ui/vitepress-theme/" un-text-neutral-800 target="_blank" rel="noopener" underline>Nimiq Vitepress Theme</a>
68+
Built with the <a
69+
href="https://onmax.github.io/nimiq-ui/vitepress-theme/" un-text-neutral-800 target="_blank"
70+
rel="noopener" underline
71+
>Nimiq Vitepress Theme</a>
5772
</p>
5873
</div>
5974
</div>

0 commit comments

Comments
 (0)