Skip to content

Commit ce6659d

Browse files
committed
feat: add about page
1 parent 13e4bca commit ce6659d

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,25 @@ Do NOT use `class` to style internal parts of components. Instead, use the `ui`
7979
- **UHeader**: `root`, `left`, `center`, `right`, `logo`
8080
- **UAvatar**: `root`, `image`, `fallback`
8181

82+
### UAvatar custom sizes
83+
When using UAvatar with a custom size via the `ui` prop, always set explicit `width` and `height` props to match the display size. This ensures NuxtImg fetches the image at the correct resolution and avoids blurry images:
84+
85+
```vue
86+
<!-- ❌ Wrong - image will be blurry (fetched at default small size) -->
87+
<UAvatar
88+
src="/images/profile.png"
89+
:ui="{ root: 'size-44' }"
90+
/>
91+
92+
<!-- ✅ Correct - explicit dimensions match the display size (size-44 = 176px) -->
93+
<UAvatar
94+
src="/images/profile.png"
95+
:width="176"
96+
:height="176"
97+
:ui="{ root: 'size-44' }"
98+
/>
99+
```
100+
82101
### Always check component documentation
83102
Use `mcp_nuxt-ui_get-component` or `mcp_nuxt-ui_get-component-metadata` to find:
84103
- Available props and their types

app/pages/about.vue

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<script setup lang="ts">
2+
import { NuxtImg } from '#components'
3+
4+
const route = useRoute()
5+
const { data: page } = await useAsyncData(route.path, () => queryCollection('content').path(route.path).first())
6+
7+
if (!page.value) {
8+
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
9+
}
10+
11+
useSeoMeta({
12+
title: page.value.title,
13+
ogTitle: page.value.title,
14+
description: page.value.description,
15+
ogDescription: page.value.description
16+
})
17+
</script>
18+
19+
<template>
20+
<UContainer>
21+
<UPageHero
22+
v-if="page"
23+
:title="page.title"
24+
:description="page.description"
25+
orientation="horizontal"
26+
:ui="{ container: 'gap-8 sm:gap-12 lg:gap-16 py-8 sm:py-12 lg:py-16', wrapper: 'py-0', title: 'text-4xl sm:text-5xl', description: 'text-lg text-muted' }"
27+
>
28+
<NuxtImg
29+
src="/images/bordeaux_1.jpg"
30+
alt="Picture of Place de la Bourse (Bordeaux) at night."
31+
class="w-full rounded-md shadow-xl"
32+
width="800"
33+
height="533"
34+
quality="90"
35+
/>
36+
</UPageHero>
37+
<UPage>
38+
<UPageBody prose>
39+
<ContentRenderer v-if="page" :value="page" />
40+
<div class="flex justify-center mt-8">
41+
<UAvatar
42+
src="/images/profile.png"
43+
alt="Picture of Alexandre Nédélec"
44+
:width="176"
45+
:height="176"
46+
:ui="{ root: 'size-44' }"
47+
/>
48+
</div>
49+
</UPageBody>
50+
</UPage>
51+
</UContainer>
52+
</template>

content/about.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: About
3+
description: A few words about me and this website.
4+
navigation.icon: i-heroicons-user-circle-solid
5+
---
6+
Hi, my name is Alexandre Nédélec. I am a software developer living in Bordeaux.
7+
8+
I graduated from the Engineer School [ENSEIRB-MATMECA](https://enseirb-matmeca.bordeaux-inp.fr) in Computer Sciences over 10 years ago. I am currently working for an IT consulting company specialized in Microsoft Technologies.
9+
I am a .NET and Azure enthusiast, primarily coding in C# but I like to discover other languages and technologies too. I want to keep learning and always become a better developer.
10+
11+
My blog and its posts are a good way to remind me of things I have learned, solutions and workarounds to some coding issues I have encountered and helpful tools I have used. This blog is also a place to write about things I am interested in and if it can make some people learn something new or help them solve a problem, that's for the better.
12+
13+
This website is built using [Nuxt Content](https://content.nuxt.com/) and [NuxtUI Pro](https://ui.nuxt.com/). It was initially created using the [NuxtUI Pro SaaS template](https://github.com/nuxt-ui-pro/saas) but was also inspired by other websites (like [Nuxt website](https://nuxt.com/)). Previously, my blog was generated using [Statiq](https://www.statiq.dev/), but I have switched to Nuxt to benefit from the Nuxt ecosystem.

0 commit comments

Comments
 (0)