Offer all Midra templates in one ZIP download

This commit is contained in:
Dandaedre 2026-11-15 12:30:46 +01:00
parent bf5f2b86d2
commit 0dc7ec0106
6 changed files with 27 additions and 17 deletions

View File

@ -109,7 +109,7 @@ See [development setup](https://proxy.dandaedre.com/gitea/Beffroi/beffroi-tools/
## Midra Layout templates
[Browse all starter files →](https://proxy.dandaedre.com/gitea/Beffroi/beffroi-tools/src/branch/main/docs/templates/midra-layout/README.md)
[**Download all templates as ZIP**](https://proxy.dandaedre.com/gitea/Beffroi/beffroi-tools/raw/branch/main/docs/templates/midra-layout/midra-layout-all-templates.zip) · [Browse individual starter files →](https://proxy.dandaedre.com/gitea/Beffroi/beffroi-tools/src/branch/main/docs/templates/midra-layout/README.md)
Matching Full HD and UHD 4K layouts are available in SVG, draw.io, geometry JSON,
CSV, DXF/DWG, HTML, PPTX, Figma FIG and Illustrator AI. The catalog contains every

View File

@ -4,6 +4,10 @@
## Unreleased
- Offer Download all templates as ZIP first in the README and starter catalog,
replacing the Illustrator-only archive with all 20 Full HD/UHD starter files.
Tests check every archived filename and byte against the individual templates.
- Clear layer selection when clicking empty space in the Layers list, including
gaps between rows and the gutter beside folder contents. Regression tests cover
blank clicks and normal folder/layer selection.

View File

@ -2,6 +2,13 @@
[Midra Layout](../../midra-layout/README.md) · [User guide](../../midra-layout/guide/README.md) · [Geometry format contract](../../interfaces/midra-layout-exchange.md)
**[Download all templates as ZIP](midra-layout-all-templates.zip)** — all ten formats
in both Full HD and UHD 4K (20 files). Extract the archive and use whichever
format suits your editor. This also preserves file names when browsers would
otherwise preview a template, including PDF-compatible Illustrator files.
Individual downloads are listed below.
This folder is the single source for the base files in every supported geometry
exchange format. Each file contains the same two named 16:9 layer boxes on an
exact pixel canvas, without backgrounds or placeholder pictures. The UHD layout
@ -24,19 +31,6 @@ Review the detected rectangles and their destination layers before applying.
| Figma FIG | [Download .fig](midra-layout-1080p-2-layers.fig) | [Download .fig](midra-layout-4k-2-layers.fig) | Figma or FigCraft |
| Illustrator AI | [Download .ai](midra-layout-1080p-2-layers.ai) | [Download .ai](midra-layout-4k-2-layers.ai) | Illustrator or VectorCraft |
## Illustrator downloads in Gitea
[Download both Illustrator templates as ZIP](midra-layout-ai-templates.zip), then
extract the `.ai` files. This avoids the browser's PDF viewer changing the download
extension. These AI files contain PDF-compatible artwork: Gitea detects the `%PDF`
header and serves them as `application/pdf` with an inline disposition. It does
not convert them. If you already downloaded the original bytes under a `.pdf`
name, rename the extension to `.ai`; do not print or re-export from the PDF viewer.
The ZIP contains exact copies of the two AI samples. After updating them, rebuild
it with `python3 -m zipfile -c midra-layout-ai-templates.zip
midra-layout-1080p-2-layers.ai midra-layout-4k-2-layers.ai` from this folder.
## Geometry files and saved projects
These files exchange visible layer boxes. They do not store the complete editor
@ -52,6 +46,15 @@ CLI. See [dependencies and licensing builds](../../interfaces/midra-layout-excha
## Maintaining the base files
After updating any starter file, rebuild the combined download from this folder:
```sh
python3 -m zipfile -c midra-layout-all-templates.zip midra-layout-*-2-layers.*
```
The archive contains exact copies of all 20 templates; regression tests verify
the file names and bytes and the manual includes the same archive.
Keep all formats here and link to this catalog instead of copying files or
maintaining separate download lists. The [generation and verification commands](../../interfaces/midra-layout-exchange.md)
rebuild both canvas sizes with the application exporter and verify their geometry.

Binary file not shown.

View File

@ -7,10 +7,13 @@ ROOT = pathlib.Path(__file__).resolve().parents[1] / "docs/templates/midra-layou
class MidraTemplateDownloads(unittest.TestCase):
def test_ai_download_archive_preserves_names_and_original_bytes(self):
names = {"midra-layout-1080p-2-layers.ai", "midra-layout-4k-2-layers.ai"}
with zipfile.ZipFile(ROOT / "midra-layout-ai-templates.zip") as archive:
def test_all_templates_archive_preserves_names_and_original_bytes(self):
names = {path.name for path in ROOT.glob("midra-layout-*-2-layers.*")}
self.assertEqual(len(names), 20)
with zipfile.ZipFile(ROOT / "midra-layout-all-templates.zip") as archive:
self.assertEqual(set(archive.namelist()), names)
self.assertEqual(len(archive.namelist()), len(names))
self.assertIsNone(archive.testzip())
for name in names:
self.assertEqual(archive.read(name), (ROOT / name).read_bytes())