Migrate frontend to pnpm+parcel with JS modules

This commit is contained in:
William Bouzourène 2025-05-12 15:37:53 +02:00
parent 4d8b7d6e62
commit 0b8fbea6c3
Signed by: bouzoure
SSH key fingerprint: SHA256:19MbXpLua4rUtk8tunMesD8KUKb91LXLHg8E/qTooww
30 changed files with 2289 additions and 404 deletions

View file

@ -92,21 +92,3 @@
</form>
</div>
{% endblock %}
{% block javascript %}
<script>
$(document).ready(function () {
$("#password").on("input", function () {
var enable = false;
if ($(this).val().length > 0) {
enable = true;
}
$("#password-verify").prop("disabled", !enable);
$("#password-verify").prop("required", enable);
});
$("#password").trigger("input");
});
</script>
{% endblock %}

View file

@ -118,25 +118,3 @@
</form>
</div>
{% endblock %}
{% block javascript %}
<script>
$(document).ready(function () {
$("#field_type").on("change", function () {
var enable = false;
if ($(this).val() == "list") {
enable = true;
$("#list-disabled").remove();
} else {
$("#list").append('<option id="list-disabled" selected></option>');
}
$("#list").prop("disabled", !enable);
$("#list").prop("required", enable);
});
$("#field_type").trigger("change");
});
</script>
{% endblock %}

View file

@ -14,16 +14,13 @@
<link
rel="shortcut icon"
href="/static/images/favicon.jpg"
href="/static/images/favicon.jpg?cb={{ Globals.CacheBusting }}"
type="image/jpg"
/>
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" />
<link
rel="stylesheet"
href="/static/bootstrap-icons/bootstrap-icons.min.css"
href="/static/assets/index.css?cb={{ Globals.CacheBusting }}"
/>
<link rel="stylesheet" href="/static/main.css" />
{% block stylesheet %}{% endblock %}
</head>
<body class="d-flex flex-column h-100">
<main class="flex-shrink-0">
@ -64,9 +61,9 @@
</div>
</footer>
<script src="/static/jquery/jquery.min.js"></script>
<script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/static/functions.js"></script>
{% block javascript %}{% endblock %}
<script
src="/static/assets/index.js?cb={{ Globals.CacheBusting }}"
type="module"
></script>
</body>
</html>

View file

@ -3,16 +3,3 @@
{% block main %}
<div id="licenses" class="container-fluid p-3">{{ Markdown|safe }}</div>
{% endblock %}
{% block stylesheet %}
<style>
#licenses h2 {
font-weight: bold;
margin: 15px 0;
}
#licenses p {
margin: 0;
}
</style>
{% endblock %}

View file

@ -367,7 +367,3 @@
</nav>
</div>
{% endblock %}
{% block javascript %}
<script src="/static/search.js"></script>
{% endblock %}