v5 migration + remove i18n

This commit is contained in:
nicolas arduin 2024-12-29 12:33:22 +01:00
parent b7ce5b7f20
commit b2b6887fdf
Signed by: nicolas
SSH Key Fingerprint: SHA256:ELi8eDeNLl5PTn64G+o2Kx5+XVDfHF5um2tZigfwWkM
84 changed files with 1258 additions and 1354 deletions

View File

@ -0,0 +1,48 @@
{
"$ref": "#/definitions/HPsections",
"definitions": {
"HPsections": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"lang": {
"type": "string",
"enum": [
"fr",
"en"
]
},
"uid": {
"type": "string"
},
"image": {
"type": "string"
},
"order": {
"type": "number"
},
"quickTitle": {
"type": "string"
},
"quickImage": {
"type": "string"
},
"reference": {
"type": "string"
},
"$schema": {
"type": "string"
}
},
"required": [
"type",
"lang",
"order"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -0,0 +1,61 @@
{
"$ref": "#/definitions/articles",
"definitions": {
"articles": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"lang": {
"type": "string",
"enum": [
"fr",
"en"
]
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
},
"permalink": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"code": {
"type": "boolean"
},
"draft": {
"type": "boolean"
},
"$schema": {
"type": "string"
}
},
"required": [
"title",
"subtitle",
"lang",
"tags",
"type",
"permalink",
"createdAt"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -0,0 +1,61 @@
{
"$ref": "#/definitions/fragments",
"definitions": {
"fragments": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"lang": {
"type": "string",
"enum": [
"fr",
"en"
]
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string"
},
"permalink": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"code": {
"type": "boolean"
},
"draft": {
"type": "boolean"
},
"$schema": {
"type": "string"
}
},
"required": [
"title",
"subtitle",
"lang",
"tags",
"type",
"permalink",
"createdAt"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -0,0 +1,61 @@
{
"$ref": "#/definitions/references",
"definitions": {
"references": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"url": {
"type": "string"
},
"lang": {
"type": "string",
"enum": [
"fr",
"en"
]
},
"permalink": {
"type": "string"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"code": {
"type": "boolean"
},
"draft": {
"type": "boolean"
},
"$schema": {
"type": "string"
}
},
"required": [
"title",
"subtitle",
"url",
"lang",
"permalink",
"tags",
"createdAt"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -0,0 +1,32 @@
{
"$ref": "#/definitions/veille",
"definitions": {
"veille": {
"type": "object",
"properties": {
"lang": {
"type": "string",
"enum": [
"fr",
"en"
]
},
"title": {
"type": "string"
},
"updatedAt": {
"type": "string"
},
"$schema": {
"type": "string"
}
},
"required": [
"lang",
"title"
],
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}

View File

@ -0,0 +1 @@
export default new Map();

View File

@ -0,0 +1,18 @@
export default new Map([
["src/content/articles/en/after-effects-expressions.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fafter-effects-expressions.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/sci-hub-blocage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fsci-hub-blocage.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fthe-day-I-jamd.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/video-compression.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fvideo-compression.mdx&astroContentModuleFlag=true")],
["src/content/fragments/en/image-full.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Fen%2Fimage-full.mdx&astroContentModuleFlag=true")],
["src/content/fragments/en/super-cookies.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Fen%2Fsuper-cookies.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/image-full.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fimage-full.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/buttons.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fbuttons.mdx&astroContentModuleFlag=true")],
["src/content/articles/fr/sci-hub-blocage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Ffr%2Fsci-hub-blocage.mdx&astroContentModuleFlag=true")],
["src/content/fragments/fr/super-cookies.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Ffragments%2Ffr%2Fsuper-cookies.mdx&astroContentModuleFlag=true")],
["src/content/articles/fr/the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Ffr%2Fthe-day-I-jamd.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/en-after-effects-expressions.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fen-after-effects-expressions.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/en-sci-hub-blocage.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fen-sci-hub-blocage.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/en-the-day-I-jamd.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fen-the-day-I-jamd.mdx&astroContentModuleFlag=true")],
["src/content/articles/en/en-video-compression.mdx", () => import("astro:content-layer-deferred-module?astro%3Acontent-layer-deferred-module=&fileName=src%2Fcontent%2Farticles%2Fen%2Fen-video-compression.mdx&astroContentModuleFlag=true")]]);

206
.astro/content.d.ts vendored Normal file
View File

@ -0,0 +1,206 @@
declare module 'astro:content' {
interface Render {
'.mdx': Promise<{
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
components: import('astro').MDXInstance<{}>['components'];
}>;
}
}
declare module 'astro:content' {
export interface RenderResult {
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}
interface Render {
'.md': Promise<RenderResult>;
}
export interface RenderedContent {
html: string;
metadata?: {
imagePaths: Array<string>;
[key: string]: unknown;
};
}
}
declare module 'astro:content' {
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;
type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
>['slug'];
/** @deprecated Use `getEntry` instead. */
export function getEntryBySlug<
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 ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
/** @deprecated Use `getEntry` instead. */
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 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]
? string extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]> | undefined
: 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 render<C extends keyof AnyEntryMap>(
entry: AnyEntryMap[C][string],
): Promise<RenderResult>;
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 AnyEntryMap> = import('astro/zod').infer<
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
>;
type ContentEntryMap = {
};
type DataEntryMap = {
"HPsections": Record<string, {
id: string;
body?: string;
collection: "HPsections";
data: InferEntrySchema<"HPsections">;
rendered?: RenderedContent;
filePath?: string;
}>;
"articles": Record<string, {
id: string;
body?: string;
collection: "articles";
data: InferEntrySchema<"articles">;
rendered?: RenderedContent;
filePath?: string;
}>;
"fragments": Record<string, {
id: string;
body?: string;
collection: "fragments";
data: InferEntrySchema<"fragments">;
rendered?: RenderedContent;
filePath?: string;
}>;
"references": Record<string, {
id: string;
body?: string;
collection: "references";
data: InferEntrySchema<"references">;
rendered?: RenderedContent;
filePath?: string;
}>;
"veille": Record<string, {
id: string;
body?: string;
collection: "veille";
data: InferEntrySchema<"veille">;
rendered?: RenderedContent;
filePath?: string;
}>;
};
type AnyEntryMap = ContentEntryMap & DataEntryMap;
export type ContentConfig = typeof import("../src/content.config.js");
}

1
.astro/data-store.json Normal file

File diff suppressed because one or more lines are too long

5
.astro/settings.json Normal file
View File

@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1735403503212
}
}

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

@ -1,483 +1,2 @@
declare module 'astro:content' {
interface Render {
'.mdx': Promise<{
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}>;
}
}
declare module 'astro:content' {
interface Render {
'.md': Promise<{
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}>;
}
}
declare module 'astro:content' {
export { z } from 'astro/zod';
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<{
src: import('astro/zod').ZodString;
width: import('astro/zod').ZodNumber;
height: import('astro/zod').ZodNumber;
format: import('astro/zod').ZodUnion<
[
import('astro/zod').ZodLiteral<'png'>,
import('astro/zod').ZodLiteral<'jpg'>,
import('astro/zod').ZodLiteral<'jpeg'>,
import('astro/zod').ZodLiteral<'tiff'>,
import('astro/zod').ZodLiteral<'webp'>,
import('astro/zod').ZodLiteral<'gif'>,
import('astro/zod').ZodLiteral<'svg'>,
import('astro/zod').ZodLiteral<'avif'>,
]
>;
}>;
type BaseSchemaWithoutEffects =
| import('astro/zod').AnyZodObject
| import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]>
| import('astro/zod').ZodDiscriminatedUnion<string, import('astro/zod').AnyZodObject[]>
| import('astro/zod').ZodIntersection<BaseSchemaWithoutEffects, BaseSchemaWithoutEffects>;
type BaseSchema =
| BaseSchemaWithoutEffects
| import('astro/zod').ZodEffects<BaseSchemaWithoutEffects>;
export type SchemaContext = { image: ImageFunction };
type DataCollectionConfig<S extends BaseSchema> = {
type: 'data';
schema?: S | ((context: SchemaContext) => S);
};
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 ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
>['slug'];
export function getEntryBySlug<
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 ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
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 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 AnyEntryMap> = import('astro/zod').infer<
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
>;
type ContentEntryMap = {
"articles": {
"en/2022.md": {
id: "en/2022.md";
slug: "en/2022";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"en/2023.md": {
id: "en/2023.md";
slug: "en/2023";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"en/after-effects-expressions.mdx": {
id: "en/after-effects-expressions.mdx";
slug: "en/after-effects-expressions";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"en/faq.md": {
id: "en/faq.md";
slug: "en/faq";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"en/gratuiste.md": {
id: "en/gratuiste.md";
slug: "en/gratuiste";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"en/sci-hub-blocage.mdx": {
id: "en/sci-hub-blocage.mdx";
slug: "en/sci-hub-blocage";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"en/the-day-I-jamd.mdx": {
id: "en/the-day-I-jamd.mdx";
slug: "en/the-day-i-jamd";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"en/video-compression.mdx": {
id: "en/video-compression.mdx";
slug: "en/video-compression";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"fr/2022.md": {
id: "fr/2022.md";
slug: "fr/2022";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"fr/2023.md": {
id: "fr/2023.md";
slug: "fr/2023";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"fr/after-effects-expressions.md": {
id: "fr/after-effects-expressions.md";
slug: "fr/after-effects-expressions";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"fr/faq.md": {
id: "fr/faq.md";
slug: "fr/faq";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"fr/gratuiste.md": {
id: "fr/gratuiste.md";
slug: "fr/gratuiste";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
"fr/sci-hub-blocage.mdx": {
id: "fr/sci-hub-blocage.mdx";
slug: "fr/sci-hub-blocage";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"fr/the-day-I-jamd.mdx": {
id: "fr/the-day-I-jamd.mdx";
slug: "fr/the-day-i-jamd";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".mdx"] };
"fr/video-compression.md": {
id: "fr/video-compression.md";
slug: "fr/video-compression";
body: string;
collection: "articles";
data: InferEntrySchema<"articles">
} & { render(): Render[".md"] };
};
"fragments": {
"en/acme-sh-tls-cert.md": {
id: "en/acme-sh-tls-cert.md";
slug: "en/acme-sh-tls-cert";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"en/array-vs-array.md": {
id: "en/array-vs-array.md";
slug: "en/array-vs-array";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"en/buttons.md": {
id: "en/buttons.md";
slug: "en/buttons";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"en/image-full.mdx": {
id: "en/image-full.mdx";
slug: "en/image-full";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] };
"en/nuxt-graphql-static.md": {
id: "en/nuxt-graphql-static.md";
slug: "en/nuxt-graphql-static";
body: string;
collection: "fragments";
data: InferEntrySchema<"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[".mdx"] };
"en/toulouse-fun.md": {
id: "en/toulouse-fun.md";
slug: "en/toulouse-fun";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { 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: "fr/acme-sh-tls-cert";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"fr/array-vs-array.md": {
id: "fr/array-vs-array.md";
slug: "fr/array-vs-array";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"fr/buttons.mdx": {
id: "fr/buttons.mdx";
slug: "fr/buttons";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] };
"fr/image-full.mdx": {
id: "fr/image-full.mdx";
slug: "fr/image-full";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] };
"fr/nuxt-graphql-static.md": {
id: "fr/nuxt-graphql-static.md";
slug: "fr/nuxt-graphql-static";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".md"] };
"fr/super-cookies.mdx": {
id: "fr/super-cookies.mdx";
slug: "fr/super-cookies";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { render(): Render[".mdx"] };
"fr/toulouse-fun.md": {
id: "fr/toulouse-fun.md";
slug: "fr/toulouse-fun";
body: string;
collection: "fragments";
data: InferEntrySchema<"fragments">
} & { 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: "en/3w";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"en/natureo.md": {
id: "en/natureo.md";
slug: "en/natureo";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"en/parole-expression.md": {
id: "en/parole-expression.md";
slug: "en/parole-expression";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"en/rose-primaire.md": {
id: "en/rose-primaire.md";
slug: "en/rose-primaire";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"fr/3w.md": {
id: "fr/3w.md";
slug: "fr/3w";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"fr/natureo.md": {
id: "fr/natureo.md";
slug: "fr/natureo";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"fr/parole-expression.md": {
id: "fr/parole-expression.md";
slug: "fr/parole-expression";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
"fr/rose-primaire.md": {
id: "fr/rose-primaire.md";
slug: "fr/rose-primaire";
body: string;
collection: "references";
data: InferEntrySchema<"references">
} & { render(): Render[".md"] };
};
};
type DataEntryMap = {
};
type AnyEntryMap = ContentEntryMap & DataEntryMap;
type ContentConfig = typeof import("../src/content/config");
}
/// <reference types="astro/client" />
/// <reference path="content.d.ts" />

11
.vscode/settings.json vendored
View File

@ -1,7 +1,8 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": false,
"editor.detectIndentation": false,
"editor.tabSize": 2
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.insertSpaces": false,
"editor.detectIndentation": false,
"editor.tabSize": 2,
"astro.content-intellisense": true
}

View File

@ -1,30 +1,27 @@
{
"name": "@example/minimal",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro-i18n sync && astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"i18n:install": "astro-i18n install",
"i18n:sync": "astro-i18n sync"
},
"dependencies": {
"@astrojs/mdx": "4.0.3",
"@astrojs/rss": "4.0.10",
"@astrojs/sitemap": "3.2.1",
"@astrojs/ts-plugin": "^1.10.4",
"astro": "5.1.1",
"sharp": "^0.33.5"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-organize-imports": "^4.1.0"
}
"name": "nardude",
"type": "module",
"version": "3.0.0",
"private": true,
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "4.0.3",
"@astrojs/rss": "4.0.10",
"@astrojs/sitemap": "3.2.1",
"@astrojs/ts-plugin": "^1.10.4",
"astro": "5.1.1",
"sharp": "^0.33.5"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-organize-imports": "^4.1.0"
}
}

View File

@ -1,45 +1,45 @@
---
import { Image, getImage } from "astro:assets";
import { Image, getImage } from 'astro:assets'
const { src, alt, width, height, ...attrs } = Astro.props;
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;
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",
format: 'avif',
width: Number(imgWidth),
height: Number(imgHeight),
});
height: Number(imgHeight)
})
const imgWebp = await getImage({
src: src,
format: "webp",
format: 'webp',
// need Number() because sharp wants an integer and not a string for w/h
width: Number(imgWidth),
height: Number(imgHeight),
});
height: Number(imgHeight)
})
---
<picture>
<source
srcset={imgAvif.src}
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
type="image/avif"
type='image/avif'
/>
<source
srcset={imgWebp.src}
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
type="image/webp"
type='image/webp'
/>
<Image
src={src}
width={Number(imgWidth)}
height={Number(imgHeight)}
format="jpg"
alt={alt ? alt : ""}
format='jpg'
alt={alt ? alt : ''}
{...attrs}
/>
</picture>

View File

@ -1,20 +1,19 @@
---
import ListTags from "./ListTags.astro";
import { l, t } from "astro-i18n";
import ListTags from './ListTags.astro'
const { item, routeName } = Astro.props;
const { item, routeName } = Astro.props
// no link on references cards
const isReference = routeName === t("references.slug");
const isReference = routeName === 'references'
---
<div class:list={["card", { "card--link": !isReference }]}>
<div class:list={['card', { 'card--link': !isReference }]}>
<h3>
{
!isReference ? (
<a
class="clean-link card__link"
href={`${l(`/${routeName}`)}/${item.data.permalink}`}
class='clean-link card__link'
href={`/${routeName}/${item.data.slug}`}
>
{item.data.title}
</a>
@ -27,15 +26,15 @@ const isReference = routeName === t("references.slug");
<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 href={item.data.url} rel='noopener noreferer'>
Consulter le site
<span class='sr-only'> {item.data.title}</span>
</a>
)
}
</div>
<style define:vars={{ permalink: item.data.permalink }}>
<style define:vars={{ slug: item.data.slug }}>
.card {
padding: var(--space-s-m) var(--space-xs-s);
position: relative;
@ -56,14 +55,14 @@ const isReference = routeName === t("references.slug");
box-shadow: var(--shadow-elevation-high);
}
.card--link::after {
content: "";
content: '';
position: absolute;
inline-size: 30px;
block-size: 30px;
top: var(--space-m);
right: var(--space-s);
opacity: 0;
background-image: url("/assets/svg/arrow-right.svg");
background-image: url('/assets/svg/arrow-right.svg');
background-repeat: no-repeat;
background-position: center;
background-size: contain;
@ -82,7 +81,7 @@ const isReference = routeName === t("references.slug");
color: var(--color-brique);
}
.card--link::before {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;
@ -109,7 +108,7 @@ const isReference = routeName === t("references.slug");
color: var(--color-blue);
}
.card__link::after {
content: "";
content: '';
position: absolute;
inset: 0;
}
@ -121,10 +120,12 @@ const isReference = routeName === t("references.slug");
transition: transform 0.2s ease-in-out;
}
.card::after {
transition: opacity ease 0.2s, transform ease 0.2s;
transition:
opacity ease 0.2s,
transform ease 0.2s;
}
.card--link {
view-transition-name: var(--permalink);
view-transition-name: var(--slug);
}
h3 a {
transition: color ease 0.2s;

View File

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

View File

@ -1,23 +1,25 @@
---
import { l, t } from "astro-i18n";
---
<footer class="footer" role="contentinfo">
<section class="flow">
<footer class='footer' role='contentinfo'>
<section class='flow'>
<p>Nicolas Arduin</p>
<p>{t("tagline")}</p>
<ul class="flow" role="list">
<p>Développeur web spécialisé en accessibilité.</p>
<ul class='flow' role='list'>
<li>
<a href="mailto:contact@nardu.in" title={t("contact.email")}
<a
href='mailto:contact@nardu.in'
title='Envoyez-moi un mail (ouverture du logiciel automatique).'
>contact@nardu.in</a
>
</li>
<li>
<a href="tel:+33749464239" title={t("contact.tel")}>+337 49 46 42 39</a>
<a
href='tel:+33749464239'
title='Contactez-moi par téléphone (ouverture du logiciel automatique)'
>+337 49 46 42 39</a
>
</li>
<li><a href={l("/veille")}>{t("veille.titre")}</a></li>
<li><a href={l("/plan-du-site")}>{t("sitemap")}</a></li>
<li><a href={`${l("/")}rss.xml`}>RSS</a></li>
<li><a href='/veille'>Veille</a></li>
<li><a href='/plan-du-site'>Plan du site</a></li>
<li><a href='/"rss.xml'>RSS</a></li>
</ul>
</section>
</footer>

View File

@ -1,17 +1,19 @@
---
import { t } from "astro-i18n";
const { pageTitle } = Astro.props;
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" />
<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" />
<meta
name='description'
content='Développeur web spécialisé en accessibilité numérique et éco-conception à Toulouse. Création de sites web sur mesure, mise en conformité RGAA, maintenance, etc.'
/>
<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

@ -1,15 +1,11 @@
---
import { t, l } from "astro-i18n";
import Navigation from "../components/Navigation.astro";
import Navigation from '../components/Navigation.astro'
---
<header role="banner">
<a href="#skip-content" class="skip-link"> {t("header.skipLink")}</a>
<div class="container">
<a href={l("/")} class="logo clean-link" aria-label={t("header.homeLink")}
>nardu.in</a
>
<header role='banner'>
<a href='#skip-content' class='skip-link'>Accéder au contenu</a>
<div class='container'>
<a href='/' class='logo clean-link'>nardu.in</a>
<Navigation />
</div>
</header>

View File

@ -1,13 +0,0 @@
---
import { languages } from '../i18n/ui'
---
<ul>
{
Object.entries(languages).map(([lang, label]) => (
<li>
<a href={`/${lang}/`}>{label}</a>
</li>
))
}
</ul>

View File

@ -1,13 +1,13 @@
---
const { list, routeName } = Astro.props;
const { list, routeName } = Astro.props
import CardEditorial from "./CardEditorial.astro";
import CardEditorial from './CardEditorial.astro'
---
<ul class="list" role="list">
<ul class='list' role='list'>
{
list.map((item) => (
<li class="list__item">
<li class='list__item'>
<CardEditorial item={item} routeName={routeName} />
</li>
))

View File

@ -1,12 +1,13 @@
---
const { list } = Astro.props;
const { list } = Astro.props
---
<ul class="tags-list" role="list">
<ul class='tags-list' role='list'>
{
list.map((tag, index) => (
<li>
{tag}{index + 1 < list.length && <span>, </span>}
{tag}
{index + 1 < list.length && <span>, </span>}
</li>
))
}

View File

@ -1,26 +1,41 @@
---
import { t, astroI18n } from "astro-i18n";
astroI18n.init(Astro);
const { item } = Astro.props
const locale: 'fr' | 'en' = item.frontmatter.lang
const { item } = Astro.props;
let ui = {
published: 'Publié le',
updated: 'Mis à jour le'
}
function formatDate(date) {
const options = { year: "numeric", month: "long", day: "numeric" };
return new Date(date).toLocaleDateString(astroI18n.langCode, options);
switch (locale) {
case 'en':
ui = {
published: 'Published on',
updated: 'Last updated on'
}
break
}
function formatDate(date: Date) {
return new Date(date).toLocaleDateString(locale, {
year: 'numeric',
month: 'long',
day: 'numeric'
})
}
// Needed because browser will transform the value to a readable english date in 'datetime' if not forced
// see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#attr-datetime for valid formats
function rawDate(date) {
return new Date(date).toISOString();
function rawDate(date: Date) {
return new Date(date).toISOString()
}
---
<div class="meta">
<div class='meta'>
{
!!item.createdAt && (
<p class="meta__date">
{t("meta.publication")}&nbsp;:
<p class='meta__date'>
{ui.published}&nbsp;:
<time datetime={rawDate(item.createdAt)}>
{formatDate(item.createdAt)}
</time>
@ -31,8 +46,8 @@ function rawDate(date) {
formatDate(item.createdAt) != formatDate(item.updatedAt) &&
!!item.createdAt &&
!!item.updatedAt && (
<p class="meta__date">
{t("meta.modification")}&nbsp;:
<p class='meta__date'>
{ui.updated}&nbsp;:
<time datetime={rawDate(item.updatedAt)}>
{formatDate(item.updatedAt)}
</time>
@ -41,8 +56,8 @@ function rawDate(date) {
}
{
!item.createdAt && !!item.updatedAt && (
<p class="meta__date">
{t("meta.modification")}&nbsp;:
<p class='meta__date'>
{ui.updated}&nbsp;:
<time datetime={rawDate(item.updatedAt)}>
{formatDate(item.updatedAt)}
</time>

View File

@ -1,37 +1,24 @@
---
import { t, l } from "astro-i18n";
import LanguageSwitcher from "./LangSwitcher.astro";
---
<nav role="navigation" aria-label={t("header.mainNav")}>
<ul class="main-nav" role="list">
<nav role='navigation' aria-label='Menu principal'>
<ul class='main-nav' role='list'>
<li>
<a href={l("/articles")} class="clean-link nice-link"
>{t("article.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
<a href='/articles' class='clean-link nice-link'>Articles&nbsp;</a>
<span aria-hidden='true'>&middot;</span>
</li>
<li>
<a href={l("/fragments")} class="clean-link nice-link"
>{t("fragments.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
<a href='/fragments' class='clean-link nice-link'>Fragments&nbsp;</a>
<span aria-hidden='true'>&middot;</span>
</li>
<li>
<a href={l("/references")} class="clean-link nice-link"
>{t("references.titre")}&nbsp;</a
>
<span aria-hidden="true">&middot;</span>
<a href='/references' class='clean-link nice-link'>Références&nbsp;</a>
<span aria-hidden='true'>&middot;</span>
</li>
<li>
<a
href="mailto:contact@nardu.in"
class="clean-link nice-link"
title={t("contact.email")}>{t("contact.title")}</a
><span aria-hidden="true">&nbsp;&#x7C;</span>
</li>
<li>
<LanguageSwitcher />
href='mailto:contact@nardu.in'
class='clean-link nice-link'
title='Envoyez-moi un mail (ouverture du logiciel automatique).'
>contact</a
>
</li>
</ul>
</nav>

View File

@ -1,19 +1,19 @@
---
const { item } = Astro.props;
const { item } = Astro.props
---
<div class="card">
<div class="card-container">
<div class="card__illustration">
<div class='card'>
<div class='card-container'>
<div class='card__illustration'>
<img
src={item.quickImage}
width="150"
height="150"
alt=""
aria-hidden="true"
width='150'
height='150'
alt=''
aria-hidden='true'
/>
</div>
<a href={`#${item.id}`} class="card__link clean-link">{item.quickTitle}</a>
<a href={`#${item.uid}`} class='card__link clean-link'>{item.quickTitle}</a>
</div>
</div>
@ -52,7 +52,7 @@ const { item } = Astro.props;
text-decoration: none;
}
.card__link::after {
content: "";
content: '';
position: absolute;
inset: 0;
}

View File

@ -1,13 +1,12 @@
---
import { t } from "astro-i18n";
const { toc } = Astro.props;
const { toc } = Astro.props
---
<aside class="table-of-content">
<details open="true">
<summary>{t("index.toc")}</summary>
<nav role="navigation" aria-label={t("index.toc")}>
<ol class="table-of-content__list" role="list">
<aside class='table-of-content'>
<details open='true'>
<summary id='toc-title'>Table des matières</summary>
<nav role='navigation' aria-labelledby='toc-title'>
<ol class='table-of-content__list' role='list'>
{
// loop over the toc
toc.map(
@ -17,14 +16,14 @@ const { toc } = Astro.props;
) =>
heading.depth === 2 ? (
<li>
<a href={`#${heading.slug}`} class="toc-2">
<a href={`#${heading.slug}`} class='toc-2'>
{heading.text}
</a>
</li> // if h3, set as inner ol > li
) : heading.depth === 3 ? (
<ol role="list">
<ol role='list'>
<li>
<a href={`#${heading.slug}`} class="toc-3">
<a href={`#${heading.slug}`} class='toc-3'>
{heading.text}
</a>
</li>
@ -70,7 +69,7 @@ const { toc } = Astro.props;
}
.table-of-content__list a::before {
content: "";
content: '';
position: absolute;
top: 50%;
left: 0;

View File

@ -1,69 +1,133 @@
import { z, defineCollection } from "astro:content";
import { glob } from 'astro/loaders';
import { glob } from 'astro/loaders'
import type { CollectionEntry } from 'astro:content'
import { defineCollection, z } from 'astro:content'
// TYPES
const articleSchema = z.object({
title: z.string(),
subtitle: z.string(),
lang: z.enum(['fr', 'en']),
tags: z.array(z.string()), // An array of strings
type: z.string(),
slug: z.string(),
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false
})
const fragmentSchema = z.object({
title: z.string(),
subtitle: z.string(),
lang: z.enum(['fr', 'en']),
tags: z.array(z.string()), // An array of strings
type: z.string(),
slug: z.string(),
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false
})
const referenceSchema = z.object({
title: z.string(),
subtitle: z.string(),
url: z.string(),
lang: z.enum(['fr', 'en']),
slug: z.string(),
tags: z.array(z.string()), // An array of strings
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false
})
const HPsectionSchema = z.object({
type: z.string(),
lang: z.enum(['fr', 'en']),
uid: z.string().optional(),
image: z.string().optional(),
order: z.number(),
quickTitle: z.string().optional(),
quickImage: z.string().optional(),
reference: z.string().optional()
})
const VeilleSchema = z.object({
lang: z.enum(['fr', 'en']),
title: z.string(),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional()
})
// COLLECTIONS
const articles = defineCollection({
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/articles" }),
schema: z.object({
title: z.string(),
subtitle: z.string(),
lang: z.enum(["fr", "en"]),
tags: z.array(z.string()), // An array of strings
type: z.string(),
permalink: z.string(),
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false,
loader: glob({
pattern: '**/[^_]*.{md,mdx}',
base: './src/content/articles'
}),
});
schema: articleSchema
})
const fragments = defineCollection({
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/fragments" }),
schema: z.object({
title: z.string(),
subtitle: z.string(),
lang: z.enum(["fr", "en"]),
tags: z.array(z.string()), // An array of strings
type: z.string(),
permalink: z.string(),
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false,
loader: glob({
pattern: '**/[^_]*.{md,mdx}',
base: './src/content/fragments'
}),
});
schema: fragmentSchema
})
const references = defineCollection({
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/references" }),
schema: z.object({
title: z.string(),
subtitle: z.string(),
url: z.string(),
lang: z.enum(["fr", "en"]),
permalink: z.string(),
tags: z.array(z.string()), // An array of strings
// Parse pubDate as a browser-standard `Date` object
createdAt: z.string().transform((str) => new Date(str)),
updatedAt: z
.string()
.transform((str) => new Date(str))
.optional(),
code: z.boolean().optional() || false,
draft: z.boolean().optional() || false,
loader: glob({
pattern: '**/[^_]*.{md,mdx}',
base: './src/content/references'
}),
});
schema: referenceSchema
})
// DATA
const HPsections = defineCollection({
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/data/HP' }),
schema: HPsectionSchema
})
const veille = defineCollection({
loader: glob({ pattern: '**/[^_]*.{md,mdx}', base: './src/data/veille' }),
schema: VeilleSchema
})
export const collections = {
// Don't forget 'quotes' for collection names containing dashes
articles,
fragments,
references,
};
HPsections,
veille
}
// TYPES from the schemas
export type ArticleFrontmatter = z.infer<typeof articleSchema>
export type FragmentFrontmatter = z.infer<typeof fragmentSchema>
export type ReferenceFrontmatter = z.infer<typeof referenceSchema>
export type HPsectionsFrontmatter = z.infer<typeof HPsectionSchema>
export type VeilleFrontmatter = z.infer<typeof VeilleSchema>
// full entry type including data, body, slug etc.
export type ArticleEntry = CollectionEntry<'articles'>
export type FragmentEntry = CollectionEntry<'fragments'>
export type ReferenceEntry = CollectionEntry<'references'>
export type HPSectionEntry = CollectionEntry<'HPsections'>

View File

@ -2,11 +2,11 @@
title: Nico v2.0
subtitle: 2022 update of many things.
lang: en
permalink: "2022"
slug: 'en-2022'
excerpt: Changes in my services, the website and myself.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2022-06-08T14:24:06.000Z"
createdAt: '2022-06-08T14:24:06.000Z'
---
After two years of full-time freelancing, I took a step back from my activity. I especially questioned my positioning and the services I was offering.

View File

@ -2,12 +2,12 @@
title: Nico v2.5
subtitle: Update 2023.
lang: en
permalink: "2023"
slug: 'en-2023'
excerpt: New changes.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2023-02-03T17:41:00.000Z"
updatedAt: "2023-05-17T17:41:00.000Z"
createdAt: '2023-02-03T17:41:00.000Z'
updatedAt: '2023-05-17T17:41:00.000Z'
---
This article will be updated when I have something new to share during the year 2023.

View File

@ -2,15 +2,15 @@
title: After Effects Expressions
subtitle: Animation on steroïds.
lang: en
permalink: "after-effects-expressions"
slug: 'en-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"]
tags: ['Design']
type: articles
createdAt: "2019-04-24T09:00:00.000Z"
createdAt: '2019-04-24T09:00:00.000Z'
code: true
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## An ever lasting battle
@ -22,10 +22,10 @@ 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="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."
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.'
/>
Over the last updates, Adobe has made an effort to make expressions more accessible to everyone. For example, the expression box is now resembling a code editor thanks to code-coloring and auto-completion features. After Effects expression feel like JavaScript with custom functions.
@ -33,10 +33,10 @@ 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="https://assets.nardu.in/shortcut_39cc19d383.jpeg"
width="728"
height="322"
alt="Alt + Click the stopwatch to access the shortcuts."
src='https://assets.nardu.in/shortcut_39cc19d383.jpeg'
width='728'
height='322'
alt='Alt + Click the stopwatch to access the shortcuts.'
/>
## So I need to learn javascript to do motion design now?
@ -72,14 +72,14 @@ Let's say you need to animate a rather simple counter from 0% to 100%.
- On the effect menu add expression options > slider control
- Alt + Click the Source text property
<video width="728" loop controls preload="metadata">
<source src="https://assets.nardu.in/alt-counter.mp4" type="video/mp4" />
<video width='728' loop controls preload='metadata'>
<source src='https://assets.nardu.in/alt-counter.mp4' type='video/mp4' />
</video>
- Parent the source text to the slider control through the pickwhip.
<video width="462" loop controls preload="metadata">
<source src="https://assets.nardu.in/pickwhip.mp4" type="video/mp4" />
<video width='462' loop controls preload='metadata'>
<source src='https://assets.nardu.in/pickwhip.mp4' type='video/mp4' />
</video>
You should get something like this in the expressions panel:
@ -91,8 +91,8 @@ effect("Slider Control")("Slider")
- Set two keyframes on the slider from 0 to 100. The text should update accordingly.
- By default, After Effects does not round numbers. In the expression panel, wrap your expression with the `Math.round()` function.
<video width="728" loop controls preload="metadata">
<source src="https://assets.nardu.in/round.mp4" type="video/mp4" />
<video width='728' loop controls preload='metadata'>
<source src='https://assets.nardu.in/round.mp4' type='video/mp4' />
</video>
```javascript
@ -107,8 +107,8 @@ Still in the expression panel, we're going to add a string containing the % glyp
Math.round(effect("Slider Control")("Slider")) + '%'
```
<video width="538" loop controls preload="metadata">
<source src="https://assets.nardu.in/percent.mp4" type="video/mp4" />
<video width='538' loop controls preload='metadata'>
<source src='https://assets.nardu.in/percent.mp4' type='video/mp4' />
</video>
**And there we go!** A fully functioning and customizable counter using a slider controller and expressions.

View File

@ -2,12 +2,12 @@
title: Accessibility and sobriety
subtitle: Translation in progress, stay tuned ;)
lang: en
permalink: "faq"
slug: 'en-faq'
draft: true
excerpt: Why, how et and especially what.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2022-06-22T15:34:45.000Z"
createdAt: '2022-06-22T15:34:45.000Z'
---
[Go back to available articles](/en/articles)

View File

@ -2,12 +2,12 @@
title: Gratuiste
subtitle: Translation in progress, stay tuned ;)
lang: en
permalink: "gratuiste"
slug: 'en-gratuiste'
draft: true
excerpt: Translation in progress, stay tuned ;)
tags: ["Design", "Freelance"]
tags: ['Design', 'Freelance']
type: articles
createdAt: "2017-05-27T07:47:36.000Z"
createdAt: '2017-05-27T07:47:36.000Z'
---
[Go back to available articles](/en/articles)

View File

@ -1,17 +1,17 @@
---
title: "Access blocked Sci-hub"
subtitle: "The science of sharing."
title: 'Access blocked Sci-hub'
subtitle: 'The science of sharing.'
lang: en
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"]
slug: 'en-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']
type: articles
createdAt: "2019-03-31T07:47:36.000Z"
updatedAt: "2022-12-27T12:08:00.000Z"
createdAt: '2019-03-31T07:47:36.000Z'
updatedAt: '2022-12-27T12:08:00.000Z'
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
The current sci-hub address is: <a href="https://sci-hub.se" rel="noreferer noopener">sci-hub.se</a>
@ -46,10 +46,10 @@ 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="https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg"
width="728"
height="1060"
alt="MacOS network and DNS settings"
src='https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg'
width='728'
height='1060'
alt='MacOS network and DNS settings'
/>
### Windows (10)
@ -67,31 +67,31 @@ 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="https://assets.nardu.in/sci-hub-settings.jpg"
width="728"
height="319"
alt="Windows system settings"
src='https://assets.nardu.in/sci-hub-settings.jpg'
width='728'
height='319'
alt='Windows system settings'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-network.jpg"
width="728"
height="803"
alt="Windows network settings"
src='https://assets.nardu.in/sci-hub-network.jpg'
width='728'
height='803'
alt='Windows network settings'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-adapter.jpg"
width="728"
height="327"
alt="Windows network connections settings"
src='https://assets.nardu.in/sci-hub-adapter.jpg'
width='728'
height='327'
alt='Windows network connections settings'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-adapter-settings.jpg"
width="728"
height="434"
alt="Windows network adapter settings"
src='https://assets.nardu.in/sci-hub-adapter-settings.jpg'
width='728'
height='434'
alt='Windows network adapter settings'
/>
## Which DNS?

View File

@ -2,15 +2,15 @@
title: The day I Jamd
subtitle: A story of unusual tools and fun gambles.
lang: en
permalink: "the-day-I-jamd"
slug: 'en-the-day-I-jamd'
excerpt: Ooh, yeah! All right! Were jammin
tags: ["Dev", "Jamstack"]
tags: ['Dev', 'Jamstack']
type: articles
createdAt: "2020-10-08T09:00:00.000Z"
updatedAt: "2022-12-27T15:40:06.000Z"
createdAt: '2020-10-08T09:00:00.000Z'
updatedAt: '2022-12-27T15:40:06.000Z'
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## The not so easy choice
@ -31,10 +31,10 @@ Boy did they exceed my expectations! With almost no optimization on the static s
### wordpress
<AstroImage
src="https://assets.nardu.in/wordpress_8ee6f54b98.jpeg"
width="728"
height="412"
alt="Performance score of 53/100 on Wordpress."
src='https://assets.nardu.in/wordpress_8ee6f54b98.jpeg'
width='728'
height='412'
alt='Performance score of 53/100 on Wordpress.'
/>
Despite a lot of efforts I could not do better. Im no expert in caching, do not use CDN and relied on plugins to achieve a lot of stuff (php not being my strongest skill 😬).
@ -42,10 +42,10 @@ Despite a lot of efforts I could not do better. Im no expert in caching, do n
### 11ty + strapi
<AstroImage
src="https://assets.nardu.in/static_2c0d9f1eb8.jpeg"
width="728"
height="412"
alt="Performance score of 97/100 on jamstack."
src='https://assets.nardu.in/static_2c0d9f1eb8.jpeg'
width='728'
height='412'
alt='Performance score of 97/100 on jamstack.'
/>
Almost **zero** special configuration (I was too anxious to test) and I reached an awesome score. I know lighthouse scores are not everything but hey, **53 vs 97**… Ill take it!

View File

@ -2,15 +2,15 @@
title: Video compression
subtitle: Encode like you mean it.
lang: en
permalink: "video-compression"
slug: 'en-video-compression'
excerpt: How to gain precious weight when encoding videos.
tags: ["Design"]
tags: ['Design']
type: articles
createdAt: "2021-05-05T09:00:00.000Z"
updatedAt: "2022-06-08T14:24:06.000Z"
createdAt: '2021-05-05T09:00:00.000Z'
updatedAt: '2022-06-08T14:24:06.000Z'
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## Let's play.
@ -27,9 +27,9 @@ 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="https://assets.nardu.in/video-premiere-1.jpeg"
width="673"
height="800"
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,9 +52,9 @@ While it's not as nice as Premiere Pro, it has way more exporting capabilities.
1. Keep MPEG-4 as the format
<AstroImage
src="https://assets.nardu.in/video-handbrake-1.jpeg"
width="728"
height="337"
src='https://assets.nardu.in/video-handbrake-1.jpeg'
width='728'
height='337'
/>
### Video screen
@ -65,9 +65,9 @@ While it's not as nice as Premiere Pro, it has way more exporting capabilities.
1. Choose the type of video you are encoding (film, animation…)
<AstroImage
src="https://assets.nardu.in/video-handbrake-2.jpeg"
width="728"
height="337"
src='https://assets.nardu.in/video-handbrake-2.jpeg'
width='728'
height='337'
/>
### Audio screen
@ -80,9 +80,9 @@ If you have an audio channel, these settings are great and will not influence th
1. Bitrate 192 to 256 (your choice)
<AstroImage
src="https://assets.nardu.in/video-handbrake-3.jpeg"
width="728"
height="337"
src='https://assets.nardu.in/video-handbrake-3.jpeg'
width='728'
height='337'
/>
### Export!
@ -105,10 +105,10 @@ Webm is an html video format and VP9 is its latest codec.
Using Handbrake and webm/VP9, we can achieve really great compression without losing too much quality (or none at all depending on the settings). I was able to divide by 4 the size of a video using these presets:
<AstroImage
src="https://assets.nardu.in/video-handbrake-4.jpg"
width="728"
height="313"
alt=""
src='https://assets.nardu.in/video-handbrake-4.jpg'
width='728'
height='313'
alt=''
/>
The only down side is that it takes some time to encode. It will depend on the video length and your computing power.

View File

@ -2,11 +2,11 @@
title: Nico v2.0
subtitle: Mise à jour 2022 de plein de trucs.
lang: fr
permalink: "2022"
slug: '2022'
excerpt: Évolution des services, du site et de moi-même.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2022-06-08T14:24:06.000Z"
createdAt: '2022-06-08T14:24:06.000Z'
---
Après deux ans de freelance à temps plein, jai pris du recul sur mon activité. Jai surtout questionné mon positionnement et les prestations que je proposais.

View File

@ -2,12 +2,12 @@
title: Nico v2.5
subtitle: Mise à jour 2023.
lang: fr
permalink: "2023"
slug: '2023'
excerpt: Suite des évolutions.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2023-02-03T17:41:00.000Z"
updatedAt: "2023-05-17T17:41:00.000Z"
createdAt: '2023-02-03T17:41:00.000Z'
updatedAt: '2023-05-17T17:41:00.000Z'
---
Cet article sera mis à jour lorsque j'aurai des nouveautés à partager au cours de l'année 2023.

View File

@ -3,11 +3,11 @@ title: After Effects Expressions
subtitle: En cours de traduction, revenez bientôt ;)
lang: fr
draft: true
permalink: "after-effects-expressions"
slug: 'after-effects-expressions'
excerpt: En cours de traduction, revenez bientôt ;)
tags: ["Design"]
tags: ['Design']
type: articles
createdAt: "2019-04-24T09:00:00.000Z"
createdAt: '2019-04-24T09:00:00.000Z'
---
[Retour aux articles](/articles)

View File

@ -2,11 +2,11 @@
title: Accessibilité, sobriété et F.A.Q.
subtitle: Explications sur ma vision et mon fonctionnement.
lang: fr
permalink: "faq"
slug: 'faq'
excerpt: Pourquoi, comment et surtout quèsaco.
tags: ["Freelance"]
tags: ['Freelance']
type: articles
createdAt: "2022-06-22T15:34:45.000Z"
createdAt: '2022-06-22T15:34:45.000Z'
---
## l'Accessibilité

View File

@ -1,13 +1,13 @@
---
title: "Gratuiste"
subtitle: "Ou le travail gratuit."
title: 'Gratuiste'
subtitle: 'Ou le travail gratuit.'
lang: fr
permalink: "gratuiste"
excerpt: "Jai cherché un moyen de mettre mes compétences au service dautrui et je pense avoir trouvé: je vais travailler gratuitement pour des associations."
tags: ["Graphisme", "Freelance"]
slug: 'gratuiste'
excerpt: 'Jai cherché un moyen de mettre mes compétences au service dautrui et je pense avoir trouvé: je vais travailler gratuitement pour des associations.'
tags: ['Graphisme', 'Freelance']
type: articles
createdAt: "2017-05-27T07:47:36.000Z"
updatedAt: "2022-12-27T15:36:06.000Z"
createdAt: '2017-05-27T07:47:36.000Z'
updatedAt: '2022-12-27T15:36:06.000Z'
---
## Gratuiste, quest-ce que cest ?

View File

@ -1,16 +1,16 @@
---
title: "Sci-hub bloqué, comment contourner"
subtitle: "La science du partage."
title: 'Sci-hub bloqué, comment contourner'
subtitle: 'La science du partage.'
lang: fr
permalink: "sci-hub-blocage"
excerpt: "Le tribunal de grande instance de Paris a ordonné aux fournisseurs daccès à internet de bloquer laccès à sci-hub. Voici comment contourner les blocages mis en place."
tags: ["Internet", "Science"]
slug: 'sci-hub-blocage'
excerpt: 'Le tribunal de grande instance de Paris a ordonné aux fournisseurs daccès à internet de bloquer laccès à sci-hub. Voici comment contourner les blocages mis en place.'
tags: ['Internet', 'Science']
type: articles
createdAt: "2019-03-31T07:47:36.000Z"
updatedAt: "2022-12-27T12:08:00.000Z"
createdAt: '2019-03-31T07:47:36.000Z'
updatedAt: '2022-12-27T12:08:00.000Z'
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
L'adresse actuelle de sci-hub est&nbsp;: [sci-hub.se](https://sci-hub.se)
@ -49,10 +49,10 @@ Ouvrez&nbsp;:
De là, vous pouvez ajouter des serveurs DNS en cliquant sur l'icône +. Cliquez sur ok et appliquez les nouveaux paramètres. Vous devrez peut-être redémarrer votre ordinateur pour que les changements fonctionnent.
<AstroImage
src="https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg"
width="728"
height="1060"
alt="MacOS réglages réseau et DNS"
src='https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg'
width='728'
height='1060'
alt='MacOS réglages réseau et DNS'
/>
### Sur Windows (ici 10)
@ -68,31 +68,31 @@ Ouvrez&nbsp;:
1. Utiliser ladresse de serveur DNS suivante
<AstroImage
src="https://assets.nardu.in/sci-hub-settings.jpg"
width="728"
height="319"
alt="Réglages windows"
src='https://assets.nardu.in/sci-hub-settings.jpg'
width='728'
height='319'
alt='Réglages windows'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-network.jpg"
width="728"
height="803"
alt="Windows réglages réseaux"
src='https://assets.nardu.in/sci-hub-network.jpg'
width='728'
height='803'
alt='Windows réglages réseaux'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-adapter.jpg"
width="728"
height="327"
alt="Windows régalges connections réseaux"
src='https://assets.nardu.in/sci-hub-adapter.jpg'
width='728'
height='327'
alt='Windows régalges connections réseaux'
/>
<AstroImage
src="https://assets.nardu.in/sci-hub-adapter-settings.jpg"
width="728"
height="434"
alt="Windows options adaptateur réseau"
src='https://assets.nardu.in/sci-hub-adapter-settings.jpg'
width='728'
height='434'
alt='Windows options adaptateur réseau'
/>
## Quels serveurs DNS utiliser&nbsp;?

View File

@ -2,15 +2,15 @@
title: The day I Jamd
subtitle: Des paris, des outils et du fun.
lang: fr
permalink: "the-day-I-jamd"
slug: 'the-day-I-jamd'
excerpt: Ooh, yeah! All right! Were jammin
tags: ["Dev", "Jamstack"]
tags: ['Dev', 'Jamstack']
type: articles
createdAt: "2020-10-08T07:47:36.000Z"
updatedAt: "2022-12-27T15:40:06.000Z"
createdAt: '2020-10-08T07:47:36.000Z'
updatedAt: '2022-12-27T15:40:06.000Z'
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## La solution de non facilité
@ -31,10 +31,10 @@ Jen suis resté pantois&nbsp;! Quasiment sans optimisation du côté statique
### wordpress
<AstroImage
src="https://assets.nardu.in/wordpress_8ee6f54b98.jpeg"
width="728"
height="412"
alt="Score de performance de 53/100 sur Wordpress."
src='https://assets.nardu.in/wordpress_8ee6f54b98.jpeg'
width='728'
height='412'
alt='Score de performance de 53/100 sur Wordpress.'
/>
Malgré beaucoup defforts, je nai pas pu faire mieux. Je ne suis pas un expert en cache, je nutilise pas de CDN et je me suis appuyé sur des plugins pour réaliser beaucoup de choses (php nétant pas ma spécialité 😬).
@ -42,10 +42,10 @@ Malgré beaucoup defforts, je nai pas pu faire mieux. Je ne suis pas un ex
### 11ty + strapi
<AstroImage
src="https://assets.nardu.in/static_2c0d9f1eb8.jpeg"
width="728"
height="412"
alt="Score de performance de 97/100 en Jamstack."
src='https://assets.nardu.in/static_2c0d9f1eb8.jpeg'
width='728'
height='412'
alt='Score de performance de 97/100 en Jamstack.'
/>
Presque **zéro** configuration spéciale (jétais trop impatient de tester) et jai atteint un score impressionnant. Je sais que les scores lighthouse ne font pas tout mais **53 contre 97**… Ça me va&nbsp;!

View File

@ -3,12 +3,12 @@ title: Compression vidéo
subtitle: En cours de traduction, revenez bientôt ;)
lang: fr
draft: true
permalink: "video-compression"
slug: 'video-compression'
excerpt: Pas encore traduit
tags: ["Design"]
tags: ['Design']
type: articles
createdAt: "2021-05-05T09:00:00.000Z"
updatedAt: "2022-06-08T14:24:06.000Z"
createdAt: '2021-05-05T09:00:00.000Z'
updatedAt: '2022-06-08T14:24:06.000Z'
---
[Retour aux articles](/articles)

View File

@ -2,10 +2,10 @@
title: Strong TLS certificates with acme.sh
subtitle: 384-bit of https
lang: en
permalink: "acme-sh-tls-cert"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'en-acme-sh-tls-cert'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: Real cert have curves.
tags: ["security"]
tags: ['security']
type: snippets
---

View File

@ -2,10 +2,10 @@
title: Filter an array against another array
subtitle: Array vs Array.
lang: en
permalink: "array-vs-array"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'en-array-vs-array'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: My peak javascript
tags: ["nuxt.js"]
tags: ['nuxt.js']
type: snippets
---
@ -20,24 +20,24 @@ Here is an example:
```javascript
const skills = [
{
name: "Be awesome",
user: "Jean",
name: 'Be awesome',
user: 'Jean'
},
{
name: "Great jokes",
user: "Jacques",
name: 'Great jokes',
user: 'Jacques'
},
{
name: "Heavy sleeper",
user: "Jean",
name: 'Heavy sleeper',
user: 'Jean'
},
{
name: "Heavy sleeper",
user: "Beatriz",
},
];
name: 'Heavy sleeper',
user: 'Beatriz'
}
]
const selectedUsers = ["Jean", "Beatriz"];
const selectedUsers = ['Jean', 'Beatriz']
```
I thought it would be pretty easy but I guess I'm not familiar enough with javascript 😬
@ -54,9 +54,9 @@ After a bit more trials and errors, this is the code I ended up using in a `comp
// index.vue
const filteredSkills = selectedUsers.map((user) => {
return skills.filter((skill) => {
return skill.user === user;
});
});
return skill.user === user
})
})
```
I used `map()` in order to loop on the second array and used its string value to only include the corresponding skills with `filter()`.

View File

@ -2,13 +2,13 @@
title: Buttons hover
subtitle: Simple, but nice.
lang: en
permalink: "buttons"
slug: 'en-buttons'
draft: true
excerpt: Easy to grab and use hover effects.
tags: ["CSS"]
tags: ['CSS']
code: true
type: snippets
createdAt: "2020-10-08T09:00:00.000Z"
createdAt: '2020-10-08T09:00:00.000Z'
---
## General rules
@ -51,7 +51,7 @@ All the buttons use these styles as a “reset”:
background-color: hotpink;
}
.btn-icon::before {
content: url("~assets/svg/arrow-right-white.svg");
content: url('~assets/svg/arrow-right-white.svg');
position: absolute;
width: 20px;
top: 50%;
@ -103,7 +103,7 @@ All the buttons use these styles as a “reset”:
}
.btn-rideau::before,
.btn-rideau::after {
content: "";
content: '';
position: absolute;
height: 100%;
width: 100%;
@ -174,7 +174,7 @@ All the buttons use these styles as a “reset”:
background-color: transparent;
}
.btn-scale::after {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;

View File

@ -3,10 +3,10 @@ title: Full width image
subtitle: Translation in progress, stay tuned ;)
lang: en
draft: true
permalink: "image-full"
createdAt: "2020-09-15T09:00:00.000Z"
updatedAt: "2022-06-08T14:24:06.000Z"
tags: ["CSS"]
slug: 'en-image-full'
createdAt: '2020-09-15T09:00:00.000Z'
updatedAt: '2022-06-08T14:24:06.000Z'
tags: ['CSS']
type: snippets
---

View File

@ -2,18 +2,18 @@
title: Static website and GraphQL queries with Nuxt.js
subtitle: Graphql client is king.
lang: en
permalink: "nuxt-graphql-static"
createdAt: "2022-06-08T14:24:06.000Z"
updatedAt: "2022-09-08T13:43:33.000Z"
slug: 'en-nuxt-graphql-static'
createdAt: '2022-06-08T14:24:06.000Z'
updatedAt: '2022-09-08T13:43:33.000Z'
excerpt: When the most used gql module doesn't work…
tags: ["nuxt.js"]
tags: ['nuxt.js']
type: snippets
---
## The problem
I encountered a nasty bug while using static generation with Nuxt and [nuxt apollo](https://github.com/nuxt-community/apollo-module "Dépôt github du module nuxt apollo (new tab)") client.
I found [the issue](https://github.com/nuxt-community/apollo-module/issues/339 "Github issue on nuxt/apollo repository (new tab)") already reported on github.
I encountered a nasty bug while using static generation with Nuxt and [nuxt apollo](https://github.com/nuxt-community/apollo-module 'Dépôt github du module nuxt apollo (new tab)') client.
I found [the issue](https://github.com/nuxt-community/apollo-module/issues/339 'Github issue on nuxt/apollo repository (new tab)') already reported on github.
It seems the module doesn't handle static generation correctly with `nuxt generate`.
@ -86,7 +86,7 @@ export default {
#### Inside a component
It is safer to wait until `fetch` has received a response before displaying anything. You can use `$fetchState` to be sure ([documentation](https://nuxtjs.org/docs/2.x/components-glossary/pages-fetch "Documentation on the fetch hook (new tab)")).
It is safer to wait until `fetch` has received a response before displaying anything. You can use `$fetchState` to be sure ([documentation](https://nuxtjs.org/docs/2.x/components-glossary/pages-fetch 'Documentation on the fetch hook (new tab)')).
```javascript
// Header.vue
@ -131,7 +131,7 @@ export default {
const locale = app.i18n.localeProperties.iso
const data = await $graphql.default.request(articleQuery, {
code: locale,
permalink: params.slug,
slug: params.slug,
})
return { data }
},

View File

@ -2,14 +2,14 @@
title: The best cookies
subtitle: Consentless biscuits.
lang: en
permalink: "super-cookies"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'en-super-cookies'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: It's a real recipe, not a joke about annoying files.
tags: ["food"]
tags: ['food']
type: snippets
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## Vegetalian version
@ -74,14 +74,14 @@ Chocolate can be replaced by anything like nuts, raisins, legos... (don't eat le
## Figures
<AstroImage
src="https://assets.nardu.in/cookies-fig-1.jpg"
width="753"
height="1248"
alt="All ingredients mixed together to form a brown paste."
src='https://assets.nardu.in/cookies-fig-1.jpg'
width='753'
height='1248'
alt='All ingredients mixed together to form a brown paste.'
/>
<AstroImage
src="https://assets.nardu.in/cookies-fig-2.jpg"
width="753"
height="1248"
alt="The cookies are round and soft after baking."
src='https://assets.nardu.in/cookies-fig-2.jpg'
width='753'
height='1248'
alt='The cookies are round and soft after baking.'
/>

View File

@ -2,11 +2,11 @@
title: Toulouse yourself
subtitle: Only the bestest
lang: en
permalink: "toulouse-fun"
slug: 'en-toulouse-fun'
excerpt: Gonna have to trust me on this ¯\_(ツ)_/¯
tags: ["lifestyle"]
tags: ['lifestyle']
type: snippets
createdAt: "2022-06-22T15:34:45.000Z"
createdAt: '2022-06-22T15:34:45.000Z'
---
Here is my list of great places to go to when in Toulouse. There are of course a lot of other great places to go to, these are just my all time favourite.

View File

@ -3,11 +3,11 @@ title: Visited links and visuel aid
subtitle: Translation in progress, stay tuned ;)
lang: en
draft: true
permalink: "visited-links"
slug: 'en-visited-links'
excerpt: Petit hack CSS
tags: ["Front-end"]
tags: ['Front-end']
type: snippets
createdAt: "2023-06-06T18:34:00.000Z"
createdAt: '2023-06-06T18:34:00.000Z'
---
[Go back to available snippets](/en/snippets)

View File

@ -2,10 +2,10 @@
title: Certificates TLS robustes avec acme.sh
subtitle: 384-bit de https
lang: fr
permalink: "acme-sh-tls-cert"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'acme-sh-tls-cert'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: La sécurité avec des courbes.
tags: ["sécurité"]
tags: ['sécurité']
type: fragments
---

View File

@ -3,10 +3,10 @@ title: Filtrer un array avec un autre array
subtitle: En cours de traduction.
lang: fr
draft: true
permalink: "array-vs-array"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'array-vs-array'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: En cours de traduction.
tags: ["nuxt.js"]
tags: ['nuxt.js']
type: fragments
---

View File

@ -1,14 +1,14 @@
---
title: "Effets de survol de boutons"
subtitle: "Simples mais efficaces."
title: 'Effets de survol de boutons'
subtitle: 'Simples mais efficaces.'
lang: fr
permalink: "buttons"
slug: 'buttons'
draft: true
excerpt: Quelques effets de survol faciles à récupérer et utiliser.
tags: ["CSS"]
tags: ['CSS']
type: fragments
code: true
createdAt: "2020-10-08T09:00:00.000Z"
createdAt: '2020-10-08T09:00:00.000Z'
---
## Styles généraux
@ -42,7 +42,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
## Ajout d'icône
<button role="none" class="btn btn-icon">
<button role='none' class='btn btn-icon'>
<span>Icône</span>
</button>
@ -51,7 +51,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
background-color: hotpink;
}
.btn-icon::before {
content: url("./assets/svg/arrow-right-white.svg");
content: url('./assets/svg/arrow-right-white.svg');
position: absolute;
width: 20px;
top: 50%;
@ -81,7 +81,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
## Double volet
<button role="none" class="btn btn-rideau">
<button role='none' class='btn btn-rideau'>
<span>Volet</span>
</button>
@ -103,7 +103,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
}
.btn-rideau::before,
.btn-rideau::after {
content: "";
content: '';
position: absolute;
height: 100%;
width: 100%;
@ -128,7 +128,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
## Dégradé animé
<button role="none" class="btn btn-gradient">
<button role='none' class='btn btn-gradient'>
<span>Dégradé</span>
</button>
@ -163,7 +163,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
## Échelle non desctructrice
<button role="none" class="btn btn-scale">
<button role='none' class='btn btn-scale'>
<span>Échelle</span>
</button>
@ -174,7 +174,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de «&nbsp;r
background-color: transparent;
}
.btn-scale::after {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;

View File

@ -2,24 +2,24 @@
title: Image pleine largeur
subtitle: Casser le conteneur.
lang: fr
permalink: "image-full"
createdAt: "2020-09-15T09:00:00.000Z"
updatedAt: "2022-06-08T14:24:06.000Z"
slug: 'image-full'
createdAt: '2020-09-15T09:00:00.000Z'
updatedAt: '2022-06-08T14:24:06.000Z'
excerpt: Faire déborder une image de son conteneur sans tout casser.
tags: ["CSS"]
tags: ['CSS']
type: fragments
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## Image inline
On est parfois obligé d'utiliser des images dans des balises `img` plutôt que dans un `background` en css. Comment faire alors pour que l'image sorte de son conteneur pour en faire une bannière&nbsp;? Exemple pratique à partir de ce même site.
<AstroImage
src="https://assets.nardu.in/image_bleed_container_9e3939b3ae.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_container_9e3939b3ae.jpeg'
width='320'
height='568'
/>
### Contexte
@ -50,9 +50,9 @@ img {
```
<AstroImage
src="https://assets.nardu.in/image_bleed_original_d49f0d11bf.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_original_d49f0d11bf.jpeg'
width='320'
height='568'
/>
### Déborder du conteneur
@ -68,9 +68,9 @@ Afin de faire prendre à l'image toute la largeur, on agit sur son conteneur&nbs
```
<AstroImage
src="https://assets.nardu.in/image_bleed_full_2a902f9539.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_full_2a902f9539.jpeg'
width='320'
height='568'
/>
### Faire une bannière
@ -87,9 +87,9 @@ On peut alors réduire la hauteur du conteneur pour obtenir une bannière plutô
```
<AstroImage
src="https://assets.nardu.in/image_bleed_height_81b4ce969a.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_height_81b4ce969a.jpeg'
width='320'
height='568'
/>
Il faut ensuite forcer l'image à prendre toute la largeur du conteneur&nbsp;:
@ -101,9 +101,9 @@ Il faut ensuite forcer l'image à prendre toute la largeur du conteneur&nbsp;:
```
<AstroImage
src="https://assets.nardu.in/image_bleed_deformed_479046d2cb.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_deformed_479046d2cb.jpeg'
width='320'
height='568'
/>
Pas top…
@ -120,9 +120,9 @@ Pas top…
```
<AstroImage
src="https://assets.nardu.in/image_bleed_6c164e82b3.jpeg"
width="320"
height="568"
src='https://assets.nardu.in/image_bleed_6c164e82b3.jpeg'
width='320'
height='568'
/>
Cette technique s'apparente à l'utilisation d'une image de background mais en dur 😁

View File

@ -2,18 +2,18 @@
title: Site statique et requêtes GraphQL avec Nuxt.js
subtitle: Le client graphql est roi.
lang: fr
permalink: "nuxt-graphql-static"
createdAt: "2022-06-08T14:24:06.000Z"
updatedAt: "2022-09-08T13:43:33.000Z"
slug: 'nuxt-graphql-static'
createdAt: '2022-06-08T14:24:06.000Z'
updatedAt: '2022-09-08T13:43:33.000Z'
excerpt: Quand le module gql le plus utilisé ne fonctionne pas…
tags: ["nuxt.js"]
tags: ['nuxt.js']
type: fragments
---
## Le problème
Je me suis heurté à un villain bug en utilisant Nuxt en mode génération statique complète et le client [nuxt apollo](https://github.com/nuxt-community/apollo-module "Dépôt github du module nuxt apollo (nouvel onglet)").
Après quelques recherches, voici [le bug constaté par quelqu'un d'autre](https://github.com/nuxt-community/apollo-module/issues/339 "Bug visible sur le dépôt github du module nuxt/apollo (nouvel onglet)") sur github.
Je me suis heurté à un villain bug en utilisant Nuxt en mode génération statique complète et le client [nuxt apollo](https://github.com/nuxt-community/apollo-module 'Dépôt github du module nuxt apollo (nouvel onglet)').
Après quelques recherches, voici [le bug constaté par quelqu'un d'autre](https://github.com/nuxt-community/apollo-module/issues/339 'Bug visible sur le dépôt github du module nuxt/apollo (nouvel onglet)') sur github.
Il semblerait que le module en l'état ne gère pas correctement la génération statique avec `nuxt generate`.
@ -23,7 +23,7 @@ Je trouvais toujours des appels à mon API locale après la génération statiqu
Heureusement, il existe un autre module Nuxt pour gérer les requêtes GraphQL&nbsp;!
[Nuxt graphql request à la rescousse&nbsp;!](https://github.com/gomah/nuxt-graphql-request "Dépôt github du module (nouvel onglet)")
[Nuxt graphql request à la rescousse&nbsp;!](https://github.com/gomah/nuxt-graphql-request 'Dépôt github du module (nouvel onglet)')
### La conf
@ -86,7 +86,7 @@ export default {
#### Dans un composant
Il est plus prudent d'attendre que `fetch` ait reçu une réponse avant d'afficher quoi que ce soit. On peut utiliser `$fetchState` afin d'être tranquille ([documentation](https://fr.nuxtjs.org/docs/2.x/components-glossary/pages-fetch "Documentation sur la méthode fetch (nouvel onglet)")).
Il est plus prudent d'attendre que `fetch` ait reçu une réponse avant d'afficher quoi que ce soit. On peut utiliser `$fetchState` afin d'être tranquille ([documentation](https://fr.nuxtjs.org/docs/2.x/components-glossary/pages-fetch 'Documentation sur la méthode fetch (nouvel onglet)')).
```javascript
// Header.vue
@ -119,7 +119,7 @@ export default {
### Les options
Pour passer des options à la requête, par exemple pour une version multilingue avec [nuxt/i18n](https://i18n.nuxtjs.org/ "Documentation de nuxt i18n (nouvel onglet)") et/ou un paramètre d'url dans le cadre d'une page dynamique&nbsp;:
Pour passer des options à la requête, par exemple pour une version multilingue avec [nuxt/i18n](https://i18n.nuxtjs.org/ 'Documentation de nuxt i18n (nouvel onglet)') et/ou un paramètre d'url dans le cadre d'une page dynamique&nbsp;:
```javascript
// _slug.vue
@ -131,7 +131,7 @@ export default {
const locale = app.i18n.localeProperties.iso
const data = await $graphql.default.request(articleQuery, {
code: locale,
permalink: params.slug,
slug: params.slug,
})
return { data }
},

View File

@ -2,14 +2,14 @@
title: Les meilleurs cookies
subtitle: Des gâteaux sans consentement.
lang: fr
permalink: "super-cookies"
createdAt: "2022-06-08T14:24:06.000Z"
slug: 'super-cookies'
createdAt: '2022-06-08T14:24:06.000Z'
excerpt: C'est vraiment une recette hein, pas une blague sur les fichiers temporaires.
tags: ["cuisine"]
tags: ['cuisine']
type: fragments
---
import AstroImage from "../../../components/AstroImage.astro";
import AstroImage from '../../../components/AstroImage.astro'
## Version végétalienne
@ -74,14 +74,14 @@ Le chocolat peut-être remplacé par n'importe quoi comme des noix, des raisins
## Figures
<AstroImage
src="https://assets.nardu.in/cookies-fig-1.jpg"
width="753"
height="1248"
alt="Tous les ingrédients mélangés forment une pâte marron."
src='https://assets.nardu.in/cookies-fig-1.jpg'
width='753'
height='1248'
alt='Tous les ingrédients mélangés forment une pâte marron.'
/>
<AstroImage
src="https://assets.nardu.in/cookies-fig-2.jpg"
width="753"
height="1248"
alt="Les cookies cuits sont bombés et très moelleux."
src='https://assets.nardu.in/cookies-fig-2.jpg'
width='753'
height='1248'
alt='Les cookies cuits sont bombés et très moelleux.'
/>

View File

@ -3,10 +3,10 @@ title: Toulouse yourself
subtitle: En cours de traduction.
lang: fr
draft: true
permalink: "toulouse-fun"
createdAt: "2022-06-22T15:34:45.000Z"
slug: 'toulouse-fun'
createdAt: '2022-06-22T15:34:45.000Z'
excerpt: En cours de traduction.
tags: ["lifestyle"]
tags: ['lifestyle']
type: fragments
---

View File

@ -3,11 +3,11 @@ title: Liens visités et indication visuelle
subtitle: Comment différencier les liens déjà cliqués
lang: fr
draft: false
permalink: "visited-links"
slug: 'visited-links'
excerpt: Petit hack CSS
tags: ["Front-end"]
tags: ['Front-end']
type: snippets
createdAt: "2023-06-06T18:34:00.000Z"
createdAt: '2023-06-06T18:34:00.000Z'
---
## La théorie
@ -51,7 +51,7 @@ a {
text-decoration: none;
}
a::before {
content: "";
content: '';
position: absolute;
top: 50%;
left: 0;

View File

@ -3,8 +3,8 @@ title: 3w
subtitle: J'ai fait de la doc!
url: https://3-w.fr
lang: fr
permalink: "3w"
slug: '3w'
excerpt: Développement web et compagnie.
tags: ["Front-end", "documentation"]
createdAt: "2022-10-19T18:02:00.000Z"
tags: ['Front-end', 'documentation']
createdAt: '2022-10-19T18:02:00.000Z'
---

View File

@ -1,10 +0,0 @@
---
title: 3w
subtitle: I wrote the doc!
url: https://3-w.fr
lang: en
permalink: "3w"
excerpt: Développement web et compagnie.
tags: ["Front-end", "docs"]
createdAt: "2022-10-19T18:02:00.000Z"
---

View File

@ -1,10 +0,0 @@
---
title: Nature en Occitanie
subtitle: Sobriety is only natural.
url: https://www.natureo.org/
lang: en
permalink: "natureo"
excerpt: Développement web et compagnie.
tags: ["Front-end", "accessibility", "sobriety", "CMS"]
createdAt: "2023-04-19T18:02:00.000Z"
---

View File

@ -1,10 +0,0 @@
---
title: Parole Expression
subtitle: A new website for the association.
url: https://www.paroleexpression.fr/
lang: en
permalink: "parole-expression"
excerpt: Développement web et compagnie.
tags: ["Front-end", "sobriety", "CMS"]
createdAt: "2022-04-19T17:11:00.000Z"
---

View File

@ -1,10 +0,0 @@
---
title: Rose Primaire
subtitle: An agency we love.
url: https://roseprimaire.com/
lang: en
permalink: "rose-primaire"
excerpt: Web dev and other things.
tags: ["Front-end", "accessibility", "sobriety", "CMS"]
createdAt: "2023-04-19T17:11:00.000Z"
---

View File

@ -3,8 +3,8 @@ title: Nature en Occitanie
subtitle: La sobriété au naturel.
url: https://www.natureo.org/
lang: fr
permalink: "natureo"
slug: 'natureo'
excerpt: Développement web et compagnie.
tags: ["Front-end", "accessibilité", "éco-conception", "CMS"]
createdAt: "2023-04-19T18:02:00.000Z"
tags: ['Front-end', 'accessibilité', 'éco-conception', 'CMS']
createdAt: '2023-04-19T18:02:00.000Z'
---

View File

@ -3,8 +3,8 @@ title: Parole Expression
subtitle: Un nouveau site pour l'association.
url: https://www.paroleexpression.fr/
lang: fr
permalink: parole-expression
slug: parole-expression
excerpt: Développement web et compagnie.
tags: ["Front-end", "éco-conception", "CMS"]
createdAt: "2022-04-19T17:11:00.000Z"
tags: ['Front-end', 'éco-conception', 'CMS']
createdAt: '2022-04-19T17:11:00.000Z'
---

View File

@ -3,8 +3,8 @@ title: Rose Primaire
subtitle: Une agence comme on l'aime.
url: https://roseprimaire.com/
lang: fr
permalink: "rose-primaire"
slug: 'rose-primaire'
excerpt: Développement web et compagnie.
tags: ["Front-end", "accessibilité", "éco-conception", "CMS"]
createdAt: "2023-04-19T17:11:00.000Z"
tags: ['Front-end', 'accessibilité', 'éco-conception', 'CMS']
createdAt: '2023-04-19T17:11:00.000Z'
---

View File

@ -1,10 +1,9 @@
---
type: section
id: offre
uid: offre
lang: fr
createdAt:
image: /assets/images/home/offre-1.1.svg
order: 1
order: 1.1
quickTitle: Mes offres en freelance
quickImage: /assets/images/home/icon-desktop.svg
reference: parole-expression

View File

@ -1,6 +1,7 @@
---
type: section
lang: fr
order: 1.2
image: /assets/images/home/offre-1.2.svg
reference: rose-primaire
---

View File

@ -1,6 +1,7 @@
---
type: section
lang: fr
order: 1.3
image: /assets/images/home/offre-1.3.svg
---

View File

@ -1,9 +1,7 @@
---
type: section
id: methodology
uid: methodology
lang: fr
slug:
createdAt:
image: /assets/images/home/methodo.svg
order: 2
quickTitle: Ma méthodologie

View File

@ -1,9 +1,7 @@
---
type: section
id: about
uid: about
lang: fr
slug:
createdAt:
image: /assets/images/home/about.svg
order: 3
quickTitle: Moi

View File

@ -1,29 +0,0 @@
---
type: section
id: offre
lang: en
image: /assets/images/home/offre-1.1.svg
order: 1
quickTitle: My offers
quickImage: /assets/images/home/icon-desktop.svg
---
## Full website offer
### Small website, blog, landing page…
Whether it's a creation or a redesign, I can handle everything:
- custom development;
- configuration of a content management system (if needed);
- hosting and deploying;
- maintenance.
### Bigger websites, e-commerce
When the project is larger, I call on talented partners who share the same values:
- [Rose Primaire](https://roseprimaire.com/) for the monitoring and management of the project;
- [Sylvain Plantier](https://jedessinebien.com/) and/or [Benoît Etchevery](http://ben-etche.com/) for illustration and art direction.
[See some work here!](/en/work/)

View File

@ -1,29 +0,0 @@
---
type: section
id: methodology
lang: en
image: /assets/images/home/methodo.svg
order: 2
quickTitle: My methodology
quickImage: /assets/images/home/icon-methodo.svg
---
## Methodology
### Accessibility by default
Committed to a more accessible web, I create **websites** relying on the [french General Accessibility Guidelines (RGAA)](https://www.numerique.gouv.fr/publications/rgaa-accessibilite/) as well as the [Opquast recommandations.](https://www.opquast.com/en/making-the-web-better/)
### Sobriety by choice
I specialize in the development of **static websites**, adopting an [eco-design](https://en.wikipedia.org/wiki/Ecological_design) approach.
It means that the website is designed to only include the necessary functionalities for its use.
This methodology has **many advantages:**
- great performances;
- enhanced security;
- reduced costs;
- easier maintenance.
When the project requires it, I set up a content management system (CMS) decoupled from the interface. This ensures that **the website stays online** even if the CMS stops working.

View File

@ -1,28 +0,0 @@
---
type: section
id: about
lang: en
image: /assets/images/home/about.svg
order: 3
quickTitle: Me
quickImage: /assets/images/home/icon-heart.svg
---
## About
### Trainings myself
In order to strengthen my skills, I have completed the following training and certifications:
- [Opquast](https://directory.opquast.com/en/certificat/CTQSKP/) - Mastering Web Quality Assurance;
- Access42 - Developing and coding accessible websites (cert number: 696fa2e0-cc67-11ec-88d2-9dabf3f992d4).
### Trainings others
For several years, I have been teaching web development courses on various campuses.
### Free time
I try to contribute to [open source projects](https://git.nardu.in/explore/repos) that I enjoy.
Oh and I write [articles!](/en/articles) Articles about design and the web in general.

View File

@ -1,7 +1,7 @@
---
lang: fr
title: 2023
updatedAt: "2023-04-20T17:12:06.000Z"
title: '2023'
updatedAt: '2023-04-20T17:12:06.000Z'
---
- [mmm.page](https://build.mmm.page/) - Éditeur de sites web très simples, en glisser-déposer, pour n'importe quoi.

View File

@ -1,29 +0,0 @@
---
lang: en
title: 2023
updatedAt: "2023-04-20T17:12:06.000Z"
---
- [mmm.page](https://build.mmm.page/) - Dead simple, drag & drop websites for anything
- [Color.io](https://www.color.io/) - Online Raw Editor & Color Grading App.
- [Addy's toolkit](https://toolkit.addy.codes/) - Tools & resources for web designers & developers.
- [3D in CSS](https://garden.bradwoods.io/notes/css/3d) Explanations et examples of 3D in CSS.
- [Fable](https://fable.app) Motion design app.
- [Rive](https://rive.app) Motion design app.
- [Cake Desk](https://cakedesk.app/) Invoicing application.
- [Smooth CSS shadow](https://shadows.brumm.af/) Generator.
- [Smol CSS](https://smolcss.dev/) CSS snippets.
- [Optical adjustment](https://marvelapp.com/blog/optical-adjustment-logic-vs-designers/) Optical vs logical alignment.
- [Datawrapper](https://blog.datawrapper.de/category/datavis-dos-and-donts/) Advice on data visualization.
- [Assistivlabs](https://assistivlabs.com/) Test accessibility with real softwares.
- [`time` input done right](https://adamsilver.io/blog/designing-a-time-input-backed-by-research/) Article.
- [Tabby](https://tabby.sh) An alternative terminal app.
- [Newglyph](https://newglyph.com/) Independant foundry.
- [Headless UI](https://headlessui.com/vue/dialog) LUI librairy in vue and react.
- [Sexy privacy](https://privacy.sexy) Privacy tools for windows and macos.
- [33 JavaScript concepts](https://github.com/leonardomso/33-js-concepts) Articles.
- [Formbricks](https://formbricks.com/) Open source alternative to google form/typeform.
- [SVG loader](https://github.com/n3r4zzurr0/svg-spinners) Collection.
- [a11yphant](https://a11yphant.com/) Code challenges to learn accessibility.
- [Modern CSS](https://moderncss.dev/) CSS snippets.
- [Moderne CSS container](https://twitter.com/KevinJPowell/status/1501555193799925761) Tweet from Kevin Powell ❤️

View File

@ -1,21 +1,19 @@
---
const locale = Astro.currentLocale;
import '../styles/style.css'
import "../styles/style.css";
import Head from '../components/Head.astro'
import Header from '../components/Header.astro'
import Footer from '../components/Footer.astro'
import Head from "../components/Head.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
const { pageTitle } = Astro.props;
const { pageTitle, locale } = Astro.props
---
<html lang={locale} dir="ltr">
<html lang={locale} dir='ltr'>
<Head pageTitle={pageTitle} />
<body>
<div class="wrapper">
<div class='wrapper'>
<Header />
<main id="skip-content" role="main">
<main id='skip-content' role='main'>
<slot />
</main>
</div>

View File

@ -2,14 +2,15 @@
import BaseLayout from '../layouts/BaseLayout.astro'
import { getLangFromUrl, useTranslations } from '../utils/i18n'
const locale = getLangFromUrl(Astro.url)
const t = useTranslations(locale)
const { frontmatter, image, title } = Astro.props
const locale = frontmatter.locale
const publishedDate = new Date(frontmatter.pubDate)
const localizedDate = new Intl.DateTimeFormat(locale, {
dateStyle: 'long'
}).format(publishedDate)
const t = useTranslations(locale)
---
<BaseLayout pageTitle={title}>

View File

@ -1,24 +1,24 @@
---
import { createStaticPaths } from "astro-i18n";
import { createStaticPaths } from 'astro-i18n'
import { getCollection } from "astro:content";
import { getCollection } from 'astro:content'
import EditorialContent from "../../components/EditorialContent.astro";
import BaseLayout from "../../layouts/BaseLayout.astro";
import EditorialContent from '../../components/EditorialContent.astro'
import BaseLayout from '../../layouts/BaseLayout.astro'
export const getStaticPaths = createStaticPaths(
async ({ langCode }) => {
const articles = await getCollection("articles", ({ data }) => {
console.log(langCode);
return data.lang === langCode;
});
const articles = await getCollection('articles', ({ data }) => {
console.log(langCode)
return data.lang === langCode
})
return articles.map((article) => ({
params: { id: article.data.permalink },
props: { article },
}));
params: { id: article.data.slug },
props: { article }
}))
},
import.meta.url
);
)
// export async function getStaticPaths() {
// const articles = await getCollection("articles", ({ data }) => {
@ -28,12 +28,12 @@ export const getStaticPaths = createStaticPaths(
// console.log(articles);
// return articles.map((article) => ({
// params: { slug: article.data.permalink },
// params: { slug: article.data.slug },
// props: { article },
// }));
// }
const { article } = Astro.props;
const { article } = Astro.props
---
<BaseLayout pageTitle={article.data.title}>

View File

@ -1,36 +1,36 @@
---
import { createStaticPaths } from "astro-i18n";
import { createStaticPaths } from 'astro-i18n'
// import { astroI18n } from "astro-i18n";
import { getCollection } from "astro:content";
import EditorialContent from "../../components/EditorialContent.astro";
import { getCollection } from 'astro:content'
import EditorialContent from '../../components/EditorialContent.astro'
import BaseLayout from "../../layouts/BaseLayout.astro";
import BaseLayout from '../../layouts/BaseLayout.astro'
export const getStaticPaths = createStaticPaths(
async ({ langCode }) => {
const snippets = await getCollection("fragments", ({ data }) => {
return data.lang === langCode;
});
const snippets = await getCollection('fragments', ({ data }) => {
return data.lang === langCode
})
return snippets.map((snippet) => ({
params: { id: snippet.data.permalink },
props: { snippet },
}));
params: { id: snippet.data.slug },
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.data.permalink },
// params: { slug: snippet.data.slug },
// props: { snippet },
// }));
// }
const { snippet } = Astro.props;
const { snippet } = Astro.props
---
<BaseLayout pageTitle={snippet.data.title}>

View File

@ -1,57 +1,61 @@
---
const locale = Astro.currentLocale;
import { getCollection, render } from 'astro:content'
// import stuff
import BaseLayout from "../layouts/BaseLayout.astro";
import QuickAccessCard from "../components/QuickAccessCard.astro";
import ListCards from "../components/ListCards.astro";
import BaseLayout from '../layouts/BaseLayout.astro'
import QuickAccessCard from '../components/QuickAccessCard.astro'
import ListCards from '../components/ListCards.astro'
const pageTitle = t("accueil");
const pageTitle = 'Accueil'
// get all HP sections
const allSections = Object.values(
import.meta.glob("../data/HP/**/*.md", { eager: true })
);
// only keep the right locale version
const localizedSections = allSections.filter((section) => {
return section.frontmatter.lang === locale;
});
const HPsections = await getCollection('HPsections').then(async (entries) => {
entries.sort((a, b) => a.data.order - b.data.order)
return Promise.all(
entries.map(async (entry) => {
// render and return entry + content
const { Content } = await render(entry)
return {
...entry,
Content
}
})
)
})
// New astro content collections
import { getCollection } from "astro:content";
// Only return posts with correct lang in the frontmatter
const localizedArticles = await getCollection("articles", ({ data }) => {
return data.lang === locale && !data.draft;
});
// sort articles by descending publication date
const sortedArticles = localizedArticles.sort(
(a, b) => b.data.createdAt - a.data.createdAt
);
// Only return snippets with correct lang in the frontmatter
const localizedSnippets = await getCollection("fragments", ({ data }) => {
return data.lang === locale && !data.draft;
});
// sort articles by descending publication date
const sortedSnippets = localizedSnippets.sort(
(a, b) => b.data.createdAt - a.data.createdAt
);
const localizedReferences = await getCollection("references", ({ data }) => {
return data.lang === locale && !data.draft;
});
const allArticles = await getCollection('articles', ({ data }) => {
return !data.draft && data.lang === 'fr'
}).then((entries) =>
// sort results
entries.sort(
(a, b) => b.data.createdAt.getTime() - a.data.createdAt.getTime()
)
)
const allSnippets = await getCollection('fragments', ({ data }) => {
return !data.draft && data.lang === 'fr'
}).then((entries) =>
entries.sort(
(a, b) => b.data.createdAt.getTime() - a.data.createdAt.getTime()
)
)
const allReferences = await getCollection('references')
---
<BaseLayout pageTitle={pageTitle}>
<section class="region intro">
<h1 set:html={t("index.title")} />
<section class="quick-access">
<h2 class="intro__subtitle">{t("index.subtitle")}</h2>
<ul class="quick-access__list" role="list">
<section class='region intro'>
<h1>
Création de <span class='highlight'>sites&nbsp;web</span>
<a href='/articles/faq' class='clean-link'>sobres et accessibles</a>
</h1>
<section class='quick-access'>
<h2 class='intro__subtitle'>Apprenez-en plus sur…</h2>
<ul class='quick-access__list' role='list'>
{
localizedSections.map(
HPsections.map(
(section) =>
section.frontmatter.id && (
section.data.uid && (
<li>
<QuickAccessCard item={section.frontmatter} />
<QuickAccessCard item={section.data} />
</li>
)
)
@ -61,49 +65,43 @@ const localizedReferences = await getCollection("references", ({ data }) => {
</section>
{
localizedSections.map((section) => (
<section id={section.frontmatter.id} class="region section">
<div class="section__container">
<div class="flow section__content">
<section.Content />
{section.frontmatter.reference && (
<div class="section__reference">
HPsections.map(({ data, Content }) => (
<section id={data.uid} class='region section'>
<div class='section__container'>
<div class='flow section__content'>
<Content />
{data.reference && (
<div class='section__reference'>
<ListCards
list={localizedReferences.filter((ref) => {
return ref.data.permalink === section.frontmatter.reference;
list={allReferences.filter((ref) => {
return ref.data.slug === data.reference
})}
routeName={t("references.slug")}
routeName='references'
/>
</div>
)}
</div>
<div class="section__image">
<img
src={section.frontmatter.image}
width="400"
height="350"
alt=""
aria-hidden="true"
/>
<div class='section__image'>
<img src={data.image} width='400' height='350' alt='' />
</div>
</div>
</section>
))
}
<section class="region flow latest">
<div class="flow latest__articles">
<h2>{t("index.latestArticles")}</h2>
<ListCards list={sortedArticles} routeName={t("article.titre")} />
<p class="latest__link">
<a href={l("/articles")}>{t("index.allArticles")}</a>
<section class='region flow latest'>
<div class='flow latest__articles'>
<h2>Derniers articles</h2>
<ListCards list={allArticles} routeName='articles' />
<p class='latest__link'>
<a href='/articles'>Tous les articles</a>
</p>
</div>
<div class="flow latest__snippets">
<h2>{t("index.latestSnippets")}</h2>
<ListCards list={sortedSnippets} routeName={t("fragments.titre")} />
<p class="latest__link">
<a href={l("/fragments")}>{t("index.allSnippets")}</a>
<div class='flow latest__snippets'>
<h2>Derniers fragments</h2>
<ListCards list={allSnippets} routeName='fragments' />
<p class='latest__link'>
<a href='/fragments'>Tous les fragments</a>
</p>
</div>
</section>
@ -115,7 +113,7 @@ const localizedReferences = await getCollection("references", ({ data }) => {
position: relative;
}
.intro::before {
content: "";
content: '';
position: absolute;
top: -30%;
left: -10%;
@ -142,7 +140,7 @@ const localizedReferences = await getCollection("references", ({ data }) => {
}
.intro__subtitle {
margin: var(--space-s-m) 0;
font-family: "wotfard";
font-family: 'wotfard';
font-weight: 500;
text-align: center;
color: var(--color-dark-blue);

View File

@ -1,44 +1,40 @@
---
// init i18n
import { l, t, astroI18n } from "astro-i18n";
astroI18n.init(Astro);
import BaseLayout from "../layouts/BaseLayout.astro";
import BaseLayout from '../layouts/BaseLayout.astro'
// New astro content collections
import { getCollection } from "astro:content";
import { getCollection } from 'astro:content'
// get all articles
const localizedArticles = await getCollection("articles", ({ data }) => {
return data.lang === astroI18n.langCode && !data.draft;
});
const allArticles = await getCollection('articles', ({ data }) => {
return !data.draft
})
// get all snippets
const localizedFragments = await getCollection("fragments", ({ data }) => {
return data.lang === astroI18n.langCode && !data.draft;
});
const allFragments = await getCollection('fragments', ({ data }) => {
return !data.draft
})
const pageTitle = t("sitemap");
const pageTitle = 'Plan du site'
---
<BaseLayout pageTitle={pageTitle}>
<section class="region">
<h1>{t("sitemap")}</h1>
<ul class="flow sitemap" role="list">
<section class='region'>
<h1>{pageTitle}</h1>
<ul class='flow sitemap' role='list'>
<li>
<h2>
<a href={l("/")}>{t("accueil")}</a>
<a href='/'>Accueil</a>
</h2>
</li>
<li>
<h2>
<a href={l("/articles")}>{t("article.titre")}</a>
<a href='/articles'>Articles</a>
</h2>
<ul>
{
localizedArticles.map((article) => (
allArticles.map((article) => (
<li>
<a href={l("/articles/[slug]", { slug: article.slug })}>
{article.data.title}
<a href={`/articles/${article.data.slug}`}>
{article.data.title} <sup>({article.data.lang})</sup>
</a>
</li>
))
@ -47,14 +43,17 @@ const pageTitle = t("sitemap");
</li>
<li>
<h2>
<a href={l("/fragments")}>{t("fragments.titre")}</a>
<a href='/fragments'>Fragments</a>
</h2>
<ul>
{
localizedFragments.map((fragment) => (
allFragments.map((fragment) => (
<li>
<a href={l("/fragments/[slug]", { slug: fragment.slug })}>
{fragment.data.title}
<a
href={`/fragments/${fragment.id}`}
lang={fragment.data.lang !== 'fr' ? fragment.data.lang : null}
>
{fragment.data.title} <sup>({fragment.data.lang})</sup>
</a>
</li>
))
@ -63,12 +62,12 @@ const pageTitle = t("sitemap");
</li>
<li>
<h2>
<a href={l("/references")}>{t("references.titre")}</a>
<a href='/references'>Références</a>
</h2>
</li>
<li>
<h2>
<a href={l("/veille")}>{t("veille.titre")}</a>
<a href='/veille'>Veille</a>
</h2>
</li>
</ul>
@ -76,11 +75,13 @@ const pageTitle = t("sitemap");
</BaseLayout>
<style>
h2 {
text-transform: capitalize;
}
.sitemap * + * {
margin-block-start: 20px;
margin-block-start: var(--space-s);
}
.sitemap > * + * {
margin-block-start: var(--space-l);
}
sup {
font-weight: normal;
}
</style>

View File

@ -1,19 +1,19 @@
import rss from "@astrojs/rss";
import { getCollection } from "astro:content";
import rss from '@astrojs/rss'
import { getCollection } from 'astro:content'
export async function get(context) {
const articles = await getCollection("articles", ({ data }) => {
return data.lang === "fr" && !data.draft;
});
const fragments = await getCollection("fragments", ({ data }) => {
return data.lang === "fr" && !data.draft;
});
const posts = articles.concat(fragments);
const articles = await getCollection('articles', ({ data }) => {
return data.lang === 'fr' && !data.draft
})
const fragments = await getCollection('fragments', ({ data }) => {
return data.lang === 'fr' && !data.draft
})
const posts = articles.concat(fragments)
return rss({
// `<title>` field in output xml
title: "Nicolas Arduin",
title: 'Nicolas Arduin',
// `<description>` field in output xml
description: "Articles publiés sur nardu.in",
description: 'Articles publiés sur nardu.in',
// Pull in your project "site" from the endpoint context
// https://docs.astro.build/en/reference/api-reference/#contextsite
site: context.site,
@ -26,9 +26,9 @@ export async function get(context) {
lang: post.data.lang,
// Compute RSS link from post `slug`
// This example assumes all posts are rendered as `/blog/[slug]` routes
link: `/${post.data.type}/${post.data.permalink}/`,
link: `/${post.data.type}/${post.data.slug}/`
})),
// (optional) inject custom xml
customData: `<language>fr-fr</language>`,
});
customData: `<language>fr-fr</language>`
})
}