Skip to content

Commit 2be47ea

Browse files
google-labs-jules[bot]IngmarStein
authored andcommitted
Fix: Refine page title and H1 heading logic
- Modified `base.html` to conditionally add a separator to the page title. If a page defines a specific title, it will be shown as "Page Title - Tronbyt Manager". If a page has no specific title, the browser title will be just "Tronbyt Manager". - Adjusted `manager/index.html` and `manager/adminindex.html` to explicitly set their main `<h1>` heading to "Tronbyt Manager". This ensures they have a visible heading while their browser tab title correctly defaults to "Tronbyt Manager". This addresses the issue where some pages had concatenated titles (e.g., "LoginTronbyt Manager") and ensures that main index pages have appropriate titles and headings.
1 parent 0866efb commit 2be47ea

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tronbyt_server/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
55
</head>
6-
<title>{% block title %}{% endblock %}Tronbyt Manager</title>
6+
<title>{% if self.title() %}{% block title %}{% endblock %} - {% endif %}Tronbyt Manager</title>
77
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
88
<link rel="stylesheet" href="{{ url_for('static', filename='css/w3.css') }}">
99
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">

tronbyt_server/templates/manager/adminindex.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% extends 'base.html' %}
22
{% block header %}
3-
<h1>{% block title %}{% endblock %}</h1>
3+
<h1>{{ _('Tronbyt Manager') }}</h1>
44

55
{% endblock %}
66
{% block content %}

tronbyt_server/templates/manager/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
}
241241
}
242242
</script>
243-
<h1>{% block title %}{% endblock %}</h1>
243+
<h1>{{ _('Tronbyt Manager') }}</h1>
244244
{% endblock %}
245245
{% block content %}
246246
{% if g.user %}

0 commit comments

Comments
 (0)