Skip to content

Commit

Permalink
Fix directories in /docs
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Solymos <psolymos@gmail.com>
  • Loading branch information
psolymos committed Jul 11, 2024
1 parent ac204e3 commit b842b6b
Show file tree
Hide file tree
Showing 260 changed files with 84,705 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ rm -rf docs/py-shinylive docs/r-shinylive
rm -rf docs/quarto-py-shinylive docs/quarto-r-shinylive

# Copy files
cp -r r-shinylive/app docs/
cp -r py-shinylive/app docs/
cp -r r-shinylive/app docs/r-shinylive
cp -r py-shinylive/app docs/py-shinylive
cp -r quarto-r-shinylive/app docs/quarto-r-shinylive
cp -r quarto-py-shinylive/app docs/quarto-py-shinylive

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/r-shinylive/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"name":"app.R","content":"library(shiny)\n\nx <- faithful$waiting\n\napp_ui <- fixedPage(\n title = \"Old Faithful\",\n h2(\"Old Faithful\"),\n plotOutput(outputId = \"histogram\"),\n sliderInput(\n inputId = \"n\",\n label = \"Number of bins:\",\n min = 1,\n max = 50,\n value = 25,\n ticks = TRUE\n )\n)\n\nserver <- function(input, output, session) {\n output$histogram <- renderPlot(\n alt = \"Histogram of waiting times\",\n {\n hist(\n x,\n breaks = seq(min(x), max(x),\n length.out = input$n + 1),\n freq = TRUE,\n col = \"#BB74DB\",\n border = \"white\",\n main = \"Histogram of waiting times\",\n xlab = \"Waiting time to next eruption [mins]\",\n ylab = \"Frequency\")\n box()\n }\n )\n}\n\nshinyApp(ui = app_ui, server = server)\n","type":"text"}]
34 changes: 34 additions & 0 deletions docs/r-shinylive/edit/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shiny examples browser</title>
<script
src="../shinylive/load-shinylive-sw.js"
type="module"
></script>
<script src="../shinylive/jquery.min.js"></script>
<script src="../shinylive/jquery.terminal/js/jquery.terminal.min.js"></script>
<link
href="../shinylive/jquery.terminal/css/jquery.terminal.min.css"
rel="stylesheet"
/>
<script type="module">
import { runApp } from "../shinylive/shinylive.js";
const response = await fetch("../app.json");
if (!response.ok) {
throw new Error("HTTP error loading app.json: " + response.status);
}
const appFiles = await response.json();

const appRoot = document.getElementById("root");
runApp(appRoot, "editor-terminal-viewer", {startFiles: appFiles}, "r");
</script>
<link rel="stylesheet" href="../shinylive/style-resets.css" />
<link rel="stylesheet" href="../shinylive/shinylive.css" />
</head>
<body>
<div style="height: 100vh; width: 100vw" id="root"></div>
</body>
</html>
28 changes: 28 additions & 0 deletions docs/r-shinylive/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shiny App</title>
<script
src="./shinylive/load-shinylive-sw.js"
type="module"
></script>
<script type="module">
import { runApp } from "./shinylive/shinylive.js";
const response = await fetch("./app.json");
if (!response.ok) {
throw new Error("HTTP error loading app.json: " + response.status);
}
const appFiles = await response.json();

const appRoot = document.getElementById("root");
runApp(appRoot, "viewer", {startFiles: appFiles}, "r");
</script>
<link rel="stylesheet" href="./shinylive/style-resets.css" />
<link rel="stylesheet" href="./shinylive/shinylive.css" />
</head>
<body>
<div style="height: 100vh; width: 100vw" id="root"></div>
</body>
</html>
Loading

0 comments on commit b842b6b

Please sign in to comment.