Skip to content

Commit

Permalink
enable bookmarking and solve background position
Browse files Browse the repository at this point in the history
  • Loading branch information
Nithador committed May 16, 2024
1 parent b8951e3 commit 0abf742
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
6 changes: 5 additions & 1 deletion app/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ box::use(
app/view/grassland/grassland_main[grassland_main_ui, grassland_main_server],
)

shiny$enableBookmarking("server")
# App theme ----
#' @export
biodt_theme <- bs_theme(
Expand Down Expand Up @@ -122,9 +123,12 @@ ui <- function(id) {
title = "Acknowledgements",
value = "acknowledgements",
icon = shiny$icon("users-gear"),
class = "container-fluid index-info",
class = "container-fluid",
mod_acknowledgements_ui("info")
),
nav_item(
shiny$bookmarkButton()
)
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion app/static/css/app.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions app/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
.index-info {
background-image: url("../img/forest2.png");
background-repeat: no-repeat;
background-size: 100%;
background-position: bottom;
background-attachment: fixed;
background-size: 100%;
display: flex;
}

Expand Down Expand Up @@ -193,4 +194,4 @@
transition: .3s all ease-in-out;
text-decoration: none;
}
}
}
3 changes: 1 addition & 2 deletions app/view/honeybee/beekeeper_control.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
box::use(
shiny[moduleServer, NS, tags, tagList, actionButton, observeEvent, req, reactive, reactiveVal, bookmarkButton],
shiny[moduleServer, NS, tags, tagList, actionButton, observeEvent, req, reactive, reactiveVal],
bslib[card, card_header, card_body],
shinyjs[disabled, disable, enable],
purrr[is_empty],
Expand Down Expand Up @@ -28,7 +28,6 @@ beekeeper_control_ui <- function(id) {
),
tags$div(
class = "col-md-4 col-sm-12 d-flex flex-row justify-content-end",
bookmarkButton(),
disabled(
actionButton(
ns("run_simulation"),
Expand Down
4 changes: 1 addition & 3 deletions app/view/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ mod_info_ui <- function(id) {
ns <- NS(id)

fluidRow(
tags$div(
class = "row",
class = "index-info",
tags$div(
class = "col mx-auto col-lg-8",
tags$h1(
Expand Down Expand Up @@ -240,7 +239,6 @@ mod_info_ui <- function(id) {
),
),
)
),

)
}
Expand Down
Binary file added shiny_bookmarks/beekeeper/input.rds
Binary file not shown.

0 comments on commit 0abf742

Please sign in to comment.