Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include "title" in function tablerDashNav #5

Open
alexquant1993 opened this issue Jan 20, 2020 · 0 comments
Open

Include "title" in function tablerDashNav #5

alexquant1993 opened this issue Jan 20, 2020 · 0 comments

Comments

@alexquant1993
Copy link

Hi,

What do you think about including a new argument "title" in the function tablerDashNav. This is my proposal:

`tablerDashNav <- function(id, ..., src = NULL, title = NULL, navMenu = NULL) {

headerTag <- shiny::tags$div(
class = "header main-title py-4",
shiny::tags$div(
class = "container",
shiny::tags$div(
class = "d-flex",
# header brand
shiny::tags$a(
class = "header-brand",
href = "#",
shiny::img(src = src, class = "header-brand-img"),
span(title, id = "header-title")
),
# navbar content
shiny::tags$div(
class = "d-flex order-lg-2 ml-auto",
lapply(list(...), shiny::tagAppendAttributes, class = "mx-2")
),
# header toggle
if (!is.null(navMenu)) {
shiny::tags$a(
href = "#",
class = "header-toggler d-lg-none ml-3 ml-lg-0",
data-toggle = "collapse",
data-target = paste0("#", id),
shiny::tags$span(class="header-toggler-icon")
)
}
)
)
)

navTag <- if (!is.null(navMenu)) {
shiny::tags$div(
class = "header collapse d-lg-flex p-0",
id = id,
shiny::tags$div(
class = "container",
shiny::tags$div(
class = "row align-items-center",
# navigation
shiny::tags$div(
class = "col-lg order-lg-first",
navMenu
)
)
)
)
}

shiny::tagList(headerTag, navTag)
}`

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant