fix css of the posterdown_html output
There was an extra page being sent to the chrome print function and it was due to some mistakes I had made in dealing with padding values and not wrapping different components in divs properly. Should be fixed now!
Also added new hexlogo to the document :smile:
diff --git a/inst/rmarkdown/templates/posterdown_html/resources/template.html b/inst/rmarkdown/templates/posterdown_html/resources/template.html
index 2339da4..3d14952 100644
--- a/inst/rmarkdown/templates/posterdown_html/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_html/resources/template.html
@@ -55,9 +55,14 @@
font-family: $font_family$;
background-color: $body_bgcol$;
}
+.poster_wrap {
+width: $poster_width$;
+height: $poster_height$;
+padding: 0cm;
+}
.title_container {
-width: 100%;
-height: 15%;
+width: $poster_width$;
+height: calc($poster_height$ * 0.15);
overflow: hidden;
background-color: $titlebox_bgcol$;
border: $titlebox_borderwidth$ solid $titlebox_bordercol$;
@@ -130,11 +135,7 @@
-moz-column-rule-color: $columnline_col$;
column-rule-color: $columnline_col$;
width: 100%;
-height: 85%;
-padding-left: 1cm;
-padding-right: 1cm;
-padding-bottom: 1cm;
-padding-top: 1cm;
+height: 100%;
color: $body_textcol$;
}
.poster_title h1 {
@@ -145,6 +146,12 @@
padding-top: 1cm;
padding-bottom: 0;
}
+.poster_body_wrap{
+width: $poster_width$;
+height: calc($poster_height$ * 0.83);
+padding-top: calc($poster_height$ * 0.01);
+padding-bottom: calc($poster_height$ * 0.01);
+}
.poster_title h3 {
color: $author_textcol$;
font-size: $author_textsize$;
@@ -166,6 +173,9 @@
margin-top: 2cm;
margin-bottom: 0;
}
+.section {
+ padding: 1cm;
+}
.poster_body h1 {
text-align: center;
color: $sectitle_textcol$;
@@ -287,6 +297,8 @@
$include-before$
$endfor$
+<div class="poster_wrap">
+
<div class="title_container">
<!-- Left Logo -->
<div class="logo_left">
@@ -305,9 +317,13 @@
</div>
</div>
+<div class='poster_body_wrap'>
<div class='poster_body'>
$body$
</div>
+</div>
+
+</div>
$if(math)$
<!-- dynamically load mathjax for compatibility with self-contained -->
diff --git a/inst/rmarkdown/templates/posterdown_html/skeleton/Figures/posterdownlogo.png b/inst/rmarkdown/templates/posterdown_html/skeleton/Figures/posterdownlogo.png
index 258776d..b296a26 100644
--- a/inst/rmarkdown/templates/posterdown_html/skeleton/Figures/posterdownlogo.png
+++ b/inst/rmarkdown/templates/posterdown_html/skeleton/Figures/posterdownlogo.png
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
index 7b44131..dc6ad37 100644
--- a/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
@@ -21,7 +21,7 @@
titlebox_bgcol: "#008080" #Colour of the Title Box background
titlebox_bordercol: "#0b4545" #Colour of the title Box border.
titlebox_shape: "" #ONLY posterdown_PDF
-titlebox_borderwidth: "1cm"
+titlebox_borderwidth: "0cm"
titletext_fontfamily: Special Elite
title_textcol: "#ffffff" #colour of title text
author_textcol: "#0b4545" # Colour of author text
@@ -36,7 +36,7 @@
body_bgcol: "#ffffff" #colour of the poster main background
body_textsize: "45px" # Size of the main poster body text
body_textcol: "#000000" # Colour of main text in the body of poster
-column_numbers: 4 # Number of columns that the poster has
+column_numbers: 3 # Number of columns that the poster has
column_margins: "0.5in" # Margin spacing for columns
columnline_col: "#008080" #colour
columnline_width: "1mm" #width of line between each column
@@ -91,19 +91,28 @@
# Results
-Usually you want to have a nice table displaying some important results that you have calculated. In `posterdown` this is as easy as using the `kable` table formatting you are probably use to as per typical R Markdown formatting. I suggesting checking out the `kableExtra` package and its in depth documentation on customizing these tables found [here](https://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf) [@kableExtra2019]. You can reference tables like so: Table \@ref(tab:mytable).
+Usually you want to have a nice table displaying some important results that you have calculated. In `posterdown` this is as easy as using the `kable` table formatting you are probably use to as per typical R Markdown formatting.
+I suggesting checking out the `kableExtra` package and its in depth documentation on customizing these tables found [here](https://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf) [@kableExtra2019]. You can reference tables like so: Table \@ref(tab:mytable). Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam placerat augue at velit tincidunt semper. Donec elementum porta posuere. Nullam interdum, odio at tincidunt feugiat, turpis nisi blandit eros, eu posuere risus felis non quam. Nam eget lorem odio. Duis et aliquet orci. Phasellus nec viverra est.
```{r mytable, out.width='80%'}
-knitr::kable(iris[1:5, 1:4], caption = 'Table caption.',align = 'c',"html")
+knitr::kable(iris[1:10, 1:4], caption = 'Table caption.',align = 'c',"html")
```
-Or with figures: Figure \@ref(fig:standard-plot).
+Or with figures: Figure \@ref(fig:standard-plot), or Figure \@ref(fig:morefigs).
-```{r standard-plot, out.width='80%', fig.align='center', echo=TRUE, fig.cap='Great figure!'}
+```{r standard-plot, out.width='80%', fig.align='center', fig.cap='Great figure!', fig.height=10}
plot(mtcars[1:2])
```
+```{r morefigs, out.width='80%', fig.cap='Amazing, right?!', fig.height=5}
+data <- iris
+
+plot(x = data$Sepal.Length, y = data$Sepal.Width, col = data$Species, pch = 19, xlab = "Sepal Length (cm)", ylab = "Sepal Width (cm)")
+
+```
+
+
# Next Steps: More random text