Compare commits

...

4 Commits

Author SHA1 Message Date
Nico 5927336ae8 updated to astro v3
removed image integration in favor of native image processing
removed export image from mdx to url
various fixes
2023-09-21 13:15:24 +02:00
Nico 3ff4ad3b17 new HP design + content, new references, fixed styles, fixed i18n 2023-07-20 15:35:04 +02:00
Nico 407cdf9099 reworked HP + new snippet 2023-06-12 15:47:35 +02:00
Nico 4d184782fc changed offres + added reference to HP 2023-06-03 22:27:00 +02:00
88 changed files with 2417 additions and 1923 deletions

View File

@ -1,8 +1,8 @@
type DefaultLangCode = "fr"
type SupportedLangCode = "en"
type LangCode = DefaultLangCode | SupportedLangCode
type RouteUri = | "/articles/[...slug]" | "/articles" | "/agments/[slug]" | "/agments" | "/references" | "/veille" | "/" | "/plan-du-site"
type RouteParams = {"/articles/[...slug]": { "...slug": string; }; "/articles": undefined; "/agments/[slug]": { "slug": string; }; "/agments": undefined; "/references": undefined; "/veille": undefined; "/": undefined; "/plan-du-site": undefined; }
type RouteUri = | "/articles/[slug]" | "/articles" | "/agments/[slug]" | "/agments" | "/references" | "/veille" | "/" | "/plan-du-site"
type RouteParams = {"/articles/[slug]": { "slug": string; }; "/articles": undefined; "/agments/[slug]": { "slug": string; }; "/agments": undefined; "/references": undefined; "/veille": undefined; "/": undefined; "/plan-du-site": undefined; }
type TranslationPath = "accueil" | "tagline" | "copyright" | "contact.title" | "contact.email" | "contact.tel" | "contenuVide" | "header.skipLink" | "header.mainNav" | "header.homeLink" | "sitemap" | "prevNext.contenus" | "prevNext.precedent" | "prevNext.suivant" | "article.titre" | "article.tagline" | "article.published" | "meta.publication" | "meta.modification" | "meta.credit" | "fragments.titre" | "fragments.tagline" | "references.titre" | "references.slug" | "references.cta" | "references.tagline" | "veille.titre" | "veille.tagline" | "erreur.introuvable" | "erreur.autre" | "erreur.lienRetour" | "seo.meta.description" | "seo.article.title" | "seo.article.description" | "seo.code.title" | "seo.code.description" | "seo.references.title" | "seo.references.description" | "index.articles.pageName" | "index.articles.subtitle" | "index.fragments.pageName" | "index.fragments.subtitle" | "index.references.pageName" | "index.references.subtitle" | "index.veille.pageName" | "index.veille.subtitle" | "index.title" | "index.subtitle" | "index.quoi" | "index.comment" | "index.opensource" | "index.writing" | "index.latestProjects" | "index.latestArticles" | "index.allProjects" | "index.allArticles" | "index.latestSnippets" | "index.allSnippets" | "index.toc" | "contact.contenuVide"
type TranslationOptions = { "accueil": {} | undefined; "tagline": {} | undefined; "copyright": {} | undefined; "contact.title": {} | undefined; "contact.email": {} | undefined; "contact.tel": {} | undefined; "contenuVide": {} | undefined; "header.skipLink": {} | undefined; "header.mainNav": {} | undefined; "header.homeLink": {} | undefined; "sitemap": {} | undefined; "prevNext.contenus": {} | undefined; "prevNext.precedent": {} | undefined; "prevNext.suivant": {} | undefined; "article.titre": {} | undefined; "article.tagline": {} | undefined; "article.published": { datetime: unknown; options: unknown; }; "meta.publication": {} | undefined; "meta.modification": {} | undefined; "meta.credit": {} | undefined; "fragments.titre": {} | undefined; "fragments.tagline": {} | undefined; "references.titre": {} | undefined; "references.slug": {} | undefined; "references.cta": {} | undefined; "references.tagline": {} | undefined; "veille.titre": {} | undefined; "veille.tagline": {} | undefined; "erreur.introuvable": {} | undefined; "erreur.autre": {} | undefined; "erreur.lienRetour": {} | undefined; "seo.meta.description": {} | undefined; "seo.article.title": {} | undefined; "seo.article.description": {} | undefined; "seo.code.title": {} | undefined; "seo.code.description": {} | undefined; "seo.references.title": {} | undefined; "seo.references.description": {} | undefined; "index.articles.pageName": {} | undefined; "index.articles.subtitle": {} | undefined; "index.fragments.pageName": {} | undefined; "index.fragments.subtitle": {} | undefined; "index.references.pageName": {} | undefined; "index.references.subtitle": {} | undefined; "index.veille.pageName": {} | undefined; "index.veille.subtitle": {} | undefined; "index.title": {} | undefined; "index.subtitle": {} | undefined; "index.quoi": {} | undefined; "index.comment": {} | undefined; "index.opensource": {} | undefined; "index.writing": {} | undefined; "index.latestProjects": {} | undefined; "index.latestArticles": {} | undefined; "index.allProjects": {} | undefined; "index.allArticles": {} | undefined; "index.latestSnippets": {} | undefined; "index.allSnippets": {} | undefined; "index.toc": {} | undefined; "contact.contenuVide": {} | undefined; }

