forked from Github-Mirrors/canaille
refactor: use 'url_for' in templates instead of static urls
This commit is contained in:
parent
5c11ebf0d3
commit
38038d8db9
8 changed files with 24 additions and 24 deletions
|
@ -8,7 +8,7 @@
|
|||
{% block content %}
|
||||
<div class="ui clearing segment">
|
||||
<a href="{{ url_for('core.account.index') }}">
|
||||
<img class="ui tiny centered image" src="/static/img/canaille-head.webp" alt="{{ website_name }}">
|
||||
<img class="ui tiny centered image" src="{{ url_for("static", filename="img/canaille-head.webp") }}" alt="{{ website_name }}">
|
||||
</a>
|
||||
|
||||
<h2 class="ui center aligned header">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{%- endblock -%}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/js/copy.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/copy.js") }}" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{%- endblock -%}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/js/profile.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/profile.js") }}" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{%- endblock -%}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/js/profile.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/profile.js") }}" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{%- endblock -%}
|
||||
|
||||
{% block script %}
|
||||
<script src="/static/js/copy.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/copy.js") }}" defer></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block submenu %}
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<link href="/static/fomanticui/semantic.min.css" rel="stylesheet">
|
||||
<link href="/static/fonts/lato.css" rel="stylesheet">
|
||||
<link href="/static/css/base.css" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="fomanticui/semantic.min.css") }}" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="fonts/lato.css") }}" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="css/base.css") }}" rel="stylesheet">
|
||||
{% if logo_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
|
||||
{% endif %}
|
||||
{% block style %}{% endblock %}
|
||||
|
@ -92,17 +92,17 @@
|
|||
</footer>
|
||||
{% if config.get("JAVASCRIPT", true) %}
|
||||
{% if not is_boosted %}
|
||||
<script src="/static/jquery/jquery.min.js" defer></script>
|
||||
<script src="/static/fomanticui/semantic.min.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="jquery/jquery.min.js") }}" defer></script>
|
||||
<script src="{{ url_for("static", filename="fomanticui/semantic.min.js") }}" defer></script>
|
||||
{% if config.get("HTMX", true) %}
|
||||
<script src="/static/htmx/htmx.min.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="htmx/htmx.min.js") }}" defer></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
htmx.config.requestClass = "loading"
|
||||
})
|
||||
</script>
|
||||
{% endif %}
|
||||
<script src="/static/js/base.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/base.js") }}" defer></script>
|
||||
{% endif %}
|
||||
{% block script %}{% endblock %}
|
||||
{% endif %}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
<title>Canaille test client</title>
|
||||
|
||||
<link href="/static/fomanticui/semantic.min.css" rel="stylesheet">
|
||||
<link href="/static/css/base.css" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="fomanticui/semantic.min.css") }}" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="css/base.css") }}" rel="stylesheet">
|
||||
{% if logo_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
|
||||
{% block style %}{% endblock %}
|
||||
</head>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<div class="ui masthead center aligned segment">
|
||||
<div class="ui text container">
|
||||
<h2 class="ui header">
|
||||
<img class="ui image" src="/static/img/canaille-head.webp" alt="Canaille client" />
|
||||
<img class="ui image" src="{{ url_for("static", filename="img/canaille-head.webp") }}" alt="Canaille client" />
|
||||
<div class="content">
|
||||
{{ name }}
|
||||
</div>
|
||||
|
@ -139,9 +139,9 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/jquery/jquery.min.js" defer></script>
|
||||
<script src="/static/fomanticui/semantic.min.js" defer></script>
|
||||
<script src="/static/js/base.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="jquery/jquery.min.js") }}" defer></script>
|
||||
<script src="{{ url_for("static", filename="fomanticui/semantic.min.js") }}" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/base.js") }}" defer></script>
|
||||
{% block script %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
<title>{% block title %}{{ website_name|default("Canaille") }} {% trans %}authorization interface{% endtrans %}{% endblock %}</title>
|
||||
|
||||
<link href="/static/fomanticui/semantic.min.css" rel="stylesheet">
|
||||
<link href="/static/fonts/lato.css" rel="stylesheet">
|
||||
<link href="/static/css/base.css" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="fomanticui/semantic.min.css") }}" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="fonts/lato.css") }}" rel="stylesheet">
|
||||
<link href="{{ url_for("static", filename="css/base.css") }}" rel="stylesheet">
|
||||
{% if logo_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
|
||||
{% block style %}{% endblock %}
|
||||
</head>
|
||||
|
@ -95,9 +95,9 @@
|
|||
<footer>
|
||||
<a href="{{ url_for('core.account.about') }}">{{ _("About canaille") }}</a>
|
||||
</footer>
|
||||
<script src="/static/jquery/jquery.min.js" defer></script>
|
||||
<script src="/static/fomanticui/semantic.min.js" defer></script>
|
||||
<script src="/static/js/base.js" defer></script>
|
||||
<script src="{{ url_for("static", filename="jquery/jquery.min.js") }}" defer></script>
|
||||
<script src="{{ url_for("static", filename="fomanticui/semantic.min.js") }}" defer></script>
|
||||
<script src="{{ url_for("static", filename="js/base.js") }}" defer></script>
|
||||
{% block script %}{% endblock %}
|
||||
|
||||
TEST_THEME
|
||||
|
|
Loading…
Reference in a new issue