Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
"version": "1.0",
"build": "1",
"python_version": "3.X.0",
"style_framework": [
"Shoelace v2.3",
"Bootstrap v4.6",
"None"
],
"_copy_without_render": [
".gitignore",
"*.png"
Expand Down
2 changes: 2 additions & 0 deletions {{ cookiecutter.format }}/briefcase.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ app_path = "app"
app_requirements_path = "requirements.txt"

icon.32 = "www/static/logo-32.png"

splash = "www/static/splash.png"
32 changes: 8 additions & 24 deletions {{ cookiecutter.format }}/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,21 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{{ cookiecutter.formal_name }}</title>

<link rel="icon" type="image/png" href="/static/logo-32.png"/>
<link rel="icon" type="image/png" href="./static/logo-32.png"/>

<script defer src="https://pyscript.net/latest/pyscript.js"></script>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />

{% if cookiecutter.style_framework == "Bootstrap v4.6" %}
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/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/[email protected]/dist/themes/light.css" />
<script type="module"
src="https://cdn.jsdelivr.net/npm/@shoelace-style/[email protected]/dist/shoelace.js"></script>
{% endif %}
<link rel="stylesheet" href="/static/css/briefcase.css">
<!-----@ header:start @----->
<!-----@ header:end @----->

<link rel="stylesheet" href="./static/css/briefcase.css">
</head>
<body id="app-placeholder">
{% if cookiecutter.style_framework == "Bootstrap v4.6" %}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>
{% endif %}
<py-config src="/pyscript.toml"></py-config>
<py-config src="./pyscript.toml"></py-config>
<py-script>
import runpy
result = runpy.run_module("{{ cookiecutter.module_name }}", run_name="__main__", alter_sys=True)
#####@ bootstrap:start @#####
#####@ bootstrap:end @#####
</py-script>
</body>
</html>
31 changes: 17 additions & 14 deletions {{ cookiecutter.format }}/www/static/css/briefcase.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@

/* Unset the overly generic pyscript .label style */
#app-placeholder .label {
margin-top: inherit;
color: inherit;
text-align: inherit;
width: inherit;
display: inherit;
color: inherit;
font-size: inherit;
margin-top: inherit;
/* Hide the loading text */
#pyscript-loading-label, #pyscript-operation-details {
display: none;
}

.py-pop-up::before {
content: url('../splash.png');
}

.py-pop-up .spinner::after {
top: inherit;
margin-top: 2em;
}

/*******************************************************************
* WARNING: Do not remove or modify this comment block, or add any
* content below this block. Briefcase will add content here during
* the build step.
******************* Wheel contributed styles **********************/
* WARNING: Do not remove or modify anything between the CSS:start
* and CSS:end markers; this content is contributed by wheels, and
* is generated during the build step.
*******************************************************************/
/*****@ CSS:start @*****/
/*****@ CSS:end @*****/
Binary file added {{ cookiecutter.format }}/www/static/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.