From 19fe5e9d9e7ec320f7d0efa278fc2f1863b04688 Mon Sep 17 00:00:00 2001 From: erkamyaman Date: Fri, 13 Nov 2026 17:50:34 +0300 Subject: [PATCH] docs: describe the slide.ng 3.5 and 3.6 timer and language links --- src/content/built-in/components.md | 1 + src/content/features/context-menu.md | 2 ++ src/content/features/interface-language.md | 1 + src/content/features/timer.md | 24 +++++++++++++++++++++- src/content/guide/hosting.md | 7 +++++++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/content/built-in/components.md b/src/content/built-in/components.md index 01ba496..dae3158 100644 --- a/src/content/built-in/components.md +++ b/src/content/built-in/components.md @@ -14,6 +14,7 @@ These tags work in every slide. The generator imports a component only into the | `` | Table of contents from slide titles and levels. Options: `columns`, `listClass`, `listStyle`, `start`, `minDepth`, `maxDepth`, `mode`. See [Table of contents](../features/table-of-contents.md). | | `` | The number of the slide it is on. | | `` | The number of slides. | +| `` | The presenter timer as a clock; a click starts or pauses it. See [Timer](../features/timer.md). New in 3.5. | | `` | A bar that shows how far through the deck the slide is. Options: `position` (`top`, `bottom`, `inline`), `height`, `color`, `track`, `clicks`, `minutes`. See [Progress bar](../features/progress-bar.md). | | `` | The title of the slide it is on, as HTML: its inline markdown and `$math$` are drawn. `no="3"` shows the title of slide 3. Raw HTML in a title is shown as text. Slidev's `TitleRenderer`. | | `text` | A link to slide 3, or to a `routeAlias`. It has the prefix because `link` is a built-in HTML tag. The link has the slide's real address, so Ctrl or Cmd + click opens it in a new tab. `title="Details"` is the text when the tag has none. | diff --git a/src/content/features/context-menu.md b/src/content/features/context-menu.md index 9d9acd0..58325ae 100644 --- a/src/content/features/context-menu.md +++ b/src/content/features/context-menu.md @@ -9,6 +9,8 @@ A right click on a slide opens a menu with the same actions as the bar. Hold Shi When the navigation bar is out of sight, the menu also has Show Navigation Bar, which shows it for a few seconds. Once a viewer moved the bar, Reset Navigation Bar Position puts it back in the deck's own place. See [Shortcuts](../built-in/shortcuts.md#mouse). +Show Timer and Hide Timer put the [timer](./timer.md#without-the-presenter-page) over the slides or take it away (new in 3.5). + ```md diff --git a/src/content/features/interface-language.md b/src/content/features/interface-language.md index 1c868b5..520a526 100644 --- a/src/content/features/interface-language.md +++ b/src/content/features/interface-language.md @@ -87,6 +87,7 @@ title: Konuşmam The bar then has a language button, with a translate icon. Its menu lists the languages, each named in its own language, with the current one ticked. Choosing one keeps the address and the slide. It switches the slides, `` and `dir`, the page title, the locale of the pipes and the interface text. - The page loads again for the switch, because Angular fixes the locale when the app starts. +- A link can pick the language: `/1?lang=tr` opens slide 1 in Turkish, for that tab only, and takes `lang` off the address. A host redirect makes it short, for example `/tr /1?lang=tr 302` in `public/_redirects` on Netlify (see [Hosting](../guide/hosting.md#netlify)). New in 3.5. - The choice is kept in the browser, per deck, like the other settings. The presenter and audience windows of one browser switch together. Another device keeps its own choice. - A page starts in the entry file's language until the reader chooses another. - It works in `dev`, in a build and in an offline folder. diff --git a/src/content/features/timer.md b/src/content/features/timer.md index a9b8984..d5dad5e 100644 --- a/src/content/features/timer.md +++ b/src/content/features/timer.md @@ -1,6 +1,6 @@ --- title: Timer -description: A stopwatch or countdown on the presenter page. +description: A stopwatch or countdown on the presenter page, over the slides, or inside a slide. --- # Timer @@ -24,4 +24,26 @@ The timer starts, pauses and resets from the buttons on the presenter page. Hove - A restart of the dev server (`r`) keeps the timer too. - The newest start, pause or reset wins, so a tab that comes back with the time it kept does not undo a later reset from another window. +## Without the presenter page + +New in 3.5. To keep an eye on the time while you present from the slides alone: + +- **Show Timer**, in the settings menu or the right-click menu, puts the timer over the slides. Drag it anywhere, and the place is kept in the browser. +- **Timer Minutes** in the settings sets the length here and now: a countdown of that many minutes in this browser, over the deck's `duration`. Empty goes back to the deck's. Every window of the deck in this browser follows it. +- **Timer Size** in the settings picks S, M or L. +- **Timer Fades** picks when it fades: **When Idle** (after 3 seconds without mouse movement, the default) or **Always** (faint until you hover it). +- Click the clock to start or pause it, or Tab to it and press Space or Enter. Hover it for reset and hide. + +To put the clock in a slide or a layer, write ``: + +```md +Time left: + + +``` + +Style it with `class`, and wrap it in [`slide-ng-drag`](./draggable.md) to move it. A click starts or pauses it. In the overview and the PDF it is shown as plain text. In a layer, import `SlideTimer` from `slide-ng/builtin/slide-timer`. + +Every timer shows the same shared time, so the presenter page, the floating timer and `` always agree. + A bar shows how much of the duration has passed. `progressBar: { minutes: true }` shows the minutes on the slides too, see [Progress bar](./progress-bar.md). diff --git a/src/content/guide/hosting.md b/src/content/guide/hosting.md index 083cb3f..ea812cc 100644 --- a/src/content/guide/hosting.md +++ b/src/content/guide/hosting.md @@ -92,6 +92,13 @@ The build contains `_redirects`. Or use `netlify.toml`: status = 200 ``` +Netlify reads `_redirects` before `netlify.toml`, so redirects of your own in `netlify.toml` never run: the build's catch-all matches first. Put them in `public/_redirects` instead. The build keeps those lines and adds its catch-all after them (3.5.1 and newer): + +```txt +/tr /1?lang=tr 302! +/en /1?lang=en 302! +``` + ## Vercel ```json