Skip to content

Commit

Permalink
chore: use the same app_height in both the places
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 4, 2024
1 parent bf8b5fb commit 5f33b74
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/tag_examplesShinylive.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ roxy_tag_rd.roxy_tag_examplesShinylive <- function(x, base_path, env) {
#' @noRd
#' @exportS3Method format rd_section_examplesShinylive
format.rd_section_examplesShinylive <- function(x, ...) {
app_height <- "800px"
iframe_style <- paste0(
"style=\"",
paste(
"height: 800px",
"height: ", app_height,
"width: 100vw",
"border: 1px solid rgba(0,0,0,0.175)",
"border-radius: .375rem",
Expand All @@ -215,7 +216,7 @@ $(function() {
" \\item{example-", seq_along(x$value), "}{\n",
" \\href{", x$value, "}{Open in Shinylive}\n",
" \\if{html}{\\out{<script type=\"text/javascript\">", gsub("\n", "", jscode), "</script>}}\n",
" \\if{html}{\\out{<iframe class=\"iframe_shinylive\" src=\"", x$value, "\" ", iframe_style, "></iframe><div style='height: 800px;'></div>}}\n", # nolint: line_length_linter.
" \\if{html}{\\out{<iframe class=\"iframe_shinylive\" src=\"", x$value, "\" ", iframe_style, "></iframe><div style='height: ", app_height, ";'></div>}}\n", # nolint: line_length_linter.
" }\n",
collapse = ""
),
Expand Down

0 comments on commit 5f33b74

Please sign in to comment.