NERC-CEH / UKCEH_shiny_theming

Guidance for applying UKCEH branding to R Shiny apps
6 stars 1 forks source link

Provide theme advice for multiple logos #2

Open simonrolph opened 1 year ago

simonrolph commented 1 year ago

eg. UKSCAPE

Provide links to proper resolution logos (possibly hosted in repository)

ZekeMarshall commented 7 months ago

Hi @simonrolph , thanks for putting this repository together! I've incorporated parts of your "Logo, title and favicon" reccomendations. I am however using a local copy of the UKCEH logo, placed in a "www" folder. I also don't need to, but i've tested using multiple logos column-wise and this code works if it is any help.

title = shiny::div(

    shiny::splitLayout(

      # CEH Logo
      bslib::card_image(file = "www/ukceh_logo_long_720x170_rgb.png", fill = FALSE, width = "300px"),

      # Second, TEST, CEH Logo
      bslib::card_image(file = "www/ukceh_logo_long_720x170_rgb.png", fill = FALSE, width = "300px"),

      # App Title
      shiny::div(shiny::h1("pseudoMAVIS")),

      # Align cell contents in the middle vertically
      cellArgs = list(style = "vertical-align: middle !important;")

    ),

      # Tab Title
      shiny::tagList(tags$head(tags$title(paste0(" | UK Centre for Ecology & Hydrology")),
                     tags$link(rel = "shortcut icon", href = "https://brandroom.ceh.ac.uk/themes/custom/ceh/favicon.ico")))

   )