v5 migration + remove i18n
This commit is contained in:
parent
b7ce5b7f20
commit
b2b6887fdf
48
.astro/collections/HPsections.schema.json
Normal file
48
.astro/collections/HPsections.schema.json
Normal 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#"
|
||||||
|
}
|
61
.astro/collections/articles.schema.json
Normal file
61
.astro/collections/articles.schema.json
Normal 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#"
|
||||||
|
}
|
61
.astro/collections/fragments.schema.json
Normal file
61
.astro/collections/fragments.schema.json
Normal 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#"
|
||||||
|
}
|
61
.astro/collections/references.schema.json
Normal file
61
.astro/collections/references.schema.json
Normal 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#"
|
||||||
|
}
|
32
.astro/collections/veille.schema.json
Normal file
32
.astro/collections/veille.schema.json
Normal 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#"
|
||||||
|
}
|
1
.astro/content-assets.mjs
Normal file
1
.astro/content-assets.mjs
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default new Map();
|
18
.astro/content-modules.mjs
Normal file
18
.astro/content-modules.mjs
Normal 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
206
.astro/content.d.ts
vendored
Normal 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
1
.astro/data-store.json
Normal file
File diff suppressed because one or more lines are too long
5
.astro/settings.json
Normal file
5
.astro/settings.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"_variables": {
|
||||||
|
"lastUpdateCheck": 1735403503212
|
||||||
|
}
|
||||||
|
}
|
485
.astro/types.d.ts
vendored
485
.astro/types.d.ts
vendored
@ -1,483 +1,2 @@
|
|||||||
declare module 'astro:content' {
|
/// <reference types="astro/client" />
|
||||||
interface Render {
|
/// <reference path="content.d.ts" />
|
||||||
'.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");
|
|
||||||
}
|
|
11
.vscode/settings.json
vendored
11
.vscode/settings.json
vendored
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"editor.insertSpaces": false,
|
"editor.insertSpaces": false,
|
||||||
"editor.detectIndentation": false,
|
"editor.detectIndentation": false,
|
||||||
"editor.tabSize": 2
|
"editor.tabSize": 2,
|
||||||
|
"astro.content-intellisense": true
|
||||||
}
|
}
|
||||||
|
53
package.json
53
package.json
@ -1,30 +1,27 @@
|
|||||||
{
|
{
|
||||||
"name": "@example/minimal",
|
"name": "nardude",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "3.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro-i18n sync && astro dev",
|
"dev": "astro dev",
|
||||||
"start": "astro dev",
|
"build": "astro build",
|
||||||
"build": "astro build",
|
"preview": "astro preview",
|
||||||
"preview": "astro preview",
|
"astro": "astro"
|
||||||
"astro": "astro",
|
},
|
||||||
"i18n:install": "astro-i18n install",
|
"dependencies": {
|
||||||
"i18n:sync": "astro-i18n sync"
|
"@astrojs/mdx": "4.0.3",
|
||||||
},
|
"@astrojs/rss": "4.0.10",
|
||||||
"dependencies": {
|
"@astrojs/sitemap": "3.2.1",
|
||||||
"@astrojs/mdx": "4.0.3",
|
"@astrojs/ts-plugin": "^1.10.4",
|
||||||
"@astrojs/rss": "4.0.10",
|
"astro": "5.1.1",
|
||||||
"@astrojs/sitemap": "3.2.1",
|
"sharp": "^0.33.5"
|
||||||
"@astrojs/ts-plugin": "^1.10.4",
|
},
|
||||||
"astro": "5.1.1",
|
"devDependencies": {
|
||||||
"sharp": "^0.33.5"
|
"autoprefixer": "^10.4.20",
|
||||||
},
|
"postcss": "^8.4.49",
|
||||||
"devDependencies": {
|
"prettier": "^3.4.2",
|
||||||
"autoprefixer": "^10.4.20",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"postcss": "^8.4.49",
|
"prettier-plugin-organize-imports": "^4.1.0"
|
||||||
"prettier": "^3.4.2",
|
}
|
||||||
"prettier-plugin-astro": "^0.14.1",
|
|
||||||
"prettier-plugin-organize-imports": "^4.1.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
// if h/w attributes are declared, use them. If not, use from the source file
|
||||||
const imgHeight = height ? height : src.height;
|
const imgHeight = height ? height : src.height
|
||||||
const imgWidth = width ? width : src.width;
|
const imgWidth = width ? width : src.width
|
||||||
|
|
||||||
// compute avif and webp format in order to use inside a <picture> element
|
// compute avif and webp format in order to use inside a <picture> element
|
||||||
const imgAvif = await getImage({
|
const imgAvif = await getImage({
|
||||||
src: src,
|
src: src,
|
||||||
format: "avif",
|
format: 'avif',
|
||||||
width: Number(imgWidth),
|
width: Number(imgWidth),
|
||||||
height: Number(imgHeight),
|
height: Number(imgHeight)
|
||||||
});
|
})
|
||||||
const imgWebp = await getImage({
|
const imgWebp = await getImage({
|
||||||
src: src,
|
src: src,
|
||||||
format: "webp",
|
format: 'webp',
|
||||||
// need Number() because sharp wants an integer and not a string for w/h
|
// need Number() because sharp wants an integer and not a string for w/h
|
||||||
width: Number(imgWidth),
|
width: Number(imgWidth),
|
||||||
height: Number(imgHeight),
|
height: Number(imgHeight)
|
||||||
});
|
})
|
||||||
---
|
---
|
||||||
|
|
||||||
<picture>
|
<picture>
|
||||||
<source
|
<source
|
||||||
srcset={imgAvif.src}
|
srcset={imgAvif.src}
|
||||||
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
|
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
|
||||||
type="image/avif"
|
type='image/avif'
|
||||||
/>
|
/>
|
||||||
<source
|
<source
|
||||||
srcset={imgWebp.src}
|
srcset={imgWebp.src}
|
||||||
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
|
sizes={`(max-inline-size: ${imgWidth}px) 100vw, ${imgHeight}px`}
|
||||||
type="image/webp"
|
type='image/webp'
|
||||||
/>
|
/>
|
||||||
<Image
|
<Image
|
||||||
src={src}
|
src={src}
|
||||||
width={Number(imgWidth)}
|
width={Number(imgWidth)}
|
||||||
height={Number(imgHeight)}
|
height={Number(imgHeight)}
|
||||||
format="jpg"
|
format='jpg'
|
||||||
alt={alt ? alt : ""}
|
alt={alt ? alt : ''}
|
||||||
{...attrs}
|
{...attrs}
|
||||||
/>
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
---
|
---
|
||||||
import ListTags from "./ListTags.astro";
|
import ListTags from './ListTags.astro'
|
||||||
import { l, t } from "astro-i18n";
|
|
||||||
|
|
||||||
const { item, routeName } = Astro.props;
|
const { item, routeName } = Astro.props
|
||||||
|
|
||||||
// no link on references cards
|
// 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>
|
<h3>
|
||||||
{
|
{
|
||||||
!isReference ? (
|
!isReference ? (
|
||||||
<a
|
<a
|
||||||
class="clean-link card__link"
|
class='clean-link card__link'
|
||||||
href={`${l(`/${routeName}`)}/${item.data.permalink}`}
|
href={`/${routeName}/${item.data.slug}`}
|
||||||
>
|
>
|
||||||
{item.data.title}
|
{item.data.title}
|
||||||
</a>
|
</a>
|
||||||
@ -27,15 +26,15 @@ const isReference = routeName === t("references.slug");
|
|||||||
<ListTags list={item.data.tags} />
|
<ListTags list={item.data.tags} />
|
||||||
{
|
{
|
||||||
isReference && (
|
isReference && (
|
||||||
<a href={item.data.url} rel="noopener noreferer">
|
<a href={item.data.url} rel='noopener noreferer'>
|
||||||
{t("references.cta")}
|
Consulter le site
|
||||||
<span class="sr-only"> {item.data.title}</span>
|
<span class='sr-only'> {item.data.title}</span>
|
||||||
</a>
|
</a>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style define:vars={{ permalink: item.data.permalink }}>
|
<style define:vars={{ slug: item.data.slug }}>
|
||||||
.card {
|
.card {
|
||||||
padding: var(--space-s-m) var(--space-xs-s);
|
padding: var(--space-s-m) var(--space-xs-s);
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -56,14 +55,14 @@ const isReference = routeName === t("references.slug");
|
|||||||
box-shadow: var(--shadow-elevation-high);
|
box-shadow: var(--shadow-elevation-high);
|
||||||
}
|
}
|
||||||
.card--link::after {
|
.card--link::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inline-size: 30px;
|
inline-size: 30px;
|
||||||
block-size: 30px;
|
block-size: 30px;
|
||||||
top: var(--space-m);
|
top: var(--space-m);
|
||||||
right: var(--space-s);
|
right: var(--space-s);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
background-image: url("/assets/svg/arrow-right.svg");
|
background-image: url('/assets/svg/arrow-right.svg');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
@ -82,7 +81,7 @@ const isReference = routeName === t("references.slug");
|
|||||||
color: var(--color-brique);
|
color: var(--color-brique);
|
||||||
}
|
}
|
||||||
.card--link::before {
|
.card--link::before {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@ -109,7 +108,7 @@ const isReference = routeName === t("references.slug");
|
|||||||
color: var(--color-blue);
|
color: var(--color-blue);
|
||||||
}
|
}
|
||||||
.card__link::after {
|
.card__link::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
}
|
}
|
||||||
@ -121,10 +120,12 @@ const isReference = routeName === t("references.slug");
|
|||||||
transition: transform 0.2s ease-in-out;
|
transition: transform 0.2s ease-in-out;
|
||||||
}
|
}
|
||||||
.card::after {
|
.card::after {
|
||||||
transition: opacity ease 0.2s, transform ease 0.2s;
|
transition:
|
||||||
|
opacity ease 0.2s,
|
||||||
|
transform ease 0.2s;
|
||||||
}
|
}
|
||||||
.card--link {
|
.card--link {
|
||||||
view-transition-name: var(--permalink);
|
view-transition-name: var(--slug);
|
||||||
}
|
}
|
||||||
h3 a {
|
h3 a {
|
||||||
transition: color ease 0.2s;
|
transition: color ease 0.2s;
|
||||||
|
@ -1,34 +1,33 @@
|
|||||||
---
|
---
|
||||||
import { render } from "astro:content";
|
import { render } from 'astro:content'
|
||||||
|
|
||||||
import MetaDate from "./MetaDate.astro";
|
import MetaDate from './MetaDate.astro'
|
||||||
import TOC from "./TOC.astro";
|
import TOC from './TOC.astro'
|
||||||
|
|
||||||
const { content } = Astro.props;
|
const { content } = Astro.props
|
||||||
const { Content, headings } = await render(content);
|
const { Content, headings } = await render(content)
|
||||||
|
|
||||||
const toc = headings.map((heading) => {
|
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} />
|
<TOC toc={toc} />
|
||||||
<article class="flow editorial">
|
<article class='flow editorial'>
|
||||||
<h1>{content.data.title}</h1>
|
<h1>{content.data.title}</h1>
|
||||||
<p class="h3">{content.data.subtitle}</p>
|
<p class='h3'>{content.data.subtitle}</p>
|
||||||
<MetaDate item={content.data} />
|
<MetaDate item={content.data} />
|
||||||
<!-- <div class="flow content" set:html={html}> -->
|
|
||||||
<Content />
|
<Content />
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style define:vars={{ permalink: content.data.permalink }}>
|
<style define:vars={{ slug: content.data.slug }}>
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
article {
|
article {
|
||||||
view-transition-name: var(--permalink);
|
view-transition-name: var(--slug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sidebar {
|
.sidebar {
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
---
|
<footer class='footer' role='contentinfo'>
|
||||||
import { l, t } from "astro-i18n";
|
<section class='flow'>
|
||||||
---
|
|
||||||
|
|
||||||
<footer class="footer" role="contentinfo">
|
|
||||||
<section class="flow">
|
|
||||||
<p>Nicolas Arduin</p>
|
<p>Nicolas Arduin</p>
|
||||||
<p>{t("tagline")}</p>
|
<p>Développeur web spécialisé en accessibilité.</p>
|
||||||
<ul class="flow" role="list">
|
<ul class='flow' role='list'>
|
||||||
<li>
|
<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
|
>contact@nardu.in</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<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>
|
||||||
<li><a href={l("/veille")}>{t("veille.titre")}</a></li>
|
<li><a href='/veille'>Veille</a></li>
|
||||||
<li><a href={l("/plan-du-site")}>{t("sitemap")}</a></li>
|
<li><a href='/plan-du-site'>Plan du site</a></li>
|
||||||
<li><a href={`${l("/")}rss.xml`}>RSS</a></li>
|
<li><a href='/"rss.xml'>RSS</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
---
|
---
|
||||||
import { t } from "astro-i18n";
|
const { pageTitle } = Astro.props
|
||||||
const { pageTitle } = Astro.props;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset='utf-8' />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel='icon' type='image/svg+xml' href='/favicon.svg' />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
||||||
<title>{pageTitle} - Nicolas Arduin</title>
|
<title>{pageTitle} - Nicolas Arduin</title>
|
||||||
<meta name="description" content={t("seo.meta.description")} />
|
<meta
|
||||||
<meta name="robots" content="index,follow." />
|
name='description'
|
||||||
<meta name="author" content="Nicolas Arduin" />
|
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="subject" content="Développement de sites web, accessibilité." />
|
/>
|
||||||
<meta name="view-transition" content="same-origin" />
|
<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>
|
</head>
|
||||||
|
@ -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">
|
<header role='banner'>
|
||||||
<a href="#skip-content" class="skip-link"> {t("header.skipLink")}</a>
|
<a href='#skip-content' class='skip-link'>Accéder au contenu</a>
|
||||||
<div class="container">
|
<div class='container'>
|
||||||
<a href={l("/")} class="logo clean-link" aria-label={t("header.homeLink")}
|
<a href='/' class='logo clean-link'>nardu.in</a>
|
||||||
>nardu.in</a
|
|
||||||
>
|
|
||||||
<Navigation />
|
<Navigation />
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
import { languages } from '../i18n/ui'
|
|
||||||
---
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{
|
|
||||||
Object.entries(languages).map(([lang, label]) => (
|
|
||||||
<li>
|
|
||||||
<a href={`/${lang}/`}>{label}</a>
|
|
||||||
</li>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</ul>
|
|
@ -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) => (
|
list.map((item) => (
|
||||||
<li class="list__item">
|
<li class='list__item'>
|
||||||
<CardEditorial item={item} routeName={routeName} />
|
<CardEditorial item={item} routeName={routeName} />
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
|
@ -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) => (
|
list.map((tag, index) => (
|
||||||
<li>
|
<li>
|
||||||
{tag}{index + 1 < list.length && <span>, </span>}
|
{tag}
|
||||||
|
{index + 1 < list.length && <span>, </span>}
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,41 @@
|
|||||||
---
|
---
|
||||||
import { t, astroI18n } from "astro-i18n";
|
const { item } = Astro.props
|
||||||
astroI18n.init(Astro);
|
const locale: 'fr' | 'en' = item.frontmatter.lang
|
||||||
|
|
||||||
const { item } = Astro.props;
|
let ui = {
|
||||||
|
published: 'Publié le',
|
||||||
|
updated: 'Mis à jour le'
|
||||||
|
}
|
||||||
|
|
||||||
function formatDate(date) {
|
switch (locale) {
|
||||||
const options = { year: "numeric", month: "long", day: "numeric" };
|
case 'en':
|
||||||
return new Date(date).toLocaleDateString(astroI18n.langCode, options);
|
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
|
// 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
|
// see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#attr-datetime for valid formats
|
||||||
function rawDate(date) {
|
function rawDate(date: Date) {
|
||||||
return new Date(date).toISOString();
|
return new Date(date).toISOString()
|
||||||
}
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="meta">
|
<div class='meta'>
|
||||||
{
|
{
|
||||||
!!item.createdAt && (
|
!!item.createdAt && (
|
||||||
<p class="meta__date">
|
<p class='meta__date'>
|
||||||
{t("meta.publication")} :
|
{ui.published} :
|
||||||
<time datetime={rawDate(item.createdAt)}>
|
<time datetime={rawDate(item.createdAt)}>
|
||||||
{formatDate(item.createdAt)}
|
{formatDate(item.createdAt)}
|
||||||
</time>
|
</time>
|
||||||
@ -31,8 +46,8 @@ function rawDate(date) {
|
|||||||
formatDate(item.createdAt) != formatDate(item.updatedAt) &&
|
formatDate(item.createdAt) != formatDate(item.updatedAt) &&
|
||||||
!!item.createdAt &&
|
!!item.createdAt &&
|
||||||
!!item.updatedAt && (
|
!!item.updatedAt && (
|
||||||
<p class="meta__date">
|
<p class='meta__date'>
|
||||||
{t("meta.modification")} :
|
{ui.updated} :
|
||||||
<time datetime={rawDate(item.updatedAt)}>
|
<time datetime={rawDate(item.updatedAt)}>
|
||||||
{formatDate(item.updatedAt)}
|
{formatDate(item.updatedAt)}
|
||||||
</time>
|
</time>
|
||||||
@ -41,8 +56,8 @@ function rawDate(date) {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
!item.createdAt && !!item.updatedAt && (
|
!item.createdAt && !!item.updatedAt && (
|
||||||
<p class="meta__date">
|
<p class='meta__date'>
|
||||||
{t("meta.modification")} :
|
{ui.updated} :
|
||||||
<time datetime={rawDate(item.updatedAt)}>
|
<time datetime={rawDate(item.updatedAt)}>
|
||||||
{formatDate(item.updatedAt)}
|
{formatDate(item.updatedAt)}
|
||||||
</time>
|
</time>
|
||||||
|
@ -1,37 +1,24 @@
|
|||||||
---
|
<nav role='navigation' aria-label='Menu principal'>
|
||||||
import { t, l } from "astro-i18n";
|
<ul class='main-nav' role='list'>
|
||||||
import LanguageSwitcher from "./LangSwitcher.astro";
|
|
||||||
---
|
|
||||||
|
|
||||||
<nav role="navigation" aria-label={t("header.mainNav")}>
|
|
||||||
<ul class="main-nav" role="list">
|
|
||||||
<li>
|
<li>
|
||||||
<a href={l("/articles")} class="clean-link nice-link"
|
<a href='/articles' class='clean-link nice-link'>Articles </a>
|
||||||
>{t("article.titre")} </a
|
<span aria-hidden='true'>·</span>
|
||||||
>
|
|
||||||
<span aria-hidden="true">·</span>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href={l("/fragments")} class="clean-link nice-link"
|
<a href='/fragments' class='clean-link nice-link'>Fragments </a>
|
||||||
>{t("fragments.titre")} </a
|
<span aria-hidden='true'>·</span>
|
||||||
>
|
|
||||||
<span aria-hidden="true">·</span>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href={l("/references")} class="clean-link nice-link"
|
<a href='/references' class='clean-link nice-link'>Références </a>
|
||||||
>{t("references.titre")} </a
|
<span aria-hidden='true'>·</span>
|
||||||
>
|
|
||||||
<span aria-hidden="true">·</span>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="mailto:contact@nardu.in"
|
href='mailto:contact@nardu.in'
|
||||||
class="clean-link nice-link"
|
class='clean-link nice-link'
|
||||||
title={t("contact.email")}>{t("contact.title")}</a
|
title='Envoyez-moi un mail (ouverture du logiciel automatique).'
|
||||||
><span aria-hidden="true"> |</span>
|
>contact</a
|
||||||
</li>
|
>
|
||||||
<li>
|
|
||||||
<LanguageSwitcher />
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
---
|
---
|
||||||
const { item } = Astro.props;
|
const { item } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="card">
|
<div class='card'>
|
||||||
<div class="card-container">
|
<div class='card-container'>
|
||||||
<div class="card__illustration">
|
<div class='card__illustration'>
|
||||||
<img
|
<img
|
||||||
src={item.quickImage}
|
src={item.quickImage}
|
||||||
width="150"
|
width='150'
|
||||||
height="150"
|
height='150'
|
||||||
alt=""
|
alt=''
|
||||||
aria-hidden="true"
|
aria-hidden='true'
|
||||||
/>
|
/>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ const { item } = Astro.props;
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.card__link::after {
|
.card__link::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
---
|
---
|
||||||
import { t } from "astro-i18n";
|
const { toc } = Astro.props
|
||||||
const { toc } = Astro.props;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<aside class="table-of-content">
|
<aside class='table-of-content'>
|
||||||
<details open="true">
|
<details open='true'>
|
||||||
<summary>{t("index.toc")}</summary>
|
<summary id='toc-title'>Table des matières</summary>
|
||||||
<nav role="navigation" aria-label={t("index.toc")}>
|
<nav role='navigation' aria-labelledby='toc-title'>
|
||||||
<ol class="table-of-content__list" role="list">
|
<ol class='table-of-content__list' role='list'>
|
||||||
{
|
{
|
||||||
// loop over the toc
|
// loop over the toc
|
||||||
toc.map(
|
toc.map(
|
||||||
@ -17,14 +16,14 @@ const { toc } = Astro.props;
|
|||||||
) =>
|
) =>
|
||||||
heading.depth === 2 ? (
|
heading.depth === 2 ? (
|
||||||
<li>
|
<li>
|
||||||
<a href={`#${heading.slug}`} class="toc-2">
|
<a href={`#${heading.slug}`} class='toc-2'>
|
||||||
{heading.text}
|
{heading.text}
|
||||||
</a>
|
</a>
|
||||||
</li> // if h3, set as inner ol > li
|
</li> // if h3, set as inner ol > li
|
||||||
) : heading.depth === 3 ? (
|
) : heading.depth === 3 ? (
|
||||||
<ol role="list">
|
<ol role='list'>
|
||||||
<li>
|
<li>
|
||||||
<a href={`#${heading.slug}`} class="toc-3">
|
<a href={`#${heading.slug}`} class='toc-3'>
|
||||||
{heading.text}
|
{heading.text}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -70,7 +69,7 @@ const { toc } = Astro.props;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table-of-content__list a::before {
|
.table-of-content__list a::before {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -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({
|
const articles = defineCollection({
|
||||||
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/articles" }),
|
loader: glob({
|
||||||
schema: z.object({
|
pattern: '**/[^_]*.{md,mdx}',
|
||||||
title: z.string(),
|
base: './src/content/articles'
|
||||||
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,
|
|
||||||
}),
|
}),
|
||||||
});
|
schema: articleSchema
|
||||||
|
})
|
||||||
|
|
||||||
const fragments = defineCollection({
|
const fragments = defineCollection({
|
||||||
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/fragments" }),
|
loader: glob({
|
||||||
schema: z.object({
|
pattern: '**/[^_]*.{md,mdx}',
|
||||||
title: z.string(),
|
base: './src/content/fragments'
|
||||||
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,
|
|
||||||
}),
|
}),
|
||||||
});
|
schema: fragmentSchema
|
||||||
|
})
|
||||||
|
|
||||||
const references = defineCollection({
|
const references = defineCollection({
|
||||||
loader: glob({ pattern: '**/[^_]*.md', base: "./src/content/references" }),
|
loader: glob({
|
||||||
schema: z.object({
|
pattern: '**/[^_]*.{md,mdx}',
|
||||||
title: z.string(),
|
base: './src/content/references'
|
||||||
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,
|
|
||||||
}),
|
}),
|
||||||
});
|
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 = {
|
export const collections = {
|
||||||
// Don't forget 'quotes' for collection names containing dashes
|
// Don't forget 'quotes' for collection names containing dashes
|
||||||
articles,
|
articles,
|
||||||
fragments,
|
fragments,
|
||||||
references,
|
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'>
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
title: Nico v2.0
|
title: Nico v2.0
|
||||||
subtitle: 2022 update of many things.
|
subtitle: 2022 update of many things.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "2022"
|
slug: 'en-2022'
|
||||||
excerpt: Changes in my services, the website and myself.
|
excerpt: Changes in my services, the website and myself.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
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.
|
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.
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
title: Nico v2.5
|
title: Nico v2.5
|
||||||
subtitle: Update 2023.
|
subtitle: Update 2023.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "2023"
|
slug: 'en-2023'
|
||||||
excerpt: New changes.
|
excerpt: New changes.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2023-02-03T17:41:00.000Z"
|
createdAt: '2023-02-03T17:41:00.000Z'
|
||||||
updatedAt: "2023-05-17T17: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.
|
This article will be updated when I have something new to share during the year 2023.
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
title: After Effects Expressions
|
title: After Effects Expressions
|
||||||
subtitle: Animation on steroïds.
|
subtitle: Animation on steroïds.
|
||||||
lang: en
|
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!
|
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
|
type: articles
|
||||||
createdAt: "2019-04-24T09:00:00.000Z"
|
createdAt: '2019-04-24T09:00:00.000Z'
|
||||||
code: true
|
code: true
|
||||||
---
|
---
|
||||||
|
|
||||||
import AstroImage from "../../../components/AstroImage.astro";
|
import AstroImage from '../../../components/AstroImage.astro'
|
||||||
|
|
||||||
## An ever lasting battle
|
## 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.
|
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
|
<AstroImage
|
||||||
src="https://assets.nardu.in/basic_expression_d81b12f1ac.jpeg"
|
src='https://assets.nardu.in/basic_expression_d81b12f1ac.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="80"
|
height='80'
|
||||||
alt="Parenting the position of the form to a null creates an expression."
|
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.
|
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.
|
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
|
<AstroImage
|
||||||
src="https://assets.nardu.in/shortcut_39cc19d383.jpeg"
|
src='https://assets.nardu.in/shortcut_39cc19d383.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="322"
|
height='322'
|
||||||
alt="Alt + Click the stopwatch to access the shortcuts."
|
alt='Alt + Click the stopwatch to access the shortcuts.'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
## So I need to learn javascript to do motion design now?
|
## 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
|
- On the effect menu add expression options > slider control
|
||||||
- Alt + Click the Source text property
|
- Alt + Click the Source text property
|
||||||
|
|
||||||
<video width="728" loop controls preload="metadata">
|
<video width='728' loop controls preload='metadata'>
|
||||||
<source src="https://assets.nardu.in/alt-counter.mp4" type="video/mp4" />
|
<source src='https://assets.nardu.in/alt-counter.mp4' type='video/mp4' />
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
- Parent the source text to the slider control through the pickwhip.
|
- Parent the source text to the slider control through the pickwhip.
|
||||||
|
|
||||||
<video width="462" loop controls preload="metadata">
|
<video width='462' loop controls preload='metadata'>
|
||||||
<source src="https://assets.nardu.in/pickwhip.mp4" type="video/mp4" />
|
<source src='https://assets.nardu.in/pickwhip.mp4' type='video/mp4' />
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
You should get something like this in the expressions panel:
|
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.
|
- 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.
|
- 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">
|
<video width='728' loop controls preload='metadata'>
|
||||||
<source src="https://assets.nardu.in/round.mp4" type="video/mp4" />
|
<source src='https://assets.nardu.in/round.mp4' type='video/mp4' />
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
```javascript
|
```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")) + '%'
|
Math.round(effect("Slider Control")("Slider")) + '%'
|
||||||
```
|
```
|
||||||
|
|
||||||
<video width="538" loop controls preload="metadata">
|
<video width='538' loop controls preload='metadata'>
|
||||||
<source src="https://assets.nardu.in/percent.mp4" type="video/mp4" />
|
<source src='https://assets.nardu.in/percent.mp4' type='video/mp4' />
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
**And there we go!** A fully functioning and customizable counter using a slider controller and expressions.
|
**And there we go!** A fully functioning and customizable counter using a slider controller and expressions.
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
title: Accessibility and sobriety
|
title: Accessibility and sobriety
|
||||||
subtitle: Translation in progress, stay tuned ;)
|
subtitle: Translation in progress, stay tuned ;)
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "faq"
|
slug: 'en-faq'
|
||||||
draft: true
|
draft: true
|
||||||
excerpt: Why, how et and especially what.
|
excerpt: Why, how et and especially what.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2022-06-22T15:34:45.000Z"
|
createdAt: '2022-06-22T15:34:45.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Go back to available articles](/en/articles)
|
[Go back to available articles](/en/articles)
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
title: Gratuiste
|
title: Gratuiste
|
||||||
subtitle: Translation in progress, stay tuned ;)
|
subtitle: Translation in progress, stay tuned ;)
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "gratuiste"
|
slug: 'en-gratuiste'
|
||||||
draft: true
|
draft: true
|
||||||
excerpt: Translation in progress, stay tuned ;)
|
excerpt: Translation in progress, stay tuned ;)
|
||||||
tags: ["Design", "Freelance"]
|
tags: ['Design', 'Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2017-05-27T07:47:36.000Z"
|
createdAt: '2017-05-27T07:47:36.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Go back to available articles](/en/articles)
|
[Go back to available articles](/en/articles)
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
---
|
---
|
||||||
title: "Access blocked Sci-hub"
|
title: 'Access blocked Sci-hub'
|
||||||
subtitle: "The science of sharing."
|
subtitle: 'The science of sharing.'
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "sci-hub-unblock"
|
slug: 'en-sci-hub-unblock'
|
||||||
key: "scihub"
|
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."
|
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"]
|
tags: ['Internet', 'Science']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2019-03-31T07:47:36.000Z"
|
createdAt: '2019-03-31T07:47:36.000Z'
|
||||||
updatedAt: "2022-12-27T12:08:00.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>
|
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.
|
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
|
<AstroImage
|
||||||
src="https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg"
|
src='https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="1060"
|
height='1060'
|
||||||
alt="MacOS network and DNS settings"
|
alt='MacOS network and DNS settings'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Windows (10)
|
### 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.
|
From there, you can add DNS servers. Click save. You might need to restart your computer for the changes to work.
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-settings.jpg"
|
src='https://assets.nardu.in/sci-hub-settings.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="319"
|
height='319'
|
||||||
alt="Windows system settings"
|
alt='Windows system settings'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-network.jpg"
|
src='https://assets.nardu.in/sci-hub-network.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="803"
|
height='803'
|
||||||
alt="Windows network settings"
|
alt='Windows network settings'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-adapter.jpg"
|
src='https://assets.nardu.in/sci-hub-adapter.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="327"
|
height='327'
|
||||||
alt="Windows network connections settings"
|
alt='Windows network connections settings'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-adapter-settings.jpg"
|
src='https://assets.nardu.in/sci-hub-adapter-settings.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="434"
|
height='434'
|
||||||
alt="Windows network adapter settings"
|
alt='Windows network adapter settings'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
## Which DNS?
|
## Which DNS?
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
title: The day I Jam’d
|
title: The day I Jam’d
|
||||||
subtitle: A story of unusual tools and fun gambles.
|
subtitle: A story of unusual tools and fun gambles.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "the-day-I-jamd"
|
slug: 'en-the-day-I-jamd'
|
||||||
excerpt: Ooh, yeah! All right! We’re jammin’
|
excerpt: Ooh, yeah! All right! We’re jammin’
|
||||||
tags: ["Dev", "Jamstack"]
|
tags: ['Dev', 'Jamstack']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2020-10-08T09:00:00.000Z"
|
createdAt: '2020-10-08T09:00:00.000Z'
|
||||||
updatedAt: "2022-12-27T15:40:06.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
|
## The not so easy choice
|
||||||
|
|
||||||
@ -31,10 +31,10 @@ Boy did they exceed my expectations! With almost no optimization on the static s
|
|||||||
### wordpress
|
### wordpress
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/wordpress_8ee6f54b98.jpeg"
|
src='https://assets.nardu.in/wordpress_8ee6f54b98.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="412"
|
height='412'
|
||||||
alt="Performance score of 53/100 on Wordpress."
|
alt='Performance score of 53/100 on Wordpress.'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Despite a lot of efforts I could not do better. I’m no expert in caching, do not use CDN and relied on plugins to achieve a lot of stuff (php not being my strongest skill 😬).
|
Despite a lot of efforts I could not do better. I’m 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. I’m no expert in caching, do n
|
|||||||
### 11ty + strapi
|
### 11ty + strapi
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/static_2c0d9f1eb8.jpeg"
|
src='https://assets.nardu.in/static_2c0d9f1eb8.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="412"
|
height='412'
|
||||||
alt="Performance score of 97/100 on jamstack."
|
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**… I’ll take it!
|
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**… I’ll take it!
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
title: Video compression
|
title: Video compression
|
||||||
subtitle: Encode like you mean it.
|
subtitle: Encode like you mean it.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "video-compression"
|
slug: 'en-video-compression'
|
||||||
excerpt: How to gain precious weight when encoding videos.
|
excerpt: How to gain precious weight when encoding videos.
|
||||||
tags: ["Design"]
|
tags: ['Design']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2021-05-05T09:00:00.000Z"
|
createdAt: '2021-05-05T09:00:00.000Z'
|
||||||
updatedAt: "2022-06-08T14:24:06.000Z"
|
updatedAt: '2022-06-08T14:24:06.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
import AstroImage from "../../../components/AstroImage.astro";
|
import AstroImage from '../../../components/AstroImage.astro'
|
||||||
|
|
||||||
## Let's play.
|
## 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:
|
Let's say we exported a 1920x1080 video from Premiere Pro with these basic settings:
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/video-premiere-1.jpeg"
|
src='https://assets.nardu.in/video-premiere-1.jpeg'
|
||||||
width="673"
|
width='673'
|
||||||
height="800"
|
height='800'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
It's gorgeous, it's Full HD, it's 1:30 minute of excellent editing but it's 50mb… What a shame.
|
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
|
1. Keep MPEG-4 as the format
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/video-handbrake-1.jpeg"
|
src='https://assets.nardu.in/video-handbrake-1.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="337"
|
height='337'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Video screen
|
### 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…)
|
1. Choose the type of video you are encoding (film, animation…)
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/video-handbrake-2.jpeg"
|
src='https://assets.nardu.in/video-handbrake-2.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="337"
|
height='337'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Audio screen
|
### 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)
|
1. Bitrate 192 to 256 (your choice)
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/video-handbrake-3.jpeg"
|
src='https://assets.nardu.in/video-handbrake-3.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="337"
|
height='337'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Export!
|
### 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:
|
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
|
<AstroImage
|
||||||
src="https://assets.nardu.in/video-handbrake-4.jpg"
|
src='https://assets.nardu.in/video-handbrake-4.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="313"
|
height='313'
|
||||||
alt=""
|
alt=''
|
||||||
/>
|
/>
|
||||||
|
|
||||||
The only down side is that it takes some time to encode. It will depend on the video length and your computing power.
|
The only down side is that it takes some time to encode. It will depend on the video length and your computing power.
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
title: Nico v2.0
|
title: Nico v2.0
|
||||||
subtitle: Mise à jour 2022 de plein de trucs.
|
subtitle: Mise à jour 2022 de plein de trucs.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "2022"
|
slug: '2022'
|
||||||
excerpt: Évolution des services, du site et de moi-même.
|
excerpt: Évolution des services, du site et de moi-même.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
Après deux ans de freelance à temps plein, j’ai pris du recul sur mon activité. J’ai surtout questionné mon positionnement et les prestations que je proposais.
|
Après deux ans de freelance à temps plein, j’ai pris du recul sur mon activité. J’ai surtout questionné mon positionnement et les prestations que je proposais.
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
title: Nico v2.5
|
title: Nico v2.5
|
||||||
subtitle: Mise à jour 2023.
|
subtitle: Mise à jour 2023.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "2023"
|
slug: '2023'
|
||||||
excerpt: Suite des évolutions.
|
excerpt: Suite des évolutions.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2023-02-03T17:41:00.000Z"
|
createdAt: '2023-02-03T17:41:00.000Z'
|
||||||
updatedAt: "2023-05-17T17: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.
|
Cet article sera mis à jour lorsque j'aurai des nouveautés à partager au cours de l'année 2023.
|
||||||
|
@ -3,11 +3,11 @@ title: After Effects Expressions
|
|||||||
subtitle: En cours de traduction, revenez bientôt ;)
|
subtitle: En cours de traduction, revenez bientôt ;)
|
||||||
lang: fr
|
lang: fr
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "after-effects-expressions"
|
slug: 'after-effects-expressions'
|
||||||
excerpt: En cours de traduction, revenez bientôt ;)
|
excerpt: En cours de traduction, revenez bientôt ;)
|
||||||
tags: ["Design"]
|
tags: ['Design']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2019-04-24T09:00:00.000Z"
|
createdAt: '2019-04-24T09:00:00.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Retour aux articles](/articles)
|
[Retour aux articles](/articles)
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
title: Accessibilité, sobriété et F.A.Q.
|
title: Accessibilité, sobriété et F.A.Q.
|
||||||
subtitle: Explications sur ma vision et mon fonctionnement.
|
subtitle: Explications sur ma vision et mon fonctionnement.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "faq"
|
slug: 'faq'
|
||||||
excerpt: Pourquoi, comment et surtout quèsaco.
|
excerpt: Pourquoi, comment et surtout quèsaco.
|
||||||
tags: ["Freelance"]
|
tags: ['Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2022-06-22T15:34:45.000Z"
|
createdAt: '2022-06-22T15:34:45.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
## l'Accessibilité
|
## l'Accessibilité
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
title: "Gratuiste"
|
title: 'Gratuiste'
|
||||||
subtitle: "Ou le travail gratuit."
|
subtitle: 'Ou le travail gratuit.'
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "gratuiste"
|
slug: 'gratuiste'
|
||||||
excerpt: "J’ai cherché un moyen de mettre mes compétences au service d’autrui et je pense avoir trouvé: je vais travailler gratuitement pour des associations."
|
excerpt: 'J’ai cherché un moyen de mettre mes compétences au service d’autrui et je pense avoir trouvé: je vais travailler gratuitement pour des associations.'
|
||||||
tags: ["Graphisme", "Freelance"]
|
tags: ['Graphisme', 'Freelance']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2017-05-27T07:47:36.000Z"
|
createdAt: '2017-05-27T07:47:36.000Z'
|
||||||
updatedAt: "2022-12-27T15:36:06.000Z"
|
updatedAt: '2022-12-27T15:36:06.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
## Gratuiste, qu’est-ce que c’est ?
|
## Gratuiste, qu’est-ce que c’est ?
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
---
|
---
|
||||||
title: "Sci-hub bloqué, comment contourner"
|
title: 'Sci-hub bloqué, comment contourner'
|
||||||
subtitle: "La science du partage."
|
subtitle: 'La science du partage.'
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "sci-hub-blocage"
|
slug: 'sci-hub-blocage'
|
||||||
excerpt: "Le tribunal de grande instance de Paris a ordonné aux fournisseurs d’accès à internet de bloquer l’accès à sci-hub. Voici comment contourner les blocages mis en place."
|
excerpt: 'Le tribunal de grande instance de Paris a ordonné aux fournisseurs d’accès à internet de bloquer l’accès à sci-hub. Voici comment contourner les blocages mis en place.'
|
||||||
tags: ["Internet", "Science"]
|
tags: ['Internet', 'Science']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2019-03-31T07:47:36.000Z"
|
createdAt: '2019-03-31T07:47:36.000Z'
|
||||||
updatedAt: "2022-12-27T12:08:00.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 : [sci-hub.se](https://sci-hub.se)
|
L'adresse actuelle de sci-hub est : [sci-hub.se](https://sci-hub.se)
|
||||||
|
|
||||||
@ -49,10 +49,10 @@ Ouvrez :
|
|||||||
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.
|
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
|
<AstroImage
|
||||||
src="https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg"
|
src='https://assets.nardu.in/ef5a4b8e82a046e6a466c73c2fd9e99e.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="1060"
|
height='1060'
|
||||||
alt="MacOS réglages réseau et DNS"
|
alt='MacOS réglages réseau et DNS'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Sur Windows (ici 10)
|
### Sur Windows (ici 10)
|
||||||
@ -68,31 +68,31 @@ Ouvrez :
|
|||||||
1. Utiliser l’adresse de serveur DNS suivante
|
1. Utiliser l’adresse de serveur DNS suivante
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-settings.jpg"
|
src='https://assets.nardu.in/sci-hub-settings.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="319"
|
height='319'
|
||||||
alt="Réglages windows"
|
alt='Réglages windows'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-network.jpg"
|
src='https://assets.nardu.in/sci-hub-network.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="803"
|
height='803'
|
||||||
alt="Windows réglages réseaux"
|
alt='Windows réglages réseaux'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-adapter.jpg"
|
src='https://assets.nardu.in/sci-hub-adapter.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="327"
|
height='327'
|
||||||
alt="Windows régalges connections réseaux"
|
alt='Windows régalges connections réseaux'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/sci-hub-adapter-settings.jpg"
|
src='https://assets.nardu.in/sci-hub-adapter-settings.jpg'
|
||||||
width="728"
|
width='728'
|
||||||
height="434"
|
height='434'
|
||||||
alt="Windows options adaptateur réseau"
|
alt='Windows options adaptateur réseau'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
## Quels serveurs DNS utiliser ?
|
## Quels serveurs DNS utiliser ?
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
title: The day I Jam’d
|
title: The day I Jam’d
|
||||||
subtitle: Des paris, des outils et du fun.
|
subtitle: Des paris, des outils et du fun.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "the-day-I-jamd"
|
slug: 'the-day-I-jamd'
|
||||||
excerpt: Ooh, yeah! All right! We’re jammin’
|
excerpt: Ooh, yeah! All right! We’re jammin’
|
||||||
tags: ["Dev", "Jamstack"]
|
tags: ['Dev', 'Jamstack']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2020-10-08T07:47:36.000Z"
|
createdAt: '2020-10-08T07:47:36.000Z'
|
||||||
updatedAt: "2022-12-27T15:40:06.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é
|
## La solution de non facilité
|
||||||
|
|
||||||
@ -31,10 +31,10 @@ J’en suis resté pantois ! Quasiment sans optimisation du côté statique
|
|||||||
### wordpress
|
### wordpress
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/wordpress_8ee6f54b98.jpeg"
|
src='https://assets.nardu.in/wordpress_8ee6f54b98.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="412"
|
height='412'
|
||||||
alt="Score de performance de 53/100 sur Wordpress."
|
alt='Score de performance de 53/100 sur Wordpress.'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Malgré beaucoup d’efforts, je n’ai pas pu faire mieux. Je ne suis pas un expert en cache, je n’utilise pas de CDN et je me suis appuyé sur des plugins pour réaliser beaucoup de choses (php n’étant pas ma spécialité 😬).
|
Malgré beaucoup d’efforts, je n’ai pas pu faire mieux. Je ne suis pas un expert en cache, je n’utilise 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 d’efforts, je n’ai pas pu faire mieux. Je ne suis pas un ex
|
|||||||
### 11ty + strapi
|
### 11ty + strapi
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/static_2c0d9f1eb8.jpeg"
|
src='https://assets.nardu.in/static_2c0d9f1eb8.jpeg'
|
||||||
width="728"
|
width='728'
|
||||||
height="412"
|
height='412'
|
||||||
alt="Score de performance de 97/100 en Jamstack."
|
alt='Score de performance de 97/100 en Jamstack.'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Presque **zéro** configuration spéciale (j’étais trop impatient de tester) et j’ai atteint un score impressionnant. Je sais que les scores lighthouse ne font pas tout mais **53 contre 97**… Ça me va !
|
Presque **zéro** configuration spéciale (j’étais trop impatient de tester) et j’ai atteint un score impressionnant. Je sais que les scores lighthouse ne font pas tout mais **53 contre 97**… Ça me va !
|
||||||
|
@ -3,12 +3,12 @@ title: Compression vidéo
|
|||||||
subtitle: En cours de traduction, revenez bientôt ;)
|
subtitle: En cours de traduction, revenez bientôt ;)
|
||||||
lang: fr
|
lang: fr
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "video-compression"
|
slug: 'video-compression'
|
||||||
excerpt: Pas encore traduit
|
excerpt: Pas encore traduit
|
||||||
tags: ["Design"]
|
tags: ['Design']
|
||||||
type: articles
|
type: articles
|
||||||
createdAt: "2021-05-05T09:00:00.000Z"
|
createdAt: '2021-05-05T09:00:00.000Z'
|
||||||
updatedAt: "2022-06-08T14:24:06.000Z"
|
updatedAt: '2022-06-08T14:24:06.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Retour aux articles](/articles)
|
[Retour aux articles](/articles)
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
title: Strong TLS certificates with acme.sh
|
title: Strong TLS certificates with acme.sh
|
||||||
subtitle: 384-bit of https
|
subtitle: 384-bit of https
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "acme-sh-tls-cert"
|
slug: 'en-acme-sh-tls-cert'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: Real cert have curves.
|
excerpt: Real cert have curves.
|
||||||
tags: ["security"]
|
tags: ['security']
|
||||||
type: snippets
|
type: snippets
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
title: Filter an array against another array
|
title: Filter an array against another array
|
||||||
subtitle: Array vs Array.
|
subtitle: Array vs Array.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "array-vs-array"
|
slug: 'en-array-vs-array'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: My peak javascript
|
excerpt: My peak javascript
|
||||||
tags: ["nuxt.js"]
|
tags: ['nuxt.js']
|
||||||
type: snippets
|
type: snippets
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -20,24 +20,24 @@ Here is an example:
|
|||||||
```javascript
|
```javascript
|
||||||
const skills = [
|
const skills = [
|
||||||
{
|
{
|
||||||
name: "Be awesome",
|
name: 'Be awesome',
|
||||||
user: "Jean",
|
user: 'Jean'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Great jokes",
|
name: 'Great jokes',
|
||||||
user: "Jacques",
|
user: 'Jacques'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Heavy sleeper",
|
name: 'Heavy sleeper',
|
||||||
user: "Jean",
|
user: 'Jean'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Heavy sleeper",
|
name: 'Heavy sleeper',
|
||||||
user: "Beatriz",
|
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 😬
|
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
|
// index.vue
|
||||||
const filteredSkills = selectedUsers.map((user) => {
|
const filteredSkills = selectedUsers.map((user) => {
|
||||||
return skills.filter((skill) => {
|
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()`.
|
I used `map()` in order to loop on the second array and used its string value to only include the corresponding skills with `filter()`.
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
title: Buttons hover
|
title: Buttons hover
|
||||||
subtitle: Simple, but nice.
|
subtitle: Simple, but nice.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "buttons"
|
slug: 'en-buttons'
|
||||||
draft: true
|
draft: true
|
||||||
excerpt: Easy to grab and use hover effects.
|
excerpt: Easy to grab and use hover effects.
|
||||||
tags: ["CSS"]
|
tags: ['CSS']
|
||||||
code: true
|
code: true
|
||||||
type: snippets
|
type: snippets
|
||||||
createdAt: "2020-10-08T09:00:00.000Z"
|
createdAt: '2020-10-08T09:00:00.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
## General rules
|
## General rules
|
||||||
@ -51,7 +51,7 @@ All the buttons use these styles as a “reset”:
|
|||||||
background-color: hotpink;
|
background-color: hotpink;
|
||||||
}
|
}
|
||||||
.btn-icon::before {
|
.btn-icon::before {
|
||||||
content: url("~assets/svg/arrow-right-white.svg");
|
content: url('~assets/svg/arrow-right-white.svg');
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
@ -103,7 +103,7 @@ All the buttons use these styles as a “reset”:
|
|||||||
}
|
}
|
||||||
.btn-rideau::before,
|
.btn-rideau::before,
|
||||||
.btn-rideau::after {
|
.btn-rideau::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -174,7 +174,7 @@ All the buttons use these styles as a “reset”:
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
.btn-scale::after {
|
.btn-scale::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -3,10 +3,10 @@ title: Full width image
|
|||||||
subtitle: Translation in progress, stay tuned ;)
|
subtitle: Translation in progress, stay tuned ;)
|
||||||
lang: en
|
lang: en
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "image-full"
|
slug: 'en-image-full'
|
||||||
createdAt: "2020-09-15T09:00:00.000Z"
|
createdAt: '2020-09-15T09:00:00.000Z'
|
||||||
updatedAt: "2022-06-08T14:24:06.000Z"
|
updatedAt: '2022-06-08T14:24:06.000Z'
|
||||||
tags: ["CSS"]
|
tags: ['CSS']
|
||||||
type: snippets
|
type: snippets
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
title: Static website and GraphQL queries with Nuxt.js
|
title: Static website and GraphQL queries with Nuxt.js
|
||||||
subtitle: Graphql client is king.
|
subtitle: Graphql client is king.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "nuxt-graphql-static"
|
slug: 'en-nuxt-graphql-static'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
updatedAt: "2022-09-08T13:43:33.000Z"
|
updatedAt: '2022-09-08T13:43:33.000Z'
|
||||||
excerpt: When the most used gql module doesn't work…
|
excerpt: When the most used gql module doesn't work…
|
||||||
tags: ["nuxt.js"]
|
tags: ['nuxt.js']
|
||||||
type: snippets
|
type: snippets
|
||||||
---
|
---
|
||||||
|
|
||||||
## The problem
|
## 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 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 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`.
|
It seems the module doesn't handle static generation correctly with `nuxt generate`.
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export default {
|
|||||||
|
|
||||||
#### Inside a component
|
#### 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
|
```javascript
|
||||||
// Header.vue
|
// Header.vue
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
const locale = app.i18n.localeProperties.iso
|
const locale = app.i18n.localeProperties.iso
|
||||||
const data = await $graphql.default.request(articleQuery, {
|
const data = await $graphql.default.request(articleQuery, {
|
||||||
code: locale,
|
code: locale,
|
||||||
permalink: params.slug,
|
slug: params.slug,
|
||||||
})
|
})
|
||||||
return { data }
|
return { data }
|
||||||
},
|
},
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
title: The best cookies
|
title: The best cookies
|
||||||
subtitle: Consentless biscuits.
|
subtitle: Consentless biscuits.
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "super-cookies"
|
slug: 'en-super-cookies'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: It's a real recipe, not a joke about annoying files.
|
excerpt: It's a real recipe, not a joke about annoying files.
|
||||||
tags: ["food"]
|
tags: ['food']
|
||||||
type: snippets
|
type: snippets
|
||||||
---
|
---
|
||||||
|
|
||||||
import AstroImage from "../../../components/AstroImage.astro";
|
import AstroImage from '../../../components/AstroImage.astro'
|
||||||
|
|
||||||
## Vegetalian version
|
## Vegetalian version
|
||||||
|
|
||||||
@ -74,14 +74,14 @@ Chocolate can be replaced by anything like nuts, raisins, legos... (don't eat le
|
|||||||
## Figures
|
## Figures
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/cookies-fig-1.jpg"
|
src='https://assets.nardu.in/cookies-fig-1.jpg'
|
||||||
width="753"
|
width='753'
|
||||||
height="1248"
|
height='1248'
|
||||||
alt="All ingredients mixed together to form a brown paste."
|
alt='All ingredients mixed together to form a brown paste.'
|
||||||
/>
|
/>
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/cookies-fig-2.jpg"
|
src='https://assets.nardu.in/cookies-fig-2.jpg'
|
||||||
width="753"
|
width='753'
|
||||||
height="1248"
|
height='1248'
|
||||||
alt="The cookies are round and soft after baking."
|
alt='The cookies are round and soft after baking.'
|
||||||
/>
|
/>
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
title: Toulouse yourself
|
title: Toulouse yourself
|
||||||
subtitle: Only the bestest
|
subtitle: Only the bestest
|
||||||
lang: en
|
lang: en
|
||||||
permalink: "toulouse-fun"
|
slug: 'en-toulouse-fun'
|
||||||
excerpt: Gonna have to trust me on this ¯\_(ツ)_/¯
|
excerpt: Gonna have to trust me on this ¯\_(ツ)_/¯
|
||||||
tags: ["lifestyle"]
|
tags: ['lifestyle']
|
||||||
type: snippets
|
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.
|
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.
|
||||||
|
@ -3,11 +3,11 @@ title: Visited links and visuel aid
|
|||||||
subtitle: Translation in progress, stay tuned ;)
|
subtitle: Translation in progress, stay tuned ;)
|
||||||
lang: en
|
lang: en
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "visited-links"
|
slug: 'en-visited-links'
|
||||||
excerpt: Petit hack CSS
|
excerpt: Petit hack CSS
|
||||||
tags: ["Front-end"]
|
tags: ['Front-end']
|
||||||
type: snippets
|
type: snippets
|
||||||
createdAt: "2023-06-06T18:34:00.000Z"
|
createdAt: '2023-06-06T18:34:00.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
[Go back to available snippets](/en/snippets)
|
[Go back to available snippets](/en/snippets)
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
title: Certificates TLS robustes avec acme.sh
|
title: Certificates TLS robustes avec acme.sh
|
||||||
subtitle: 384-bit de https
|
subtitle: 384-bit de https
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "acme-sh-tls-cert"
|
slug: 'acme-sh-tls-cert'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: La sécurité avec des courbes.
|
excerpt: La sécurité avec des courbes.
|
||||||
tags: ["sécurité"]
|
tags: ['sécurité']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -3,10 +3,10 @@ title: Filtrer un array avec un autre array
|
|||||||
subtitle: En cours de traduction.
|
subtitle: En cours de traduction.
|
||||||
lang: fr
|
lang: fr
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "array-vs-array"
|
slug: 'array-vs-array'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: En cours de traduction.
|
excerpt: En cours de traduction.
|
||||||
tags: ["nuxt.js"]
|
tags: ['nuxt.js']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
---
|
---
|
||||||
title: "Effets de survol de boutons"
|
title: 'Effets de survol de boutons'
|
||||||
subtitle: "Simples mais efficaces."
|
subtitle: 'Simples mais efficaces.'
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "buttons"
|
slug: 'buttons'
|
||||||
draft: true
|
draft: true
|
||||||
excerpt: Quelques effets de survol faciles à récupérer et utiliser.
|
excerpt: Quelques effets de survol faciles à récupérer et utiliser.
|
||||||
tags: ["CSS"]
|
tags: ['CSS']
|
||||||
type: fragments
|
type: fragments
|
||||||
code: true
|
code: true
|
||||||
createdAt: "2020-10-08T09:00:00.000Z"
|
createdAt: '2020-10-08T09:00:00.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
## Styles généraux
|
## Styles généraux
|
||||||
@ -42,7 +42,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
|
|
||||||
## Ajout d'icône
|
## Ajout d'icône
|
||||||
|
|
||||||
<button role="none" class="btn btn-icon">
|
<button role='none' class='btn btn-icon'>
|
||||||
<span>Icône</span>
|
<span>Icône</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
background-color: hotpink;
|
background-color: hotpink;
|
||||||
}
|
}
|
||||||
.btn-icon::before {
|
.btn-icon::before {
|
||||||
content: url("./assets/svg/arrow-right-white.svg");
|
content: url('./assets/svg/arrow-right-white.svg');
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
@ -81,7 +81,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
|
|
||||||
## Double volet
|
## Double volet
|
||||||
|
|
||||||
<button role="none" class="btn btn-rideau">
|
<button role='none' class='btn btn-rideau'>
|
||||||
<span>Volet</span>
|
<span>Volet</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
}
|
}
|
||||||
.btn-rideau::before,
|
.btn-rideau::before,
|
||||||
.btn-rideau::after {
|
.btn-rideau::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -128,7 +128,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
|
|
||||||
## Dégradé animé
|
## Dégradé animé
|
||||||
|
|
||||||
<button role="none" class="btn btn-gradient">
|
<button role='none' class='btn btn-gradient'>
|
||||||
<span>Dégradé</span>
|
<span>Dégradé</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
|
|
||||||
## Échelle non desctructrice
|
## Échelle non desctructrice
|
||||||
|
|
||||||
<button role="none" class="btn btn-scale">
|
<button role='none' class='btn btn-scale'>
|
||||||
<span>Échelle</span>
|
<span>Échelle</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ Tous les boutons présents utilisent ces styles comme base en guise de « r
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
.btn-scale::after {
|
.btn-scale::after {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -2,24 +2,24 @@
|
|||||||
title: Image pleine largeur
|
title: Image pleine largeur
|
||||||
subtitle: Casser le conteneur.
|
subtitle: Casser le conteneur.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "image-full"
|
slug: 'image-full'
|
||||||
createdAt: "2020-09-15T09:00:00.000Z"
|
createdAt: '2020-09-15T09:00:00.000Z'
|
||||||
updatedAt: "2022-06-08T14:24:06.000Z"
|
updatedAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: Faire déborder une image de son conteneur sans tout casser.
|
excerpt: Faire déborder une image de son conteneur sans tout casser.
|
||||||
tags: ["CSS"]
|
tags: ['CSS']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
import AstroImage from "../../../components/AstroImage.astro";
|
import AstroImage from '../../../components/AstroImage.astro'
|
||||||
|
|
||||||
## Image inline
|
## 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 ? Exemple pratique à partir de ce même site.
|
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 ? Exemple pratique à partir de ce même site.
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_container_9e3939b3ae.jpeg"
|
src='https://assets.nardu.in/image_bleed_container_9e3939b3ae.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Contexte
|
### Contexte
|
||||||
@ -50,9 +50,9 @@ img {
|
|||||||
```
|
```
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_original_d49f0d11bf.jpeg"
|
src='https://assets.nardu.in/image_bleed_original_d49f0d11bf.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Déborder du conteneur
|
### Déborder du conteneur
|
||||||
@ -68,9 +68,9 @@ Afin de faire prendre à l'image toute la largeur, on agit sur son conteneur&nbs
|
|||||||
```
|
```
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_full_2a902f9539.jpeg"
|
src='https://assets.nardu.in/image_bleed_full_2a902f9539.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
### Faire une bannière
|
### Faire une bannière
|
||||||
@ -87,9 +87,9 @@ On peut alors réduire la hauteur du conteneur pour obtenir une bannière plutô
|
|||||||
```
|
```
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_height_81b4ce969a.jpeg"
|
src='https://assets.nardu.in/image_bleed_height_81b4ce969a.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Il faut ensuite forcer l'image à prendre toute la largeur du conteneur :
|
Il faut ensuite forcer l'image à prendre toute la largeur du conteneur :
|
||||||
@ -101,9 +101,9 @@ Il faut ensuite forcer l'image à prendre toute la largeur du conteneur :
|
|||||||
```
|
```
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_deformed_479046d2cb.jpeg"
|
src='https://assets.nardu.in/image_bleed_deformed_479046d2cb.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Pas top…
|
Pas top…
|
||||||
@ -120,9 +120,9 @@ Pas top…
|
|||||||
```
|
```
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/image_bleed_6c164e82b3.jpeg"
|
src='https://assets.nardu.in/image_bleed_6c164e82b3.jpeg'
|
||||||
width="320"
|
width='320'
|
||||||
height="568"
|
height='568'
|
||||||
/>
|
/>
|
||||||
|
|
||||||
Cette technique s'apparente à l'utilisation d'une image de background mais en dur 😁
|
Cette technique s'apparente à l'utilisation d'une image de background mais en dur 😁
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
title: Site statique et requêtes GraphQL avec Nuxt.js
|
title: Site statique et requêtes GraphQL avec Nuxt.js
|
||||||
subtitle: Le client graphql est roi.
|
subtitle: Le client graphql est roi.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "nuxt-graphql-static"
|
slug: 'nuxt-graphql-static'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
updatedAt: "2022-09-08T13:43:33.000Z"
|
updatedAt: '2022-09-08T13:43:33.000Z'
|
||||||
excerpt: Quand le module gql le plus utilisé ne fonctionne pas…
|
excerpt: Quand le module gql le plus utilisé ne fonctionne pas…
|
||||||
tags: ["nuxt.js"]
|
tags: ['nuxt.js']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
## Le problème
|
## 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)").
|
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.
|
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`.
|
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 !
|
Heureusement, il existe un autre module Nuxt pour gérer les requêtes GraphQL !
|
||||||
|
|
||||||
[Nuxt graphql request à la rescousse !](https://github.com/gomah/nuxt-graphql-request "Dépôt github du module (nouvel onglet)")
|
[Nuxt graphql request à la rescousse !](https://github.com/gomah/nuxt-graphql-request 'Dépôt github du module (nouvel onglet)')
|
||||||
|
|
||||||
### La conf
|
### La conf
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export default {
|
|||||||
|
|
||||||
#### Dans un composant
|
#### 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
|
```javascript
|
||||||
// Header.vue
|
// Header.vue
|
||||||
@ -119,7 +119,7 @@ export default {
|
|||||||
|
|
||||||
### Les options
|
### 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 :
|
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 :
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// _slug.vue
|
// _slug.vue
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
const locale = app.i18n.localeProperties.iso
|
const locale = app.i18n.localeProperties.iso
|
||||||
const data = await $graphql.default.request(articleQuery, {
|
const data = await $graphql.default.request(articleQuery, {
|
||||||
code: locale,
|
code: locale,
|
||||||
permalink: params.slug,
|
slug: params.slug,
|
||||||
})
|
})
|
||||||
return { data }
|
return { data }
|
||||||
},
|
},
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
title: Les meilleurs cookies
|
title: Les meilleurs cookies
|
||||||
subtitle: Des gâteaux sans consentement.
|
subtitle: Des gâteaux sans consentement.
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "super-cookies"
|
slug: 'super-cookies'
|
||||||
createdAt: "2022-06-08T14:24:06.000Z"
|
createdAt: '2022-06-08T14:24:06.000Z'
|
||||||
excerpt: C'est vraiment une recette hein, pas une blague sur les fichiers temporaires.
|
excerpt: C'est vraiment une recette hein, pas une blague sur les fichiers temporaires.
|
||||||
tags: ["cuisine"]
|
tags: ['cuisine']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
import AstroImage from "../../../components/AstroImage.astro";
|
import AstroImage from '../../../components/AstroImage.astro'
|
||||||
|
|
||||||
## Version végétalienne
|
## Version végétalienne
|
||||||
|
|
||||||
@ -74,14 +74,14 @@ Le chocolat peut-être remplacé par n'importe quoi comme des noix, des raisins
|
|||||||
## Figures
|
## Figures
|
||||||
|
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/cookies-fig-1.jpg"
|
src='https://assets.nardu.in/cookies-fig-1.jpg'
|
||||||
width="753"
|
width='753'
|
||||||
height="1248"
|
height='1248'
|
||||||
alt="Tous les ingrédients mélangés forment une pâte marron."
|
alt='Tous les ingrédients mélangés forment une pâte marron.'
|
||||||
/>
|
/>
|
||||||
<AstroImage
|
<AstroImage
|
||||||
src="https://assets.nardu.in/cookies-fig-2.jpg"
|
src='https://assets.nardu.in/cookies-fig-2.jpg'
|
||||||
width="753"
|
width='753'
|
||||||
height="1248"
|
height='1248'
|
||||||
alt="Les cookies cuits sont bombés et très moelleux."
|
alt='Les cookies cuits sont bombés et très moelleux.'
|
||||||
/>
|
/>
|
||||||
|
@ -3,10 +3,10 @@ title: Toulouse yourself
|
|||||||
subtitle: En cours de traduction.
|
subtitle: En cours de traduction.
|
||||||
lang: fr
|
lang: fr
|
||||||
draft: true
|
draft: true
|
||||||
permalink: "toulouse-fun"
|
slug: 'toulouse-fun'
|
||||||
createdAt: "2022-06-22T15:34:45.000Z"
|
createdAt: '2022-06-22T15:34:45.000Z'
|
||||||
excerpt: En cours de traduction.
|
excerpt: En cours de traduction.
|
||||||
tags: ["lifestyle"]
|
tags: ['lifestyle']
|
||||||
type: fragments
|
type: fragments
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@ title: Liens visités et indication visuelle
|
|||||||
subtitle: Comment différencier les liens déjà cliqués
|
subtitle: Comment différencier les liens déjà cliqués
|
||||||
lang: fr
|
lang: fr
|
||||||
draft: false
|
draft: false
|
||||||
permalink: "visited-links"
|
slug: 'visited-links'
|
||||||
excerpt: Petit hack CSS
|
excerpt: Petit hack CSS
|
||||||
tags: ["Front-end"]
|
tags: ['Front-end']
|
||||||
type: snippets
|
type: snippets
|
||||||
createdAt: "2023-06-06T18:34:00.000Z"
|
createdAt: '2023-06-06T18:34:00.000Z'
|
||||||
---
|
---
|
||||||
|
|
||||||
## La théorie
|
## La théorie
|
||||||
@ -51,7 +51,7 @@ a {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
a::before {
|
a::before {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -3,8 +3,8 @@ title: 3w
|
|||||||
subtitle: J'ai fait de la doc!
|
subtitle: J'ai fait de la doc!
|
||||||
url: https://3-w.fr
|
url: https://3-w.fr
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "3w"
|
slug: '3w'
|
||||||
excerpt: Développement web et compagnie.
|
excerpt: Développement web et compagnie.
|
||||||
tags: ["Front-end", "documentation"]
|
tags: ['Front-end', 'documentation']
|
||||||
createdAt: "2022-10-19T18:02:00.000Z"
|
createdAt: '2022-10-19T18:02:00.000Z'
|
||||||
---
|
---
|
@ -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"
|
|
||||||
---
|
|
@ -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"
|
|
||||||
---
|
|
@ -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"
|
|
||||||
---
|
|
@ -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"
|
|
||||||
---
|
|
@ -3,8 +3,8 @@ title: Nature en Occitanie
|
|||||||
subtitle: La sobriété au naturel.
|
subtitle: La sobriété au naturel.
|
||||||
url: https://www.natureo.org/
|
url: https://www.natureo.org/
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "natureo"
|
slug: 'natureo'
|
||||||
excerpt: Développement web et compagnie.
|
excerpt: Développement web et compagnie.
|
||||||
tags: ["Front-end", "accessibilité", "éco-conception", "CMS"]
|
tags: ['Front-end', 'accessibilité', 'éco-conception', 'CMS']
|
||||||
createdAt: "2023-04-19T18:02:00.000Z"
|
createdAt: '2023-04-19T18:02:00.000Z'
|
||||||
---
|
---
|
@ -3,8 +3,8 @@ title: Parole Expression
|
|||||||
subtitle: Un nouveau site pour l'association.
|
subtitle: Un nouveau site pour l'association.
|
||||||
url: https://www.paroleexpression.fr/
|
url: https://www.paroleexpression.fr/
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: parole-expression
|
slug: parole-expression
|
||||||
excerpt: Développement web et compagnie.
|
excerpt: Développement web et compagnie.
|
||||||
tags: ["Front-end", "éco-conception", "CMS"]
|
tags: ['Front-end', 'éco-conception', 'CMS']
|
||||||
createdAt: "2022-04-19T17:11:00.000Z"
|
createdAt: '2022-04-19T17:11:00.000Z'
|
||||||
---
|
---
|
@ -3,8 +3,8 @@ title: Rose Primaire
|
|||||||
subtitle: Une agence comme on l'aime.
|
subtitle: Une agence comme on l'aime.
|
||||||
url: https://roseprimaire.com/
|
url: https://roseprimaire.com/
|
||||||
lang: fr
|
lang: fr
|
||||||
permalink: "rose-primaire"
|
slug: 'rose-primaire'
|
||||||
excerpt: Développement web et compagnie.
|
excerpt: Développement web et compagnie.
|
||||||
tags: ["Front-end", "accessibilité", "éco-conception", "CMS"]
|
tags: ['Front-end', 'accessibilité', 'éco-conception', 'CMS']
|
||||||
createdAt: "2023-04-19T17:11:00.000Z"
|
createdAt: '2023-04-19T17:11:00.000Z'
|
||||||
---
|
---
|
@ -1,10 +1,9 @@
|
|||||||
---
|
---
|
||||||
type: section
|
type: section
|
||||||
id: offre
|
uid: offre
|
||||||
lang: fr
|
lang: fr
|
||||||
createdAt:
|
|
||||||
image: /assets/images/home/offre-1.1.svg
|
image: /assets/images/home/offre-1.1.svg
|
||||||
order: 1
|
order: 1.1
|
||||||
quickTitle: Mes offres en freelance
|
quickTitle: Mes offres en freelance
|
||||||
quickImage: /assets/images/home/icon-desktop.svg
|
quickImage: /assets/images/home/icon-desktop.svg
|
||||||
reference: parole-expression
|
reference: parole-expression
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
type: section
|
type: section
|
||||||
lang: fr
|
lang: fr
|
||||||
|
order: 1.2
|
||||||
image: /assets/images/home/offre-1.2.svg
|
image: /assets/images/home/offre-1.2.svg
|
||||||
reference: rose-primaire
|
reference: rose-primaire
|
||||||
---
|
---
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
type: section
|
type: section
|
||||||
lang: fr
|
lang: fr
|
||||||
|
order: 1.3
|
||||||
image: /assets/images/home/offre-1.3.svg
|
image: /assets/images/home/offre-1.3.svg
|
||||||
---
|
---
|
||||||
|
|
@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
type: section
|
type: section
|
||||||
id: methodology
|
uid: methodology
|
||||||
lang: fr
|
lang: fr
|
||||||
slug:
|
|
||||||
createdAt:
|
|
||||||
image: /assets/images/home/methodo.svg
|
image: /assets/images/home/methodo.svg
|
||||||
order: 2
|
order: 2
|
||||||
quickTitle: Ma méthodologie
|
quickTitle: Ma méthodologie
|
@ -1,9 +1,7 @@
|
|||||||
---
|
---
|
||||||
type: section
|
type: section
|
||||||
id: about
|
uid: about
|
||||||
lang: fr
|
lang: fr
|
||||||
slug:
|
|
||||||
createdAt:
|
|
||||||
image: /assets/images/home/about.svg
|
image: /assets/images/home/about.svg
|
||||||
order: 3
|
order: 3
|
||||||
quickTitle: Moi
|
quickTitle: Moi
|
@ -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/)
|
|
@ -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.
|
|
@ -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.
|
|
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
lang: fr
|
lang: fr
|
||||||
title: 2023
|
title: '2023'
|
||||||
updatedAt: "2023-04-20T17:12:06.000Z"
|
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.
|
- [mmm.page](https://build.mmm.page/) - Éditeur de sites web très simples, en glisser-déposer, pour n'importe quoi.
|
@ -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 ❤️
|
|
@ -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";
|
const { pageTitle, locale } = Astro.props
|
||||||
import Header from "../components/Header.astro";
|
|
||||||
import Footer from "../components/Footer.astro";
|
|
||||||
|
|
||||||
const { pageTitle } = Astro.props;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<html lang={locale} dir="ltr">
|
<html lang={locale} dir='ltr'>
|
||||||
<Head pageTitle={pageTitle} />
|
<Head pageTitle={pageTitle} />
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class='wrapper'>
|
||||||
<Header />
|
<Header />
|
||||||
<main id="skip-content" role="main">
|
<main id='skip-content' role='main'>
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
import BaseLayout from '../layouts/BaseLayout.astro'
|
import BaseLayout from '../layouts/BaseLayout.astro'
|
||||||
import { getLangFromUrl, useTranslations } from '../utils/i18n'
|
import { getLangFromUrl, useTranslations } from '../utils/i18n'
|
||||||
|
|
||||||
const locale = getLangFromUrl(Astro.url)
|
|
||||||
const t = useTranslations(locale)
|
|
||||||
|
|
||||||
const { frontmatter, image, title } = Astro.props
|
const { frontmatter, image, title } = Astro.props
|
||||||
|
const locale = frontmatter.locale
|
||||||
|
|
||||||
const publishedDate = new Date(frontmatter.pubDate)
|
const publishedDate = new Date(frontmatter.pubDate)
|
||||||
const localizedDate = new Intl.DateTimeFormat(locale, {
|
const localizedDate = new Intl.DateTimeFormat(locale, {
|
||||||
dateStyle: 'long'
|
dateStyle: 'long'
|
||||||
}).format(publishedDate)
|
}).format(publishedDate)
|
||||||
|
|
||||||
|
const t = useTranslations(locale)
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout pageTitle={title}>
|
<BaseLayout pageTitle={title}>
|
||||||
|
@ -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 EditorialContent from '../../components/EditorialContent.astro'
|
||||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
import BaseLayout from '../../layouts/BaseLayout.astro'
|
||||||
|
|
||||||
export const getStaticPaths = createStaticPaths(
|
export const getStaticPaths = createStaticPaths(
|
||||||
async ({ langCode }) => {
|
async ({ langCode }) => {
|
||||||
const articles = await getCollection("articles", ({ data }) => {
|
const articles = await getCollection('articles', ({ data }) => {
|
||||||
console.log(langCode);
|
console.log(langCode)
|
||||||
return data.lang === langCode;
|
return data.lang === langCode
|
||||||
});
|
})
|
||||||
return articles.map((article) => ({
|
return articles.map((article) => ({
|
||||||
params: { id: article.data.permalink },
|
params: { id: article.data.slug },
|
||||||
props: { article },
|
props: { article }
|
||||||
}));
|
}))
|
||||||
},
|
},
|
||||||
import.meta.url
|
import.meta.url
|
||||||
);
|
)
|
||||||
|
|
||||||
// export async function getStaticPaths() {
|
// export async function getStaticPaths() {
|
||||||
// const articles = await getCollection("articles", ({ data }) => {
|
// const articles = await getCollection("articles", ({ data }) => {
|
||||||
@ -28,12 +28,12 @@ export const getStaticPaths = createStaticPaths(
|
|||||||
// console.log(articles);
|
// console.log(articles);
|
||||||
|
|
||||||
// return articles.map((article) => ({
|
// return articles.map((article) => ({
|
||||||
// params: { slug: article.data.permalink },
|
// params: { slug: article.data.slug },
|
||||||
// props: { article },
|
// props: { article },
|
||||||
// }));
|
// }));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const { article } = Astro.props;
|
const { article } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout pageTitle={article.data.title}>
|
<BaseLayout pageTitle={article.data.title}>
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
---
|
---
|
||||||
import { createStaticPaths } from "astro-i18n";
|
import { createStaticPaths } from 'astro-i18n'
|
||||||
// import { astroI18n } from "astro-i18n";
|
// import { astroI18n } from "astro-i18n";
|
||||||
|
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from 'astro:content'
|
||||||
import EditorialContent from "../../components/EditorialContent.astro";
|
import EditorialContent from '../../components/EditorialContent.astro'
|
||||||
|
|
||||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
import BaseLayout from '../../layouts/BaseLayout.astro'
|
||||||
|
|
||||||
export const getStaticPaths = createStaticPaths(
|
export const getStaticPaths = createStaticPaths(
|
||||||
async ({ langCode }) => {
|
async ({ langCode }) => {
|
||||||
const snippets = await getCollection("fragments", ({ data }) => {
|
const snippets = await getCollection('fragments', ({ data }) => {
|
||||||
return data.lang === langCode;
|
return data.lang === langCode
|
||||||
});
|
})
|
||||||
return snippets.map((snippet) => ({
|
return snippets.map((snippet) => ({
|
||||||
params: { id: snippet.data.permalink },
|
params: { id: snippet.data.slug },
|
||||||
props: { snippet },
|
props: { snippet }
|
||||||
}));
|
}))
|
||||||
},
|
},
|
||||||
import.meta.url
|
import.meta.url
|
||||||
);
|
)
|
||||||
|
|
||||||
// export async function getStaticPaths() {
|
// export async function getStaticPaths() {
|
||||||
// const snippets = await getCollection("fragments", ({ data }) => {
|
// const snippets = await getCollection("fragments", ({ data }) => {
|
||||||
// return data.lang === astroI18n.langCode;
|
// return data.lang === astroI18n.langCode;
|
||||||
// });
|
// });
|
||||||
// return snippets.map((snippet) => ({
|
// return snippets.map((snippet) => ({
|
||||||
// params: { slug: snippet.data.permalink },
|
// params: { slug: snippet.data.slug },
|
||||||
// props: { snippet },
|
// props: { snippet },
|
||||||
// }));
|
// }));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
const { snippet } = Astro.props;
|
const { snippet } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout pageTitle={snippet.data.title}>
|
<BaseLayout pageTitle={snippet.data.title}>
|
||||||
|
@ -1,57 +1,61 @@
|
|||||||
---
|
---
|
||||||
const locale = Astro.currentLocale;
|
import { getCollection, render } from 'astro:content'
|
||||||
|
|
||||||
// import stuff
|
import BaseLayout from '../layouts/BaseLayout.astro'
|
||||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
import QuickAccessCard from '../components/QuickAccessCard.astro'
|
||||||
import QuickAccessCard from "../components/QuickAccessCard.astro";
|
import ListCards from '../components/ListCards.astro'
|
||||||
import ListCards from "../components/ListCards.astro";
|
|
||||||
|
|
||||||
const pageTitle = t("accueil");
|
const pageTitle = 'Accueil'
|
||||||
|
|
||||||
// get all HP sections
|
// get all HP sections
|
||||||
const allSections = Object.values(
|
const HPsections = await getCollection('HPsections').then(async (entries) => {
|
||||||
import.meta.glob("../data/HP/**/*.md", { eager: true })
|
entries.sort((a, b) => a.data.order - b.data.order)
|
||||||
);
|
return Promise.all(
|
||||||
// only keep the right locale version
|
entries.map(async (entry) => {
|
||||||
const localizedSections = allSections.filter((section) => {
|
// render and return entry + content
|
||||||
return section.frontmatter.lang === locale;
|
const { Content } = await render(entry)
|
||||||
});
|
return {
|
||||||
|
...entry,
|
||||||
|
Content
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
// New astro content collections
|
const allArticles = await getCollection('articles', ({ data }) => {
|
||||||
import { getCollection } from "astro:content";
|
return !data.draft && data.lang === 'fr'
|
||||||
// Only return posts with correct lang in the frontmatter
|
}).then((entries) =>
|
||||||
const localizedArticles = await getCollection("articles", ({ data }) => {
|
// sort results
|
||||||
return data.lang === locale && !data.draft;
|
entries.sort(
|
||||||
});
|
(a, b) => b.data.createdAt.getTime() - a.data.createdAt.getTime()
|
||||||
// sort articles by descending publication date
|
)
|
||||||
const sortedArticles = localizedArticles.sort(
|
)
|
||||||
(a, b) => b.data.createdAt - a.data.createdAt
|
|
||||||
);
|
const allSnippets = await getCollection('fragments', ({ data }) => {
|
||||||
// Only return snippets with correct lang in the frontmatter
|
return !data.draft && data.lang === 'fr'
|
||||||
const localizedSnippets = await getCollection("fragments", ({ data }) => {
|
}).then((entries) =>
|
||||||
return data.lang === locale && !data.draft;
|
entries.sort(
|
||||||
});
|
(a, b) => b.data.createdAt.getTime() - a.data.createdAt.getTime()
|
||||||
// sort articles by descending publication date
|
)
|
||||||
const sortedSnippets = localizedSnippets.sort(
|
)
|
||||||
(a, b) => b.data.createdAt - a.data.createdAt
|
const allReferences = await getCollection('references')
|
||||||
);
|
|
||||||
const localizedReferences = await getCollection("references", ({ data }) => {
|
|
||||||
return data.lang === locale && !data.draft;
|
|
||||||
});
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout pageTitle={pageTitle}>
|
<BaseLayout pageTitle={pageTitle}>
|
||||||
<section class="region intro">
|
<section class='region intro'>
|
||||||
<h1 set:html={t("index.title")} />
|
<h1>
|
||||||
<section class="quick-access">
|
Création de <span class='highlight'>sites web</span>
|
||||||
<h2 class="intro__subtitle">{t("index.subtitle")}</h2>
|
<a href='/articles/faq' class='clean-link'>sobres et accessibles</a>
|
||||||
<ul class="quick-access__list" role="list">
|
</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) =>
|
||||||
section.frontmatter.id && (
|
section.data.uid && (
|
||||||
<li>
|
<li>
|
||||||
<QuickAccessCard item={section.frontmatter} />
|
<QuickAccessCard item={section.data} />
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -61,49 +65,43 @@ const localizedReferences = await getCollection("references", ({ data }) => {
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
{
|
{
|
||||||
localizedSections.map((section) => (
|
HPsections.map(({ data, Content }) => (
|
||||||
<section id={section.frontmatter.id} class="region section">
|
<section id={data.uid} class='region section'>
|
||||||
<div class="section__container">
|
<div class='section__container'>
|
||||||
<div class="flow section__content">
|
<div class='flow section__content'>
|
||||||
<section.Content />
|
<Content />
|
||||||
{section.frontmatter.reference && (
|
{data.reference && (
|
||||||
<div class="section__reference">
|
<div class='section__reference'>
|
||||||
<ListCards
|
<ListCards
|
||||||
list={localizedReferences.filter((ref) => {
|
list={allReferences.filter((ref) => {
|
||||||
return ref.data.permalink === section.frontmatter.reference;
|
return ref.data.slug === data.reference
|
||||||
})}
|
})}
|
||||||
routeName={t("references.slug")}
|
routeName='references'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div class="section__image">
|
<div class='section__image'>
|
||||||
<img
|
<img src={data.image} width='400' height='350' alt='' />
|
||||||
src={section.frontmatter.image}
|
|
||||||
width="400"
|
|
||||||
height="350"
|
|
||||||
alt=""
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
<section class="region flow latest">
|
<section class='region flow latest'>
|
||||||
<div class="flow latest__articles">
|
<div class='flow latest__articles'>
|
||||||
<h2>{t("index.latestArticles")}</h2>
|
<h2>Derniers articles</h2>
|
||||||
<ListCards list={sortedArticles} routeName={t("article.titre")} />
|
<ListCards list={allArticles} routeName='articles' />
|
||||||
<p class="latest__link">
|
<p class='latest__link'>
|
||||||
<a href={l("/articles")}>{t("index.allArticles")}</a>
|
<a href='/articles'>Tous les articles</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flow latest__snippets">
|
<div class='flow latest__snippets'>
|
||||||
<h2>{t("index.latestSnippets")}</h2>
|
<h2>Derniers fragments</h2>
|
||||||
<ListCards list={sortedSnippets} routeName={t("fragments.titre")} />
|
<ListCards list={allSnippets} routeName='fragments' />
|
||||||
<p class="latest__link">
|
<p class='latest__link'>
|
||||||
<a href={l("/fragments")}>{t("index.allSnippets")}</a>
|
<a href='/fragments'>Tous les fragments</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@ -115,7 +113,7 @@ const localizedReferences = await getCollection("references", ({ data }) => {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.intro::before {
|
.intro::before {
|
||||||
content: "";
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -30%;
|
top: -30%;
|
||||||
left: -10%;
|
left: -10%;
|
||||||
@ -142,7 +140,7 @@ const localizedReferences = await getCollection("references", ({ data }) => {
|
|||||||
}
|
}
|
||||||
.intro__subtitle {
|
.intro__subtitle {
|
||||||
margin: var(--space-s-m) 0;
|
margin: var(--space-s-m) 0;
|
||||||
font-family: "wotfard";
|
font-family: 'wotfard';
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--color-dark-blue);
|
color: var(--color-dark-blue);
|
||||||
|
@ -1,44 +1,40 @@
|
|||||||
---
|
---
|
||||||
// init i18n
|
import BaseLayout from '../layouts/BaseLayout.astro'
|
||||||
import { l, t, astroI18n } from "astro-i18n";
|
|
||||||
astroI18n.init(Astro);
|
|
||||||
|
|
||||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
|
||||||
|
|
||||||
// New astro content collections
|
// New astro content collections
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from 'astro:content'
|
||||||
|
|
||||||
// get all articles
|
// get all articles
|
||||||
const localizedArticles = await getCollection("articles", ({ data }) => {
|
const allArticles = await getCollection('articles', ({ data }) => {
|
||||||
return data.lang === astroI18n.langCode && !data.draft;
|
return !data.draft
|
||||||
});
|
})
|
||||||
// get all snippets
|
// get all snippets
|
||||||
const localizedFragments = await getCollection("fragments", ({ data }) => {
|
const allFragments = await getCollection('fragments', ({ data }) => {
|
||||||
return data.lang === astroI18n.langCode && !data.draft;
|
return !data.draft
|
||||||
});
|
})
|
||||||
|
|
||||||
const pageTitle = t("sitemap");
|
const pageTitle = 'Plan du site'
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout pageTitle={pageTitle}>
|
<BaseLayout pageTitle={pageTitle}>
|
||||||
<section class="region">
|
<section class='region'>
|
||||||
<h1>{t("sitemap")}</h1>
|
<h1>{pageTitle}</h1>
|
||||||
<ul class="flow sitemap" role="list">
|
<ul class='flow sitemap' role='list'>
|
||||||
<li>
|
<li>
|
||||||
<h2>
|
<h2>
|
||||||
<a href={l("/")}>{t("accueil")}</a>
|
<a href='/'>Accueil</a>
|
||||||
</h2>
|
</h2>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<h2>
|
<h2>
|
||||||
<a href={l("/articles")}>{t("article.titre")}</a>
|
<a href='/articles'>Articles</a>
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{
|
{
|
||||||
localizedArticles.map((article) => (
|
allArticles.map((article) => (
|
||||||
<li>
|
<li>
|
||||||
<a href={l("/articles/[slug]", { slug: article.slug })}>
|
<a href={`/articles/${article.data.slug}`}>
|
||||||
{article.data.title}
|
{article.data.title} <sup>({article.data.lang})</sup>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
@ -47,14 +43,17 @@ const pageTitle = t("sitemap");
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<h2>
|
<h2>
|
||||||
<a href={l("/fragments")}>{t("fragments.titre")}</a>
|
<a href='/fragments'>Fragments</a>
|
||||||
</h2>
|
</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{
|
{
|
||||||
localizedFragments.map((fragment) => (
|
allFragments.map((fragment) => (
|
||||||
<li>
|
<li>
|
||||||
<a href={l("/fragments/[slug]", { slug: fragment.slug })}>
|
<a
|
||||||
{fragment.data.title}
|
href={`/fragments/${fragment.id}`}
|
||||||
|
lang={fragment.data.lang !== 'fr' ? fragment.data.lang : null}
|
||||||
|
>
|
||||||
|
{fragment.data.title} <sup>({fragment.data.lang})</sup>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
@ -63,12 +62,12 @@ const pageTitle = t("sitemap");
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<h2>
|
<h2>
|
||||||
<a href={l("/references")}>{t("references.titre")}</a>
|
<a href='/references'>Références</a>
|
||||||
</h2>
|
</h2>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<h2>
|
<h2>
|
||||||
<a href={l("/veille")}>{t("veille.titre")}</a>
|
<a href='/veille'>Veille</a>
|
||||||
</h2>
|
</h2>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -76,11 +75,13 @@ const pageTitle = t("sitemap");
|
|||||||
</BaseLayout>
|
</BaseLayout>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
h2 {
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sitemap * + * {
|
.sitemap * + * {
|
||||||
margin-block-start: 20px;
|
margin-block-start: var(--space-s);
|
||||||
|
}
|
||||||
|
.sitemap > * + * {
|
||||||
|
margin-block-start: var(--space-l);
|
||||||
|
}
|
||||||
|
sup {
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
import rss from "@astrojs/rss";
|
import rss from '@astrojs/rss'
|
||||||
import { getCollection } from "astro:content";
|
import { getCollection } from 'astro:content'
|
||||||
|
|
||||||
export async function get(context) {
|
export async function get(context) {
|
||||||
const articles = await getCollection("articles", ({ data }) => {
|
const articles = await getCollection('articles', ({ data }) => {
|
||||||
return data.lang === "fr" && !data.draft;
|
return data.lang === 'fr' && !data.draft
|
||||||
});
|
})
|
||||||
const fragments = await getCollection("fragments", ({ data }) => {
|
const fragments = await getCollection('fragments', ({ data }) => {
|
||||||
return data.lang === "fr" && !data.draft;
|
return data.lang === 'fr' && !data.draft
|
||||||
});
|
})
|
||||||
const posts = articles.concat(fragments);
|
const posts = articles.concat(fragments)
|
||||||
return rss({
|
return rss({
|
||||||
// `<title>` field in output xml
|
// `<title>` field in output xml
|
||||||
title: "Nicolas Arduin",
|
title: 'Nicolas Arduin',
|
||||||
// `<description>` field in output xml
|
// `<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
|
// Pull in your project "site" from the endpoint context
|
||||||
// https://docs.astro.build/en/reference/api-reference/#contextsite
|
// https://docs.astro.build/en/reference/api-reference/#contextsite
|
||||||
site: context.site,
|
site: context.site,
|
||||||
@ -26,9 +26,9 @@ export async function get(context) {
|
|||||||
lang: post.data.lang,
|
lang: post.data.lang,
|
||||||
// Compute RSS link from post `slug`
|
// Compute RSS link from post `slug`
|
||||||
// This example assumes all posts are rendered as `/blog/[slug]` routes
|
// 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
|
// (optional) inject custom xml
|
||||||
customData: `<language>fr-fr</language>`,
|
customData: `<language>fr-fr</language>`
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user