Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The site of the [missing-elements](https://github.com/missing-elements) web comp
| `/` | The project list, the tools (the build page first, with its how-to), and a footer of links | [src/index.njk](src/index.njk); the lists are in [src/_data/site.js](src/_data/site.js) |
| `/pdfjs-viewer/` | The docs of `<pdfjs-viewer-element>`, with a live preview | [src/pdfjs-viewer/](src/pdfjs-viewer/) |
| `/h5p/build/` | The build page, for people: what it makes, a sample that plays, and the build of a chat's source into a `.h5p`, in the visitor's browser | [src/h5p/build/](src/h5p/build/) |
| `/h5p/play/` | The play page: the activity in a link's `#source=`, built in the visitor's browser as the build page builds it, with any file of their own it names chosen there, and played with nothing beside it but its download and a link to the build page, for a chat app to show in its reply (h5p-toolkit#210); no page links to it | [src/h5p/play/](src/h5p/play/) |
| `/h5p/play/` | The play page: the activity in a link's `#source=`, built in the visitor's browser as the build page builds it, with any file of their own it names chosen there or given by the page that frames it (a video or a recording as its address, played from there at once and fetched whole only for the download), and played with nothing beside it but its download and a link to the build page, for a chat app to show in its reply (h5p-toolkit#210); no page links to it | [src/h5p/play/](src/h5p/play/) |
| `/h5p/create-with-ai/` | The how-to, for people: installing the skill, asking a chat, the prompts to start from, the types, and what to do when something goes wrong | [src/h5p/create-with-ai/](src/h5p/create-with-ai/) |
| `/h5p/skill/` | The skill as zips to install: `h5p-author.zip`, installed once in a chat's place for skills, or attached to the message in each new chat where it has none, and `h5p-author-chatgpt.zip`, the same skill laid out as a plugin; and a page that lists them and the bundles' addresses, each in full, which no page links to | [src/h5p/skill/](src/h5p/skill/); the zips written by [vite.config.ts](vite.config.ts) |
| `/h5p/bundles/` | The skill's build tool and a library bundle per content type, for a chat that runs Node but cannot reach npm; and `h5p-author-build.tar.gz`, the tool and every library in one archive, for a person to attach to a chat whose code can download nothing | written by [vite.config.ts](vite.config.ts) |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@codemirror/state": "6.7.6",
"@codemirror/view": "6.43.15",
"@lezer/highlight": "1.2.5",
"@missing-elements/h5p-author": "0.15.0",
"@missing-elements/h5p-author": "0.16.0",
"@missing-elements/h5p-libraries": "1.1.1",
"@missing-elements/h5p-offline-player": "1.7.0",
"@missing-elements/h5p-runtime": "1.0.2",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/assets/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,8 @@ html[data-standalone] .play { padding: 1rem; }
.play-stage { display: grid; border: 1px solid var(--border); border-radius: 12px; overflow: clip; background: var(--surface); }
.play-stage > * { grid-area: 1 / 1; min-width: 0; }
.play:not([data-state="ready"]) .play-stage { aspect-ratio: 16 / 9; }
/* The activity's own frame keeps its square corners: the stage rounds only what the page draws in it. */
.play[data-state="ready"] .play-stage { border-radius: 0; }
.play .player-box { margin: 0; border: 0; border-radius: 0; }
.play:not([data-state="ready"]) .player-box { visibility: hidden; }
.play-panel { z-index: 1; display: grid; place-items: center; padding: 1.5rem 1rem; background: var(--surface); text-align: center; }
Expand Down Expand Up @@ -1133,18 +1135,28 @@ html[data-standalone] .play { padding: 1rem; }
.play-meta:empty { width: 6rem; height: 0.7rem; margin: 0.2rem 0; }
.play-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }
.play-actions [hidden] { display: none; }
/* Download of a preview: the file's bytes coming, under the bar, while the activity plays on. */
.play-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.625rem 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.play-keep[hidden], .play-keep [hidden] { display: none; }
.play-keep-text { display: grid; flex: 1 1 14rem; gap: 0.4rem; min-width: 0; }
.play-keep-label { margin: 0; font-size: 0.875rem; line-height: 1.4; overflow-wrap: anywhere; }
.play-keep .play-progress { width: 100%; }
.play-progress[data-indeterminate] span { width: 30%; opacity: 0.85; }
#download[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.button-icon { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
.play-spinner { animation: turn 0.8s linear infinite; }
.play-progress span { transition: width 0.3s ease-out; }
.play-progress[data-indeterminate] span { animation: slide 1.3s ease-in-out infinite; }
.play[data-state="building"] .play-panel, .play[data-state="fetching"] .play-panel {
background: linear-gradient(100deg, var(--surface) 40%, color-mix(in srgb, var(--raised) 70%, var(--surface)) 50%, var(--surface) 60%) 0 0 / 250% 100%;
animation: sheen 1.8s linear infinite;
}
.play-title:empty, .play-meta:empty { animation: breathe 1.4s ease-in-out infinite alternate; }
}
@keyframes sheen { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@keyframes slide { from { translate: -100% 0; } to { translate: 340% 0; } }
@keyframes breathe { from { opacity: 1; } to { opacity: 0.45; } }

@media (forced-colors: active) {
Expand Down
10 changes: 9 additions & 1 deletion src/h5p/play/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' da
</div>
<p class="play-actions">
<a class="button" id="edit" target="_blank" rel="noopener">Open in the build page</a>
<a class="button button-solid" id="download" download hidden><svg class="button-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4v12M7 11l5 5 5-5M5 20h14"/></svg>Download .h5p</a>
<a class="button button-solid" id="download" download hidden><svg class="button-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4v12M7 11l5 5 5-5M5 20h14"/></svg><span id="download-label">Download .h5p</span></a>
</p>
</div>
{#- Download of an activity whose video plays from the chat: its bytes come first, while it plays on. -#}
<div class="play-keep" id="keep" hidden>
<div class="play-keep-text">
<p class="play-keep-label" id="keep-label"></p>
<div class="play-progress" id="keep-progress" role="progressbar" aria-label="Getting the file for the download" aria-valuemin="0" aria-valuemax="100" data-indeterminate><span id="keep-bar"></span></div>
</div>
<button type="button" class="button" id="keep-instead">Choose it from your computer instead</button>
</div>
</main>
<script type="module" src="/h5p/play/play-page.js"></script>
Loading