luci-theme: html title: swap hostname <-> page title
authorPaul Donald <newtwen+github@gmail.com>
Mon, 9 Feb 2026 17:08:38 +0000 (18:08 +0100)
committerPaul Donald <newtwen+github@gmail.com>
Mon, 9 Feb 2026 17:08:38 +0000 (18:08 +0100)
hostname first to differentiate units from at-a-glance
browser tab view.

Closes #8308

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut
themes/luci-theme-material/ucode/template/themes/material/header.ut
themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut
themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut

index 6a4af93f840f7d6265837ce89671dc9025ab9293..01444cabe04bf168dfaccfaec226cfc2dd4f572f 100644 (file)
@@ -18,7 +18,7 @@
 <html lang="{{ dispatcher.lang }}" {{ darkpref ? `data-darkmode="${darkpref}"` : '' }}>
        <head>
                <meta charset="utf-8">
-               <title>{{ striptags(`${dispatched?.title ? `${_(dispatched.title)} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
+               <title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} | LuCI</title>
                {% if (!darkpref): %}
                        <script>
                                var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'),
index 442928987cda810c335ccba21f620192dcde132e..7a208a3c40240989293f4b6631fb2863eb7a6151 100644 (file)
@@ -46,7 +46,7 @@
 {% endif %}
 <script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
 <script src="{{ resource }}/cbi.js"></script>
-<title>{{ striptags(`${dispatched?.title ? `${_(dispatched.title)} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
+<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} | LuCI</title>
 {% if (css): %}
 <style title="text/css">{{ css }}</style>
 {% endif %}
index 1449f0fb8369b13b2ffdebaaa20a922d75152954..8a06bfab7f8c0255e51fce8c7b77940848640050 100644 (file)
@@ -22,7 +22,7 @@
 <link rel="icon" href="{{ media }}/logo.svg" sizes="any">
 <script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
 <script src="{{ resource }}/cbi.js"></script>
-<title>{{ striptags(`${dispatched?.title ? `${_(dispatched.title)} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
+<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} | LuCI</title>
 {% if (css): %}
 <style title="text/css">{{ css }}</style>
 {% endif %}
index ce3596b3fc49d90d7c2bc52f6b11517ef0051f89..838a5826ffc55d4c5911212474b2e3bf0c95a1a3 100644 (file)
@@ -28,7 +28,7 @@
 <script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
 <script src="{{ resource }}/cbi.js"></script>
 
-<title>{{ striptags(`${dispatched?.title ? `${_(dispatched.title)} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI</title>
+<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} | LuCI</title>
 </head>
 <body class="lang_{{ dispatcher.lang }}" data-page="{{ entityencode(join('-', ctx.request_path), true) }}">