generated from statOmics/Rmd-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.R
28 lines (26 loc) · 952 Bytes
/
utils.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
suppressPackageStartupMessages(library(slickR))
suppressPackageStartupMessages(library(htmltools))
generate_div <- function(header, sub_header, description, img_path) {
description_div <- tags$div(
tags$h3(header,
style = css(color = "black")),
tags$div(
tags$h4(sub_header,
style = css(color = "black")),
tags$p(description,
style = css(color = "black"))
)
)
d <- tags$div(
style = css(display = "flex", "align-items" = "center"),
tags$div(
style = css(display = "flex", "flex-direction" = "column", "margin-right" = "20px", width = "20%"),
tags$img(src=img_path)
),
tags$div(
style = css(display = "flex", "flex-direction" = "column", "margin-right" = "20px", width = "80%", "text-align" = "left"),
description_div
)
)
return(d)
}