Archived
Own bar above the new brother_ql_web label designer, which has no Bootstrap
deploy / deploy (push) Successful in 5s
deploy / deploy (push) Successful in 5s
The Bootstrap navbar was injected without Bootstrap and took the first row of the designer's page grid, its top bar was stretched to the height of the page.
This commit is contained in:
1 parent
a76c35304c
commit
d5db7ded9e
3 files changed
+21
-2
No files matched your search
@@ -265,7 +265,7 @@ helpers do
|
||||
|
||||
body = res.body || ''
|
||||
if res['Content-Type']&.include?('text/html')
|
||||
body = body.sub(/(<body[^>]*>)/i) { "#{Regexp.last_match(1)}\n#{erb(:_navbar, layout: false)}" }
|
||||
body = body.sub(/(<body[^>]*>)/i) { "#{Regexp.last_match(1)}\n#{erb(:_brother_bar, layout: false)}" }
|
||||
# The navbar's icons, brother_ql_web has no MDI font of its own
|
||||
body = body.sub(%r{</head>}i) { %(<link href="/vendor/mdi-7.4.47/css/materialdesignicons.min.css" rel="stylesheet">\n</head>) }
|
||||
end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<%# Above brother_ql_web's label designer, which has no Bootstrap: styled here,
|
||||
and a row of the designer's page grid (its top bar and view follow) %>
|
||||
<style>
|
||||
body { grid-template-rows: auto 58px 1fr !important; }
|
||||
.lp-bar { display: flex; align-items: center; gap: .2rem; padding: 0 .8rem; height: 36px; background: #212529; font: 14px/1 system-ui, sans-serif; overflow-x: auto; }
|
||||
.lp-bar a { color: rgba(255, 255, 255, .65); text-decoration: none; padding: .45rem .6rem; white-space: nowrap; }
|
||||
.lp-bar a:hover, .lp-bar a.active { color: #fff; }
|
||||
.lp-bar .brand { color: #fff; font-size: 16px; margin-right: .6rem; display: inline-flex; align-items: center; gap: .3rem; }
|
||||
.lp-bar i { display: inline-block; line-height: 1; }
|
||||
.lp-bar .sep { border-left: 1px solid rgba(255, 255, 255, .25); }
|
||||
</style>
|
||||
<nav class="lp-bar">
|
||||
<a class="brand" href="/"><i class="mdi mdi-printer"></i> Print server</a>
|
||||
<a href="/">Home</a>
|
||||
<a class="sep active" href="/brother">Brother</a>
|
||||
<a href="/upload">Shipping labels</a>
|
||||
<a href="/epson">Receipts</a>
|
||||
<a class="sep" href="/repository">Labels</a>
|
||||
</nav>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark <%= request.path.start_with?('/brother/') ? 'mb-0' : 'mb-4' %>">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-4">
|
||||
<div class="container-fluid d-flex align-items-center">
|
||||
<a class="navbar-brand" href="/"><i class="mdi mdi-printer"></i> Print server</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
|
||||
Reference in new issue
Block a user