mirror of
https://github.com/pyscript/pyscript.git
synced 2026-03-06 06:38:39 -05:00
Add directly listing for releases (#838)
* Add directly listing for releases * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
54
pyscriptjs/public/index.html
Normal file
54
pyscriptjs/public/index.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="https://unpkg.com/mvp.css@1.12/mvp.css">
|
||||
<link rel="stylesheet" href="pyscript.css">
|
||||
<script defer src="pyscript.min.js"></script>
|
||||
<title>PyScript</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<h1><py-script></h1>
|
||||
<ul>
|
||||
<li><a href="pyscript.min.js.map">pyscript.min.js.map</a></li>
|
||||
<li><a href="pyscript.min.js">pyscript.min.js</a></li>
|
||||
<li><a href="pyscript.js.map">pyscript.js.map</a></li>
|
||||
<li><a href="pyscript.js">pyscript.js</a></li>
|
||||
<li><a href="pyscript.css">pyscript.css</a></li>
|
||||
</ul>
|
||||
<div id="out"></div>
|
||||
<py-script std-out="out">
|
||||
import sys
|
||||
print(sys.version)
|
||||
</py-script>
|
||||
|
||||
<h2>Hello World Example</h2>
|
||||
<pre style="padding:1em;border:1px solid #000000;"><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>PyScript Hello World</title>
|
||||
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
|
||||
<script defer src="https://pyscript.net/latest/build/pyscript.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Hello world! <br>
|
||||
This is the current date and time, as computed by Python:
|
||||
<py-script>
|
||||
from datetime import datetime
|
||||
now = datetime.now()
|
||||
now.strftime("%m/%d/%Y, %H:%M:%S")
|
||||
</py-script>
|
||||
</body>
|
||||
</html></pre>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -48,7 +48,8 @@ export default {
|
||||
// This will make sure that examples will always get the latest build folder
|
||||
!production && copy({
|
||||
targets: [
|
||||
{ src: 'build/*', dest: 'examples/build' }
|
||||
{ src: 'build/*', dest: 'examples/build' },
|
||||
{ src: 'public/index.html', dest: 'build/' },
|
||||
]
|
||||
}),
|
||||
!production && serve(),
|
||||
|
||||
Reference in New Issue
Block a user