-
-
Notifications
You must be signed in to change notification settings - Fork 8
Update web template and enable insert-based injection (Phase 4) #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
8cf80af
0678a14
ecf33d2
7229c9c
c53768c
1d565b8
f4c4096
d0c2d73
bf80710
a9277f7
765dcf7
143d2af
d1440a2
22a8e8b
26b8b82
b7adfdd
cd84b61
2445fc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,50 +16,33 @@ | |
|
|
||
| <!-- PyScript --> | ||
|
|
||
| <script type="module"> | ||
| // Hide the splash screen when the page is ready. | ||
| import { hooks } from "https://pyscript.net/releases/2024.11.1/core.js"; | ||
| hooks.main.onReady.add(() => { | ||
| document.getElementById("briefcase-splash").classList.add("hidden"); | ||
| }); | ||
| </script> | ||
|
|
||
| <link rel="stylesheet" href="https://pyscript.net/releases/2024.11.1/core.css"> | ||
| <script type="module" src="https://pyscript.net/releases/2024.11.1/core.js"></script> | ||
| <!--@@ PyScript:start @@--> | ||
| <!--@@ PyScript:end @@--> | ||
|
|
||
| <!-- App Style --> | ||
| <!-- Toolkit Head Insert (any valid <head> content)--> | ||
|
|
||
| <!--@@ head:start @@--> | ||
| <!--@@ head:end @@--> | ||
|
|
||
| {% if cookiecutter.style_framework == "Bootstrap v4.6" %} | ||
| <link rel="stylesheet" | ||
| href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" | ||
| integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" | ||
| crossorigin="anonymous"> | ||
| {% elif cookiecutter.style_framework == "Shoelace v2.3" %} | ||
| <link rel="stylesheet" | ||
| href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.3.0/dist/themes/light.css" /> | ||
| <script type="module" | ||
| src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.3.0/dist/shoelace.js"></script> | ||
| {% endif %} | ||
| <link rel="stylesheet" href="/static/css/briefcase.css"> | ||
| </head> | ||
| <body id="app-placeholder"> | ||
| <div id="briefcase-splash"> | ||
| <img src="static/logo-32.png" alt="Splash screen logo"> | ||
| <p>Loading...</p> | ||
| </div> | ||
| {% if cookiecutter.style_framework == "Bootstrap v4.6" %} | ||
| <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" | ||
| integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" | ||
| crossorigin="anonymous"></script> | ||
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" | ||
| integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" | ||
| crossorigin="anonymous"></script> | ||
| {% endif %} | ||
|
|
||
| <script type="py" async="false" config="pyscript.toml"> | ||
| import runpy | ||
| result = runpy.run_module( | ||
| "{{ cookiecutter.module_name }}", run_name="__main__", alter_sys=True | ||
| ) | ||
| </script> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is (obviously) a PyScript specific insertion - possibly not the actual Python code, but at the very least the |
||
|
|
||
| <!-- Toolkit Body Insert (any valid <script> tags)--> | ||
|
|
||
| <!--@@ end:start @@--> | ||
| <!--@@ end:end @@--> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "end:end" is a bit ambiguous... "body-end" or "BodyEnd" (not sure what naming convention we're using here) might be better.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, thanks Russell
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't think of an obvious reason you'd need one - but it doesn't cost anything to have the inclusion in case it's needed. |
||
|
|
||
| </body> | ||
| </html> | ||
Uh oh!
There was an error while loading. Please reload this page.