Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoRCD committed Jan 23, 2025
1 parent 7ed4455 commit 5c9b093
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 38 deletions.
56 changes: 31 additions & 25 deletions apps/base/components/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script setup lang="ts">
const { size = 'size-6', text = true, textSize = 'text-base' } = defineProps<{
const { size = 'size-6', text = true, textSize = 'text-base', lp = false } = defineProps<{
size?: string
text?: boolean
textSize?: string
lp?: boolean
}>()
const logo = ref<SVGSVGElement>()
Expand All @@ -18,31 +19,36 @@ function downloadLogo(svg: string, filename: string) {
toast.success('Logo downloaded successfully')
}
const items = ref([
[
{
label: 'Copy logo as SVG',
icon: 'custom:shelve',
onSelect: () => {
copyToClipboard(logo.value!.outerHTML, 'Logo copied to clipboard')
}
},
{
label: 'Download logo',
icon: 'custom:shelve',
onSelect: () => {
downloadLogo(logo.value!.outerHTML, 'shelve.svg')
}
const baseItems = [
{
label: 'Copy logo as SVG',
icon: 'custom:shelve',
onSelect: () => {
copyToClipboard(logo.value!.outerHTML, 'Logo copied to clipboard')
}
],
[
{
label: 'Brand Assets',
icon: 'i-heroicons-photo',
to: '/brand'
},
]
])
},
{
label: 'Download logo',
icon: 'custom:shelve',
onSelect: () => {
downloadLogo(logo.value!.outerHTML, 'shelve.svg')
}
}
]
const brandAssetsItem = {
label: 'Brand Assets',
icon: 'i-heroicons-photo',
to: '/brand'
}
const items = computed(() => {
const menuItems = [baseItems]
if (lp) {
menuItems.push([brandAssetsItem])
}
return menuItems
})
</script>

<template>
Expand Down
13 changes: 2 additions & 11 deletions apps/lp/app/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import type { ContentNavigationItem } from '@nuxt/content'
import type { NavigationMenuItem } from '@nuxt/ui'
const props = defineProps<{
defineProps<{
links: NavigationMenuItem[]
}>()
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
const items = computed(() => props.links.map(({ icon, ...link }) => link))
defineShortcuts({
meta_g: () => {
window.open('https://github.com/hugorcd/shelve', '_blank')
Expand All @@ -20,14 +18,7 @@ defineShortcuts({
<template>
<UHeader class="bg-white dark:bg-neutral-950" :ui="{ left: 'min-w-0' }" mode="drawer" :menu="{ shouldScaleBackground: true }">
<template #left>
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-[var(--ui-text-highlighted)] min-w-0 focus-visible:outline-[var(--ui-primary)] shrink-0" aria-label="Shelve">
<div class="flex items-center gap-1">
<UIcon name="custom:shelve" />
<span>
Shelve
</span>
</div>
</NuxtLink>
<Logo lp />
</template>

<UContentSearchButton label="Search or ⌘K..." icon="lucide:search" variant="subtle" size="sm" class="w-[300px]" />
Expand Down
2 changes: 1 addition & 1 deletion apps/lp/app/components/landing/Hero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defineShortcuts({
<div class="z-20 h-[400px] w-full bg-dotted sm:p-0 p-5 relative flex items-center justify-center overflow-hidden">
<div flex="flex flex-col items-center justify-center gap-4">
<div class="flex items-center justify-center">
<Logo :text="false" size="size-10" />
<Logo :text="false" lp size="size-10" />
</div>
<div class="mx-auto max-w-md text-pretty text-center text-3xl sm:text-4xl">
The all-in-one developer <span class="font-newsreader font-light italic">workspace</span>
Expand Down
3 changes: 2 additions & 1 deletion apps/lp/app/components/layout/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const items = [
},
{
label: 'Docs',
to: '/getting-started',
children: [
{
to: '/getting-started',
Expand Down Expand Up @@ -120,7 +121,7 @@ const navigationUi = computed(() => ({
<Blur position="both" />
<UHeader mode="drawer" :ui="headerUi">
<template #left>
<Logo />
<Logo lp />
</template>

<UNavigationMenu variant="link" color="neutral" :items :ui="navigationUi">
Expand Down

0 comments on commit 5c9b093

Please sign in to comment.