decktile 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {decktile-0.4.1 → decktile-0.4.2}/PKG-INFO +2 -1
- {decktile-0.4.1 → decktile-0.4.2}/README.md +1 -0
- {decktile-0.4.1 → decktile-0.4.2}/pyproject.toml +1 -1
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/templates/base.css +4 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_html.py +27 -0
- {decktile-0.4.1 → decktile-0.4.2}/LICENSE +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/NOTICE +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/__main__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/assets/lucide/VENDORED.md +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/assets/lucide/lucide.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/assets/lucide/lucide.ttf +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/chart_themes/kubecon_na.toml +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/chart_themes/ossummit_europe.toml +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/cli.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/parser/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/parser/ast.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/parser/markdown.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/cards.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/directives.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/fenced.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/layouts.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/lucide.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/plugins/lucide_font.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/html.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/ir.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/odf/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/odf/geometry.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/odf/shapes.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/odf/styles.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/odp.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/pdf.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/pdg.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/seaborn.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/templates/decktile.js +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/render/templates/shell.html +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/theme/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/theme/loader.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/theme/parser.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/default.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/kcd_vietnam.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/kubecon_china.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/kubecon_japan.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/kubecon_na.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/ossummit_europe.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/ossummit_korea.css +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/skeleton/preview.deck.md +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/src/decktile/themes/skeleton/theme.toml +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/__init__.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_cli.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_geometry.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_ir.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_odf_shapes.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_odp.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_parser.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_pdg.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_seaborn_styles.py +0 -0
- {decktile-0.4.1 → decktile-0.4.2}/tests/test_video.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: decktile
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Markdown to designed slides: HTML, PDF and editable ODP
|
|
5
5
|
Author-Email: Reza Jelveh <git@jelveh.me>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -353,6 +353,7 @@ The arrow block accepts text or images:
|
|
|
353
353
|
```
|
|
354
354
|
::: grid {cols=2} # responsive grid
|
|
355
355
|
::: grid {cols=3} # 3-column grid
|
|
356
|
+
::: grid {cols=5, fill} # rows spread over the rest of the slide (no empty band below)
|
|
356
357
|
::: card # basic card
|
|
357
358
|
::: card{ tag="green" } # colored left border + background
|
|
358
359
|
::: card{ tag="quote" } # accent left border, italic, no fill
|
|
@@ -321,6 +321,7 @@ The arrow block accepts text or images:
|
|
|
321
321
|
```
|
|
322
322
|
::: grid {cols=2} # responsive grid
|
|
323
323
|
::: grid {cols=3} # 3-column grid
|
|
324
|
+
::: grid {cols=5, fill} # rows spread over the rest of the slide (no empty band below)
|
|
324
325
|
::: card # basic card
|
|
325
326
|
::: card{ tag="green" } # colored left border + background
|
|
326
327
|
::: card{ tag="quote" } # accent left border, italic, no fill
|
|
@@ -162,6 +162,10 @@ th { font-weight: 700; }
|
|
|
162
162
|
|
|
163
163
|
.grid { display: grid; gap: var(--gap); margin: 0 0 var(--gap) 0; }
|
|
164
164
|
.grid > * { min-width: 0; }
|
|
165
|
+
/* {fill}: the grid takes the rest of the slide body and spreads its rows over it,
|
|
166
|
+
content centred in each row, so a short grid leaves no empty band at the bottom */
|
|
167
|
+
.slide-body:has(> .grid.fill) { display: flex; flex-direction: column; }
|
|
168
|
+
.grid.fill { flex: 1; grid-auto-rows: 1fr; align-items: center; margin-bottom: 0; }
|
|
165
169
|
|
|
166
170
|
.card {
|
|
167
171
|
border-radius: var(--radius);
|
|
@@ -220,3 +220,30 @@ def test_email_in_speaker_role_is_a_link():
|
|
|
220
220
|
def test_mailto_links_keep_text_colour():
|
|
221
221
|
css = base_css()
|
|
222
222
|
assert 'a[href^="mailto:"]' in css and "color: inherit" in css
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def test_grid_fill_spreads_rows_over_the_slide():
|
|
226
|
+
"""{fill}: rows of a short grid spread down the slide instead of leaving a band."""
|
|
227
|
+
from weasyprint import HTML
|
|
228
|
+
|
|
229
|
+
md = "---\ntitle: t\n---\n\n## Fill\n\n::: grid {cols=2, %s}\n" + "".join(f"::: card\n### C{i}\nx\n:::\n" for i in range(4)) + ":::\n"
|
|
230
|
+
|
|
231
|
+
def row2_y(flag):
|
|
232
|
+
from decktile.render.ir import assemble_css
|
|
233
|
+
|
|
234
|
+
css = assemble_css(base_css(), default_theme(), (1280, 720))
|
|
235
|
+
doc = HTML(string=render(parse(md % flag), default_theme(), css, (1280, 720))).render()
|
|
236
|
+
page = doc.pages[0]._page_box
|
|
237
|
+
|
|
238
|
+
def walk(box):
|
|
239
|
+
yield box
|
|
240
|
+
for c in getattr(box, "children", []):
|
|
241
|
+
yield from walk(c)
|
|
242
|
+
|
|
243
|
+
ys = [b.position_y for b in walk(page) if getattr(b, "element_tag", "") == "h3" and "C2" in "".join(b.element.itertext())]
|
|
244
|
+
return ys[0], page.height
|
|
245
|
+
|
|
246
|
+
plain, h = row2_y("plain-grid")
|
|
247
|
+
filled, _ = row2_y("fill")
|
|
248
|
+
assert filled > plain + h * 0.1
|
|
249
|
+
assert "grid fill" in _full_page(md % "fill")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|