Skip to content

Commit

Permalink
feat: add handling for logo in config.yml theming
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepanshKhurana committed Nov 22, 2024
1 parent 2250cfa commit b33ef11
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
File renamed without changes
16 changes: 12 additions & 4 deletions app/view/mod_header.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
box::use(
config[
get
],
shiny[
a,
actionLink,
div,
h2,
Expand All @@ -12,14 +16,18 @@ box::use(
#' @export
ui <- function(id) {
ns <- NS(id)
branding <- get("branding")
div(
class = "header",
div(
class = "left header-section",
img(
src = "static/appsilon-logo.png",
alt = "Appsilon logo",
href = "https://demo.appsilon.com"
a(
img(
src = branding$logo$src,
alt = branding$logo$alt
),
href = branding$logo$href,
target = "_blank"
),
div(
class = "vertical-line"
Expand Down
6 changes: 5 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ default:
rhino_log_file: !expr Sys.getenv("RHINO_LOG_FILE", NA)
app_role: "owner"
branding:
logo:
src: "static/logo.png"
alt: "Appsilon logo"
href: "https://demo.appsilon.com"
colors:
red: "#a50e0e"#
red: "#a50e0e"
red-highlight: "#fce8e650"
green: "#3a5a40"
green-highlight: "#e0f0df50"
Expand Down

0 comments on commit b33ef11

Please sign in to comment.