Spaces:
Running
Running
thibaud frere
commited on
Commit
·
e904bd4
1
Parent(s):
9e27095
update
Browse files
app/src/components/Accordion.astro
CHANGED
@@ -134,6 +134,12 @@ const wrapperClass = ["accordion", className].filter(Boolean).join(" ");
|
|
134 |
padding: 12px 4px 4px;
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
/* Separator between header and content when open (edge-to-edge) */
|
138 |
.accordion[open] .accordion__content-wrapper::before {
|
139 |
content: "";
|
|
|
134 |
padding: 12px 4px 4px;
|
135 |
}
|
136 |
|
137 |
+
/* Ensure the very last slotted element has no bottom spacing */
|
138 |
+
.accordion .accordion__content > :global(*:last-child) {
|
139 |
+
padding-bottom: 0 !important;
|
140 |
+
margin-bottom: 0 !important;
|
141 |
+
}
|
142 |
+
|
143 |
/* Separator between header and content when open (edge-to-edge) */
|
144 |
.accordion[open] .accordion__content-wrapper::before {
|
145 |
content: "";
|
app/src/content/chapters/available-blocks.mdx
CHANGED
@@ -158,58 +158,19 @@ Here are a few variations using the same bibliography:
|
|
158 |
[^f1]: Footnote attached to the sentence above.
|
159 |
```
|
160 |
|
|
|
161 |
|
162 |
-
|
163 |
|
164 |
-
|
165 |
-
|
166 |
-
<Aside>
|
167 |
-
This paragraph presents a **key idea** concisely.
|
168 |
-
<Fragment slot="aside">
|
169 |
-
**Side note** for brief context or a definition.
|
170 |
-
</Fragment>
|
171 |
-
</Aside>
|
172 |
|
173 |
<small className="muted">Example</small>
|
174 |
```mdx
|
175 |
-
|
176 |
-
|
177 |
-
<Aside>
|
178 |
-
Main paragraph with the core idea.
|
179 |
-
<Fragment slot="aside">Short side note.</Fragment>
|
180 |
-
</Aside>
|
181 |
-
```
|
182 |
-
|
183 |
-
Use these helpers to expand content beyond the main column when needed. They will always be centered and displayed above every other content.
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
<Wide>
|
188 |
-
<div className="demo-wide">demo wide</div>
|
189 |
-
</Wide>
|
190 |
-
|
191 |
-
<small className="muted">Example</small>
|
192 |
-
```mdx
|
193 |
-
import Wide from '../components/Wide.astro'
|
194 |
-
|
195 |
-
<Wide>
|
196 |
-
Your content here...
|
197 |
-
</Wide>
|
198 |
-
```
|
199 |
-
|
200 |
-
#### Full-bleed example
|
201 |
-
|
202 |
-
<FullBleed>
|
203 |
-
<div className="demo-full-bleed">demo full-bleed</div>
|
204 |
-
</FullBleed>
|
205 |
-
|
206 |
-
<small className="muted">Example</small>
|
207 |
-
```mdx
|
208 |
-
import FullBleed from '../components/FullBleed.astro'
|
209 |
|
210 |
-
|
211 |
-
Your content here...
|
212 |
-
</FullBleed>
|
213 |
```
|
214 |
|
215 |
|
@@ -359,7 +320,7 @@ You can embed external content in your article using **iframes**. For example, *
|
|
359 |
<iframe 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>
|
360 |
```
|
361 |
|
362 |
-
####
|
363 |
|
364 |
You can also embed **gradio** apps.
|
365 |
|
|
|
158 |
[^f1]: Footnote attached to the sentence above.
|
159 |
```
|
160 |
|
161 |
+
### Separator
|
162 |
|
163 |
+
Use `---` on its own line to insert a horizontal separator between sections. This is a standard Markdown “thematic break”. Don’t confuse it with the `---` used at the very top of the file to delimit the frontmatter.
|
164 |
|
165 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
<small className="muted">Example</small>
|
168 |
```mdx
|
169 |
+
Intro paragraph.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
+
Next section begins here.
|
|
|
|
|
174 |
```
|
175 |
|
176 |
|
|
|
320 |
<iframe 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>
|
321 |
```
|
322 |
|
323 |
+
#### Gradio
|
324 |
|
325 |
You can also embed **gradio** apps.
|
326 |
|
app/src/content/chapters/getting-started.mdx
CHANGED
@@ -35,8 +35,25 @@ A [slug-title].pdf and thumb.jpg are also generated at build time. You can find
|
|
35 |
|
36 |
### Deploy
|
37 |
|
38 |
-
The recommended way is to **
|
39 |
|
40 |
-
|
|
|
|
|
41 |
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
### Deploy
|
37 |
|
38 |
+
The recommended way is to **duplicate this Space on Hugging Face** rather than cloning it directly:
|
39 |
|
40 |
+
1. Open the template Space: **[🤗 science-blog-template](https://huggingface.co/spaces/tfrere/science-blog-template)** and click "Duplicate this Space".
|
41 |
+
2. Give it a name, choose visibility, and keep the SDK as **Docker** (this project includes a `Dockerfile`).
|
42 |
+
3. A new Space repository will be created under your account.
|
43 |
|
44 |
+
Then push your changes to your new Space repo:
|
45 |
+
|
46 |
+
```bash
|
47 |
+
git clone https://huggingface.co/spaces/<your-username>/<your-space>
|
48 |
+
cd <your-space>
|
49 |
+
# Make edits locally, then:
|
50 |
+
git add .
|
51 |
+
git commit -m "Update content"
|
52 |
+
git push
|
53 |
+
```
|
54 |
+
|
55 |
+
**Every push automatically triggers a build and deploy** on Spaces.
|
56 |
+
|
57 |
+
Notes for Docker Spaces:
|
58 |
+
- This project exposes port `8080` via Nginx; the Space front matter includes `app_port: 8080` so the service can be probed correctly.
|
59 |
+
- No extra configuration is required; the `Dockerfile` builds the Astro site and serves it.
|
app/src/content/chapters/writing-your-content.mdx
CHANGED
@@ -72,17 +72,6 @@ Below is an image imported via Astro and optimized at build time:
|
|
72 |
```
|
73 |
|
74 |
|
75 |
-
Use `---` on its own line to insert a horizontal separator between sections. This is a standard Markdown “thematic break”. Don’t confuse it with the `---` used at the very top of the file to delimit the frontmatter.
|
76 |
-
|
77 |
-
<small className="muted">Example</small>
|
78 |
-
```mdx
|
79 |
-
Intro paragraph.
|
80 |
-
|
81 |
-
---
|
82 |
-
|
83 |
-
Next section begins here.
|
84 |
-
```
|
85 |
-
|
86 |
|
87 |
### Chapters
|
88 |
|
@@ -131,3 +120,59 @@ Use the **color picker** below to see how the primary color affects the theme.
|
|
131 |
Here is a suggestion of **color palettes** for your **data visualizations** that align with your **brand identity**. These palettes are generated from your `--primary-color`.
|
132 |
|
133 |
<HtmlFragment src="palettes.html" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
```
|
73 |
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
### Chapters
|
77 |
|
|
|
120 |
Here is a suggestion of **color palettes** for your **data visualizations** that align with your **brand identity**. These palettes are generated from your `--primary-color`.
|
121 |
|
122 |
<HtmlFragment src="palettes.html" />
|
123 |
+
|
124 |
+
|
125 |
+
### Placement
|
126 |
+
|
127 |
+
Use these helpers when you need to step outside the main content flow: **Asides** for contextual side notes, **Wide** to extend beyond the main column, and **Full-bleed** for full-width, immersive sections.
|
128 |
+
|
129 |
+
#### Asides
|
130 |
+
|
131 |
+
<Aside>
|
132 |
+
This paragraph presents a **key idea** concisely.
|
133 |
+
<Fragment slot="aside">
|
134 |
+
**Side note** for brief context or a definition.
|
135 |
+
</Fragment>
|
136 |
+
</Aside>
|
137 |
+
|
138 |
+
<small className="muted">Example</small>
|
139 |
+
```mdx
|
140 |
+
import Aside from '../components/Aside.astro'
|
141 |
+
|
142 |
+
<Aside>
|
143 |
+
Main paragraph with the core idea.
|
144 |
+
<Fragment slot="aside">Short side note.</Fragment>
|
145 |
+
</Aside>
|
146 |
+
```
|
147 |
+
|
148 |
+
Use these helpers to expand content beyond the main column when needed. They will always be centered and displayed above every other content.
|
149 |
+
|
150 |
+
#### Wide example
|
151 |
+
|
152 |
+
<Wide>
|
153 |
+
<div className="demo-wide">demo wide</div>
|
154 |
+
</Wide>
|
155 |
+
|
156 |
+
<small className="muted">Example</small>
|
157 |
+
```mdx
|
158 |
+
import Wide from '../components/Wide.astro'
|
159 |
+
|
160 |
+
<Wide>
|
161 |
+
Your content here...
|
162 |
+
</Wide>
|
163 |
+
```
|
164 |
+
|
165 |
+
#### Full-bleed example
|
166 |
+
|
167 |
+
<FullBleed>
|
168 |
+
<div className="demo-full-bleed">demo full-bleed</div>
|
169 |
+
</FullBleed>
|
170 |
+
|
171 |
+
<small className="muted">Example</small>
|
172 |
+
```mdx
|
173 |
+
import FullBleed from '../components/FullBleed.astro'
|
174 |
+
|
175 |
+
<FullBleed>
|
176 |
+
Your content here...
|
177 |
+
</FullBleed>
|
178 |
+
```
|