Skip to content

Commit

Permalink
Optimize non-admin routes js/css, minor typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas committed Aug 6, 2023
1 parent af699e4 commit 37d9ed3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BookingSystem/templates/forms/categories.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<form action="{{url_for('api.update_categories')}}" method="post"
onclick="cueAlert('Sukksess!', 'Kategorilisten ble oppdatert.', 'success')">
onclick="cueAlert('Sukksess!', 'Kategoriene ble oppdatert.', 'success')">
<textarea name="categories" id="categories" cols="30" rows="10">{{'\n'.join(all_categories)}}</textarea>
<input type="submit" value="Oppdater">
</form>
2 changes: 1 addition & 1 deletion BookingSystem/templates/inventar_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h3>Her kan du legge til nytt inventar. Legg gjerne til flere, så forlater du b
error: function (response) {
var msg = response.responseText;
if (response.status === 502) {
msg = "Klarte ikke koble til Etikett tjeneren.";
msg = "Klarte ikke koble til etikett tjeneren.";
}
iziToast.error({
title: 'Utskrift',
Expand Down
2 changes: 1 addition & 1 deletion BookingSystem/templates/inventar_print.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h3>For {{ item.id }} ({{ item.name }})</h3>
error: function (response) {
var msg = response.responseText;
if (response.status === 502) {
msg = "Klarte ikke koble til Etikett tjeneren.";
msg = "Klarte ikke koble til etikett tjeneren.";
}
iziToast.error({
title: 'Utskrift',
Expand Down
8 changes: 1 addition & 7 deletions BookingSystem/templates/partials/css.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/static/css/pico.classless.min.css">
{% include 'partials/css_student.html' %}
<link rel="stylesheet" href="/static/css/font-awesome.min.css">
<link rel="stylesheet" href="/static/css/iziToast.min.css">

Expand All @@ -24,11 +23,6 @@
border-radius: 1rem;
}

header, main, footer {
padding-top: 1rem !important;
padding-bottom: 1rem !important;
}

.dropdown {
position: relative;
display: inline-block;
Expand Down
9 changes: 9 additions & 0 deletions BookingSystem/templates/partials/css_student.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="/static/css/pico.classless.min.css">

<style>
header, main, footer {
padding-top: 1rem !important;
padding-bottom: 1rem !important;
}
</style>
6 changes: 5 additions & 1 deletion BookingSystem/templates/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{% if session.user and session.user.is_admin %}
{% include 'partials/css.html' %}

{% include 'partials/js.html' %}
{% else %}
{% include 'partials/css_student.html' %}
{% include 'partials/js_student.html' %}
{% endif %}

<title>Utstyrbase</title>

Expand Down
1 change: 1 addition & 0 deletions BookingSystem/templates/partials/js.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% include 'partials/js_student.html' %}
<script src="/static/js/jquery-3.7.0.min.js"></script>
<script src="/static/js/iziToast.min.js"></script>

Expand Down
Empty file.

0 comments on commit 37d9ed3

Please sign in to comment.