559
.astro/types.d.ts vendored
View File

@ -20,27 +20,14 @@ declare module 'astro:content' {
declare module 'astro:content' {
export { z } from 'astro/zod';
export type CollectionEntry<C extends keyof typeof entryMap> =
(typeof entryMap)[C][keyof (typeof entryMap)[C]];
// TODO: Remove this when having this fallback is no longer relevant. 2.3? 3.0? - erika, 2023-04-04
/**
* @deprecated
* `astro:content` no longer provide `image()`.
*
* Please use it through `schema`, like such:
* ```ts
* import { defineCollection, z } from "astro:content";
*
* defineCollection({
* schema: ({ image }) =>
* z.object({
* image: image(),
* }),
* });
* ```
*/
export const image: never;
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;
export type CollectionKey = keyof AnyEntryMap;
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;
export type ContentCollectionKey = keyof ContentEntryMap;
export type DataCollectionKey = keyof DataEntryMap;
// This needs to be in sync with ImageMetadata
export type ImageFunction = () => import('astro/zod').ZodObject<{
@ -55,19 +42,17 @@ declare module 'astro:content' {
import('astro/zod').ZodLiteral<'tiff'>,
import('astro/zod').ZodLiteral<'webp'>,
import('astro/zod').ZodLiteral<'gif'>,
import('astro/zod').ZodLiteral<'svg'>
import('astro/zod').ZodLiteral<'svg'>,
import('astro/zod').ZodLiteral<'avif'>,
]
>;
}>;
type BaseSchemaWithoutEffects =
| import('astro/zod').AnyZodObject
| import('astro/zod').ZodUnion<import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]>
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodIntersection<
import('astro/zod').AnyZodObject,
import('astro/zod').AnyZodObject
>;
| import('astro/zod').ZodIntersection<BaseSchemaWithoutEffects, BaseSchemaWithoutEffects>;
type BaseSchema =
| BaseSchemaWithoutEffects
@ -75,316 +60,424 @@ declare module 'astro:content' {
export type SchemaContext = { image: ImageFunction };
type BaseCollectionConfig<S extends BaseSchema> = {
type DataCollectionConfig<S extends BaseSchema> = {
type: 'data';
schema?: S | ((context: SchemaContext) => S);
};
export function defineCollection<S extends BaseSchema>(
input: BaseCollectionConfig<S>
): BaseCollectionConfig<S>;
type EntryMapKeys = keyof typeof entryMap;
type ContentCollectionConfig<S extends BaseSchema> = {
type?: 'content';
schema?: S | ((context: SchemaContext) => S);
};
type CollectionConfig<S> = ContentCollectionConfig<S> | DataCollectionConfig<S>;
export function defineCollection<S extends BaseSchema>(
input: CollectionConfig<S>
): CollectionConfig<S>;
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidEntrySlug<C extends EntryMapKeys> = AllValuesOf<(typeof entryMap)[C]>['slug'];
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
>['slug'];
export function getEntryBySlug<
C extends keyof typeof entryMap,
E extends ValidEntrySlug<C> | (string & {})
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
// Note that this has to accept a regular string too, for SSR
entrySlug: E
): E extends ValidEntrySlug<C>
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getCollection<C extends keyof typeof entryMap, E extends CollectionEntry<C>>(
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
collection: C,
entryId: E
): Promise<CollectionEntry<C>>;
export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
collection: C,
filter?: (entry: CollectionEntry<C>) => entry is E
): Promise<E[]>;
export function getCollection<C extends keyof typeof entryMap>(
export function getCollection<C extends keyof AnyEntryMap>(
collection: C,
filter?: (entry: CollectionEntry<C>) => unknown
): Promise<CollectionEntry<C>[]>;
export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(entry: {
collection: C;
slug: E;
}): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(entry: {
collection: C;
id: E;
}): E extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
slug: E
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(
collection: C,
id: E
): E extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;
/** Resolve an array of entry references from the same collection */
export function getEntries<C extends keyof ContentEntryMap>(
entries: {
collection: C;
slug: ValidContentEntrySlug<C>;
}[]
): Promise<CollectionEntry<C>[]>;
export function getEntries<C extends keyof DataEntryMap>(
entries: {
collection: C;
id: keyof DataEntryMap[C];
}[]
): Promise<CollectionEntry<C>[]>;
export function reference<C extends keyof AnyEntryMap>(
collection: C
): import('astro/zod').ZodEffects<
import('astro/zod').ZodString,
C extends keyof ContentEntryMap
? {
collection: C;
slug: ValidContentEntrySlug<C>;
}
: {
collection: C;
id: keyof DataEntryMap[C];
}
>;
// Allow generic `string` to avoid excessive type errors in the config
// if `dev` is not running to update as you edit.
// Invalid collection names will be caught at build time.
export function reference<C extends string>(
collection: C
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;
type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
type InferEntrySchema<C extends keyof typeof entryMap> = import('astro/zod').infer<
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
>;
const entryMap: {
type ContentEntryMap = {
"articles": {
"en/2022.md": {
id: "en/2022.md",
slug: "2022",
body: string,
collection: "articles",
id: "en/2022.md";
slug: "en/2022";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/2023.md": {
id: "en/2023.md",
slug: "2023",
body: string,
collection: "articles",
id: "en/2023.md";
slug: "en/2023";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/after-effects-expressions.mdx": {
id: "en/after-effects-expressions.mdx",
slug: "after-effects-expressions",
body: string,
collection: "articles",
id: "en/after-effects-expressions.mdx";
slug: "en/after-effects-expressions";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"en/faq.md": {
id: "en/faq.md",
slug: "faq",
body: string,
collection: "articles",
id: "en/faq.md";
slug: "en/faq";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/gratuiste.md": {
id: "en/gratuiste.md",
slug: "gratuiste",
body: string,
collection: "articles",
id: "en/gratuiste.md";
slug: "en/gratuiste";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/sci-hub-blocage.mdx": {
id: "en/sci-hub-blocage.mdx",
slug: "sci-hub-unblock",
body: string,
collection: "articles",
id: "en/sci-hub-blocage.mdx";
slug: "en/sci-hub-blocage";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"en/the-day-I-jamd.mdx": {
id: "en/the-day-I-jamd.mdx",
slug: "the-day-I-jamd",
body: string,
collection: "articles",
id: "en/the-day-I-jamd.mdx";
slug: "en/the-day-i-jamd";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"en/video-compression.mdx": {
id: "en/video-compression.mdx",
slug: "video-compression",
body: string,
collection: "articles",
id: "en/video-compression.mdx";
slug: "en/video-compression";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/2022.md": {
id: "fr/2022.md",
slug: "2022",
body: string,
collection: "articles",
id: "fr/2022.md";
slug: "fr/2022";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/2023.md": {
id: "fr/2023.md",
slug: "2023",
body: string,
collection: "articles",
id: "fr/2023.md";
slug: "fr/2023";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/after-effects-expressions.md": {
id: "fr/after-effects-expressions.md",
slug: "after-effects-expressions",
body: string,
collection: "articles",
id: "fr/after-effects-expressions.md";
slug: "fr/after-effects-expressions";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/faq.md": {
id: "fr/faq.md",
slug: "faq",
body: string,
collection: "articles",
id: "fr/faq.md";
slug: "fr/faq";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/gratuiste.md": {
id: "fr/gratuiste.md",
slug: "gratuiste",
body: string,
collection: "articles",
id: "fr/gratuiste.md";
slug: "fr/gratuiste";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/sci-hub-blocage.mdx": {
id: "fr/sci-hub-blocage.mdx",
slug: "sci-hub-blocage",
body: string,
collection: "articles",
id: "fr/sci-hub-blocage.mdx";
slug: "fr/sci-hub-blocage";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/the-day-I-jamd.mdx": {
id: "fr/the-day-I-jamd.mdx",
slug: "the-day-I-jamd",
body: string,
collection: "articles",
id: "fr/the-day-I-jamd.mdx";
slug: "fr/the-day-i-jamd";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/video-compression.md": {
id: "fr/video-compression.md",
slug: "video-compression",
body: string,
collection: "articles",
id: "fr/video-compression.md";
slug: "fr/video-compression";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] },
},
} & { render(): Render[".md"] };
};
"fragments": {
"en/acme-sh-tls-cert.md": {
id: "en/acme-sh-tls-cert.md",
slug: "acme-sh-tls-cert",
body: string,
collection: "fragments",
id: "en/acme-sh-tls-cert.md";
slug: "en/acme-sh-tls-cert";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/array-vs-array.md": {
id: "en/array-vs-array.md",
slug: "array-vs-array",
body: string,
collection: "fragments",
id: "en/array-vs-array.md";
slug: "en/array-vs-array";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/buttons.md": {
id: "en/buttons.md",
slug: "buttons",
body: string,
collection: "fragments",
id: "en/buttons.md";
slug: "en/buttons";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/image-full.mdx": {
id: "en/image-full.mdx",
slug: "image-full",
body: string,
collection: "fragments",
id: "en/image-full.mdx";
slug: "en/image-full";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"en/nuxt-graphql-static.md": {
id: "en/nuxt-graphql-static.md",
slug: "nuxt-graphql-static",
body: string,
collection: "fragments",
id: "en/nuxt-graphql-static.md";
slug: "en/nuxt-graphql-static";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
"en/super-cookies.md": {
id: "en/super-cookies.md",
slug: "super-cookies",
body: string,
collection: "fragments",
} & { render(): Render[".md"] };
"en/super-cookies.mdx": {
id: "en/super-cookies.mdx";
slug: "en/super-cookies";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".mdx"] };
"en/toulouse-fun.md": {
id: "en/toulouse-fun.md",
slug: "toulouse-fun",
body: string,
collection: "fragments",
id: "en/toulouse-fun.md";
slug: "en/toulouse-fun";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/visited-links.md": {
id: "en/visited-links.md";
slug: "en/visited-links";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"fr/acme-sh-tls-cert.md": {
id: "fr/acme-sh-tls-cert.md",
slug: "acme-sh-tls-cert",
body: string,
collection: "fragments",
id: "fr/acme-sh-tls-cert.md";
slug: "fr/acme-sh-tls-cert";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/array-vs-array.md": {
id: "fr/array-vs-array.md",
slug: "array-vs-array",
body: string,
collection: "fragments",
id: "fr/array-vs-array.md";
slug: "fr/array-vs-array";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/buttons.mdx": {
id: "fr/buttons.mdx",
slug: "buttons",
body: string,
collection: "fragments",
id: "fr/buttons.mdx";
slug: "fr/buttons";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/image-full.mdx": {
id: "fr/image-full.mdx",
slug: "image-full",
body: string,
collection: "fragments",
id: "fr/image-full.mdx";
slug: "fr/image-full";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/nuxt-graphql-static.md": {
id: "fr/nuxt-graphql-static.md",
slug: "nuxt-graphql-static",
body: string,
collection: "fragments",
id: "fr/nuxt-graphql-static.md";
slug: "fr/nuxt-graphql-static";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/super-cookies.mdx": {
id: "fr/super-cookies.mdx",
slug: "super-cookies",
body: string,
collection: "fragments",
id: "fr/super-cookies.mdx";
slug: "fr/super-cookies";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] },
} & { render(): Render[".mdx"] };
"fr/toulouse-fun.md": {
id: "fr/toulouse-fun.md",
slug: "toulouse-fun",
body: string,
collection: "fragments",
id: "fr/toulouse-fun.md";
slug: "fr/toulouse-fun";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] },
},
} & { render(): Render[".md"] };
"fr/visited-links.md": {
id: "fr/visited-links.md";
slug: "fr/visited-links";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
};
"references": {
"en/3w.md": {
id: "en/3w.md",
slug: "3w",
body: string,
collection: "references",
id: "en/3w.md";
slug: "en/3w";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/natureo.md": {
id: "en/natureo.md",
slug: "natureo",
body: string,
collection: "references",
id: "en/natureo.md";
slug: "en/natureo";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/parole-expression.md": {
id: "en/parole-expression.md",
slug: "parole-expression",
body: string,
collection: "references",
id: "en/parole-expression.md";
slug: "en/parole-expression";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"en/rose-primaire.md": {
id: "en/rose-primaire.md",
slug: "rose-primaire",
body: string,
collection: "references",
id: "en/rose-primaire.md";
slug: "en/rose-primaire";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/3w.md": {
id: "fr/3w.md",
slug: "3w",
body: string,
collection: "references",
id: "fr/3w.md";
slug: "fr/3w";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/natureo.md": {
id: "fr/natureo.md",
slug: "natureo",
body: string,
collection: "references",
id: "fr/natureo.md";
slug: "fr/natureo";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/parole-expression.md": {
id: "fr/parole-expression.md",
slug: "parole-expression",
body: string,
collection: "references",
id: "fr/parole-expression.md";
slug: "fr/parole-expression";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
} & { render(): Render[".md"] };
"fr/rose-primaire.md": {
id: "fr/rose-primaire.md",
slug: "rose-primaire",
body: string,
collection: "references",
id: "fr/rose-primaire.md";
slug: "fr/rose-primaire";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] },
},
} & { render(): Render[".md"] };
};
};
type DataEntryMap = {
};
type AnyEntryMap = ContentEntryMap & DataEntryMap;
type ContentConfig = typeof import("../src/content/config");
}

