mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Add release html template (#1705)
This commit is contained in:
53
public/index.html
Normal file
53
public/index.html
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<!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="[[PATH]]core.css" />
|
||||||
|
<script type="module" src="[[PATH]]core.js"></script>
|
||||||
|
<title>PyScript</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<main>
|
||||||
|
<h1><py-script></h1>
|
||||||
|
<ul>
|
||||||
|
<li><a href="core.js">core.js</a></li>
|
||||||
|
<li><a href="core.js.map">core.js.map</a></li>
|
||||||
|
<li><a href="core.css">core.css</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="out"></div>
|
||||||
|
<py-script>
|
||||||
|
from pyscript import display
|
||||||
|
import sys
|
||||||
|
display(sys.version)
|
||||||
|
</py-script>
|
||||||
|
|
||||||
|
<h2>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="[[PATH]]core.css" />
|
||||||
|
<script defer src="[[PATH]]core.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
Hello world! <br>
|
||||||
|
This is the current date and time, as computed by Python:
|
||||||
|
<py-script>
|
||||||
|
from pyscript import display
|
||||||
|
from datetime import datetime
|
||||||
|
now = datetime.now()
|
||||||
|
display(now.strftime("%m/%d/%Y, %H:%M:%S"))
|
||||||
|
</py-script>
|
||||||
|
</body>
|
||||||
|
</html></pre>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user