Skip to content

Build your personal knowledge base with Trilium Notes

feat(collection/presentation): add template for presentation & slide

Elian Doran113061902e0e
diff --git a/apps/server/src/assets/translations/en/server.json b/apps/server/src/assets/translations/en/server.json
index 2fcbe5464d..14220bcd85 100644
--- a/apps/server/src/assets/translations/en/server.json
+++ b/apps/server/src/assets/translations/en/server.json
@@ -423,7 +423,11 @@
"board_note_third": "Third note",
"board_status_todo": "To Do",
"board_status_progress": "In Progress",
- "board_status_done": "Done"
+ "board_status_done": "Done",
+ "presentation": "Presentation",
+ "presentation_slide": "Presentation slide",
+ "presentation_slide_first": "First slide",
+ "presentation_slide_second": "Second slide"
},
"sql_init": {
"db_not_initialized_desktop": "DB not initialized, please follow on-screen instructions.",
diff --git a/apps/server/src/services/hidden_subtree_templates.ts b/apps/server/src/services/hidden_subtree_templates.ts
index 11ed6c66bf..5b887978c8 100644
--- a/apps/server/src/services/hidden_subtree_templates.ts
+++ b/apps/server/src/services/hidden_subtree_templates.ts
@@ -234,6 +234,70 @@ export default function buildHiddenSubtreeTemplates() {
}
]
},
+ {
+ id: "_template_presentation",
+ type: "book",
+ title: t("hidden_subtree_templates.presentation"),
+ icon: "bx bx-slideshow",
+ attributes: [
+ {
+ name: "template",
+ type: "label"
+ },
+ {
+ name: "viewType",
+ type: "label",
+ value: "presentation"
+ },
+ {
+ name: "collection",
+ type: "label"
+ },
+ {
+ name: "child:template",
+ type: "relation",
+ value: "_template_presentation_slide"
+ }
+ ],
+ children: [
+ {
+ id: "_template_presentation_first",
+ type: "text",
+ title: t("hidden_subtree_templates.presentation_slide_first"),
+ attributes: [
+ {
+ name: "template",
+ type: "relation",
+ value: "_template_presentation_slide"
+ }
+ ]
+ },
+ {
+ id: "_template_presentation_second",
+ type: "text",
+ title: t("hidden_subtree_templates.presentation_slide_second"),
+ attributes: [
+ {
+ name: "template",
+ type: "relation",
+ value: "_template_presentation_slide"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ id: "_template_presentation_slide",
+ type: "text",
+ title: t("hidden_subtree_templates.presentation_slide"),
+ icon: "bx bx-rectangle",
+ attributes: [
+ {
+ name: "slide",
+ type: "label"
+ }
+ ]
+ }
]
};