Add footer for ids theme
Change-Id: If85c9fe027fb9cc45677068474b21d15d32e7134
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 881364f..178a08c 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -191,6 +191,11 @@
}
args <- c(args, pandoc_variable_arg("theme", theme))
+ if (theme == "ids") {
+ args <- c(args, pandoc_variable_arg("theme-ids"))
+ fig_height = 7
+ fig_width = 12
+ }
# transition
transition <- match.arg(transition, revealjs_transitions())
diff --git a/examples/ids.Rmd b/examples/ids.Rmd
index 9196688..cdd895d 100644
--- a/examples/ids.Rmd
+++ b/examples/ids.Rmd
@@ -1,8 +1,8 @@
---
-title: "Untitled"
+title: "IDS theme for revealjs demo"
author: Marc Kupietz
institute: "IDS Mannheim"
-date: 2024-01-01
+date: "Mannheim, 2024-01-01"
output:
revealjs::revealjs_presentation:
theme: ids
@@ -15,6 +15,7 @@
- chalkboard
- menu
reveal_options:
+ slideNumber: true
chalkboard:
theme: chalkboard
toggleNotesButton: true
diff --git a/inst/reveal.js-4.6.1/css/theme/source/ids.scss b/inst/reveal.js-4.6.1/css/theme/source/ids.scss
index b0f0e32..23ef168 100644
--- a/inst/reveal.js-4.6.1/css/theme/source/ids.scss
+++ b/inst/reveal.js-4.6.1/css/theme/source/ids.scss
@@ -77,3 +77,130 @@
}
}
}
+
+
+/*********************************************
+ * FOOTER
+ *********************************************/
+
+ #ids-footer {
+ opacity: 1;
+ background: white;
+ color: #444444;
+ border-top: dotted orange 2px;
+ transition: opacity 800ms ease-in-out;
+ position: fixed;
+ height: 6%;
+ line-height: 6%;
+ z-index: -20;
+ width: 100%;
+ letter-spacing: 0em;
+ text-align: center;
+ display: table;
+ background-image: url("https://corpora.ids-mannheim.de/slides/reveal.js.ids/images/Mitglied_WGL_transparent.svg");
+ background-repeat: no-repeat;
+ background-position: right 20px center;
+ background-size: 6vH auto;
+}
+
+#ids-footer span {
+ height: 100%;
+ line-height: 100%;
+ z-index: -20;
+ font-size: 2vh;
+ font-family: "Fira Sans Extra Condensed", "Univers LT Std 47 Cn Lt", "Roboto Condensed", 'League Gothic', Impact, sans-serif;
+ display: inline-block;
+ display: table-cell;
+ vertical-align: middle;
+}
+
+#ids-footer div span {}
+
+
+/* Bottom position for the IDS-Footer footer when both progress bar and TOC-Progress are visible */
+
+div.progress[style="display: block;"]~#ids-footer {
+ bottom: calc(3px + 0vh);
+}
+
+
+/* Bottom position for the IDS-Footer footer when TOC-Progress is visible */
+
+#ids-footer {
+ bottom: 3px;
+}
+
+#ids-footer a {
+ color: #555555;
+}
+
+
+/* Bottom position for the IDS-Footer footer when progress bar is visible */
+
+div.progress[style="display: block;"]~footer:last-of-type#ids-footer {
+ bottom: 3px;
+}
+
+
+/* Bottom position for the IDS-Footer footer when neither progress bar nor TOC-Progress are visible */
+
+footer:last-of-type#ids-footer {
+ bottom: 0px;
+}
+
+
+/* Make IDS-Footer invisible if explicitly indicated */
+
+.no-ids-footer #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+.title-frame #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+.no-toc-progress #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+
+/* Make IDS-Footer invisible in overview mode */
+
+.overview #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+
+/*
+ * Menu controls
+ */
+
+ body .reveal .slide-menu-button {
+ color: #aaaaaa !important;
+ position: fixed;
+ left: 30px;
+ bottom: 2%;
+ vertical-align: middle;
+ z-index: 30;
+ font-size: 2vh;
+}
+
+#customcontrols > ul {
+ color: #aaaaaa !important;
+ position: fixed;
+ left: 30px;
+ bottom: 2% !important;
+ vertical-align: middle;
+ z-index: 30;
+ font-size: 2vh;
+}
+
+@media only screen and (min-width: 500px) {
+ #customcontrols > ul {
+ bottom: 2% !important;
+ }
+}
diff --git a/inst/reveal.js-4.6.1/dist/theme/ids.css b/inst/reveal.js-4.6.1/dist/theme/ids.css
index bb2d057..4b59d99 100644
--- a/inst/reveal.js-4.6.1/dist/theme/ids.css
+++ b/inst/reveal.js-4.6.1/dist/theme/ids.css
@@ -374,4 +374,113 @@
}
.reveal ul li::marker, .reveal ol li::marker {
color: var(--r-list-bullet-color) !important;
+}
+
+/*********************************************
+ * FOOTER
+ *********************************************/
+#ids-footer {
+ opacity: 1;
+ background: white;
+ color: #444444;
+ border-top: dotted orange 2px;
+ transition: opacity 800ms ease-in-out;
+ position: fixed;
+ height: 6%;
+ line-height: 6%;
+ z-index: -20;
+ width: 100%;
+ letter-spacing: 0em;
+ text-align: center;
+ display: table;
+ background-image: url("https://corpora.ids-mannheim.de/slides/reveal.js.ids/images/Mitglied_WGL_transparent.svg");
+ background-repeat: no-repeat;
+ background-position: right 20px center;
+ background-size: 6vH auto;
+}
+
+#ids-footer span {
+ height: 100%;
+ line-height: 100%;
+ z-index: -20;
+ font-size: 2vh;
+ font-family: "Fira Sans Extra Condensed", "Univers LT Std 47 Cn Lt", "Roboto Condensed", "League Gothic", Impact, sans-serif;
+ display: inline-block;
+ display: table-cell;
+ vertical-align: middle;
+}
+
+/* Bottom position for the IDS-Footer footer when both progress bar and TOC-Progress are visible */
+div.progress[style="display: block;"] ~ #ids-footer {
+ bottom: calc(3px + 0vh);
+}
+
+/* Bottom position for the IDS-Footer footer when TOC-Progress is visible */
+#ids-footer {
+ bottom: 3px;
+}
+
+#ids-footer a {
+ color: #555555;
+}
+
+/* Bottom position for the IDS-Footer footer when progress bar is visible */
+div.progress[style="display: block;"] ~ footer:last-of-type#ids-footer {
+ bottom: 3px;
+}
+
+/* Bottom position for the IDS-Footer footer when neither progress bar nor TOC-Progress are visible */
+footer:last-of-type#ids-footer {
+ bottom: 0px;
+}
+
+/* Make IDS-Footer invisible if explicitly indicated */
+.no-ids-footer #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+.title-frame #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+.no-toc-progress #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+/* Make IDS-Footer invisible in overview mode */
+.overview #ids-footer {
+ opacity: 0;
+ transition: opacity 800ms ease-in-out;
+}
+
+/*
+ * Menu controls
+ */
+body .reveal .slide-menu-button {
+ color: #aaaaaa !important;
+ position: fixed;
+ left: 30px;
+ bottom: 2%;
+ vertical-align: middle;
+ z-index: 30;
+ font-size: 2vh;
+}
+
+#customcontrols > ul {
+ color: #aaaaaa !important;
+ position: fixed;
+ left: 30px;
+ bottom: 2% !important;
+ vertical-align: middle;
+ z-index: 30;
+ font-size: 2vh;
+}
+
+@media only screen and (min-width: 500px) {
+ #customcontrols > ul {
+ bottom: 2% !important;
+ }
}
\ No newline at end of file
diff --git a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
index b04f0ff..6f99b03 100644
--- a/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
+++ b/inst/rmarkdown/templates/revealjs_presentation/resources/default.html
@@ -642,6 +642,8 @@
$for(include-after)$
$include-after$
$endfor$
-
+$if(theme-ids)$
+ <footer id="ids-footer"><span>$author$ · $title$ · $date$</span></footer>
+$endif$
</body>
</html>