| 1 |
library(shiny) |
| 2 |
library(thematic) |
| 3 |
|
| 4 |
thematic_shiny(font = "auto") |
| 5 |
# https://github.com/rstudio/thematic/pull/68 |
| 6 |
opts <- options(device = function() stop("boom")) |
| 7 |
onStop(function() options(opts)) |
| 8 |
|
| 9 |
ui <- fluidPage( |
| 10 |
titlePanel("Hello"), |
| 11 |
tags$head( |
| 12 |
tags$link(href="https://fonts.googleapis.com/css?family=Pacifico", rel="stylesheet"), |
| 13 |
tags$style(HTML("body{background-color:#444444; color:#e4e4e4; font-family: Pacifico}")), |
| 14 |
tags$style(HTML("a{color:#e39777}")) |
| 15 |
), |
| 16 |
plotOutput("p") |
| 17 |
) |
| 18 |
|
| 19 |
render_plot <- function(expr) { |
| 20 |
snapshotPreprocessOutput(renderPlot(expr), function(value) {}) |
| 21 |
} |
| 22 |
|
| 23 |
server <- function(input, output, session) { |
| 24 |
output$p <- render_plot({ |
| 25 |
ggplot2::qplot(1:10, 1:10, color = 1:10) |
| 26 |
}) |
| 27 |
} |
| 28 |
|
| 29 |
shinyApp(ui, server) |