-
-
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 15 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 |
|---|---|---|
|
|
@@ -14,52 +14,39 @@ | |
| <meta property="og:type" content="website"> | ||
| <meta property="og:image" content="/static/social.png"> | ||
|
|
||
| <!-- PyScript --> | ||
| <!-- Python Backend --> | ||
|
|
||
| <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> | ||
| <!--@@ python:start @@--> | ||
| <!--@@ python:end @@--> | ||
|
|
||
| <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> | ||
| <!-- Toolkit Head Insert (any valid <head> content)--> | ||
|
|
||
| <!-- App Style --> | ||
| <!--@@ 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 %} | ||
|
|
||
|
freakboy3742 marked this conversation as resolved.
|
||
| <!--@@ body-start:start @@--> | ||
| <!--@@ body-start:end @@--> | ||
|
|
||
|
|
||
| <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)--> | ||
|
|
||
| <!--@@ body-end:start @@--> | ||
| <!--@@ body-end:end @@--> | ||
|
|
||
| </body> | ||
| </html> | ||
Uh oh!
There was an error while loading. Please reload this page.