posterdown_html updates
- fix body_textcol problem
- fix ugly links
- fix code chunk display
- make fig/ tab caption font size smaller by default
- fix height space issue when using border in title section of poster that resolves issue #97
diff --git a/inst/rmarkdown/templates/posterdown_html/resources/template.html b/inst/rmarkdown/templates/posterdown_html/resources/template.html
index 67da69c..75dcef0 100644
--- a/inst/rmarkdown/templates/posterdown_html/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_html/resources/template.html
@@ -63,11 +63,12 @@
padding: 0cm;
}
.title_container {
-width: $if(poster_width)$$poster_width$$else$45in$endif$;
-height: calc($if(poster_height)$$poster_height$$else$38in$endif$ * 0.15);
+width: $if(titlebox_borderwidth)$calc(100% - $titlebox_borderwidth$ - $titlebox_borderwidth$)$else$100%$endif$;
+height: $if(titlebox_borderwidth)$calc(15% - $titlebox_borderwidth$ - $titlebox_borderwidth$)$else$15%$endif$;
overflow: hidden;
background-color: $if(primary_colour)$$primary_colour$$else$#0b4545$endif$;
-border: $if(titlebox_borderwidth)$$titlebox_borderwidth$$else$0$endif$ solid $if(secondary_colour)$$secondary_colour$$else$#0b4545$endif$;
+border: $if(titlebox_borderwidth)$$titlebox_borderwidth$$else$0$endif$ solid $if(titlebox_bordercol)$$titlebox_bordercol$$else$$if(primary_colour)$$primary_colour$$else$#0b4545$endif$
+$endif$;
}
.logo_left {
float: left;
@@ -103,24 +104,28 @@
}
/* unvisited link */
a:link {
-color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#cc0000$endif$$endif$;
+color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#008080$endif$$endif$;
+text-decoration: none;
}
.mybreak {
break-before: column;
}
/* visited link */
a:visited {
-color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#cc0000$endif$$endif$;
+color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#008080$endif$$endif$;
+text-decoration: none;
}
/* mouse over link */
a:hover {
-color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#cc0000$endif$$endif$;
+color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#008080$endif$$endif$;
+text-decoration: none;
}
/* selected link */
a:active {
-color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#cc0000$endif$$endif$;
+color: $if(link_col)$$link_col$$else$$if(accent_colour)$$accent_colour$$else$#008080$endif$$endif$;
+text-decoration: none;
}
.poster_body {
-webkit-column-count: $if(column_numbers)$$column_numbers$$else$3$endif$; /* Chrome, Safari, Opera */
@@ -138,15 +143,9 @@
-webkit-column-rule-color: $if(columnline_col)$$columnline_col$$else$$if(primary_colour)$$primary_colour$$else$#0b4545$endif$$endif$;
-moz-column-rule-color: $if(columnline_col)$$columnline_col$$else$$if(primary_colour)$$primary_colour$$else$#0b4545$endif$$endif$;
column-rule-color: $if(columnline_col)$$columnline_col$$else$$if(primary_colour)$$primary_colour$$else$#0b4545$endif$$endif$;
-$if(titlebox_borderwidth)$
-column-gap: $titlebox_borderwidth$;
-padding-left: calc($titlebox_borderwidth$ / 2);
-padding-right: calc($titlebox_borderwidth$ / 2);
-$else$
column-gap: 1em;
padding-left: 0.5em;
padding-right: 0.5em;
-$endif$
height: 100%;
color: $if(body_textcol)$$body_textcol$$else$#000000$endif$
background-color: $if(body_bgcol)$$body_bgcol$$else$#ffffff$endif$;
@@ -158,9 +157,9 @@
font-weight: normal;
}
.poster_body_wrap{
-width: calc($if(poster_width)$$poster_width$$else$45in$endif$ + $if(titlebox_borderwidth)$$titlebox_borderwidth$$else$0$endif$ + $if(titlebox_borderwidth)$$titlebox_borderwidth$$else$0$endif$);
+width: $if(poster_width)$$poster_width$$else$45in$endif$;
height: calc($if(poster_height)$$poster_height$$else$38in$endif$ * 0.83);
-padding-top: calc($if(poster_height)$$poster_height$$else$38in$endif$ * 0.005);
+padding-top: calc($if(poster_height)$$poster_height$$else$38in$endif$ * 0.01);
padding-bottom: calc($if(poster_height)$$poster_height$$else$38in$endif$ * 0.01);
background-color: $if(body_bgcol)$$body_bgcol$$else$#ffffff$endif$;
}
@@ -183,7 +182,7 @@
font-weight: normal;
}
img {
-margin-top: 2cm;
+margin-top: 0;
margin-bottom: 0;
}
.section {
@@ -221,25 +220,30 @@
position: sticky;
width: 100%;
}
+div.sourceCode {
+font-size: 20pt;
+width: 85%;
+margin-left: auto;
+margin-right: auto;
+padding: 1em;
+border: 1mm solid;
+border-color: #008080;
+border-radius: 1em;
+}
pre.sourceCode.r {
-background-color: #dddddd40;
-border-radius: 4mm;
-padding: 4mm;
-width: 75%;
+width: 100%;
/* align-items: center; */
margin: auto;
-padding-left: 2cm;
}
code.sourceCode.r{
background-color: transparent;
-font-size: 20pt;
-border-radius: 2mm;
+color: $if(body_textcol)$$body_textcol$$else$#000000$endif$
}
.caption {
-font-size: 25pt;
+font-size: 20pt;
}
.table caption {
-font-size: 25pt;
+font-size: 20pt;
padding-bottom: 3mm;
}
@@ -277,6 +281,7 @@
margin-left: 4mm;
margin-top: 6mm;
margin-bottom: 10mm;
+color: $if(body_textcol)$$body_textcol$$else$#000000$endif$
}
.poster_body ol {
margin-right: 4mm;
@@ -314,8 +319,8 @@
<!-- Poster Title -->
<div class= "poster_title">
$if(title)$<h1 id="title">$title$</h1>$endif$
-$if(author)$<h3 id="author">$for(author)$$author.name$<sup>$author.affil$$if(author.orcid)$, <a class="orcid" href="https://orcid.org/$author.orcid$"><img src="https://raw.githubusercontent.com/brentthorne/posterdown/master/images/orcid.jpg"></a>$else$$endif$</sup>$sep$, $endfor$</h3><br>$endif$
-$if(affiliation)$<h5 id="affiliation">$for(affiliation)$<sup>$affiliation.num$</sup> $affiliation.address$$sep$<br> $endfor$</h5>$endif$
+$if(author)$<h3 id="author">$for(author)$$author.name$<sup>$author.affil$$if(author.orcid)$, <a class="orcid" href="https://orcid.org/$author.orcid$"><img src="https://raw.githubusercontent.com/brentthorne/posterdown/master/images/orcid.jpg"></a>$else$$endif$</sup>$sep$, $endfor$</h3>$endif$
+$if(affiliation)$<h5 id="affiliation">$for(affiliation)$<sup>$affiliation.num$</sup> $affiliation.address$$sep$; $endfor$</h5>$endif$
</div>
<!-- Right Logo -->
<div class="logo_right">