mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-02-11 14:07:14 +01:00
Implement new articles and posts
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
- **Content** → [Nuxt Content](https://content.nuxtjs.org/)
|
- **Content** → [Nuxt Content](https://content.nuxtjs.org/)
|
||||||
- **Design System** → [NuxtUI](https://nuxtui.com/)
|
- **Design System** → [NuxtUI](https://nuxtui.com/)
|
||||||
- **CMS & Editing** → [Nuxt Studio](https://nuxt.studio)
|
- **CMS & Editing** → [Nuxt Studio](https://nuxt.studio)
|
||||||
- **Langage** → [Typescript](https://www.typescriptlang.org/)
|
- **Language** → [Typescript](https://www.typescriptlang.org/)
|
||||||
- **Deployment** → [NuxtHub](https://hub.nuxt.com/)
|
- **Deployment** → [NuxtHub](https://hub.nuxt.com/)
|
||||||
- **Styling** → [Sass](https://sass-lang.com/) & [Tailwind CSS](https://tailwindcss.com/)
|
- **Styling** → [Sass](https://sass-lang.com/) & [Tailwind CSS](https://tailwindcss.com/)
|
||||||
- **Package Manager** → [pnpm](https://pnpm.io/)
|
- **Package Manager** → [pnpm](https://pnpm.io/)
|
||||||
|
|||||||
@@ -39,7 +39,10 @@ function getDetails() {
|
|||||||
const like = likes > 1 ? t('likes.many') : t('likes.one')
|
const like = likes > 1 ? t('likes.many') : t('likes.one')
|
||||||
const view = views > 1 ? t('views.many') : t('views.one')
|
const view = views > 1 ? t('views.many') : t('views.one')
|
||||||
|
|
||||||
return `${likes} ${like} · ${views} ${view}`
|
return {
|
||||||
|
likes: `${likes} ${like}`,
|
||||||
|
views: `${views} ${view}`,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const likeCookie = useCookie<boolean>(`post:like:${route.params.slug}`, {
|
const likeCookie = useCookie<boolean>(`post:like:${route.params.slug}`, {
|
||||||
@@ -79,20 +82,27 @@ async function handleLike() {
|
|||||||
icon="i-ph-warning-duotone"
|
icon="i-ph-warning-duotone"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
/>
|
/>
|
||||||
<p class="border-l-2 pl-2 border-gray-300 dark:border-gray-700 rounded-sm">
|
<div class="border-l-2 pl-2 border-gray-300 dark:border-gray-700 rounded-sm flex gap-1 items-center">
|
||||||
{{ getDetails() }}
|
<UIcon name="i-ph-heart-duotone" size="16" />
|
||||||
</p>
|
<p>{{ getDetails().likes }} </p>·
|
||||||
|
<UIcon name="i-ph-eye-duotone" size="16" />
|
||||||
|
<p>{{ getDetails().views }}</p>
|
||||||
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<div class="flex items-end gap-2 flex-wrap">
|
<div class="flex items-end gap-4 flex-wrap">
|
||||||
<h1
|
<h1
|
||||||
class="font-bold text-3xl text-black dark:text-white"
|
class="font-bold text-3xl text-black dark:text-white"
|
||||||
>
|
>
|
||||||
{{ post.title }}
|
{{ post.title }}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-sm text-neutral-500">
|
<div
|
||||||
{{ useDateFormat(post.publishedAt, 'DD MMMM YYYY', { locales: currentLocale!.code ?? 'en' }).value }} ·
|
class="text-sm text-neutral-500 duration-300 flex items-center gap-1"
|
||||||
{{ post.readingTime }}min long
|
>
|
||||||
</p>
|
<UIcon name="ph:calendar-duotone" size="16" />
|
||||||
|
<p>{{ useDateFormat(post.publishedAt, 'DD MMMM YYYY').value }} </p>·
|
||||||
|
<UIcon name="ph:timer-duotone" size="16" />
|
||||||
|
<p>{{ post.readingTime }}min long</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="mt-4 text-base">
|
<p class="mt-4 text-base">
|
||||||
{{ post.description }}
|
{{ post.description }}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { type Tag, TAGS } from '~~/types'
|
||||||
|
|
||||||
const { t, locale } = useI18n({
|
const { t, locale } = useI18n({
|
||||||
useScope: 'local',
|
useScope: 'local',
|
||||||
})
|
})
|
||||||
@@ -19,22 +21,18 @@ const { data: writings, refresh } = await useAsyncData('all-portfolio', () => qu
|
|||||||
|
|
||||||
watch(tagFilter, async () => await refresh())
|
watch(tagFilter, async () => await refresh())
|
||||||
|
|
||||||
const tags = [{
|
const tags: Array<{ label: string, icon: string } & Tag> = [
|
||||||
label: 'All',
|
{
|
||||||
icon: 'i-ph-books-duotone',
|
label: 'All',
|
||||||
}, {
|
icon: 'i-ph-books-duotone',
|
||||||
label: 'Articles',
|
color: 'black',
|
||||||
icon: 'i-ph-pencil-line-duotone',
|
},
|
||||||
tag: 'article',
|
...TAGS,
|
||||||
}, {
|
]
|
||||||
label: 'Projects',
|
|
||||||
icon: 'i-ph-briefcase-duotone',
|
|
||||||
tag: 'project',
|
|
||||||
}]
|
|
||||||
|
|
||||||
function updateTag(index: number) {
|
function updateTag(index: number) {
|
||||||
const tag = tags[index]
|
const tag = tags[index]
|
||||||
tagFilter.value = tag?.label === 'All' ? undefined : tag?.tag
|
tagFilter.value = tag?.label.toLowerCase() === 'all' ? undefined : tag?.label.toLowerCase()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -52,49 +50,49 @@ function updateTag(index: number) {
|
|||||||
icon="i-ph-warning-duotone"
|
icon="i-ph-warning-duotone"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
/>
|
/>
|
||||||
<UTabs :items="tags" @change="updateTag" />
|
<UTabs :items="tags" class="hidden md:block" @change="updateTag" />
|
||||||
|
<UTabs :items="tags" orientation="vertical" class="md:hidden" @change="updateTag" />
|
||||||
<ul class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
<ul class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||||
<li
|
<NuxtLink
|
||||||
v-for="(writing, id) in writings"
|
v-for="(writing, id) in writings"
|
||||||
:key="id"
|
:key="id"
|
||||||
class="border p-4 shadow-sm border-neutral-200 rounded-md hover:border-neutral-500 dark:border-neutral-700 dark:hover:border-neutral-500 duration-300"
|
:to="writing._path"
|
||||||
>
|
>
|
||||||
<NuxtLink
|
<li
|
||||||
:to="writing._path"
|
class=" h-full border p-4 shadow-sm border-neutral-200 rounded-md hover:border-neutral-500 dark:border-neutral-700 dark:hover:border-neutral-500 duration-300"
|
||||||
>
|
>
|
||||||
<article class="space-y-2">
|
<article class="space-y-2">
|
||||||
<div class="flex gap-2 flex-col">
|
<h1
|
||||||
<h1
|
class="font-bold text-lg duration-300 text-black dark:text-white"
|
||||||
class="font-bold text-lg duration-300 text-black dark:text-white"
|
>
|
||||||
>
|
{{ writing.title }}
|
||||||
{{ writing.title }}
|
</h1>
|
||||||
</h1>
|
<div
|
||||||
<div
|
class="text-sm text-neutral-500 duration-300 flex items-center gap-1"
|
||||||
class="text-sm text-neutral-500 duration-300 flex items-center gap-1"
|
>
|
||||||
>
|
<UIcon name="ph:calendar-duotone" size="16" />
|
||||||
<UIcon name="ph:calendar-duotone" size="16" />
|
<p>{{ useDateFormat(writing.publishedAt, 'DD MMMM YYYY').value }} </p>·
|
||||||
<p>{{ useDateFormat(writing.publishedAt, 'DD MMMM YYYY').value }} </p>·
|
<UIcon name="ph:timer-duotone" size="16" />
|
||||||
<UIcon name="ph:timer-duotone" size="16" />
|
<p>{{ writing.readingTime }}min long</p>
|
||||||
<p>{{ writing.readingTime }}min long</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<h3>
|
<h3>
|
||||||
{{ writing.description }}
|
{{ writing.description }}
|
||||||
</h3>
|
</h3>
|
||||||
</article>
|
</article>
|
||||||
<div class="flex gap-2 mt-2 flex-wrap">
|
<div class="flex gap-2 mt-4 flex-wrap">
|
||||||
<UBadge
|
<UBadge
|
||||||
v-for="tag in writing.tags"
|
v-for="tag in writing.tags"
|
||||||
:key="tag"
|
:key="tag"
|
||||||
color="gray"
|
:color="TAGS.find(color => color.label.toLowerCase() === tag)?.color || 'black'"
|
||||||
variant="soft"
|
variant="soft"
|
||||||
size="md"
|
size="sm"
|
||||||
|
:ui="{ rounded: 'rounded-full' }"
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ TAGS.find(color => color.label.toLowerCase() === tag)?.label }}
|
||||||
</UBadge>
|
</UBadge>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</li>
|
||||||
</li>
|
</NuxtLink>
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ readingTime: 1
|
|||||||
cover: arthome/cover.png
|
cover: arthome/cover.png
|
||||||
tags:
|
tags:
|
||||||
- project
|
- project
|
||||||
- dev
|
- web
|
||||||
---
|
---
|
||||||
|
|
||||||
[ArtHome](https://home.arthurdanjou.fr) is a personalised page where you can create categories and tabs to have a one page with all your shortcuts on all browsers.
|
[ArtHome](https://home.arthurdanjou.fr) is a personalised page where you can create categories and tabs to have a one page with all your shortcuts on all browsers.
|
||||||
|
|||||||
25
content/portfolio/artsite.md
Normal file
25
content/portfolio/artsite.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
slug: artsite
|
||||||
|
title: ArtSite
|
||||||
|
description: 🌍 My personal website, my portfolio, and my blog. 🚀
|
||||||
|
publishedAt: 2024/06/01
|
||||||
|
readingTime: 1
|
||||||
|
cover: artsite/cover.png
|
||||||
|
tags:
|
||||||
|
- project
|
||||||
|
- web
|
||||||
|
---
|
||||||
|
|
||||||
|
[**ArtSite**](https://arthurdanjou.fr) is my personal website, my portfolio, and my blog. It's a place where I can share my projects, my thoughts, and my experiences. It's also a place where I can experiment with new technologies and design ideas.
|
||||||
|
|
||||||
|
## ⚒️ Tech stack
|
||||||
|
|
||||||
|
- **UI** → [Vue.js](https://vuejs.org/)
|
||||||
|
- **Framework** → [Nuxt.js](https://nuxtjs.org/)
|
||||||
|
- **Content** → [Nuxt Content](https://content.nuxtjs.org/)
|
||||||
|
- **Design System** → [NuxtUI](https://nuxtui.com/)
|
||||||
|
- **CMS & Editing** → [Nuxt Studio](https://nuxt.studio)
|
||||||
|
- **Langage** → [Typescript](https://www.typescriptlang.org/)
|
||||||
|
- **Deployment** → [NuxtHub](https://hub.nuxt.com/)
|
||||||
|
- **Styling** → [Sass](https://sass-lang.com/) & [Tailwind CSS](https://tailwindcss.com/)
|
||||||
|
- **Package Manager** → [pnpm](https://pnpm.io/)
|
||||||
@@ -6,7 +6,7 @@ publishedAt: 2024/06/21
|
|||||||
readingTime: 5
|
readingTime: 5
|
||||||
tags:
|
tags:
|
||||||
- article
|
- article
|
||||||
- dev
|
- web
|
||||||
---
|
---
|
||||||
|
|
||||||
My personal website is an overengineered playground where I tinker, explore new technologies, experiment with tools, break conventional rules, and satisfy my deep curiosity about web software.
|
My personal website is an overengineered playground where I tinker, explore new technologies, experiment with tools, break conventional rules, and satisfy my deep curiosity about web software.
|
||||||
|
|||||||
45
content/portfolio/studies.md
Normal file
45
content/portfolio/studies.md
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
---
|
||||||
|
slug: studies
|
||||||
|
title: Studies projects
|
||||||
|
description: 🎓 Studies projects - a collection of projects done during my studies.
|
||||||
|
publishedAt: 2023/09/01
|
||||||
|
readingTime: 1
|
||||||
|
tags:
|
||||||
|
- project
|
||||||
|
- data
|
||||||
|
- python
|
||||||
|
- r
|
||||||
|
---
|
||||||
|
|
||||||
|
[Studies projects](https://github.com/ArthurDanjou/studies) is a collection of mathematics projects done during my studies. It includes projects in _Python_ and in _R_.
|
||||||
|
|
||||||
|
The projects are divided into two main categories: _L3_ and _M1_, corresponding to the third year of the bachelor's degree and the first year of the master's degree in mathematics.
|
||||||
|
|
||||||
|
File structure:
|
||||||
|
- `L3`
|
||||||
|
- `Analyse Matricielle`
|
||||||
|
- `Analyse Multidimensionnelle`
|
||||||
|
- `Calculs Numériques`
|
||||||
|
- `Equations Différentielles`
|
||||||
|
- `Méthodes Numériques`
|
||||||
|
- `Probabilités`
|
||||||
|
- `Projet Numérique`
|
||||||
|
- `Statistiques`
|
||||||
|
- `M1`
|
||||||
|
- `Data Analysis`
|
||||||
|
- `General Linear Models`
|
||||||
|
- `Monte Carlo Methods`
|
||||||
|
- `Portfolio Management`
|
||||||
|
|
||||||
|
Made with:
|
||||||
|
- [Python](https://www.python.org): Python is an interpreted, high-level and general-purpose programming language.
|
||||||
|
- [R](https://www.r-project.org): R is a programming language and free software environment for statistical computing and graphics.
|
||||||
|
- [Jupyter](https://jupyter.org): Jupyter is a free, open-source, interactive web tool known as a computational notebook, which researchers can use to combine software code, computational output, explanatory text and multimedia resources in a single document.
|
||||||
|
- [Pandas](https://pandas.pydata.org): Pandas is a fast, powerful, flexible and easy to use open source data analysis and data manipulation library built on top of the Python programming language.
|
||||||
|
- [Numpy](https://numpy.org): NumPy is the fundamental package for scientific computing in Python.
|
||||||
|
- [Scipy](https://www.scipy.org): SciPy is a free and open-source Python library used for scientific and technical computing.
|
||||||
|
- [Matplotlib](https://matplotlib.org): Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
|
||||||
|
- [RMarkdown](https://rmarkdown.rstudio.com): R Markdown is an authoring framework for data science. You can use a single R Markdown file to save and execute code and generate high-quality reports that can be shared with an audience.
|
||||||
|
- [FactoMineR](https://factominer.free.fr/): FactoMineR is an R package dedicated to multivariate exploratory data analysis.
|
||||||
|
- [ggplot2](https://ggplot2.tidyverse.org): ggplot2 is a system for declaratively creating graphics, based on The Grammar of Graphics.
|
||||||
|
- and my 🧠
|
||||||
@@ -6,7 +6,7 @@ readingTime: 3
|
|||||||
publishedAt: 2024/11/26
|
publishedAt: 2024/11/26
|
||||||
tags:
|
tags:
|
||||||
- article
|
- article
|
||||||
- ML
|
- ml
|
||||||
---
|
---
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
# This is a placeholder file to keep this folder in your repository.
|
|
||||||
BIN
public/portfolio/artsite/cover.png
Normal file
BIN
public/portfolio/artsite/cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 288 KiB |
46
types.ts
46
types.ts
@@ -1,3 +1,5 @@
|
|||||||
|
import type { BadgeColor } from '#ui/types'
|
||||||
|
|
||||||
interface WakatimeData {
|
interface WakatimeData {
|
||||||
name: string
|
name: string
|
||||||
percent: number
|
percent: number
|
||||||
@@ -45,3 +47,47 @@ export const IDEs = [
|
|||||||
{ name: 'IntelliJ IDEA Ultimate', icon: 'intellij-idea' },
|
{ name: 'IntelliJ IDEA Ultimate', icon: 'intellij-idea' },
|
||||||
{ name: 'WebStorm', icon: 'webstorm' },
|
{ name: 'WebStorm', icon: 'webstorm' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export interface Tag {
|
||||||
|
label: string
|
||||||
|
icon: string
|
||||||
|
color: BadgeColor
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TAGS = [
|
||||||
|
{
|
||||||
|
label: 'Article',
|
||||||
|
icon: 'i-ph-pencil-line-duotone',
|
||||||
|
color: 'red',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Project',
|
||||||
|
icon: 'i-ph-briefcase-duotone',
|
||||||
|
color: 'blue',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'R',
|
||||||
|
icon: 'i-vscode-icons-file-type-r',
|
||||||
|
color: 'orange',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'ML',
|
||||||
|
icon: 'i-ph-brain-duotone',
|
||||||
|
color: 'green',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Data',
|
||||||
|
icon: 'i-ph-database-duotone',
|
||||||
|
color: 'purple',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Web',
|
||||||
|
icon: 'i-ph-globe-duotone',
|
||||||
|
color: 'cyan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Python',
|
||||||
|
icon: 'i-vscode-icons-file-type-python',
|
||||||
|
color: 'amber',
|
||||||
|
},
|
||||||
|
].sort((a, b) => a.label.localeCompare(b.label))
|
||||||
|
|||||||
Reference in New Issue
Block a user