Skip to content

Commit 1100dcd

Browse files
committed
refactor: re-ordered file structure to have one folder per html page.
1 parent e9670cd commit 1100dcd

17 files changed

Lines changed: 50 additions & 81 deletions

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
- W3Org example: 'https://www.w3.org/TR/WCAG20-TECHS/H76.html'.
1212
-->
1313
<title>Redirect...</title>
14-
<meta http-equiv="Refresh" content="1; URL='./rsrcs/io_inputs/app/config/web_pages/home.html'" />
14+
<meta http-equiv="Refresh" content="1; URL='./rsrcs/io_inputs/app/config/web_pages/01/home.html'" />
1515
</head>
1616
<body style="background-color: #0D1117; color: #F6F6F6;">
1717
<!--
1818
Add a fallback method for old browsers that might generate conflict with 'meta' element.
1919
- Example: 'https://stackoverflow.com/questions/5411538/how-to-redirect-one-html-page-to-another-on-load/5411567#5411567'.
2020
-->
21-
<p>This page has been moved. If you are not re-directed within 1 second(s), click <a href="./rsrcs/io_inputs/app/config/web_pages/home.html">here</a>.</p>
21+
<p>This page has been moved. If you are not re-directed within 1 second(s), click <a href="./rsrcs/io_inputs/app/config/web_pages/01/home.html">here</a>.</p>
2222
</body>
2323
</html>

rsrcs/.gitkeep

Whitespace-only changes.

rsrcs/io_inputs/.gitkeep

Whitespace-only changes.

rsrcs/io_inputs/app/.gitkeep

Whitespace-only changes.

rsrcs/io_inputs/app/config/imports/antigravity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Antigravity:
99

10-
url = "./../../../../media/img-antigravity-white.svg" # Source image. Goes up x4 folder levels to get to 'media' (rsrcs < io_inputs < app < config < web_pages), where it's stored.
10+
url = "./../../../../../media/img-antigravity-white.svg" # Source image. Goes up x(4 + 1) folder levels to get to 'media' (imports < config < app < io_inputs < rsrcs > media), where it's stored.
1111

1212
def __init__(self, target=None, interval=10, append=True, fly=False):
1313
if isinstance(target, str):

rsrcs/io_inputs/app/config/imports/antigravity_launcher-pyscript.json renamed to rsrcs/io_inputs/app/config/imports/antigravity_launcher_(pyscript).json

File renamed without changes.

rsrcs/io_inputs/app/config/imports/pandas_launcher-pyscript.json renamed to rsrcs/io_inputs/app/config/imports/pandas_launcher_(pyscript).json

File renamed without changes.

rsrcs/io_inputs/app/config/main-vars.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

rsrcs/io_inputs/app/config/web_pages/.gitkeep

Whitespace-only changes.

