moved computer

This commit is contained in:
nico 2024-06-21 15:05:35 +02:00
parent 5927336ae8
commit 59687fbade
154 changed files with 60 additions and 4207 deletions

1
src/components/AstroImage.astro Normal file → Executable file
View file

@ -17,6 +17,7 @@ const imgAvif = await getImage({
const imgWebp = await getImage({
src: src,
format: "webp",
// need Number() because sharp wants an integer and not a string for w/h
width: Number(imgWidth),
height: Number(imgHeight),
});

0
src/components/CardEditorial.astro Normal file → Executable file
View file

0
src/components/EditorialContent.astro Normal file → Executable file
View file

0
src/components/Footer.astro Normal file → Executable file
View file

0
src/components/Head.astro Normal file → Executable file
View file

0
src/components/Header.astro Normal file → Executable file
View file

0
src/components/LangSwitcher.astro Normal file → Executable file
View file

0
src/components/ListCards.astro Normal file → Executable file
View file

0
src/components/ListTags.astro Normal file → Executable file
View file

0
src/components/MetaDate.astro Normal file → Executable file
View file

6
src/components/Navigation.astro Normal file → Executable file
View file

@ -7,19 +7,19 @@ import LanguageSwitcher from "./LangSwitcher.astro";
<ul class="main-nav" role="list">
<li>
<a href={l("/articles")} class="clean-link nice-link"
>{t("article.titre")}</a
>{t("article.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
</li>
<li>
<a href={l("/fragments")} class="clean-link nice-link"
>{t("fragments.titre")}</a
>{t("fragments.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
</li>
<li>
<a href={l("/references")} class="clean-link nice-link"
>{t("references.titre")}</a
>{t("references.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
</li>

0
src/components/QuickAccessCard.astro Normal file → Executable file
View file

0
src/components/TOC.astro Normal file → Executable file
View file

0
src/content/articles/en/2022.md Normal file → Executable file
View file

0
src/content/articles/en/2023.md Normal file → Executable file
View file

0
src/content/articles/en/after-effects-expressions.mdx Normal file → Executable file
View file

0
src/content/articles/en/faq.md Normal file → Executable file
View file

0
src/content/articles/en/gratuiste.md Normal file → Executable file
View file

0
src/content/articles/en/sci-hub-blocage.mdx Normal file → Executable file
View file

0
src/content/articles/en/the-day-I-jamd.mdx Normal file → Executable file
View file

0
src/content/articles/en/video-compression.mdx Normal file → Executable file
View file

0
src/content/articles/fr/2022.md Normal file → Executable file
View file

0
src/content/articles/fr/2023.md Normal file → Executable file
View file

0
src/content/articles/fr/after-effects-expressions.md Normal file → Executable file
View file

0
src/content/articles/fr/faq.md Normal file → Executable file
View file

0
src/content/articles/fr/gratuiste.md Normal file → Executable file
View file

0
src/content/articles/fr/sci-hub-blocage.mdx Normal file → Executable file
View file

0
src/content/articles/fr/the-day-I-jamd.mdx Normal file → Executable file
View file

0
src/content/articles/fr/video-compression.md Normal file → Executable file
View file

0
src/content/config.ts Normal file → Executable file
View file

0
src/content/fragments/en/acme-sh-tls-cert.md Normal file → Executable file
View file

0
src/content/fragments/en/array-vs-array.md Normal file → Executable file
View file

0
src/content/fragments/en/buttons.md Normal file → Executable file
View file

0
src/content/fragments/en/image-full.mdx Normal file → Executable file
View file

0
src/content/fragments/en/nuxt-graphql-static.md Normal file → Executable file
View file

0
src/content/fragments/en/super-cookies.mdx Normal file → Executable file
View file

0
src/content/fragments/en/toulouse-fun.md Normal file → Executable file
View file

0
src/content/fragments/en/visited-links.md Normal file → Executable file
View file

0
src/content/fragments/fr/acme-sh-tls-cert.md Normal file → Executable file
View file

0
src/content/fragments/fr/array-vs-array.md Normal file → Executable file
View file

0
src/content/fragments/fr/buttons.mdx Normal file → Executable file
View file

0
src/content/fragments/fr/image-full.mdx Normal file → Executable file
View file

0
src/content/fragments/fr/nuxt-graphql-static.md Normal file → Executable file
View file

0
src/content/fragments/fr/super-cookies.mdx Normal file → Executable file
View file

0
src/content/fragments/fr/toulouse-fun.md Normal file → Executable file
View file

0
src/content/fragments/fr/visited-links.md Normal file → Executable file
View file

0
src/content/references/en/3w.md Normal file → Executable file
View file

0
src/content/references/en/natureo.md Normal file → Executable file
View file

0
src/content/references/en/parole-expression.md Normal file → Executable file
View file

0
src/content/references/en/rose-primaire.md Normal file → Executable file
View file

0
src/content/references/fr/3w.md Normal file → Executable file
View file

0
src/content/references/fr/natureo.md Normal file → Executable file
View file

0
src/content/references/fr/parole-expression.md Normal file → Executable file
View file

0
src/content/references/fr/rose-primaire.md Normal file → Executable file
View file

0
src/data/HP/en/01-offre.md Normal file → Executable file
View file

0
src/data/HP/en/02-methodo.md Normal file → Executable file
View file

0
src/data/HP/en/03-about.md Normal file → Executable file
View file

0
src/data/HP/fr/01.1-offre.md Normal file → Executable file
View file

0
src/data/HP/fr/01.2-offre.md Normal file → Executable file
View file

0
src/data/HP/fr/01.3-offre.md Normal file → Executable file
View file

0
src/data/HP/fr/02-methodo.md Normal file → Executable file
View file

0
src/data/HP/fr/03-about.md Normal file → Executable file
View file

0
src/data/veille/en/2023.md Normal file → Executable file
View file

0
src/data/veille/fr/2023.md Normal file → Executable file
View file

0
src/env.d.ts vendored Normal file → Executable file
View file

0
src/fonts/wotfard/wotfard-medium-webfont.woff2 Normal file → Executable file
View file

0
src/fonts/wotfard/wotfard-regular-webfont.woff2 Normal file → Executable file
View file

0
src/fonts/wotfard/wotfard-semibold-webfont.woff2 Normal file → Executable file
View file

0
src/i18n/en.json Normal file → Executable file
View file

0
src/i18n/fr.json Normal file → Executable file
View file

0
src/images/home/about.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 582 B

Before After
Before After

0
src/images/home/icon-desktop.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 528 B

After

Width:  |  Height:  |  Size: 528 B

Before After
Before After

0
src/images/home/icon-heart.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

Before After
Before After

0
src/images/home/icon-methodo.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 671 B

Before After
Before After

0
src/images/home/icon-mobile.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 429 B

Before After
Before After

0
src/images/home/icon-philo.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

Before After
Before After

0
src/images/home/methodo-1.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

0
src/images/home/methodo.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 953 B

After

Width:  |  Height:  |  Size: 953 B

Before After
Before After

0
src/images/home/offres.svg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 821 B

Before After
Before After

0
src/images/oui.jpg Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

0
src/images/projects/parole-expression/hero.png Normal file → Executable file
View file

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Before After
Before After

0
src/layouts/BaseLayout.astro Normal file → Executable file
View file

0
src/layouts/MarkdownPostLayout.astro Normal file → Executable file
View file

27
src/pages/articles/[slug].astro Normal file → Executable file
View file

@ -6,22 +6,29 @@ import { getCollection } from "astro:content";
import EditorialContent from "../../components/EditorialContent.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
const articles = await getCollection("articles", ({ data }) => {
return data.lang === langCode;
});
return articles.map((article) => ({
params: { slug: article.data.permalink },
props: { article },
}));
}, import.meta.url);
export const getStaticPaths = createStaticPaths(
async ({ langCode }) => {
const articles = await getCollection("articles", ({ data }) => {
console.log(langCode);
return data.lang === langCode;
});
return articles.map((article) => ({
params: { slug: article.data.permalink },
props: { article },
}));
},
import.meta.url
);
// export async function getStaticPaths() {
// const articles = await getCollection("articles", ({ data }) => {
// console.log(astroI18n.langCode);
// return data.lang === astroI18n.langCode;
// });
// console.log(articles);
// return articles.map((article) => ({
// params: { slug: article.slug },
// params: { slug: article.data.permalink },
// props: { article },
// }));
// }

0
src/pages/articles/i18n/en.json Normal file → Executable file
View file

0
src/pages/articles/i18n/fr.json Normal file → Executable file
View file

0
src/pages/articles/index.astro Normal file → Executable file
View file

0
src/pages/en/articles/[slug].astro Normal file → Executable file
View file

0
src/pages/en/articles/index.astro Normal file → Executable file
View file

0
src/pages/en/index.astro Normal file → Executable file
View file

View file

@ -1,34 +0,0 @@
import rss from "@astrojs/rss";
import { getCollection } from "astro:content";
export async function get(context) {
const articles = await getCollection("articles", ({ data }) => {
return data.lang === "en" && !data.draft;
});
const fragments = await getCollection("fragments", ({ data }) => {
return data.lang === "en" && !data.draft;
});
const posts = articles.concat(fragments);
return rss({
// `<title>` field in output xml
title: "Nicolas Arduin",
// `<description>` field in output xml
description: "Articles from nardu.in",
// Pull in your project "site" from the endpoint context
// https://docs.astro.build/en/reference/api-reference/#contextsite
site: context.site,
// Array of `<item>`s in output xml
// See "Generating items" section for examples using content collections and glob imports
items: posts.map((post) => ({
title: post.data.title,
pubDate: post.data.createdAt,
description: post.data.subtitle,
lang: post.data.lang,
// Compute RSS link from post `slug`
// This example assumes all posts are rendered as `/blog/[slug]` routes
link: `/en/${post.data.type}/${post.data.permalink}/`,
})),
// (optional) inject custom xml
customData: `<language>en-us</language>`,
});
}

0
src/pages/en/sitemap.astro Normal file → Executable file
View file

0
src/pages/en/snippets/[slug].astro Normal file → Executable file
View file

0
src/pages/en/snippets/index.astro Normal file → Executable file
View file

0
src/pages/en/veille/index.astro Normal file → Executable file
View file

0
src/pages/en/work/index.astro Normal file → Executable file
View file

24
src/pages/fragments/[slug].astro Normal file → Executable file
View file

@ -1,27 +1,31 @@
---
import { createStaticPaths } from "astro-i18n";
// import { astroI18n } from "astro-i18n";
import { getCollection } from "astro:content";
import EditorialContent from "../../components/EditorialContent.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
export const getStaticPaths = createStaticPaths(async ({ langCode }) => {
const snippets = await getCollection("fragments", ({ data }) => {
return data.lang === langCode;
});
return snippets.map((snippet) => ({
params: { slug: snippet.data.permalink },
props: { snippet },
}));
}, import.meta.url);
export const getStaticPaths = createStaticPaths(
async ({ langCode }) => {
const snippets = await getCollection("fragments", ({ data }) => {
return data.lang === langCode;
});
return snippets.map((snippet) => ({
params: { slug: snippet.data.permalink },
props: { snippet },
}));
},
import.meta.url
);
// export async function getStaticPaths() {
// const snippets = await getCollection("fragments", ({ data }) => {
// return data.lang === astroI18n.langCode;
// });
// return snippets.map((snippet) => ({
// params: { slug: snippet.slug },
// params: { slug: snippet.data.permalink },
// props: { snippet },
// }));
// }

0
src/pages/fragments/i18n/en.json Normal file → Executable file
View file

0
src/pages/fragments/i18n/fr.json Normal file → Executable file
View file

0
src/pages/fragments/index.astro Normal file → Executable file
View file

Some files were not shown because too many files have changed in this diff Show more