shinylive message
Browse files
app.R
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
# ::rtemislive::
|
3 |
# 2024 EDG rtemis.org
|
4 |
|
|
|
|
|
|
|
5 |
# Setup
|
6 |
library(shiny)
|
7 |
library(bslib)
|
@@ -40,18 +43,32 @@ xtlive <- function(
|
|
40 |
default_theme = "dark",
|
41 |
xt_plotly_height = "900px",
|
42 |
verbosity = 1) {
|
|
|
43 |
# Logo
|
44 |
logo <- base64enc::dataURI(
|
45 |
file = "./www/rtemisxt_gray.png", mime = "image/png"
|
46 |
)
|
|
|
47 |
# Version
|
|
|
48 |
xtl <- paste0(
|
49 |
"xtlive v.0.0.2",
|
50 |
" | ", "rtemis v.", utils::packageVersion("rtemis"), # doesn't work in shinylive
|
51 |
" | R v.", version$major, ".", version$minor,
|
52 |
-
" | running on ",
|
53 |
)
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
# UI page_navbar ----
|
56 |
ui <- function(request) {
|
57 |
bslib::page_navbar(
|
@@ -115,11 +132,7 @@ xtlive <- function(
|
|
115 |
"To get started, use the navigation tabs at the top.",
|
116 |
title = "Welcome"
|
117 |
),
|
118 |
-
|
119 |
-
as.character(a("WebAssembly", href = "https://webassembly.org/", target = "_blank")),
|
120 |
-
" using ",
|
121 |
-
as.character(a("shinylive", href = "https://posit-dev.github.io/r-shinylive/", target = "_blank")),
|
122 |
-
"<br>and is best viewed with the latest version of Chrome."
|
123 |
))
|
124 |
),
|
125 |
bslib::card_image(
|
|
|
2 |
# ::rtemislive::
|
3 |
# 2024 EDG rtemis.org
|
4 |
|
5 |
+
# Shiny
|
6 |
+
# shiny::runApp("app.R")
|
7 |
+
|
8 |
# Setup
|
9 |
library(shiny)
|
10 |
library(bslib)
|
|
|
43 |
default_theme = "dark",
|
44 |
xt_plotly_height = "900px",
|
45 |
verbosity = 1) {
|
46 |
+
|
47 |
# Logo
|
48 |
logo <- base64enc::dataURI(
|
49 |
file = "./www/rtemisxt_gray.png", mime = "image/png"
|
50 |
)
|
51 |
+
|
52 |
# Version
|
53 |
+
platform <- sessionInfo()[["platform"]]
|
54 |
xtl <- paste0(
|
55 |
"xtlive v.0.0.2",
|
56 |
" | ", "rtemis v.", utils::packageVersion("rtemis"), # doesn't work in shinylive
|
57 |
" | R v.", version$major, ".", version$minor,
|
58 |
+
" | running on ", platform
|
59 |
)
|
60 |
|
61 |
+
# Shinylive info
|
62 |
+
shinylive_info <- if (substr(platform, 1, 4) == "wasm") {
|
63 |
+
paste0(
|
64 |
+
"<br><br>This application has been compiled to ",
|
65 |
+
as.character(a("WebAssembly", href = "https://webassembly.org/", target = "_blank")),
|
66 |
+
" using ",
|
67 |
+
as.character(a("shinylive", href = "https://posit-dev.github.io/r-shinylive/", target = "_blank")),
|
68 |
+
"<br>and is best viewed with the latest version of Chrome."
|
69 |
+
)
|
70 |
+
}
|
71 |
+
|
72 |
# UI page_navbar ----
|
73 |
ui <- function(request) {
|
74 |
bslib::page_navbar(
|
|
|
132 |
"To get started, use the navigation tabs at the top.",
|
133 |
title = "Welcome"
|
134 |
),
|
135 |
+
shinylive_info
|
|
|
|
|
|
|
|
|
136 |
))
|
137 |
),
|
138 |
bslib::card_image(
|