From c6116d363cbda066fb4d4e133ba4e194b8f5476f Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Fri, 16 Dec 2022 11:44:32 +0100 Subject: [PATCH] Update overall style --- R/style.R | 23 +++-------------------- R/ui.R | 4 ++-- inst/content/style.css | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 22 deletions(-) create mode 100644 inst/content/style.css diff --git a/R/style.R b/R/style.R index dd3b060..8bda174 100644 --- a/R/style.R +++ b/R/style.R @@ -2,25 +2,8 @@ #' @noRd custom_css <- function() { tags$head( - tags$style(HTML( - ".nav-hidden { height: 0 }", - ".flow-layout > div {", - " display: inline-block;", - " vertical-align: top;", - " margin-right: 12px;", - "}", - ".container h2, .container h3 {", - " margin-top: 64px;", - "}", - "", - ".container table {", - " margin-top: 32px;", - " margin-bottom: 32px;", - "}", - "", - ".container th, .container td {", - " padding: 4px;", - "}" - )) + tags$style(HTML(includeText( + system.file("content", "style.css", package = "ubigen") + ))) ) } diff --git a/R/ui.R b/R/ui.R index 24c48ff..46093a9 100644 --- a/R/ui.R +++ b/R/ui.R @@ -16,9 +16,9 @@ ui <- function(custom_dataset = NULL) { sidebarLayout( sidebarPanel( width = 3, - h3("Your genes"), + h5("Your genes"), gene_selector_ui("custom_genes"), - h3("Method"), + h5("Method"), selectInput( "dataset", label = strong("Expression dataset"), diff --git a/inst/content/style.css b/inst/content/style.css new file mode 100644 index 0000000..4a0028d --- /dev/null +++ b/inst/content/style.css @@ -0,0 +1,34 @@ +.nav-hidden { + height: 0 +} + +h5 { + margin-top: 0.5rem; + margin-bottom: 1rem; + font-weight: bold; +} + +.navbar-brand { + font-weight: bold; +} + +.flow-layout>div { + display: inline-block; + vertical-align: top; + margin-right: 12px; +} + +.container h2, +.container h3 { + margin-top: 64px; +} + +.container table { + margin-top: 32px; + margin-bottom: 32px; +} + +.container th, +.container td { + padding: 4px; +} \ No newline at end of file