Wire styleguide.css and ajax.js into root.mako globally

- Load styleguide.css before style.css so new design tokens are
  available app-wide and new styles take precedence
- Load ajax.js after scripts.min.js — provides qs(), onReady(),
  onDelegate(), setCookie(), getCookie(), and other vanilla utilities
- Keep jQuery's $ intact via qs() alias to avoid breaking existing code
- Add no-js class to <html> for capability-driven presentation
- Update error_document.mako with same CSS/JS stack
This commit is contained in:
russell@unturf.com 2026-02-19 20:18:09 -05:00
parent dc3502fed0
commit 1dac65fc8a
3 changed files with 18 additions and 12 deletions

View file

@ -40,7 +40,7 @@ c.template_context['attachment_store'] = {
}
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js">
<head>
<title>${self.title()}</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
@ -62,6 +62,7 @@ c.template_context['attachment_store'] = {
## CSS definitions
<%def name="css()">
<link rel="stylesheet" type="text/css" href="${h.asset('css/styleguide.css', ver=c.rhodecode_version_hash)}" media="screen"/>
<link rel="stylesheet" type="text/css" href="${h.asset('css/filepond.css', ver=c.rhodecode_version_hash)}" media="screen"/>
<link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
## EXTRA FOR CSS
@ -144,6 +145,7 @@ c.template_context['attachment_store'] = {
<script> var alertMessagePayloads = ${h.flash.json_alerts(request=request)|n}; </script>
## avoide escaping the %N
<script language="javascript" type="text/javascript" src="${h.asset('js/scripts.min.js', ver=c.rhodecode_version_hash)}"></script>
<script src="${h.asset('js/ajax.js', ver=c.rhodecode_version_hash)}"></script>
## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
${self.js_extra()}