Refactor the demo page

1. Rename simple script into hello world
2. Rename simple script 2 into simple clock
3. Group demos into categories, starting with simple examples towards more complex ones
This commit is contained in:
Antonio Cuni
2022-04-28 17:19:09 +02:00
parent 631eb8170e
commit ad118eeb8e
3 changed files with 40 additions and 28 deletions

View File

@@ -0,0 +1,24 @@
<!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="icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="../build/pyscript.css" />
<script defer src="../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>