Move help links from the global header onto each relevant card

The single header-wide help icon (added last release) pointed at a
per-page doc guess, but a page can have several cards covering different
topics. Removed it and added a small help icon directly to each card
that has real corresponding doc content, linking straight to that doc:
Proxy List + Add/Edit host modal (hosts.ejs), Add DNS Provider + Dynamic
A Records (dns.ejs), Add New User + User List (users.ejs), Add
Permission + Permissions (permissions.ejs), Add Group (groups.ejs).

Bumps to v1.1.11.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KDEx8ghuZR61pqPXc6da9C
This commit is contained in:
2026-07-17 20:00:34 -04:00
parent e5df0d3370
commit a40da55993
9 changed files with 20 additions and 26 deletions
-21
View File
@@ -62,9 +62,6 @@
</li>
</ul>
<div class="form-inline mt-2 mt-md-0">
<a id="cl-help" class="nav-link text-light me-3" href="/docs" title="Help">
<i class="fa-solid fa-circle-question"></i>
</a>
<a id="cl-username" class="navbar-text text-light me-3" href="/profile" style="display: none;">
<i class="fa-solid fa-user me-1"></i><span id="cl-username-text"></span>
</a>
@@ -105,21 +102,6 @@
sessionStorage.setItem('update-banner-dismissed', '1');
}
// Deep-link the header help icon to whichever doc is most relevant to
// the current page. No server-side "current section" local exists
// (every res.render() call shares one values object, see
// routes/render.js), so this follows the same client-side
// path-matching convention already used for the top-nav active-link
// highlighting just below. Unmapped pages fall back to the docs
// index (already /docs, the anchor's default).
var HELP_DOCS_BY_PATH = {
'/hosts': 'installation',
'/dns': 'installation',
'/users': 'architecture',
'/permissions': 'architecture',
'/groups': 'architecture',
};
$(document).ready(function(){
// Set the correct link to active in the top nav bar
@@ -131,9 +113,6 @@
}
})
let helpSlug = HELP_DOCS_BY_PATH[window.location.pathname.toLocaleLowerCase()];
if(helpSlug) $('#cl-help').attr('href', '/docs/' + helpSlug);
// Set the correct login/logout button, and reveal admin-only nav
// items for global admins.
app.auth.isLoggedIn(function(error, data){