From e7942ebf15d84251b4b1e37fd832445ba4d3fca0 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 16 Feb 2022 14:18:08 +0100 Subject: [PATCH] Make content-root size configurable --- config/components.go | 9 +++++++++ web/js/app.js | 2 ++ 2 files changed, 11 insertions(+) diff --git a/config/components.go b/config/components.go index a7024c8..3ee50ef 100644 --- a/config/components.go +++ b/config/components.go @@ -1,8 +1,15 @@ package config +const ( + defaultWidth uint = 960 + defaultHeight uint = 700 +) + var defaults = map[string]interface{}{ "mermaid.theme": "forest", "theme": "beige", + "width": defaultWidth, + "height": defaultHeight, "codeTheme": "monokai", "verticalSeparator": `\*\*\*`, "horizontalSeparator": `---`, @@ -54,6 +61,8 @@ type ( History bool `json:"history"` Center bool `json:"center"` SlideNumber bool `json:"slideNumber"` + Width uint `json:"width"` + Height uint `json:"height"` Menu struct { Numbers bool `json:"numbers"` UseTextContentForMissingTitles bool `json:"useTextContentForMissingTitles"` diff --git a/web/js/app.js b/web/js/app.js index d60359f..c805b0a 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -39,6 +39,8 @@ async function initReveal() { center: cfg.center, slideNumber: cfg.slideNumber, transition: cfg.transition, + width: cfg.width, + height: cfg.height, hash: true, pdfSeparateFragments: false, menu: {