Skip to content

Commit 063e1af

Browse files
kavi2ducaydnnfreakboy3742
authored
Update web template and enable insert-based injection (Phase 4) (#21)
Co-authored-by: caydnn <caydnlee1@gmail.com> Co-authored-by: 19766375 <19766375@student.curtin.edu.au> Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
1 parent bf85867 commit 063e1af

2 files changed

Lines changed: 25 additions & 41 deletions

File tree

{{ cookiecutter.format }}/www/index.html

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,52 +14,34 @@
1414
<meta property="og:type" content="website">
1515
<meta property="og:image" content="/static/social.png">
1616

17-
<!-- PyScript -->
17+
<!-- Python Implementation -->
1818

19-
<script type="module">
20-
// Hide the splash screen when the page is ready.
21-
import { hooks } from "https://pyscript.net/releases/2024.11.1/core.js";
22-
hooks.main.onReady.add(() => {
23-
document.getElementById("briefcase-splash").classList.add("hidden");
24-
});
25-
</script>
19+
<!--@@ head-python:start @@-->
20+
<!--@@ head-python:end @@-->
2621

27-
<link rel="stylesheet" href="https://pyscript.net/releases/2024.11.1/core.css">
28-
<script type="module" src="https://pyscript.net/releases/2024.11.1/core.js"></script>
22+
<!-- Toolkit Head Insert (any valid <head> content)-->
2923

30-
<!-- App Style -->
24+
<!--@@ head:start @@-->
25+
<!--@@ head:end @@-->
3126

32-
{% if cookiecutter.style_framework == "Bootstrap v4.6" %}
33-
<link rel="stylesheet"
34-
href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
35-
integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
36-
crossorigin="anonymous">
37-
{% elif cookiecutter.style_framework == "Shoelace v2.3" %}
38-
<link rel="stylesheet"
39-
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.3.0/dist/themes/light.css" />
40-
<script type="module"
41-
src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.3.0/dist/shoelace.js"></script>
42-
{% endif %}
4327
<link rel="stylesheet" href="/static/css/briefcase.css">
4428
</head>
4529
<body id="app-placeholder">
4630
<div id="briefcase-splash">
4731
<img src="static/logo-32.png" alt="Splash screen logo">
4832
<p>Loading...</p>
4933
</div>
50-
{% if cookiecutter.style_framework == "Bootstrap v4.6" %}
51-
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
52-
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
53-
crossorigin="anonymous"></script>
54-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
55-
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
56-
crossorigin="anonymous"></script>
57-
{% endif %}
58-
<script type="py" async="false" config="pyscript.toml">
59-
import runpy
60-
result = runpy.run_module(
61-
"{{ cookiecutter.module_name }}", run_name="__main__", alter_sys=True
62-
)
63-
</script>
34+
35+
<!--@@ body-start:start @@-->
36+
<!--@@ body-start:end @@-->
37+
38+
<!--@@ body-python:start @@-->
39+
<!--@@ body-python:end @@-->
40+
41+
<!-- Toolkit Body Insert (any valid <script> tags)-->
42+
43+
<!--@@ body-end:start @@-->
44+
<!--@@ body-end:end @@-->
45+
6446
</body>
6547
</html>

{{ cookiecutter.format }}/www/static/css/briefcase.css

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ div#briefcase-splash img {
3838
}
3939
}
4040

41-
/*******************************************************************
42-
* WARNING: Do not remove or modify this comment block, or add any
43-
* content below this block. Briefcase will add content here during
44-
* the build step.
45-
******************* Wheel contributed styles **********************/
41+
/************************* Toolkit styles *************************/
42+
43+
/* WARNING: Do not modify content between the @@ css:start @@ and
44+
@@ css:end @@ markers. */
45+
46+
/*@@ css:start @@*/
47+
/*@@ css:end @@*/

0 commit comments

Comments
 (0)