# NOT RUN {
if (interactive()) {
library(shiny)
library(shinyMobile)
shiny::shinyApp(
ui = f7Page(
title = "My app",
init = f7Init(skin = "md", theme = "light"),
f7SingleLayout(
navbar = f7Navbar(
title = "Single Layout",
hairline = FALSE,
shadow = TRUE,
left_panel = TRUE,
right_panel = TRUE
),
panels = tagList(
f7Panel(side = "left", inputId = "mypanel1", theme = "light", effect = "cover"),
f7Panel(side = "right", inputId = "mypanel2", theme = "light")
),
toolbar = f7Toolbar(
position = "bottom",
icons = TRUE,
hairline = FALSE,
shadow = FALSE,
f7Link(label = "Link 1", src = "https://www.google.com"),
f7Link(label = "Link 2", src = "https://www.google.com", external = TRUE)
)
)
),
server = function(input, output, session) {
observe({
print(
list(
panel1 = input$mypanel1,
panel2 = input$mypanel2
)
)
})
observe({
invalidateLater(2000)
updateF7Panel(inputId = "mypanel1", session = session)
})
}
)
}
# }
Run the code above in your browser using DataLab