Skip to content

Commit 43393fd

Browse files
committed
Merge branch 'EVL-143'
2 parents c0471ab + 3dd8f7c commit 43393fd

25 files changed

Lines changed: 734 additions & 18 deletions

apps/docs/app/components/LandingCta.vue

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import { Shader, Aurora } from 'shaders/vue'
33
import { Motion } from 'motion-v'
44
5+
const { public: pub } = useRuntimeConfig()
6+
const justUseEvlogUrl = computed(() =>
7+
typeof pub.justUseEvlogUrl === 'string' ? pub.justUseEvlogUrl.trim() : '',
8+
)
9+
510
const prefersReducedMotion = ref(false)
611
712
const shipByTime = ref('')
@@ -27,19 +32,16 @@ onMounted(() => {
2732

2833
<template>
2934
<section class="relative overflow-hidden flex flex-col">
30-
<!-- Top fade mask: smooth transition from dark page into gradient -->
3135
<div
3236
class="absolute inset-x-0 top-0 h-24 z-[1] pointer-events-none"
3337
style="background: linear-gradient(180deg, #000000 0%, transparent 100%)"
3438
/>
3539

36-
<!-- Gradient: dark → blue → white (smooth diffuse) -->
3740
<div
3841
class="absolute inset-0"
3942
style="background: linear-gradient(180deg, #000000 0%, #000711 6%, #001133 14%, #002266 22%, #0044CC 32%, #0055FF 42%, #0077FF 52%, #0099FF 62%, #44BBFF 72%, #88D4FF 80%, #BBE6FF 88%, #E0F3FF 94%, #FFFFFF 100%)"
4043
/>
4144

42-
<!-- Aurora shader overlay -->
4345
<ClientOnly>
4446
<div class="absolute inset-0 mix-blend-screen opacity-30">
4547
<div class="size-full">
@@ -60,7 +62,6 @@ onMounted(() => {
6062
</div>
6163
</ClientOnly>
6264

63-
<!-- CTA content — in the blue zone -->
6465
<div class="relative z-10 pt-24 md:pt-32 text-center max-w-2xl mx-auto px-6">
6566
<Motion
6667
:initial="prefersReducedMotion ? { opacity: 1 } : { opacity: 0, y: 20 }"
@@ -96,6 +97,18 @@ onMounted(() => {
9697
<UIcon name="i-lucide-arrow-right" class="size-4" />
9798
</template>
9899
</UButton>
100+
<UButton
101+
v-if="justUseEvlogUrl"
102+
:to="justUseEvlogUrl"
103+
target="_blank"
104+
size="lg"
105+
class="bg-white/10 border border-white/40 text-white hover:bg-white/20 backdrop-blur-sm"
106+
>
107+
<template #leading>
108+
<UIcon name="i-lucide-megaphone" class="size-4" />
109+
</template>
110+
Just fucking use evlog
111+
</UButton>
99112
<UButton
100113
to="https://github.com/hugorcd/evlog"
101114
target="_blank"
@@ -112,7 +125,6 @@ onMounted(() => {
112125
</Motion>
113126
</div>
114127

115-
<!-- Inline footer — pinned to bottom of white zone -->
116128
<div class="relative z-10 mt-auto pt-32 md:pt-44 pb-4">
117129
<div class="max-w-4xl mx-auto px-6 flex items-center justify-between">
118130
<div class="text-xs font-mono italic tracking-tight text-zinc-500">

apps/docs/app/components/app/AppFooter.vue

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,26 @@ import type { FooterColumn } from '@nuxt/ui'
33
44
const route = useRoute()
55
const isLanding = computed(() => route.path === '/')
6+
const { public: pub } = useRuntimeConfig()
7+
const justUseEvlogUrl = computed(() =>
8+
typeof pub.justUseEvlogUrl === 'string' ? pub.justUseEvlogUrl.trim() : '',
9+
)
610
7-
const columns: FooterColumn[] = [
11+
const columns = computed<FooterColumn[]>(() => [
812
{
913
label: 'Resources',
1014
children: [
1115
{
1216
label: 'Documentation',
1317
to: '/getting-started/introduction'
1418
},
19+
...(justUseEvlogUrl.value
20+
? [{
21+
label: 'Just fucking use evlog',
22+
to: justUseEvlogUrl.value,
23+
target: '_blank' as const,
24+
}]
25+
: []),
1526
{
1627
label: 'Releases',
1728
to: 'https://github.com/hugorcd/evlog/releases',
@@ -39,7 +50,7 @@ const columns: FooterColumn[] = [
3950
}
4051
]
4152
}
42-
]
53+
])
4354
</script>
4455

4556
<template>

apps/docs/nuxt.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ export default defineNuxtConfig({
6767
},
6868
},
6969

70+
runtimeConfig: {
71+
public: {
72+
justUseEvlogUrl: process.env.NUXT_PUBLIC_JUST_USE_EVLOG_URL || '',
73+
},
74+
},
75+
7076
icon: {
7177
customCollections: [
7278
{

apps/just-use-evlog/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Just fucking use evlog
2+
3+
Small marketing / showcase site for evlog. Deploy separately from the documentation app.
4+
5+
Uses **Nuxt UI** (`UApp` in `app.vue`) and **`@vercel/analytics/nuxt`**: page views are recorded automatically on Vercel production (no extra config in code). Enable **Web Analytics** on the Vercel project if you have not already.
6+
7+
## Content
8+
9+
- **Nuxt Content** ([docs](https://content.nuxt.com/)): editable copy lives in [`content/landing.md`](content/landing.md) (front matter + Markdown).
10+
- **Comark** ([Nuxt integration](https://comark.dev/integrations/nuxt)): [`LandingComark`](app/components/LandingComark.ts) wraps `defineComarkComponent` with the **Shiki** [`highlight` plugin](https://comark.dev) (same idea as [nuxt-ui-templates/chat](https://github.com/nuxt-ui-templates/chat)) so fenced blocks get proper syntax highlighting. Custom blocks `::landing-demo-resize`, `::landing-demo-buttons`, and `::landing-ctas` are registered there.
11+
12+
The home page is a single **content-first** column: no separate marketing hero or sticky nav — the story, demos, and CTAs all live in Markdown and Comark. The app loads the parsed document from the `landing` collection, turns the minimark body back into Markdown with `minimark/stringify`, then Comark parses and renders it so custom blocks and prose stay aligned with the Comark toolchain.
13+
14+
## Environment
15+
16+
| Variable | Purpose |
17+
|----------|---------|
18+
| `NUXT_PUBLIC_SITE_URL` | Public URL of this deployment (required for correct OG / site config in production; avoid localhost). |
19+
| `NUXT_PUBLIC_DOCS_URL` | Optional override for documentation links (defaults to `https://www.evlog.dev`). |
20+
21+
## Documentation site
22+
23+
On **evlog-docs**, set `NUXT_PUBLIC_JUST_USE_EVLOG_URL` to this app’s production URL so the landing CTA and footer can link to this site (**Just fucking use evlog**).
24+
25+
## Develop
26+
27+
From the monorepo root:
28+
29+
```bash
30+
bun run dev:just-use-evlog
31+
```
32+
33+
Or from this directory:
34+
35+
```bash
36+
bun run dev
37+
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default defineAppConfig({
2+
ui: {
3+
colors: {
4+
primary: 'blue',
5+
neutral: 'zinc',
6+
},
7+
},
8+
})

apps/just-use-evlog/app/app.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<template>
2+
<UApp>
3+
<NuxtRouteAnnouncer />
4+
<NuxtPage />
5+
</UApp>
6+
</template>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
@import "tailwindcss";
2+
@import "@nuxt/ui";
3+
4+
@theme {
5+
--font-sans: "Geist", sans-serif;
6+
--font-mono: "Geist Mono", monospace;
7+
--font-pixel: "Geist Pixel Line", monospace;
8+
}
9+
10+
:root {
11+
--ui-radius: 0;
12+
--ui-primary: #2853FF;
13+
}
14+
15+
.dark {
16+
--ui-bg: #030303;
17+
--ui-bg-muted: #0a0a0c;
18+
--ui-bg-elevated: #0e0e11;
19+
--ui-border: #1a1a20;
20+
--ui-border-muted: #141418;
21+
}
22+
23+
@layer base {
24+
:root {
25+
@apply selection:bg-primary selection:text-white;
26+
}
27+
28+
html, body {
29+
@apply bg-default text-highlighted;
30+
}
31+
32+
html.dark .shiki span {
33+
color: var(--shiki-dark) !important;
34+
font-style: var(--shiki-dark-font-style) !important;
35+
font-weight: var(--shiki-dark-font-weight) !important;
36+
text-decoration: var(--shiki-dark-text-decoration) !important;
37+
}
38+
}
39+
40+
.landing-h1 {
41+
@apply font-pixel text-5xl leading-[1.1] tracking-tight text-highlighted md:text-6xl lg:text-7xl;
42+
}
43+
44+
.landing-h2 {
45+
@apply font-pixel text-3xl leading-[1.2] tracking-tight text-highlighted md:text-4xl;
46+
}
47+
48+
.landing-prose {
49+
@apply text-muted;
50+
}
51+
52+
.landing-prose :where(pre) {
53+
@apply bg-elevated;
54+
}
55+
56+
pre.framework-pre {
57+
@apply bg-elevated text-muted font-mono;
58+
padding: 1.25rem 1.5rem;
59+
font-size: 0.8125rem;
60+
line-height: 1.7;
61+
overflow-x: auto;
62+
white-space: pre;
63+
}
64+
65+
.landing-prose .vitrine-eyebrow {
66+
@apply mb-1 font-pixel text-[10px] uppercase tracking-[0.28em] text-muted;
67+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineComarkRendererComponent } from '@comark/vue'
2+
import LandingCtas from './LandingCtas.vue'
3+
import LandingH1 from './LandingH1.vue'
4+
import LandingH2 from './LandingH2.vue'
5+
6+
export default defineComarkRendererComponent({
7+
name: 'LandingComark',
8+
components: {
9+
'h1': LandingH1,
10+
'h2': LandingH2,
11+
'landing-ctas': LandingCtas,
12+
},
13+
class: 'landing-prose *:first:mt-0 *:last:mb-0',
14+
})
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<script setup lang="ts">
2+
const { public: pub } = useRuntimeConfig()
3+
const docsUrl = computed(() => pub.docsUrl || 'https://www.evlog.dev')
4+
</script>
5+
6+
<template>
7+
<div class="flex flex-col gap-6 border-t border-default pt-10 sm:flex-row sm:flex-wrap sm:items-center sm:gap-10">
8+
<NuxtLink
9+
:to="`${docsUrl}/getting-started/installation`"
10+
class="inline-flex items-center justify-center border border-primary bg-primary px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-primary-600"
11+
target="_blank"
12+
rel="noopener noreferrer"
13+
>
14+
Read the docs
15+
</NuxtLink>
16+
<NuxtLink
17+
:to="`${docsUrl}/getting-started/quick-start`"
18+
class="text-muted underline decoration-muted underline-offset-4 transition-colors hover:text-highlighted"
19+
target="_blank"
20+
rel="noopener noreferrer"
21+
>
22+
Quick start
23+
</NuxtLink>
24+
<NuxtLink
25+
to="https://github.com/hugorcd/evlog"
26+
class="text-muted underline decoration-muted underline-offset-4 transition-colors hover:text-highlighted"
27+
target="_blank"
28+
rel="noopener noreferrer"
29+
>
30+
GitHub
31+
</NuxtLink>
32+
</div>
33+
</template>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<script setup lang="ts">
2+
const frameworks = [
3+
{
4+
label: 'Nuxt',
5+
slot: 'nuxt' as const,
6+
code: `export default defineEventHandler(async (event) => {
7+
const log = useLogger(event)
8+
log.set({ cart: { items: 3, total: 9999 } })
9+
return { ok: true }
10+
})`,
11+
},
12+
{
13+
label: 'Express',
14+
slot: 'express' as const,
15+
code: `app.post('/api/checkout', (req, res) => {
16+
const log = useLogger(req)
17+
log.set({ cart: { items: 3, total: 9999 } })
18+
res.json({ ok: true })
19+
})`,
20+
},
21+
{
22+
label: 'Hono',
23+
slot: 'hono' as const,
24+
code: `app.post('/api/checkout', (c) => {
25+
const log = c.get('log')
26+
log.set({ cart: { items: 3, total: 9999 } })
27+
return c.json({ ok: true })
28+
})`,
29+
},
30+
{
31+
label: 'Fastify',
32+
slot: 'fastify' as const,
33+
code: `app.post('/api/checkout', async (request) => {
34+
request.log.set({ cart: { items: 3, total: 9999 } })
35+
return { ok: true }
36+
})`,
37+
},
38+
]
39+
</script>
40+
41+
<template>
42+
<UTabs :items="frameworks.map(f => ({ label: f.label, slot: f.slot }))" class="mb-10">
43+
<template v-for="fw in frameworks" :key="fw.slot" #[fw.slot]>
44+
<pre class="framework-pre"><code>{{ fw.code }}</code></pre>
45+
</template>
46+
</UTabs>
47+
</template>

0 commit comments

Comments
 (0)