Skip to content

Commit 4dc99f2

Browse files
committed
Using relative URLs only for resources and links
Fixes #4
1 parent 1289d78 commit 4dc99f2

6 files changed

Lines changed: 20 additions & 14 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.2] - 2025-12-11
9+
10+
### Fixed
11+
12+
- Using relative URLs only for resources and links (#4)
13+
814
## [1.3.1] - 2025-12-04
915

1016
### Fixed

src/adminui/templates/auth/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<div class="form-signin">
6464
<header>
6565
<img
66-
src="{{ url_for('static', path='branding/horizontal-logo-light.png') }}"
66+
src="{{ url_for('static', path='branding/horizontal-logo-light.png').path }}"
6767
class="object-scale-down w-[19rem] h-[6rem] object-left pt-[1.2rem] pb-[1.2rem]" />
6868
</header>
6969
<form method="POST" class="">

src/adminui/templates/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@
120120
<header>
121121
<div class="container-sm row m-auto">
122122
<div class="offset-md-2 col-md-8">
123-
<a class="navbar-brand" href="{{ url_for('home') }}"><img src="{{ url_for('static', path='branding/horizontal-logo-light.png') }}" /></a>
123+
<a class="navbar-brand" href="{{ url_for('home').path }}"><img src="{{ url_for('static', path='branding/horizontal-logo-light.png').path }}" /></a>
124124
</div>
125125
</div>
126126
</header>
127127
<div class="admin-bar">
128128
<div class="container-sm row m-auto">
129129
<nav class="col-8 offset-lg-2 col-lg-6">
130-
<a href="{{ url_for('home') }}">{% block pagetitle %}Administration Panel{% endblock %}</a>
130+
<a href="{{ url_for('home').path }}">{% block pagetitle %}Administration Panel{% endblock %}</a>
131131
</nav>
132132
<nav class="col-4 col-lg-2 text-end">
133-
<a class="disconnect-link" title="Disconnect and return to Hotspot" href="{{ url_for('logout') }}"><span class="d-none d-sm-inline">Disconnect </span><i class="fa-solid fa-arrow-right-from-bracket"></i></a>
133+
<a class="disconnect-link" title="Disconnect and return to Hotspot" href="{{ url_for('logout').path }}"><span class="d-none d-sm-inline">Disconnect </span><i class="fa-solid fa-arrow-right-from-bracket"></i></a>
134134
</nav>
135135
</div>
136136
</div>

src/adminui/templates/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
<h2>Configuration options</h2>
5656
</div>
5757
<div class="col-12 offset-xl-1 col-md-8 d-flex flex-row cards">
58-
<a href="{{ url_for('wifi_config') }}" class="card">
58+
<a href="{{ url_for('wifi_config').path }}" class="card">
5959
<h5 class="card-title">WiFi Settings</h5>
6060
<p class="card-text">Change the Hotspot's WiFi network settings.</p>
6161
</a>
6262

63-
<a href="{{ url_for('optional_config') }}" class="card">
63+
<a href="{{ url_for('optional_config').path }}" class="card">
6464
<h5 class="card-title">Optional Features</h5>
6565
<p class="card-text">Enable/disable additional features.</p>
6666
</a>

src/adminui/templates/raw_base.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
66
<title>{% block title %}Kiwix Hotspot Admin{% endblock %}</title>
7-
<link rel="icon" type="image/png" href="{{ url_for('static', path='branding/square-logo-light.png') }}" media="(prefers-color-scheme:no-preference)">
8-
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/fontawesome.css') }}" >
9-
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/solid.css') }}" >
10-
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/brands.css') }}" >
11-
<link href="{{ url_for('static', path='bootstrap-5.3.8-dist/css/bootstrap.min.css') }}" rel="stylesheet">
7+
<link rel="icon" type="image/png" href="{{ url_for('static', path='branding/square-logo-light.png').path }}" media="(prefers-color-scheme:no-preference)">
8+
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/fontawesome.css').path }}" >
9+
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/solid.css').path }}" >
10+
<link rel="stylesheet" href="{{ url_for('static', path='fontawesome-free-7.1.0-web/css/brands.css').path }}" >
11+
<link href="{{ url_for('static', path='bootstrap-5.3.8-dist/css/bootstrap.min.css').path }}" rel="stylesheet">
1212
<style type="text/css">
1313
body {
1414
background: #161C32;
@@ -28,8 +28,8 @@
2828
{% block content %}{% endblock %}
2929
</main>
3030
{% endblock %}
31-
<script src="{{ url_for('static', path='bootstrap-5.3.8-dist/js/bootstrap.bundle.min.js') }}"></script>
32-
<script src="{{ url_for('static', path='admin-dashboard.js') }}"></script>
31+
<script src="{{ url_for('static', path='bootstrap-5.3.8-dist/js/bootstrap.bundle.min.js').path }}"></script>
32+
<script src="{{ url_for('static', path='admin-dashboard.js').path }}"></script>
3333
{% block javascript %}
3434
<script type="text/javascript">
3535
function run() {}

src/adminui/templates/reboot_required.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h1>Your changes have been saved.</h1>
5050
<p>Those <strong>will be applied upon next restart</strong> of the device.</p>
5151
<h2 class="text-center">Do you want to restart the device now?</h2>
5252
<form action="{{ url_for('restart') }}" method="POST" class="text-center">
53-
<a class="btn btn-secondary mb-1 mb-md-0" href="{{ url_for('logout') }}">Restart later (back to Dashboard)</a>
53+
<a class="btn btn-secondary mb-1 mb-md-0" href="{{ url_for('logout').path }}">Restart later (back to Dashboard)</a>
5454
<button class="btn btn-danger mb-1 mb-md-0 ms-md-2">Restart now <i class="fa-solid fa-power-off"></i></button>
5555
</form>
5656
<p class="bd-callout bd-callout-warning">

0 commit comments

Comments
 (0)