$ python3 init-slides.py \ --logos PKU_logo.jpeg CMS_logo.png CERN_logo.png \ --title "Frontend Slides PKU Documentation" \ --subtitle "Technical Tutorial" \ --author "Leyan Li:1" \ --speaker "Leyan Li" \ --affiliations "Peking University (CN)" \ --date "May 7th 2026" \ --event "PKU-CMS Group Meeting" \ --highlight "Frontend Slides" "PKU" \ --skin voltage \ --outline "Introduction:2" "Built-in Elements:3" \ "Web Hosting:3" "Summary:2" \ --out frontend_slides_intro.html ✅ Slide harness created successfully Total slides: 17 Skin: voltage Logos: PKU_logo.jpeg, CMS_logo.png, CERN_logo.png Outline sections: 4 1. Introduction (2 pages) 2. Built-in Elements (3 pages) 3. Web Hosting (3 pages) 4. Summary (2 pages) $ █
init-slides.py to generate a fixed 1920×1080
HTML harness first, preventing LLM structural
instability from breaking the layout..pptx files.final_v3.pptx).hep-frontend-slides.md is the core entry
point. It instructs the AI on the repository's Iron Rules and how to execute all
Python/Bash scripts and CLI arguments. Users don't
need to learn any of these commands—simply interact in natural language
and let the AI drive the pipeline.
reference/ contains the core spec, 12
fine-tuning parameters, figure layouts, and skins specs for the AI to read.init-slides.py: Scaffold generator
renumber-slides.py: Sync slide
markersbundle-html.py: Base64 image
bundlingexport-pdf.sh: Playwright PDF export
$ tree . -L 2.├── LICENSE├── README.md├── README_EN.md├── assets│ ├── logos│ ├── skins│ └── templates├── hep-frontend-slides.md # AI Skill Entry├── reference│ ├── FIGURE_LAYOUTS.md│ ├── FINE_TUNING.md│ ├── PKU_ACADEMIC_CLASSIC.md│ ├── PKU_SKINS.md│ ├── TERMINAL_BOX.md│ └── animation-patterns.md└── scripts ├── bundle-html.py ├── export-pdf.sh ├── init-slides.py └── renumber-slides.py6 directories, 14 files$ █
init-slides.py$ python3 init-slides.py \ --logos CMS_logo.png CERN_logo.png PKU_logo.jpeg \ --title "Frontend Slides PKU Documentation" \ --author "Leyan Li:1" \ --affiliations "Peking University" \ --date "Apr 29th 2026" \ --skin voltage \ --out frontend_slides_intro.html 📦 Reading template... ✅🎨 Applying skin: voltage... ✅🖼️ Injecting logos: CMS, CERN, PKU... ✅📝 Generating 18 slides... ✅ ================================================✅ Scaffold ready: frontend_slides_intro.html (1920x1080)
AN.tex or TWiki links<!-- [Slide 6] Content: 3-Step Workflow --><section class="slide normal-slide" data-title="3-Step Workflow"> <!-- FINE TUNING: - overall container: adjust 'margin-top' and 'padding' - each step block: adjust 'width', 'padding', 'font-size' --> <div class="slide-content" style="padding: 0 30px;"> <div class="reveal d1" style="display: flex; gap: 25px; margin-top: 8%;"> <!-- [ELEMENT: Step 1 — Plan + Scaffold] --> <div style="flex: 1; border: 2px solid var(--theme-primary);"> <div style="font-size: 32px; font-weight: bold;"> ① Plan + Scaffold</div> <ul class="bullet-list" style="font-size: 22px;"> <li>AI asks <strong>Q0–Q11</strong>...</li> <li>Run <code>init-slides.py</code></li> </ul> </div> <!-- [ELEMENT: Step 2 — Content + Fine-tune] --> <div style="flex: 1; border: 2px solid var(--theme-accent);"> <div style="font-size: 32px; font-weight: bold;"> ② Content + Fine-tune</div> <ul class="bullet-list">...</ul> </div> </div> </div></section>
bundle-html.py → Base64 encodes all
local imagesexport-pdf.sh for offline PDF backup
$ python3 bundle-html.py frontend_slides_intro.html🖼️ Embedded image: attachment/Figures/S1/PKU_logo.jpeg🖼️ Embedded image: attachment/Figures/S1/CMS_logo.png... (16 more images embedded)✨ Bundle complete! Output: frontend_slides_bundle.html $ bash export-pdf.sh frontend_slides_intro.html --dpr 3ℹ Checking dependencies... ✓ Node.js foundℹ Setting up Playwright (headless browser)... Local server on port 58213 Captured slide 1/18 (1 link) Captured slide 2/18 ... Captured slide 18/18 Assembling PDF...✓ PDF exported successfully! (frontend_slides_intro.pdf)
| Element | HTML Class | Use |
|---|---|---|
| Bullet List | bullet-list |
L1 red dot + L2 dash |
| Highlight | highlight-accent |
Keyword emphasis |
| MathJax | $...$ |
$E=mc^2$ |
| Figure Grid | fig fig-2x4 |
Multi-plot layout |
| Table | tab |
Data tables |
| Terminal (anim) | mac-terminal |
Typewriter effect |
| Terminal (static) | mac-terminal-lined |
Code + line numbers |
| Hyperlink | <a target=_blank> |
External refs |
--theme-primary.
<!-- [Slide 9] Content: Built-in Elements --><section class="slide normal-slide" data-header="visible" data-title="Slide Structure"> <div class="slide-content reveal d1" style="margin-top: 0; padding-top: 0; padding-left: 0;"> <div class="two-col" style="gap: 30px; margin-top: 6%; align-items: stretch;"> <!-- [ELEMENT: Left — HTML Code Terminal] --> <div class="left-col" style="padding-top: 0;"> <div class="mac-terminal" style="--term-accent: #f38ba8; margin-top: 0; width: 100%;"> <div class="mac-terminal-bar"> <span class="mac-dot mac-dot-red"></span> <span class="mac-dot mac-dot-yellow"></span> <span class="mac-dot mac-dot-green"></span> ... </div> <div class="mac-terminal-body mac-terminal-lined"> ... (this terminal) </div> </div> </div> <!-- [ELEMENT: Right — Annotations] --> <div class="right-col" style="justify-content: flex-start; padding-top: 0;"> <ul class="bullet-list" style="margin-top: 10px; font-size: 24px;"> <li style="margin-bottom: 10px;"><code style="color: var(--theme-accent);">data-header="visible"</code> — show/hide top red bar </li> <li><code>data-title="..."</code> — text shown in the header bar</li> <li><code>class="bullet-list"</code> — auto L1 red dot + L2 dash</li> <li><code>highlight-accent</code> — theme-color keyword</li> </ul> <div class="mac-terminal" style="margin-top: 10px; width: 100%;"> <div class="mac-terminal-bar"> ... (directory tree) </div> </div> <div class="tip-box">Attachment: ...</div> </div> </div> </div></section>
data-header="visible" — show/hide top
red bar
"hidden"data-title="..." — text shown in the
header barclass="bullet-list" — auto L1 red dot
+ L2 dash stylingstyle="font-size: 1.6em" — inline CSS
for fine-tuninghighlight-accent — theme-color
keyword highlightwidth: 100% — control element
width (terminal, figure, box)margin-top / margin-left — position any
element freelymy_talk/ ├── talk.html # source ├── attachment_talk_html/ │ └── Figures/ │ ├── S1/ # title slide imgs │ ├── S4/ # content imgs │ ├── S5/ │ └── ... ├── talk_bundle.html # packaged └── talk_export.pdf # optional
attachment_{name}_html/Figures/S{N}/,
bundle-html.py auto-embeds as Base64.
<!-- [Slide 38] Control Plots --><section class="slide normal-slide" data-header="visible" data-title="Prefit Control Plots - 2022postEE $e\mu$"> <div class="slide-content" style="position: relative; overflow: visible;"> <div class="reveal d1" style="position: absolute; top: 3%; left: -3.5%; width: 110%;"> <div class="fig fig-2x4" style="--gap: 10px;"> <!-- Row 1: nob --> <img src="attachment/.../m_fastmtt_nob_lin.png"> <img src="attachment/.../met_nob_lin.png"> <img src="attachment/.../pt_1_nob_lin.png"> <img src="attachment/.../pt_2_nob_lin.png"> <!-- Row 2: btag --> <img src="attachment/.../m_fastmtt_btag_lin.png"> <img src="attachment/.../met_btag_lin.png"> <img src="attachment/.../pt_1_btag_lin.png"> <img src="attachment/.../pt_2_btag_lin.png"> </div> </div> </div></section>
fig-{R}x{C}
(up to 4x4, see FIGURE_LAYOUTS.md)--gap: 10px — controls spacing
between figureswidth: 110% / left: -3.5% — expand figure area &
center itposition: absolute / top: 3% — break grid for precise
placementfont-size
for text/tables, margin for position, --gap for figures) →
Zero global CSS breakage.
renumber-slides.py to resync
<!-- [Slide N] --> markers +
Figures/S{N}/ directories.
| # | Skin | --theme-primary |
--theme-accent |
Style | Preview | |
|---|---|---|---|---|---|---|
| 1 | 🏛️ | classic |
■ #cc0000 |
■ #ffff00 |
PKU Red-Yellow-White (default) | Preview |
| 2 | 🔥 | bold |
■ #ec5f18 |
■ #f3ecdb |
Orange cards + dark gradient | Preview |
| 3 | 💎 | cobalt |
■ #4361ee |
■ #f6f606 |
Cobalt blue + bright yellow | Preview |
| 4 | ⚡ | voltage |
■ #0066ff |
■ #d0f804 |
Electric blue + neon yellow | Preview |
| 5 | 🌺 | botanical |
■ #d4a574 |
■ #cb2c64 |
Warm brown + magenta | Preview |
| 6 | 🍀 | jade |
■ #2ca657 |
■ #f6f606 |
Jade green + bright yellow | Preview |
| 7 | 💜 | lavender |
■ #9171a6 |
■ #f7f706 |
Lavender purple + lemon yellow | Preview |
| 8 | 🌐 | cyber |
■ #2dd4bf |
■ #f4f81d |
Cyber teal + neon yellow | Preview |
| 9 | 💻 | terminal |
■ #39d353 |
■ #39d353 |
Hacker terminal green | Preview |
cp skins/diy.css.example skins/diy.css → edit CSS
variables → --skin diy{Name}_logo.png into assets/logos/ → auto-detected by init-slides.py
index.php auto-scans directory →
renders image cards with depth control + searchREADME.md → HTML via
Parsedown.php
# 1. Request Personal Website # → https://webeos.cern.ch/site/new # 2. Clone php-plots into EOS $ cp -r php-plots/ /eos/user/l/leyan/www/slides/ # 3. Copy bundled HTML into web dir $ cp talk_bundle.html /eos/user/l/leyan/www/slides/ # 4. Access online: https://leyan.web.cern.ch/slides/talk_bundle.html
index.php key config:$plot_extensions:
png, pdf, jpg, gif — shown as image cards$additional_extensions:
eps, svg, root, txt — listed as downloadable filesshow_entry(): hides files starting with
. or _
/eos/user/ directory
has www symlink created by the webEOS service. Files must be world-readable
(chmod 644).
$ cp talk_bundle.html /path/to/pages-repo/ $ cd /path/to/pages-repo $ git add . && git commit -m "add slides" $ git push # → https://{user}.github.io/{repo}/talk_bundle.html
Html-slides-public)Deploy from a branchmain /
/ (root)*_bundle.html → live in ~60s at:https://{user}.github.io/{repo}/
CNAME record pointing to
{user}.github.io.
| Dimension | HTML Slides (This Tool) | PPTX |
|---|---|---|
| Version Control | ✅ Pure text — Git diff line-by-line | ❌ Binary blob, impossible to diff |
| AI Generation | ✅ Agent reads/writes HTML directly | ❌ Vector layout hard for AI to adjust |
| Online Sharing | ✅ Single URL, zero download | ❌ Must download + open in Office |
| Math / $\LaTeX$ | ✅ MathJax native rendering | ⚠️ Built-in formula editor limited |
| Animations | ✅ CSS + JS — web-design-level creativity | ⚠️ Built-in presets only |
| Batch Scripting | ✅ Scripts: bulk image insert, renumber, bundle | ❌ GUI-only, manual one-by-one |
| Cross-platform | ✅ Any browser, any OS | ⚠️ Office/Keynote/LibreOffice |
| Pixel-perfect | ✅ Fixed 1920×1080 canvas | ⚠️ Depends on display device |
| Custom Styles | ✅ Full CSS freedom, 10 skins | ⚠️ Template master limited |
| PDF Export | ⚠️ Screenshot mode — text not
selectable (but hyperlinks remain clickable) |
✅ Vector text, fully selectable |
| Collaboration | ✅ Git branch + PR review | ✅ Office 365 real-time co-edit |
init-slides.py → open in browser → start
presenting! 🚀