Spaces:
Running
Running
thibaud frere commited on
Commit ·
fef84f3
1
Parent(s): fc7711a
update
Browse filesFiles changed (12)
- app/.astro/astro/content.d.ts-164
- app/astro.config.mjs+9-9
- app/src/components/FullBleed.astroAdded+9
- app/src/components/ThemeToggle.astro+1-1
- app/src/components/Wide.astroAdded+9
- app/src/pages/article.mdx+141-66
- app/src/pages/index.astro+14-1
- app/src/styles/components/_base.scss → app/src/styles/_base.scssRenamed+57-5
- app/src/styles/components/_layout.scss → app/src/styles/_layout.scssRenamed+63-1
- app/src/styles/components/_variables.scss → app/src/styles/_variables.scssRenamed+5
- app/src/styles/components/_footer.scssAdded+8
- app/src/styles/global.scss+6-26
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164declare 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' {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 SSRentrySlug: 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]? 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 = {};type AnyEntryMap = ContentEntryMap & DataEntryMap;export type ContentConfig = never;}
6 unmodified lines789101112131415161718193 unmodified lines23242526272829303132333435366 unmodified linesimport rehypeSlug from 'rehype-slug';import rehypeAutolinkHeadings from 'rehype-autolink-headings';import rehypeCitation from 'rehype-citation';import rehypePrettyCode from 'rehype-pretty-code';export default defineConfig({output: 'static',integrations: [mdx()],markdown: {remarkPlugins: [[remarkToc, { heading: 'Table of Contents', maxDepth: 3 }],remarkMath,3 unmodified linesrehypeSlug,[rehypeAutolinkHeadings, { behavior: 'wrap' }],rehypeKatex,[rehypePrettyCode, {theme: {light: 'github-light',dark: 'github-dark'},keepBackground: false,defaultLang: 'text'}],[rehypeCitation, {bibliography: 'src/content/bibliography.bib',linkCitations: true6 unmodified lines7891011121314151617181920212223242526273 unmodified lines3132333435366 unmodified linesimport rehypeSlug from 'rehype-slug';import rehypeAutolinkHeadings from 'rehype-autolink-headings';import rehypeCitation from 'rehype-citation';// Shiki intégré (dual themes) — pas de rehype-pretty-codeexport default defineConfig({output: 'static',integrations: [mdx()],markdown: {shikiConfig: {themes: {light: 'github-light',dark: 'github-dark'},defaultColor: false,wrap: true},remarkPlugins: [[remarkToc, { heading: 'Table of Contents', maxDepth: 3 }],remarkMath,3 unmodified linesrehypeSlug,[rehypeAutolinkHeadings, { behavior: 'wrap' }],rehypeKatex,[rehypeCitation, {bibliography: 'src/content/bibliography.bib',linkCitations: true
123456789---const { class: className, ...props } = Astro.props;const wrapperClass = ["full-bleed", className].filter(Boolean).join(" ");---<div class={wrapperClass} {...props}> <slot /></div>
14 unmodified lines1516171819202114 unmodified linesdocument.documentElement.dataset.theme = mode;};// Initial mode: localStorage overrides system preferenceapply(saved || (prefersDark ? 'dark' : 'light'));// If user hasn't chosen manually, follow system changes14 unmodified lines1516171819202114 unmodified linesdocument.documentElement.dataset.theme = mode;};// Initial mode: default to light, then use localStorage, else systemapply(saved || (prefersDark ? 'dark' : 'light'));// If user hasn't chosen manually, follow system changes
123456789---const { class: className, ...props } = Astro.props;const wrapperClass = ["wide", className].filter(Boolean).join(" ");---<div class={wrapperClass} {...props}> <slot /></div>
13 unmodified lines1415161718192021222324252627282930313233343536373839404113 unmodified lines55565758596061626364656667686970717273747576777879808182838485869 unmodified lines9697989910010110210310410510610710810912 unmodified lines1221231241251261271281291301311321331341351361371381391401415 unmodified lines14714814915015115246 unmodified lines19920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223317 unmodified lines25125225325425525625725825926026126226326426526626726826927012 unmodified lines28328428528628728822 unmodified lines31131231331431531631731831932032132232332432532632732832933013 unmodified lines---import HtmlFragment from "../components/HtmlFragment.astro";import { Image } from 'astro:assets';import placeholder from "../assets/images/placeholder.jpg";import audioDemo from "../assets/audio/audio-example.wav";import Aside from "../components/Aside.astro";import visualPoster from "../assets/images/visual-vocabulary-poster.png";<Aside>Welcome to this single-page research article template built with Astro and MDX.It’s designed to help you write clear, modern, and interactive technical articles with minimal setup.Whether you cover machine learning, data science, physics, or software topics, this template keeps the authoring flow simple while offering robust features out of the box.<Fragment slot="aside">Reading time: 10–15 minutes.</Fragment>In this guide, you’ll learn how to install the template,write content (math, citations, images, code, asides, interactive fragments),customize styles and behavior, and follow a few best practices for publishing.<Fragment slot="aside">If you have questions or remarks open a discussion on the <a href="https://huggingface.co/spaces/tfrere/science-blog-template/discussions?status=open&type=discussion">Community tab</a>!</Fragment></Aside>## Features<div className="tag-list">13 unmodified lines## Getting StartedInstallation:```bashnpm installnpm run dev```Build for production:```bashnpm run build```Deployment: serve the `dist/` directory on any static host. A Docker/Nginx setup is included and works well on Spaces or similar environments.Large assets: track binaries (e.g., `.png`, `.wav`) with Git LFS to keep the repository lean. This project is preconfigured to store such files via LFS.## Writing Your ContentAuthor content in MDX. Below are minimal examples for the core elements.### MDX: frontmatter and imports (minimal example)The initial skeleton of this article looks like this:```mdx---title: "The science template:\nCraft Beautiful Blogs"description: "A modern, MDX-first research article template with math, citations, and interactive figures."9 unmodified linesogImage: "https://example.com/your-og-image.png"---import HtmlFragment from "../components/HtmlFragment.astro";import { Image } from 'astro:assets';import placeholder from "../assets/images/placeholder.png";import audioDemo from "../assets/audio/audio-example.wav";import Aside from "../components/Aside.astro";import visualPoster from "../assets/images/visual-vocabulary-poster.png";<Aside>Welcome to this single-page research article template built with Astro and MDX.It’s designed to help you write clear, modern, and interactive technical articles with minimal setup.12 unmodified lines```### MathInline example: $x^2 + y^2 = z^2$.Block (scaled dot-product attention):$$\mathrm{Attention}(Q, K, V) = \mathrm{softmax}\!\left(\frac{QK^{\top}}{\sqrt{d_k}}\right) V$$```mdxInline: $x^2 + y^2 = z^2$Block:$$\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V$$5 unmodified lines**Optional:** Zoomable (Medium-like lightbox): add `data-zoomable` to opt-in. Only images with this attribute will open full-screen on click.<figure><Imagesrc={placeholder}46 unmodified lines```````### GitHub code embedsFinally, if you want to include code from GitHub you can use emgithub.com and, for example, create a collapsible widget like this:```html<details style="background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; margin: 1em 0;"><summary style="padding: 12px; cursor: pointer; user-select: none; background: #f3f4f6; border-bottom: 1px solid #d0d7de;">👉 Naive DP implementation with overlap in Picotron (Click to expand)</summary><div class="code-embed-container" style="margin: 0; border-radius: 0; overflow-x: scroll; width: max-content; min-width: 100%; font-size: 8px;"></div><scriptsrc="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fpicotron%2Fblob%2F0035cce0e04afd6192763b11efe50010d8ad0f71%2Fpicotron%2Fdata_parallel%2Fdata_parallel.py%23L10-L60&style=github&type=code&showBorder=off&showLineNumbers=on&showFileMeta=on&showCopy=on&showFullPath=on"></script></details>```Which will display as follows:<details style="background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; margin: 1em 0;"><summary style="padding: 12px; cursor: pointer; user-select: none; background: #f3f4f6; border-bottom: 1px solid #d0d7de;">👉 Naive DP implementation with overlap in Picotron (Click to expand)</summary><div class="code-embed-container" style="margin: 0; border-radius: 0; overflow-x: scroll; width: max-content; min-width: 100%; font-size: 8px;"></div><scriptsrc="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fpicotron%2Fblob%2F0035cce0e04afd6192763b11efe50010d8ad0f71%2Fpicotron%2Fdata_parallel%2Fdata_parallel.py%23L10-L60&style=github&type=code&showBorder=off&showLineNumbers=on&showFileMeta=on&showCopy=on&showFullPath=on"></script></details>### Citations and notesHere are a few variations using the same bibliography:17 unmodified lines```### Interactive fragmentsPlotly example (line):<div className="plot-card"><HtmlFragment src="line.html" /></div>```mdximport HtmlFragment from '../components/HtmlFragment.astro'<HtmlFragment src="line.html" />```### Asides<Aside>12 unmodified lines</Aside>```### Minimal table| Method | Score |22 unmodified lines</audio>```### Tracking training metrics with TrackIOTrackIO is a lightweight dashboard to monitor ML experiments. The embed below opens a demo project and shows a couple of metrics. You can customize the query parameters (`project`, `metrics`, `sidebar`) to fit your setup.<div style="margin-top: 8px;"><iframe src="https://trackio-documentation.hf.space/?project=fake-training-750735&metrics=train_loss,train_accuracy&sidebar=hidden" width="100%" height="600" frameborder="0"></iframe></div>To embed TrackIO in your own page, copy the following HTML and adjust the `src` parameters:```html<iframe src="https://org_name-space_name.hf.space/?project=fake-training&metrics=train_loss,train_accuracy&sidebar=hidden" width="100%" height="600" frameBorder="0"></iframe>```## Best Practices- Keep sections short and focused.13 unmodified lines1415161718192021222324252627282930313233343536373839404142434413 unmodified lines5859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161179 unmodified lines12712812913013113213313413513613713813914012 unmodified lines1531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911925 unmodified lines19819920020120220320420546 unmodified lines25225325425525625717 unmodified lines27527627727827928012 unmodified lines29329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033122 unmodified lines35435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440513 unmodified lines---import HtmlFragment from "../components/HtmlFragment.astro";import Wide from "../components/Wide.astro";import FullBleed from "../components/FullBleed.astro";import { Image } from 'astro:assets';import placeholder from "../assets/images/placeholder.jpg";import audioDemo from "../assets/audio/audio-example.wav";import Aside from "../components/Aside.astro";import visualPoster from "../assets/images/visual-vocabulary-poster.png";<Aside>Welcome to this single-page research article template built with **Astro** and **MDX**.It’s designed to help you write clear, modern, and **interactive** technical articles with **minimal setup**.Whether you cover machine learning, data science, physics, or software topics, this template keeps the authoring flow simple while offering robust features out of the box.<Fragment slot="aside">Reading time: 10–15 minutes.</Fragment>In this guide, you’ll learn how to install the template,write content (math, citations, images, code, asides, interactive fragments),customize styles and behavior, and follow a few **best practices** for publishing.<Fragment slot="aside">If you have questions or remarks open a discussion on the <a href="https://huggingface.co/spaces/tfrere/science-blog-template/discussions?status=open&type=discussion">Community tab</a>!</Fragment></Aside>Ce template est heavely inspired by distill.## Features<div className="tag-list">13 unmodified lines## Getting Started### Installation```bashgit lfs installgit lfs pullcd appnpm install```### Development```bashnpm run dev```### Build```bashnpm run build```Serving the `dist/` directory on any static host is enough to deliver the site.### DeployThe easiest way to get online is to clone [this Hugging Face Space](https://huggingface.co/spaces/tfrere/science-blog-template) and push your changes; every push triggers an automatic build and deploy.### Large files (Git LFS)Track binaries (e.g., `.png`, `.wav`) with Git LFS to keep the repository lean. This project is preconfigured to store such files via LFS.## Writing Your Content### MDXAuthor your content in MDX for a pleasant, productive writing flow that combines familiar Markdown with reusable components when needed.Below are minimal examples of the core elements.Don't forget to enable syntax highlighting for MDX to make your editing experience even smoother!```bash# For VS Code but alternatively, use the Extensions marketplace UI and search for "MDX" by unifiedjs.code --install-extension unifiedjs.vscode-mdx```The initial skeleton of this article looks like this:```mdx{/* HEADER */}---title: "The science template:\nCraft Beautiful Blogs"description: "A modern, MDX-first research article template with math, citations, and interactive figures."9 unmodified linesogImage: "https://example.com/your-og-image.png"---{/* IMPORTS */}import { Image } from 'astro:assets';import Aside from "../components/Aside.astro";import HtmlFragment from "../components/HtmlFragment.astro";import placeholder from "../assets/images/placeholder.png";import audioDemo from "../assets/audio/audio-example.wav";{/* CONTENT */}<Aside>Welcome to this single-page research article template built with Astro and MDX.It’s designed to help you write clear, modern, and interactive technical articles with minimal setup.12 unmodified lines```It is composed of three parts:- **Header**: which contains the title and the article's metadata.- **Imports**: the imports of the different modules / images used in the article- **Content**: the content of the article**Available blocs**:<div className="tag-list"><a className="tag" href="#math">Math</a><a className="tag" href="#images">Images</a><a className="tag" href="#code-blocks">Code</a><a className="tag" href="#citations-and-notes">Citations & notes</a><a className="tag" href="#asides">Asides</a><a className="tag" href="#minimal-table">Array</a><a className="tag" href="#audio">Audio</a><a className="tag" href="#interactive-fragments">Interactive fragments</a><a className="tag" href="#tracking-training-metrics-with-trackio">TrackIO</a></div>### MathInline example: $x^2 + y^2 = z^2$.Block example:$$x^2 + y^2 = z^2$$```mdxInline example: $x^2 + y^2 = z^2$Block example:$$\mathrm{Attention}(Q,K,V)=\mathrm{softmax}\!\left(\frac{QK^\top}{\sqrt{d_k}}\right) V$$5 unmodified lines**Optional:** Zoomable (Medium-like lightbox): add `data-zoomable` to opt-in. Only images with this attribute will open full-screen on click.**Optional:** Figcaption and credits<figure><Imagesrc={placeholder}46 unmodified lines```````### Citations and notesHere are a few variations using the same bibliography:17 unmodified lines```### Asides<Aside>12 unmodified lines</Aside>```### Width helpersUse these helpers to expand content beyond the main column when needed. They will always be centered and displayed above every other content.**Wide example**<Wide><div className="demo-wide">demo wide</div></Wide>```mdximport Wide from '../components/Wide.astro'<Wide>Your content here...</Wide>```**Full-bleed example**<FullBleed><div className="demo-full-bleed">demo full-bleed</div></FullBleed>```mdximport FullBleed from '../components/FullBleed.astro'<FullBleed>Your content here...</FullBleed>```### Minimal table| Method | Score |22 unmodified lines</audio>```### Embeds#### HtmlFragmentsThe main purpose of the ```HtmlFragment``` component is to embed a plotly or d3 chart in your article. Libraries are already imported in the template.<div className="plot-card"><HtmlFragment src="line.html" /></div>```mdximport HtmlFragment from '../components/HtmlFragment.astro'<HtmlFragment src="line.html" />```#### IframesYou can embed external content in your article using **iframes**. For example, TrackIO—a lightweight dashboard to monitor machine learning experiments—can be used this way. The example below opens a demo project and displays a couple of metrics. You can customize the query parameters (`project`, `metrics`, `sidebar`, etc.) to fit your needs.<iframe className="plot-card" src="https://trackio-documentation.hf.space/?project=fake-training-750735&metrics=train_loss,train_accuracy&sidebar=hidden&lang=en" width="100%" height="600" frameborder="0"></iframe>To embed TrackIO in your own page, copy the following HTML and adjust the `src` parameters:#### GitHub code embedsFinally, if you want to include code from GitHub you can use emgithub.com and, for example, create a collapsible widget like this:<div class="code-embed-container"></div><scriptsrc="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fpicotron%2Fblob%2F0035cce0e04afd6192763b11efe50010d8ad0f71%2Fpicotron%2Fdata_parallel%2Fdata_parallel.py%23L10-L60&style=github&type=code&showBorder=off&showLineNumbers=on&showFileMeta=on&showCopy=on&showFullPath=on"></script>```html<div class="code-embed-container"></div><scriptsrc="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2Fhuggingface%2Fpicotron%2Fblob%2F0035cce0e04afd6192763b11efe50010d8ad0f71%2Fpicotron%2Fdata_parallel%2Fdata_parallel.py%23L10-L60&style=github&type=code&showBorder=off&showLineNumbers=on&showFileMeta=on&showCopy=on&showFullPath=on"></script>```## Best Practices- Keep sections short and focused.
47 unmodified lines48495051525354555657585994 unmodified lines15415515615715815947 unmodified linesconst bibKey = `${keyAuthor}${year ?? ''}_${keyTitle}`;const bibtex = `@misc{${bibKey},\n title={${titleFlat}},\n author={${authorsBib}},\n ${year ? `year={${year}}` : ''}\n}`;---<html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>{docTitle}</title><SeoHead title={docTitle} description={description} authors={authors} published={published} tags={tags} image={imageAbs} /><script src="https://cdn.plot.ly/plotly-3.0.0.min.js" charset="utf-8"></script></head>94 unmodified lineselse window.addEventListener('load', bootstrap, { once: true });})();</script><script>// Open external links in a new tab; keep internal anchors in-pageconst setExternalTargets = () => {47 unmodified lines484950515253545556575859606162636465666768697094 unmodified lines16516616716816917017117247 unmodified linesconst bibKey = `${keyAuthor}${year ?? ''}_${keyTitle}`;const bibtex = `@misc{${bibKey},\n title={${titleFlat}},\n author={${authorsBib}},\n ${year ? `year={${year}}` : ''}\n}`;---<html lang="en" data-theme="light"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>{docTitle}</title><SeoHead title={docTitle} description={description} authors={authors} published={published} tags={tags} image={imageAbs} /><script is:inline>(() => {try {const saved = localStorage.getItem('theme');const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;const theme = saved || (prefersDark ? 'dark' : 'light');document.documentElement.setAttribute('data-theme', theme);} catch {}})();</script><script src="https://cdn.plot.ly/plotly-3.0.0.min.js" charset="utf-8"></script></head>94 unmodified lineselse window.addEventListener('load', bootstrap, { once: true });})();</script><script>// Open external links in a new tab; keep internal anchors in-pageconst setExternalTargets = () => {
21 unmodified lines222324252627282 unmodified lines313233343536371 unmodified line3940414243444520 unmodified lines666768697071727338 unmodified lines11211311411511611711821 unmodified linesfont-weight: 600;font-size: clamp(22px, 2.6vw, 32px);line-height: 1.2;margin: var(--spacing-5) 0 var(--spacing-3);padding-bottom: var(--spacing-2);border-bottom: 1px solid var(--border-color);}2 unmodified linesfont-weight: 700;font-size: clamp(18px, 2.1vw, 22px);line-height: 1.25;margin: var(--spacing-4) 0 var(--spacing-2);}.content-grid main h4 {1 unmodified linetext-transform: uppercase;font-size: 14px;line-height: 1.2;margin: var(--spacing-3) 0 var(--spacing-2);}.content-grid main a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--link-underline); }20 unmodified linesmargin: var(--spacing-4) 0;}.content-grid main pre { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: var(--spacing-3); font-size: 14px; overflow: auto; }.content-grid main code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }/* Pretty-code language label (visible chip at top-right) */.content-grid main pre:has(code[data-language]),38 unmodified lines.content-grid main hr { border: none; border-bottom: 1px solid var(--border-color); margin: var(--spacing-5) 0; }// ============================================================================// Media / Figures21 unmodified lines222324252627282 unmodified lines313233343536371 unmodified line3940414243444520 unmodified lines6667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711838 unmodified lines15715815916016116216316416516616716816917021 unmodified linesfont-weight: 600;font-size: clamp(22px, 2.6vw, 32px);line-height: 1.2;margin: var(--spacing-10) 0 var(--spacing-5);padding-bottom: var(--spacing-2);border-bottom: 1px solid var(--border-color);}2 unmodified linesfont-weight: 700;font-size: clamp(18px, 2.1vw, 22px);line-height: 1.25;margin: var(--spacing-8) 0 var(--spacing-4);}.content-grid main h4 {1 unmodified linetext-transform: uppercase;font-size: 14px;line-height: 1.2;margin: var(--spacing-8) 0 var(--spacing-4);}.content-grid main a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--link-underline); }20 unmodified linesmargin: var(--spacing-4) 0;}.content-grid main pre:not(.astro-code) { background: var(--code-bg); border: 1px solid var(--border-color); border-radius: 6px; padding: var(--spacing-3); font-size: 14px; overflow: auto; }/* Sync Shiki variables with current theme *//* Standard wrapper look for code blocks */.astro-code { border: 1px solid var(--border-color); border-radius: 6px; padding: var(--spacing-3); padding-left: calc(var(--spacing-3) + 6px); font-size: 14px; }html[data-theme='light'] .astro-code { background-color: var(--code-bg); }html[data-theme='dark'] .astro-code { background-color: var(--shiki-dark-bg); }/* Apply token color from per-span vars exposed by Shiki dual themes */html[data-theme='light'] .astro-code span { color: var(--shiki-light) !important; }html[data-theme='dark'] .astro-code span { color: var(--shiki-dark) !important; }/* Token color remapping using Shiki CSS variables on the wrapper *//* Optionnel: booster le contraste light */html[data-theme='light'] .astro-code {--shiki-foreground: #24292f;--shiki-background: #ffffff;}/* Rely on Shiki's own token spans; no class remap */.content-grid main code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }/* Placeholder block (discreet centered text) */.placeholder-block {display: grid;place-items: center;min-height: 120px;color: var(--muted-color);font-size: 12px;border: 1px dashed var(--border-color);border-radius: 8px;background: var(--surface-bg);}/* Demo blocks for width helpers */.demo-wide,.demo-full-bleed {display: grid;place-items: center;min-height: 150px;color: var(--muted-color);font-size: 12px;border: 1px dashed var(--border-color);border-radius: 8px;background: var(--surface-bg);}/* Pretty-code language label (visible chip at top-right) */.content-grid main pre:has(code[data-language]),38 unmodified lines.content-grid main hr { border: none; border-bottom: 1px solid var(--border-color); margin: var(--spacing-5) 0; }.code-block {background: var(--code-bg);border: 1px solid var(--border-color);border-radius: 6px;padding: var(--spacing-3);font-size: 14px;overflow: auto;}// ============================================================================// Media / Figures
29 unmodified lines3031323329 unmodified lines.toc { position: static; }.right-aside { display: none; }main > nav:first-of-type { display: block; }}29 unmodified lines30313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949529 unmodified lines.toc { position: static; }.right-aside { display: none; }main > nav:first-of-type { display: block; }}.margin-aside { position: relative; margin: 12px 0; }.margin-aside__aside {position: absolute;top: 0;right: -260px; /* push into the right grid column (width 260 + gap 32) */width: 260px;border-radius: 8px;padding: 0 10px;font-size: 0.9rem;color: var(--muted-color);}@media (max-width: 1100px) {.margin-aside__aside {position: static;width: auto;margin-top: 8px;}}// ============================================================================// Width helpers – slightly wider than main column, and full-bleed to viewport// ----------------------------------------------------------------------------// Usage in MDX:// <div className="wide"> ... </div>// <div className="full-bleed"> ... </div>// These center the content relative to the viewport while keeping it responsive.//// Notes:// - These helpers work inside the main article column; they break out visually// to be wider or fully span the viewport. On small screens, they fall back to 100%.// - Adjust the target width in .wide if desired..wide,.full-bleed { box-sizing: border-box; }.wide {/* Target up to ~1100px while staying within viewport minus page gutters */width: min(1100px, 100vw - 32px);margin-left: 50%;transform: translateX(-50%);}.full-bleed {/* Span the full viewport width */width: 100vw;margin-left: 50%;transform: translateX(-50%);}@media (max-width: 1100px) {.wide,.full-bleed {width: 100%;margin-left: 0;transform: none;}}
22 unmodified lines23242526272822 unmodified lines--spacing-3: 16px;--spacing-4: 24px;--spacing-5: 32px;}// Theme tokens for dark mode[data-theme="dark"] {22 unmodified lines232425262728293031323322 unmodified lines--spacing-3: 16px;--spacing-4: 24px;--spacing-5: 32px;--spacing-6: 40px;--spacing-7: 48px;--spacing-8: 56px;--spacing-9: 64px;--spacing-10: 72px;}// Theme tokens for dark mode[data-theme="dark"] {
12345678.distill-footer { margin-top: 40px; border-top: 1px solid var(--border-color); }.footer-inner { max-width: 680px; margin: 0 auto; padding: 24px 16px; }.citation-block h3 { margin: 0 0 8px; }.citation-block h4 { margin: 16px 0 8px; font-size: 14px; text-transform: uppercase; color: var(--muted-color); }.citation-text, .citation-bibtex { width: 100%; min-height: 44px; border: 1px solid var(--border-color); border-radius: 6px; background: var(--surface-bg); padding: 8px; resize: none; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; color: var(--text-color); white-space: pre-wrap; overflow-y: hidden; line-height: 1.4; }.references-block h3 { margin: 24px 0 8px; }.references-block .footnotes { margin-top: 8px; }.references-block .bibliography { margin-top: 8px; }1234565 unmodified lines121314151617181920212223242526272829303132333435363738394069 unmodified lines110111112@import "./components/variables";@import "./components/base";@import "./components/layout";/* Dark-mode form tweak */[data-theme="dark"] .plotly_input_container > select { background-color: #1a1f27; border-color: var(--border-color); color: var(--text-color); }5 unmodified lines[data-theme="dark"] .citation-text,[data-theme="dark"] .citation-bibtex { background: #12151b; border-color: rgba(255,255,255,.15); color: var(--text-color); }.margin-aside { position: relative; margin: 12px 0; }.margin-aside__main { /* main text stays full width of the main column */ }.margin-aside__aside {position: absolute;top: 0;right: -260px; /* push into the right grid column (width 260 + gap 32) */width: 260px;border-radius: 8px;padding: 10px;font-size: 0.9rem;color: var(--muted-color);}@media (max-width: 1100px) {.margin-aside__aside {position: static;width: auto;margin-top: 8px;}}/* Opt-in zoomable images */img[data-zoomable] { cursor: zoom-in; }.medium-zoom--opened img[data-zoomable] { cursor: zoom-out; }69 unmodified lines[data-theme="dark"] #theme-toggle .icon.light { display: none; }[data-theme="dark"] #theme-toggle .icon.dark { display: inline; }[data-theme="dark"] #theme-toggle .icon { filter: invert(1) brightness(1.2); }123456785 unmodified lines14151617181969 unmodified lines89909192@use "./variables" as *;@use "./base" as *;@use "./layout" as *;@use "./components/footer" as *;/* Dark-mode form tweak */[data-theme="dark"] .plotly_input_container > select { background-color: #1a1f27; border-color: var(--border-color); color: var(--text-color); }5 unmodified lines[data-theme="dark"] .citation-text,[data-theme="dark"] .citation-bibtex { background: #12151b; border-color: rgba(255,255,255,.15); color: var(--text-color); }/* Opt-in zoomable images */img[data-zoomable] { cursor: zoom-in; }.medium-zoom--opened img[data-zoomable] { cursor: zoom-out; }69 unmodified lines[data-theme="dark"] #theme-toggle .icon.light { display: none; }[data-theme="dark"] #theme-toggle .icon.dark { display: inline; }[data-theme="dark"] #theme-toggle .icon { filter: invert(1) brightness(1.2); }
app/.astro/astro/content.d.ts-164
app/astro.config.mjs+9-9
app/src/components/FullBleed.astroAdded+9
app/src/components/ThemeToggle.astro+1-1
app/src/components/Wide.astroAdded+9
app/src/pages/article.mdx+141-66
app/src/pages/index.astro+14-1
app/src/styles/components/_base.scss → app/src/styles/_base.scssRenamed+57-5
app/src/styles/components/_layout.scss → app/src/styles/_layout.scssRenamed+63-1
app/src/styles/components/_variables.scss → app/src/styles/_variables.scssRenamed+5
app/src/styles/components/_footer.scssAdded+8
app/src/styles/global.scss+6-26