Skip to content

Commit

Permalink
build app as static website
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Mar 19, 2024
1 parent 5c94fa0 commit 82be503
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 25 deletions.
74 changes: 49 additions & 25 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
<!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>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Simple Website</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
h1 {
margin: 0;
font-size: 2em;
}
main {
padding: 20px;
text-align: center;
}
footer {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
position: fixed;
width: 100%;
bottom: 0;
}
</style>
</head>
<body>
<header>
<h1>Welcome to My Simple Website</h1>
</header>
<main>
<p>This is a simple static website created using HTML and CSS.</p>
<p>Feel free to modify and expand it according to your needs!</p>
</main>
<footer>
<p>&copy; 2024 My Simple Website. All rights reserved.</p>
</footer>
</body>
</html>

28 changes: 28 additions & 0 deletions docs/indexOriginal.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>

0 comments on commit 82be503

Please sign in to comment.