Introduce partner and funder logos

Change-Id: I71e00aaa51c2dffe74335c7c4f170e8d507356d6
diff --git a/R/revealjs_presentation.R b/R/revealjs_presentation.R
index 68d0733..05c8131 100644
--- a/R/revealjs_presentation.R
+++ b/R/revealjs_presentation.R
@@ -152,6 +152,28 @@
 #'     toggleNotesButton: true
 #'     toggleChalkboardButton: true
 #' ```
+#' ## Title slide: QR code and additional logos
+#'
+#' Three optional yaml entries personalise the title slide for external
+#' audiences (ported from \pkg{posterdown.ids}):
+#'
+#' * `website: <url>` -- a linked QR code pointing to the URL is placed in
+#'   the top left of the title slide. Uses the \pkg{qrcode} package.
+#' * `partner_logo: <path-or-url>` -- when a presentation is given by
+#'   authors from two institutions, the partner institution's logo is shown
+#'   next to the IDS logo, in the top right of every slide.
+#' * `funder_logo: <path-or-url>` -- a funder logo (e.g. "Text+") is placed
+#'   in the bottom left of the title slide, opposite the Leibniz
+#'   Gemeinschaft membership logo. It is lifted above the footer band on
+#'   print (pdf) pages.
+#'
+#' Local logo files (svg, png, jpg, gif, webp) are embedded in the html as
+#' data URIs, so they do not need to be shipped with the presentation; http
+#' URLs are used as-is. A QR code anywhere else on a slide can be produced
+#' with [qrlink()] from inline R code. The navigation chrome (arrows, slide
+#' number, menu button) is hidden on the title slide for a bare first
+#' impression.
+#'
 #' ## Bibliography and citations
 #' 
 #' Documents with a `bibliography:` in their YAML header are formatted with
@@ -429,6 +451,21 @@
     # highlight
     args <- c(args, pandoc_highlight_args(highlight, default = "pygments"))
 
+    # website entry: place a linked QR code (inline SVG) in the top left of
+    # the title slide
+    if (!is.null(metadata$website)) {
+      args <- c(args, pandoc_variable_arg("website-qr", qrlink(metadata$website)))
+    }
+
+    # partner / funder institution logos: local files are inlined as data
+    # URIs so they resolve correctly in CSS and stay embedded in the output
+    if (!is.null(metadata$partner_logo)) {
+      args <- c(args, pandoc_variable_arg("partner-logo-src", logo_uri(metadata$partner_logo)))
+    }
+    if (!is.null(metadata$funder_logo)) {
+      args <- c(args, pandoc_variable_arg("funder-logo-src", logo_uri(metadata$funder_logo)))
+    }
+
     # default to the bundled IDS citation style unless the document
     # specifies a style of its own
     if (is.null(metadata$csl)) {