rsrcs/io_inputs/app/config/web_pages/home.html renamed to rsrcs/io_inputs/app/config/web_pages/01/home.html

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<!-- Window title. -->
88
<title>PyScript Exercises</title>
9-
<!-- Window logo. Goes up x4 folder levels to get to 'media' (rsrcs < io_inputs < app < config < web_pages), where it's stored. -->
10-
<link rel="icon" type="image/png" href="./../../../../media/icon-favicon.png" />
9+
<!-- Window logo. Goes up x5 folder levels to get to 'media' ([CURRENT DIR.] < web_pages < config < app < io_inputs < rsrcs > media), where it's stored. -->
10+
<link rel="icon" type="image/png" href="./../../../../../media/icon-favicon.png" />
1111
<!--
1212
External CSS stylesheet: 'https://www.w3schools.com/html/html_css.asp', 'https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/link'.
1313
- In this case, PyScript CSS.
1414
-->
1515
<link rel="stylesheet" href="https://pyscript.net/releases/2025.8.1/core.css" />
1616
<!-- External (local) CSS stylesheet, with multiple external CSS links. ORDER MATTERS! 'https://www.programminghead.com/how-to-link-multiple-css-style-sheets-in-html'. -->
17-
<link rel="stylesheet" href="./home-loading_splashscreen_(style).css">
18-
<link rel="stylesheet" href="./home_(style).css">
17+
<link rel="stylesheet" href="./../loading_splashscreen_(style).css">
18+
<link rel="stylesheet" href="./../style.css">
1919
<!--
2020
Script call; e.g. this js script tag bootstraps PyScript.
2121
- NOTE: threated as deferred script. Ref. 'https://stackoverflow.com/questions/436411/where-should-i-put-script-tags-in-html-markup/24070373#24070373'.
@@ -29,7 +29,7 @@
2929
- 'module' scripts: 'https://neerajdana.medium.com/understanding-type-module-in-javascript-a-comprehensive-guide-ebb13926da7a'.
3030
- 'module' vs. 'non-module' scripts: 'https://neerajdana.medium.com/understanding-type-module-in-javascript-a-comprehensive-guide-ebb13926da7a'.
3131
-->
32-
<script type="module" src="./home-loading_splashscreen_(app).js"></script>
32+
<script type="module" src="./../loading_splashscreen_(app).js"></script>
3333
<!-- Fallback call to PyScript script to trigger 'py:ready' event, in case there are no PyScript scripts in the page. -->
3434
<script type="py" defer></script>
3535
</head>
@@ -41,12 +41,12 @@ <h1>Loading...</h1>
4141
<header class="header">
4242
<nav class="header-nav">
4343
<div class="header-nav-left_aligned">
44-
<img class="header-nav-left_aligned-logo" src="./../../../../media/img-logo.png" />
44+
<img class="header-nav-left_aligned-logo" src="./../../../../../media/img-logo.png" />
4545
<div class="header-nav-left_aligned-links_container">
46-
<a class="header-nav-left_aligned-links_container-link" href="./home.html"><b>HOME</b></a>
47-
<a class="header-nav-left_aligned-links_container-link" href="./hello_world.html">Hello World</a>
48-
<a class="header-nav-left_aligned-links_container-link" href="./antigravity.html">Antigravity</a>
49-
<a class="header-nav-left_aligned-links_container-link" href="./pandas.html">Pandas</a>
46+
<a class="header-nav-left_aligned-links_container-link" href="./../01/home.html"><b>HOME</b></a>
47+
<a class="header-nav-left_aligned-links_container-link" href="./../02/hello_world.html">Hello World</a>
48+
<a class="header-nav-left_aligned-links_container-link" href="./../03/antigravity.html">Antigravity</a>
49+
<a class="header-nav-left_aligned-links_container-link" href="./../04/pandas.html">Pandas</a>
5050
</div>
5151
</div>
5252
<div class="header-nav-links_container">
@@ -65,8 +65,9 @@ <h1>PyScript Exercises.</h1>
6565
<p>This is a list of exercises to study <code>PyScript</code>. These exercises come from the <b><a href="https://docs.pyscript.net/2024.5.2/examples/" target="_blank">official PyScript documentation</a></b>, where several examples are listed, starting with basics such as '<a href="https://pyscript.com/@examples/hello-world/latest" target="_blank">Hello World</a>', and digging into <a href="https://pyscript.com/@examples/altair/latest" target="_blank">plotting data</a>.</p>
6666
<br>
6767
<ul>
68-
<li><a class="main-content-list_link" href="./hello_world.html">Hello World</a>: start learing how to use <code>PyScript</code> to run <code>Python</code> in a browser.</li>
69-
<li><a class="main-content-list_link" href="./antigravity.html">Antigravity</a>: import files, using <code>PyScript</code> <a href="https://docs.pyscript.net/2024.5.2/user-guide/configuration/#files" target="_blank"> configuration file (TOML or JSON)</a>.</li>
68+
<li><a class="main-content-list_link" href="./../02/hello_world.html">Hello World</a>: start learing how to use <code>PyScript</code> to run <code>Python</code> in a browser.</li>
69+
<li><a class="main-content-list_link" href="./../03/antigravity.html">Antigravity</a>: import files, using <code>PyScript</code> <a href="https://docs.pyscript.net/2024.5.2/user-guide/configuration/#files" target="_blank"> configuration file (TOML or JSON)</a>.</li>
70+
<li><a class="main-content-list_link" href="./../04/pandas.html">Pandas</a>: load a <code>.csv</code> table, from a URL, using <code>Pandas</code>.</li>
7071
</ul>
7172
</section>
7273
</main>

0 commit comments

Comments
 (0)