Skip to content

Commit

Permalink
Bugfix with Minify breaking static js, preload FA, move loadTheme fro…
Browse files Browse the repository at this point in the history
…m footer
  • Loading branch information
sondregronas committed Aug 9, 2023
1 parent 5483295 commit 617a1e6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BookingSystem/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def create_app() -> flask.Flask:
Session(app)

# Minify
Minify(app=app)
Minify(app=app, static=False)

# Register blueprints
app.register_blueprint(api.api)
Expand Down
2 changes: 1 addition & 1 deletion BookingSystem/static/css/font-awesome.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions BookingSystem/static/css/tom-select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion BookingSystem/templates/partials/css_student.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<link rel="stylesheet" href="/static/css/font-awesome.min.css">
<link rel="prelad" as="font" type="font/woff2" crossorigin href="/static/fonts/fontawesome-webfont.woff2?v=4.7.0">
<link rel="preload" as="style" href="/static/css/font-awesome.min.css" onload="this.rel='stylesheet'">
<link rel="stylesheet" href="/static/css/pico.classless.min.css">

<style>
Expand Down
3 changes: 0 additions & 3 deletions BookingSystem/templates/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
<script>
loadTheme();
</script>
4 changes: 4 additions & 0 deletions BookingSystem/templates/partials/js_student.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
let theme = localStorage.getItem('theme') || 'dark';
setTheme(theme);
}

document.addEventListener("DOMContentLoaded", function (event) {
loadTheme();
});
</script>
2 changes: 1 addition & 1 deletion BookingSystem/templates/templates/tom-select.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src="/static/js/tom-select.complete.min.js"></script>
<link rel="stylesheet" href="/static/css/tom-select.css"/>
<link rel="stylesheet" href="/static/css/tom-select.min.css"/>

<style>
.has-items .ts-control {
Expand Down

0 comments on commit 617a1e6

Please sign in to comment.