Skip to content

Commit 7faf87a

Browse files
committed
feat: add YearsSince component for dynamic year calculation in about section
1 parent c7253ba commit 7faf87a

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
const props = defineProps<{
3+
date: string
4+
}>()
5+
6+
const years = computed(() => {
7+
const startDate = new Date(props.date)
8+
const now = new Date()
9+
return Math.floor((now.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24 * 365.25))
10+
})
11+
</script>
12+
13+
<template>
14+
<span>{{ years }}</span>
15+
</template>

content/about.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ navigation.icon: i-heroicons-user-circle-solid
55
---
66
Hi, my name is Alexandre Nédélec. I am a software developer living in Bordeaux.
77

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.
8+
I graduated from the Engineer School [ENSEIRB-MATMECA](https://enseirb-matmeca.bordeaux-inp.fr) in Computer Sciences over :years-since{date="2013-11-01"} years ago. I am currently working for an IT consulting company specialized in Microsoft Technologies.
99
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.
1010

1111
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.
1212

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.
13+
This website is built using [Nuxt Content](https://content.nuxt.com/) and [NuxtUI](https://ui.nuxt.com/). It was initially created using the [Nuxt SaaS template](https://github.com/nuxt-ui-templates/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)