decker-edu / decker

A markdown based tool for slide deck creation.
GNU General Public License v3.0
53 stars 13 forks source link

ID / index for a lecture on the index page #111

Closed Feirell closed 3 months ago

Feirell commented 3 months ago

It would be wonderful, if the index page featuring all available lectures would include an additional column (maybe infront of the "week" column) with the id or index of this slide stack. This would be great to allow external referencing via index e.g. 03-20 (lecture 3 slide 20).

Thanks again for the great tool :)

monofon commented 3 months ago

It is possible to have a completely custom index file.

The contents of the top-level file index.md replaces the generated index if it exists. You can, for example, use a Markdown table and list links to your decks in any way you like.

Here is an example from a lecture of mine that uses template macros to make the links a little bit shorter and easier to write:

---
lang: de-DE
subtitle: "**Custom Index Page Example**"
templates:
  assign: |
    <a class="index" href="assignments/:(url)-page.html">:(title)
  topic: |
    <a class="index" href="topics/:(url)-deck.html">:(title) 
title: Computergrafik Grundlagen
---

| Nr. | Datum  | Thema                                                               |
|:---:|:------:|:--------------------------------------------------------------------|
| 01  | 10.10. | **Einführung**                                                      |
|     |        | [@topic](000-introduction "Einführung in das Modul Computergrafik") |
|     |        | [@assign](a01 "Aufgabenblatt 1")                                    |

``` {.javascript .run}
import("./" + Decker.meta.supportPath + "/fuzzySearch/search.js")
    .then((module) => {
      anchor.classList.add("search");
      anchor.innerHTML = `
        <div class="search-box">
          <i class="fa-solid fa-magnifying-glass"></i>
          <input class="search" placeholder="In Folien suchen" type="text">
        </div>
        <table class="search">
        <thead><tr><th>Wort</th><th>Foliensatz</th><th>Folie</th><th>Treffer</th></tr></thead>
        <tbody></tbody>
        </table>
      `;
      module.default(anchor, 0.6);
    });


Also, global search.
Feirell commented 3 months ago

Ok never mind, then this is not an issue with the software but a preference of the person creating the deck. I will raise it with the professor in question, thanks!