feat: add fragment reveal core mechanism to template - #2
Open
lwmxiaobei wants to merge 2 commits into
Open
Conversation
Owner
|
感谢 PR!fragment 这个方向我们会自己处理美学上的取舍(默认交互、hint 文案、SKILL.md 规则等),这部分不用担心。 不过目前这个 PR 里混了几件不同的事,建议拆分:
另外这个 PR 和 #1(ESC 索引)在 期待只包含 fragment 核心机制的版本 🙏 |
lwmxiaobei
force-pushed
the
feat/fragment-reveal
branch
from
April 24, 2026 05:58
3f1630f to
5cb567d
Compare
Author
|
已按建议更新并 force-push:
|
Owner
|
xiaobei 你好,fragment 这个功能我挺喜欢,代码也干净: 两个小问题想请你处理一下再合: 1. hint 文字和代码不一致现在 hint 写的是: <div id="hint">点击 / Space 逐项显示 · ← → 导航</div>但代码里只绑定了 两个选择:
2. 缺少使用文档现在代码进来了,但 希望在 ## Fragments · 逐项显示
给需要逐步揭示的元素加 `.fragment` class,讲者按 → / Space / 滚轮 / 滑动可一项项显示。
适合场景:
- 长列表逐条讲解
- pipeline step 一步一步揭示
- 对比页"先说 before,再说 after"
用法:
```html
<li class="fragment">第一点</li>
<li class="fragment">第二点</li>
<li class="fragment">第三点</li>
```
所有 fragment 揭示完后,再按一次才翻到下一页。没加 `.fragment` class 的 slide 行为不变。补完这两项我就合。多谢! |
Author
|
已按反馈补齐并 push:
提交: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the core
fragmentreveal mechanism toassets/template.html.Included in this PR
.fragment,.fragment.visible, and.fragment.instantstylesfragmentsOf,resetFragments,revealNextFragment,hidePrevFragmentforward/backwardwrappers so existing navigation reveals fragments before moving between slidesExplicitly not included
SKILL.md/checklist.mddocumentation changesRebase status
This branch has been rebased onto the latest
mainafter #1 was merged, so it keeps the ESC overview index behavior intact.