Skip to content

Commit a49e68f

Browse files
luci-theme-*: remove LuCI from title, material theme fixes
- Remove `| LuCI` suffix from title tag - Make material theme zoomable and remove legacy meta tags Follow-up to ce358ad Signed-off-by: Self-Hosting-Group <selfhostinggroup-git+openwrt@shost.ing>
1 parent d28ebe1 commit a49e68f

File tree

4 files changed

+6
-14
lines changed
  • themes
    • luci-theme-bootstrap/ucode/template/themes/bootstrap
    • luci-theme-material/ucode/template/themes/material
    • luci-theme-openwrt-2020/ucode/template/themes/openwrt2020
    • luci-theme-openwrt/ucode/template/themes/openwrt.org

4 files changed

+6
-14
lines changed

themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<html lang="{{ dispatcher.lang }}" {{ darkpref ? `data-darkmode="${darkpref}"` : '' }}>
1919
<head>
2020
<meta charset="utf-8">
21-
<title>{{ striptags(`${boardinfo.hostname + ' | ' ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} LuCI</title>
21+
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` | ${_(dispatched.title)}` : ''}`) }}</title>
2222
{% if (!darkpref): %}
2323
<script>
2424
var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'),
@@ -29,7 +29,7 @@
2929
setDarkMode(mediaQuery);
3030
</script>
3131
{% endif %}
32-
<meta name="viewport" content="initial-scale=1.0">
32+
<meta name="viewport" content="width=device-width, initial-scale=1">
3333
<meta name="darkreader-lock">
3434
<link rel="stylesheet" href="{{ media }}/cascade.css">
3535
<link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="{{ media }}/mobile.css" />

themes/luci-theme-material/ucode/template/themes/material/header.ut

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,7 @@
3030
<html lang="{{ dispatcher.lang }}">
3131
<head>
3232
<meta charset="utf-8">
33-
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
34-
<meta name="apple-mobile-web-app-capable" content="yes">
35-
<meta name="mobile-web-app-capable" content="yes">
36-
<meta name="theme-color" content="#09c">
37-
<meta name="msapplication-tap-highlight" content="no">
38-
<meta name="msapplication-TileColor" content="#09c">
39-
<meta name="application-name" content="{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI">
40-
<meta name="apple-mobile-web-app-title" content="{{ striptags(`${dispatched ? `${dispatched.title} | ` : ''}${boardinfo.hostname ?? '?'}`) }} | LuCI">
33+
<meta name="viewport" content="width=device-width, initial-scale=1">
4134
<link rel="stylesheet" href="{{ media }}/cascade.css">
4235
<link rel="icon" href="{{ media }}/logo_48.png" sizes="48x48">
4336
<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
@@ -46,7 +39,7 @@
4639
{% endif %}
4740
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
4841
<script src="{{ resource }}/cbi.js"></script>
49-
<title>{{ striptags(`${boardinfo.hostname + ' | ' ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} LuCI</title>
42+
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` | ${_(dispatched.title)}` : ''}`) }}</title>
5043
{% if (css): %}
5144
<style title="text/css">{{ css }}</style>
5245
{% endif %}

themes/luci-theme-openwrt-2020/ucode/template/themes/openwrt2020/header.ut

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
<head>
1717
<meta charset="utf-8" />
1818
<meta name="viewport" content="width=device-width, initial-scale=1" />
19-
<meta name="apple-mobile-web-app-capable" content="yes" />
2019
<link rel="stylesheet" media="screen" href="{{ media }}/cascade.css" />
2120
<link rel="icon" href="{{ media }}/logo.png" sizes="180x180">
2221
<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
2322
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
2423
<script src="{{ resource }}/cbi.js"></script>
25-
<title>{{ striptags(`${boardinfo.hostname + ' | ' ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} LuCI</title>
24+
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` | ${_(dispatched.title)}` : ''}`) }}</title>
2625
{% if (css): %}
2726
<style title="text/css">{{ css }}</style>
2827
{% endif %}

themes/luci-theme-openwrt/ucode/template/themes/openwrt.org/header.ut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<script src="{{ dispatcher.build_url('admin/translations', dispatcher.lang) }}"></script>
2929
<script src="{{ resource }}/cbi.js"></script>
3030

31-
<title>{{ striptags(`${boardinfo.hostname + ' | ' ?? '?'}${dispatched?.title ? `${_(dispatched.title)} | ` : ''}`) }} LuCI</title>
31+
<title>{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` | ${_(dispatched.title)}` : ''}`) }}</title>
3232
</head>
3333
<body class="lang_{{ dispatcher.lang }}" data-page="{{ entityencode(join('-', ctx.request_path), true) }}">
3434

0 commit comments

Comments
 (0)