View File

@ -4,19 +4,21 @@ import { defineConfig } from "astro/config";
import i18n from "astro-i18n";
// https://astro.build/config
import image from "@astrojs/image";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
// https://astro.build/config
export default defineConfig({
site: "https://www.nardu.in",
image: {
domains: ["assets.nardu.in"],
remotePatterns: [{ protocol: "https" }],
},
markdown: {
syntaxHighlight: "prism",
},
integrations: [
i18n(),
image(),
mdx(),
sitemap({
i18n: {

View File

@ -13,12 +13,12 @@
"i18n:sync": "astro-i18n sync"
},
"dependencies": {
"@astrojs/image": "0.16.7",
"@astrojs/mdx": "^0.19.1",
"@astrojs/rss": "^2.4.1",
"@astrojs/sitemap": "^1.3.1",
"astro": "2.4.3",
"astro-i18n": "1.7.0"
"@astrojs/mdx": "^1.1.0",
"@astrojs/rss": "^3.0.0",
"@astrojs/sitemap": "^3.0.0",
"astro": "3.1.1",
"astro-i18n": "1.8.1",
"sharp": "^0.32.6"
},
"devDependencies": {
"autoprefixer": "^10.4.13",

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 821 B

View File

@ -0,0 +1,20 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 400 479">
<path fill="none" d="M0 0h400v478.049H0z"/>
<clipPath id="a">
<path d="M0 0h400v478.049H0z"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#162e57" d="M29.269 268.293h29.268v209.756H29.269zm39.024 0h29.268v209.756H68.293z"/>
<path fill="#ff826c" d="M43.903 29.268h43.902v53.659H43.903zm0-29.268h58.537v29.268H43.903z"/>
<path fill="#d4ebf2" d="M0 82.927h43.903v185.366H0z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M165.854 175.6v-24.39h-29.268v-29.27h-24.39V82.917h-24.39v185.376h24.39V175.6h24.39v29.278h48.78V175.6h-19.512Z"/>
<path fill="#ff826c" d="M43.903 82.927h43.902v185.366H43.903zM9.415 258.536h29.61v34.147H9.415z"/>
<path fill="#162e57" d="M360.976 478.039h-29.268V268.283h29.268zm-39.024 0h-29.269V268.283h29.269z"/>
<path fill="#ff826c" d="M346.342 82.917H302.44V9.747h43.902z"/>
<path fill="#ff826c" fill-rule="nonzero" d="M400 121.941h-9.756V82.917H278.05v39.024h-24.39v29.269h-29.268v24.39H204.88v29.278h48.78V175.6h24.39v92.693h112.195v-14.635h9.757V121.941Z"/>
<path fill="#ff826c" d="M400 292.673h-29.61v-39.024H400zm-200-73.171h-29.268v-29.268h29.269z"/>
<path fill="#d4ebf2" d="M321.952 199.56h-14.498V82.918h14.498z"/>
<path fill="#162e57" d="M346.342 48.77h-24.39V24.38h24.39z"/>
<path fill="#ff826c" fill-rule="nonzero" d="M214.635 190.234h-34.147v9.756H200v19.522h14.635v-29.278Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 547 260">
<g transform="translate(-176.96 -424.18)">
<path fill="none" d="M176.96 424.18h546.08v260H176.96z"/>
<clipPath id="a">
<path d="M176.96 424.18h546.08v260H176.96z"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#ff826c" fill-rule="nonzero" d="M699 439.36h-15v15h-10v-15h-15v15h-10v-15h-15v35h10v15h45v-15h10v-35Z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M674 539.36v-50h-15v20h-15v20h15v65h15v-30h20v-25h-20Z"/>
<path fill="#ff826c" fill-rule="nonzero" d="M404.42 579.36v25h15v80h85v-80h15v-25h-115Zm-211.5 0v25h15v80h85v-80h15v-25h-115Zm416.08 0v25h15v80h85v-80h15v-25H609Z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M524.42 524.36h-35v-75h-60v90h15v40h45v-35h7.31v10h27.69v-30Z"/>
<path fill="#10113a" d="M470.11 464.36h9.31v10h-9.31zm-25.35 20h9.31v10h-9.31zm20.35 20h9.31v10h-9.31zm20 20h9.31v10h-9.31zm-25.35 15h9.31v10h-9.31z"/>
<path fill="#d4ebf2" d="M444.42 564.36h4.31v10h-4.31z"/>
<path fill="#10113a" d="M429.42 459.36h4.31v10h-4.31zm-171.5 15h10v105h-10z"/>
<path fill="#ff826c" fill-rule="nonzero" d="M292.92 434.36h-10v-10h-40v10h-10v30h10v10h40v-10h10v-30Z"/>
<path fill="#d4ebf2" d="M227.92 484.36h30v25h-30zm40 25h30v30h-30zm-15-70h20v20h-20z"/>
<path fill="#ff826c" d="M177.92 499.36h20v20h-20z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M247.92 529.36v30h-10v10h-30v10h50v-50h-10Z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M237.92 529.36h-10v10h-10v10h-10v10h30v-30Z"/>
<path fill="#d4ebf2" d="M207.92 529.36h10v10h-10zm-10-10h10v10h-10z"/>
<path fill="#d4ebf2" fill-rule="nonzero" d="M187.92 509.36h-5v10h15v-15h-10v5Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,15 +1,44 @@
---
import { Picture } from "@astrojs/image/components";
import { Image, getImage } from "astro:assets";
const { src, alt, width, height, ...attrs } = Astro.props;
// if h/w attributes are declared, use them. If not, use from the source file
const imgHeight = height ? height : src.height;
const imgWidth = width ? width : src.width;
// compute avif and webp format in order to use inside a <picture> element
const imgAvif = await getImage({
src: src,
format: "avif",
width: Number(imgWidth),
height: Number(imgHeight),
});
const imgWebp = await getImage({
src: src,
format: "webp",
width: Number(imgWidth),
height: Number(imgHeight),
});
---
<Picture
src={src}
widths={[320, 640, 768]}
aspectRatio={`${width}:${height}`}
sizes={`(max-inline-size: ${width}px) 100vw, ${width}px`}
formats={["avif", "webp"]}
alt={alt ? alt : ""}
{...attrs}
/>
<picture>
<source
srcset={imgAvif.src}
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
type="image/avif"
/>
<source
srcset={imgWebp.src}
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
type="image/webp"
/>
<Image
src={src}
width={Number(imgWidth)}
height={Number(imgHeight)}
format="jpg"
alt={alt ? alt : ""}
{...attrs}
/>
</picture>

View File

@ -9,35 +9,33 @@ const isReference = routeName === t("references.slug");
---
<div class:list={["card", { "card--link": !isReference }]}>
<div>
<h3>
{
!isReference ? (
<a
class="clean-link card__link"
href={`${l(`/${routeName}`)}/${item.slug}`}
>
{item.data.title}
</a>
) : (
<span>{item.data.title}</span>
)
}
</h3>
<h4>{item.data.subtitle}</h4>
<ListTags list={item.data.tags} />
<h3>
{
isReference && (
<a href={item.data.url} rel="noopener noreferer">
{t("references.cta")}
<span class="sr-only"> {item.data.title}</span>
!isReference ? (
<a
class="clean-link card__link"
href={`${l(`/${routeName}`)}/${item.data.permalink}`}
>
{item.data.title}
</a>
) : (
<span>{item.data.title}</span>
)
}
</div>
</h3>
<h4>{item.data.subtitle}</h4>
<ListTags list={item.data.tags} />
{
isReference && (
<a href={item.data.url} rel="noopener noreferer">
{t("references.cta")}
<span class="sr-only"> {item.data.title}</span>
</a>
)
}
</div>
<style scoped>
<style define:vars={{ permalink: item.data.permalink }}>
.card {
padding: var(--space-s-m) var(--space-xs-s);
position: relative;
@ -125,6 +123,9 @@ const isReference = routeName === t("references.slug");
.card::after {
transition: opacity ease 0.2s, transform ease 0.2s;
}
.card--link {
view-transition-name: var(--permalink);
}
h3 a {
transition: color ease 0.2s;
}

View File

@ -1,17 +1,17 @@
---
// import { renderContent } from "astro-i18n";
import MetaDate from "./MetaDate.astro";
import TOC from "./TOC.astro";
const { content } = Astro.props;
const { Content, headings } = await content.render();
// const { html, headings } = await renderContent(Astro, content);
const toc = headings.map((heading) => {
return heading;
});
// if (content.data.code) {
// import "../styles/vendor/one-dark-pro.css";
// }
import "../styles/vendor/one-dark-pro.css";
---
<div class="sidebar region">
@ -20,13 +20,17 @@ const toc = headings.map((heading) => {
<h1>{content.data.title}</h1>
<p class="h3">{content.data.subtitle}</p>
<MetaDate item={content.data} />
<div class="flow content">
<Content />
</div>
<!-- <div class="flow content" set:html={html}> -->
<Content />
</article>
</div>
<style>
<style define:vars={{ permalink: content.data.permalink }}>
@media (prefers-reduced-motion: no-preference) {
article {
view-transition-name: var(--permalink);
}
}
.sidebar {
--gutter: var(--space-xs-m);
}

17
src/components/Head.astro Normal file
View File

@ -0,0 +1,17 @@
---
import { t } from "astro-i18n";
const { pageTitle } = Astro.props;
---
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{pageTitle} - Nicolas Arduin</title>
<meta name="description" content={t("seo.meta.description")} />
<meta name="robots" content="index,follow." />
<meta name="author" content="Nicolas Arduin" />
<meta name="subject" content="Développement de sites web, accessibilité." />
<meta name="view-transition" content="same-origin" />
</head>

View File

@ -34,7 +34,7 @@ const { item } = Astro.props;
text-align: center;
gap: var(--space-xs);
cursor: pointer;
background-color: var(--color-light-blue);
background-color: var(--color-white);
transform: translateY(0);
}
.card:focus-within {

View File

@ -10,24 +10,26 @@ const { toc } = Astro.props;
<ol class="table-of-content__list" role="list">
{
// loop over the toc
toc.map((heading) =>
// if h2, set as a li
heading.depth === 2 ? (
<li>
<a href={`#${heading.slug}`} class="toc-2">
{heading.text}
</a>
</li>
) : // if h3, set as inner ol > li
heading.depth === 3 ? (
<ol role="list">
toc.map(
(
heading
// if h2, set as a li
) =>
heading.depth === 2 ? (
<li>
<a href={`#${heading.slug}`} class="toc-3">
<a href={`#${heading.slug}`} class="toc-2">
{heading.text}
</a>
</li>
</ol>
) : null
</li> // if h3, set as inner ol > li
) : heading.depth === 3 ? (
<ol role="list">
<li>
<a href={`#${heading.slug}`} class="toc-3">
{heading.text}
</a>
</li>
</ol>
) : null
)
}
</ol>
@ -68,15 +70,18 @@ const { toc } = Astro.props;
}
.table-of-content__list a::before {
content: "·";
content: "";
position: absolute;
top: 0;
top: 50%;
left: 0;
inline-size: 2px;
block-size: 2px;
border-radius: 4px;
transform: translate(-6px, 0);
color: var(--color-grey);
background-color: var(--color-grey);
}
.table-of-content__list a:visited::before {
color: white;
background-color: white;
}
.table-of-content__list a:focus,

View File

@ -2,7 +2,7 @@
title: Nico v2.0
subtitle: 2022 update of many things.
lang: en
slug: "2022"
permalink: "2022"
excerpt: Changes in my services, the website and myself.
tags: ["Freelance"]
type: articles

View File

@ -2,7 +2,7 @@
title: Nico v2.5
subtitle: Update 2023.
lang: en
slug: "2023"
permalink: "2023"
excerpt: New changes.
tags: ["Freelance"]
type: articles
@ -22,7 +22,7 @@ I have completely redeveloped my site with <a href="https://astro.build/" rel="n
I will definitely do an article or two about Astro and the extensions I used. It was a great experience. Nuxt v2 is not really up to date anymore, so the performance was not good. Astro has completely fixed that.
My <a href="https://pagespeed.web.dev/" rel="noopener noreferer">PageSpeed</a> performance score had dropped to 77/100. Thanks to Astro I'm back to a solid **95/100** without any particular optimization.
My <a href="https://pagespeed.web.dev/analysis/https-nardu-in/06as4el7ed?form_factor=mobile" rel="noopener noreferer">PageSpeed</a> performance score had dropped to 77/100. Thanks to Astro I'm back to a solid **95/100** without any particular optimization. With some small efforts, I've reached the good old 100/100.
I then did a work of modernization of the codebase. Hello CSS variables and goodbye `media queries`. In no particular order, here are some of the improvements I made:

View File

@ -2,7 +2,7 @@
title: After Effects Expressions
subtitle: Animation on steroïds.
lang: en
slug: "after-effects-expressions"
permalink: "after-effects-expressions"
excerpt: Expressions in After Effects have always been blurry for me. I know they exist, I know they're powerful, I know it could save a lot of time and clean complex keyframe filled compositions but… They are hard to learn!
tags: ["Design"]
type: articles
@ -11,9 +11,6 @@ code: true
---
import AstroImage from "../../../components/AstroImage.astro";
export const basicExpression =
"https://assets.nardu.in/basic_expression_d81b12f1ac.jpeg";
export const shortcut = "https://assets.nardu.in/shortcut_39cc19d383.jpeg";
## An ever lasting battle
@ -25,7 +22,7 @@ So the last time I had to do a complex animation, **I took the damn time!**
Everyone uses expressions whether they know it or not. Most of the time it's a rather transparent process for the animator. For example: when parenting a property to another one, After Effects creates an expression for us.
<AstroImage
src={basicExpression}
src="https://assets.nardu.in/basic_expression_d81b12f1ac.jpeg"
width="728"
height="80"
alt="Parenting the position of the form to a null creates an expression."
@ -36,7 +33,7 @@ Over the last updates, Adobe has made an effort to make expressions more accessi
Those custom functions can be called through a menu once you enabled the expressions on a property. It offers organized shortcut and proper syntax to all of AE native functions and a bunch of JavaScript standard ones.
<AstroImage
src={shortcut}
src="https://assets.nardu.in/shortcut_39cc19d383.jpeg"
width="728"
height="322"
alt="Alt + Click the stopwatch to access the shortcuts."

View File

@ -2,7 +2,7 @@
title: Accessibility and sobriety
subtitle: Translation in progress, stay tuned ;)
lang: en
slug: "faq"
permalink: "faq"
draft: true
excerpt: Why, how et and especially what.
tags: ["Freelance"]

View File

@ -2,7 +2,7 @@
title: Gratuiste
subtitle: Translation in progress, stay tuned ;)
lang: en
slug: "gratuiste"
permalink: "gratuiste"
draft: true
excerpt: Translation in progress, stay tuned ;)
tags: ["Design", "Freelance"]

View File

@ -2,7 +2,7 @@
title: "Access blocked Sci-hub"
subtitle: "The science of sharing."
lang: en
slug: "sci-hub-unblock"
permalink: "sci-hub-unblock"
key: "scihub"
excerpt: "In March 2019, the Paris Regional Court ruled in favour of the publishers of scientific articles Elsevier and Springer Nature by ordering internet service providers to block access to these two websites. Here is how to access them if they are blocked in your country anyway."
tags: ["Internet", "Science"]
@ -12,13 +12,6 @@ updatedAt: "2022-12-27T12:08:00.000Z"
---
import AstroImage from "../../../components/AstroImage.astro";
export const macOs =
"https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg";
export const windowsSettings = "https://assets.nardu.in/sci-hub-settings.jpg";
export const windowsNetwork = "https://assets.nardu.in/sci-hub-network.jpg";
export const windowsAdapter = "https://assets.nardu.in/sci-hub-adapter.jpg";
export const windowsAdapterSettings =
"https://assets.nardu.in/sci-hub-adapter-settings.jpg";
The current sci-hub address is: <a href="https://sci-hub.se" rel="noreferer noopener">sci-hub.se</a>
@ -53,7 +46,7 @@ Go to:
From there, you can add DNS servers by clicking the + icon. Click ok and apply the new settings. You might need to restart your computer for the changes to work.
<AstroImage
src={macOs}
src="https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg"
width="728"
height="1060"
alt="MacOS network and DNS settings"
@ -74,28 +67,28 @@ Go to:
From there, you can add DNS servers. Click save. You might need to restart your computer for the changes to work.
<AstroImage
src={windowsSettings}
src="https://assets.nardu.in/sci-hub-settings.jpg"
width="728"
height="319"
alt="Windows system settings"
/>
<AstroImage
src={windowsNetwork}
src="https://assets.nardu.in/sci-hub-network.jpg"
width="728"
height="803"
alt="Windows network settings"
/>
<AstroImage
src={windowsAdapter}
src="https://assets.nardu.in/sci-hub-adapter.jpg"
width="728"
height="327"
alt="Windows network connections settings"
/>
<AstroImage
src={windowsAdapterSettings}
src="https://assets.nardu.in/sci-hub-adapter-settings.jpg"
width="728"
height="434"
alt="Windows network adapter settings"

View File

@ -2,7 +2,7 @@
title: The day I Jamd
subtitle: A story of unusual tools and fun gambles.
lang: en
slug: "the-day-I-jamd"
permalink: "the-day-I-jamd"
excerpt: Ooh, yeah! All right! Were jammin
tags: ["Dev", "Jamstack"]
type: articles
@ -11,8 +11,6 @@ updatedAt: "2022-12-27T15:40:06.000Z"
---
import AstroImage from "../../../components/AstroImage.astro";
export const wordpress = "https://assets.nardu.in/wordpress_8ee6f54b98.jpeg";
export const strapi11ty = "https://assets.nardu.in/static_2c0d9f1eb8.jpeg";
## The not so easy choice
@ -33,7 +31,7 @@ Boy did they exceed my expectations! With almost no optimization on the static s
### wordpress
<AstroImage
src={wordpress}
src="https://assets.nardu.in/wordpress_8ee6f54b98.jpeg"
width="728"
height="412"
alt="Performance score of 53/100 on Wordpress."
@ -44,7 +42,7 @@ Despite a lot of efforts I could not do better. Im no expert in caching, do n
### 11ty + strapi
<AstroImage
src={strapi11ty}
src="https://assets.nardu.in/static_2c0d9f1eb8.jpeg"
width="728"
height="412"
alt="Performance score of 97/100 on jamstack."

View File

@ -2,7 +2,7 @@
title: Video compression
subtitle: Encode like you mean it.
lang: en
slug: "video-compression"
permalink: "video-compression"
excerpt: How to gain precious weight when encoding videos.
tags: ["Design"]
type: articles
@ -11,11 +11,6 @@ updatedAt: "2022-06-08T14:24:06.000Z"
---
import AstroImage from "../../../components/AstroImage.astro";
export const premiereExport = "https://assets.nardu.in/video-premiere-1.jpeg";
export const handbrakeBase = "https://assets.nardu.in/video-handbrake-1.jpeg";
export const handbrakeVideo = "https://assets.nardu.in/video-handbrake-2.jpeg";
export const handbrakeAudio = "https://assets.nardu.in/video-handbrake-3.jpeg";
export const handbrakeWeb = "https://assets.nardu.in/video-handbrake-4.jpg";
## Let's play.
@ -31,7 +26,11 @@ With a good connection, users will not see the difference. But if we go down tha
Let's say we exported a 1920x1080 video from Premiere Pro with these basic settings:
<AstroImage src={premiereExport} width="673" height="800" alt="" />
<AstroImage
src="https://assets.nardu.in/video-premiere-1.jpeg"
width="673"
height="800"
/>
It's gorgeous, it's Full HD, it's 1:30 minute of excellent editing but it's 50mb… What a shame.
@ -52,7 +51,11 @@ While it's not as nice as Premiere Pro, it has way more exporting capabilities.
1. Check Web Optimized
1. Keep MPEG-4 as the format
<AstroImage src={handbrakeBase} width="728" height="337" alt="" />
<AstroImage
src="https://assets.nardu.in/video-handbrake-1.jpeg"
width="728"
height="337"
/>
### Video screen
@ -61,7 +64,11 @@ While it's not as nice as Premiere Pro, it has way more exporting capabilities.
1. Choose Peak Framerate. If you don't know the framerate, keep the default setting
1. Choose the type of video you are encoding (film, animation…)
<AstroImage src={handbrakeVideo} width="728" height="337" alt="" />
<AstroImage
src="https://assets.nardu.in/video-handbrake-2.jpeg"
width="728"
height="337"
/>
### Audio screen
@ -72,7 +79,11 @@ If you have an audio channel, these settings are great and will not influence th
1. Samplerate 44.1
1. Bitrate 192 to 256 (your choice)
<AstroImage src={handbrakeAudio} width="728" height="337" alt="" />
<AstroImage
src="https://assets.nardu.in/video-handbrake-3.jpeg"
width="728"
height="337"