diff options
author | Mustafa Can Elmacı <mustafacan@elmaci.net> | 2024-11-17 15:52:45 +0300 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-11-22 22:39:46 +0100 |
commit | ae8bbb814f16c2dc2a82e88d408bee1812ceda9c (patch) | |
tree | b48de027e4f3d6a366ef60025b980bc83ee5ae90 /themes/luci-theme-bootstrap/ucode/template | |
parent | aa955d6465b4d0f00cc713904e2de7bfb0cbd062 (diff) |
treewide: HTML Cleanup
* HTML Cleanup: Meta tags.
* Converted charset to shorthand.
* Removed meta tags with `Content-Script-Type` attribute. (Invalid in HTML5 spec.)
* HTML Cleanup: CSS tags.
* Removed `type` attribute with CSS files from link tags. (HTML5 spec recommends omitting it.)
* Removed `type` attribute from style tags. (Deprecated in HTML5 spec.)
https://html.spec.whatwg.org/#attr-link-type
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style
* HTML Cleanup: Convert from XHTML to HTML5
* Removed XML declaration.
* Removed XML namespace.
* Changed doctype to HTML5.
* HTML Cleanup: CDATA tags.
* CDATA sections should not be used within HTML they are considered as comments and not displayed.
https://developer.mozilla.org/en-US/docs/Web/API/CDATASection
* HTML Cleanup: Script tags.
* Removed `language` attribute from script tags. (No longer valid in HTML5)
* Removed `type` attribute with JavaScript MIME type from script tags. (HTML5 spec recommends omitting it.)
https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
https://mimesniff.spec.whatwg.org/#javascript-mime-type
Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
Diffstat (limited to 'themes/luci-theme-bootstrap/ucode/template')
3 files changed, 4 insertions, 4 deletions
diff --git a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/footer.ut b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/footer.ut index a9dd0f939e..d51079b6fa 100644 --- a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/footer.ut +++ b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/footer.ut @@ -14,7 +14,7 @@ </span> <ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul> </footer> - <script type="text/javascript">L.require('menu-bootstrap')</script> + <script>L.require('menu-bootstrap')</script> {% endif %} </body> </html> diff --git a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut index a6d2936a5f..ef37c7a454 100644 --- a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut +++ b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/header.ut @@ -20,7 +20,7 @@ <meta charset="utf-8"> <title>{{ striptags(`${boardinfo.hostname ?? '?'}${node ? ` - ${node.title}` : ''}`) }} - LuCI</title> {% if (!darkpref): %} - <script type="text/javascript"> + <script> var mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'), rootElement = document.querySelector(':root'), setDarkMode = function(match) { rootElement.setAttribute('data-darkmode', match.matches) }; @@ -31,7 +31,7 @@ {% endif %} <meta name="viewport" content="initial-scale=1.0"> <link rel="stylesheet" href="{{ media }}/cascade.css"> - <link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="{{ media }}/mobile.css" type="text/css" /> + <link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="{{ media }}/mobile.css" /> <link rel="icon" href="{{ media }}/logo_48.png" sizes="48x48"> <link rel="icon" href="{{ media }}/logo.svg" sizes="any"> {% if (node?.css): %} diff --git a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/sysauth.ut b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/sysauth.ut index 15f3b1435b..e311f2d03f 100644 --- a/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/sysauth.ut +++ b/themes/luci-theme-bootstrap/ucode/template/themes/bootstrap/sysauth.ut @@ -38,7 +38,7 @@ <div id="view"> <div class="spinning">{{ _('Loading view…') }}</div> - <script type="text/javascript"> + <script> L.require('ui').then(function(ui) { ui.instantiateView('bootstrap.sysauth'); }); |