Add contact.qrcode option
Change-Id: Ia394607bbdc284c68b4cee8c00bc73c4c438a865
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d8d7fbe..a4a88e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,7 +40,7 @@
- end_section install_fonts
- start_section install_r_packages "Installing missing R packages"
- - R -e "install.packages(c('devtools', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite'))"
+ - R -e "install.packages(c('devtools', 'scales', 'sp', 'raster', 'kableExtra', 'DT', 'svglite', 'qrcode'))"
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/idsThemeR")'
- R -e 'devtools::install_git("https://korap.ids-mannheim.de/gerrit/IDS-Mannheim/posterdown")'
- end_section install_r_packages
diff --git a/README.md b/README.md
index 0d62c13..c9741ec 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,7 @@
department: Digital Linguistics
email: kupietz@ids-mannheim.de
website: "http://korap.ids-mannheim.de/instance/icc"
+ qrcode: "my_qrcode.svg"
```
For a complete example, see [skeleton.Rmd](./inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd)
diff --git a/inst/rmarkdown/templates/posterdown_ids/resources/template.html b/inst/rmarkdown/templates/posterdown_ids/resources/template.html
index 95bef1e..d6aec3d 100644
--- a/inst/rmarkdown/templates/posterdown_ids/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_ids/resources/template.html
@@ -295,6 +295,10 @@
overflow: display;
}
+#info-column .qrcode {
+ margin-bottom: 5em;
+}
+
@media print {
#info-column {
bottom: 7vH;
@@ -667,6 +671,10 @@
</div>
<div id="info-column">
+ $if(contact.qrcode)$
+ <img class="qrcode" src="$contact.qrcode$"/>
+ <br/>
+ $endif$
<b>Contact:</b><br/>
$if(contact.name)$$contact.name$$else$Dr. Marc Kupietz$endif$<br/>
$if(contact.department)$$contact.department$$else$Corpus Linguistics PA$endif$<br/>
diff --git a/inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd
index 228193e..6dfdbfd 100644
--- a/inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_ids/skeleton/skeleton.Rmd
@@ -18,6 +18,7 @@
department: Digital Linguistics
email: kupietz@ids-mannheim.de
website: "http://korap.ids-mannheim.de/instance/icc"
+ qrcode: "gerrit_qrcode.svg"
column_numbers: 2
# logoright_name: https://raw.githubusercontent.com/brentthorne/posterdown/master/images/betterhexlogo.png
logoleft_name: https://raw.githubusercontent.com/brentthorne/posterdown/master/images/betterhexlogo.png
@@ -31,7 +32,9 @@
---
```{r setup, include=FALSE}
+library(qrcode)
knitr::opts_chunk$set(dev = 'svg', echo = FALSE)
+generate_svg(qr_code("https://korap.ids-mannheim.de/gerrit/plugins/gitiles/IDS-Mannheim/posterdown"), "gerrit_qrcode.svg")
```
# Introduction