Skip to content

Commit a6b110f

Browse files
rorarclaude
andcommitted
ux: breadcrumb path, simpler IP replacer, remove tooltip
- Enable navigation.path for breadcrumb trail on every page - Replace hidden ?-tooltip with always-visible inline hint text: "Replaces <your-unraid-ip> in all instructions & code blocks. Saved in your browser only." - Add satellite antenna icon for visual recognition - Remove tooltip JS/CSS (overengineered for a one-liner explanation) - Simplify ip-replacer.js (no more tooltip code) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1cd1d9d commit a6b110f

4 files changed

Lines changed: 29 additions & 93 deletions

File tree

docs/javascripts/ip-replacer.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,32 +78,13 @@
7878
function init() {
7979
var input = document.getElementById("ip-input");
8080
var resetBtn = document.getElementById("ip-reset");
81-
var infoBtn = document.getElementById("ip-info-btn");
82-
var tooltip = document.getElementById("ip-tooltip");
8381

8482
if (!input) return;
8583

8684
// Restore saved IP into input field
8785
var state = applyFromStorage();
8886
input.value = state.saved;
8987

90-
// Tooltip toggle — positioned relative to ? button via fixed positioning
91-
if (infoBtn && tooltip) {
92-
infoBtn.addEventListener("click", function (e) {
93-
e.stopPropagation();
94-
var isVisible = tooltip.classList.contains("ip-replacer-tooltip--visible");
95-
if (!isVisible) {
96-
var rect = infoBtn.getBoundingClientRect();
97-
tooltip.style.top = (rect.bottom + 6) + "px";
98-
tooltip.style.left = rect.left + "px";
99-
}
100-
tooltip.classList.toggle("ip-replacer-tooltip--visible");
101-
});
102-
document.addEventListener("click", function () {
103-
tooltip.classList.remove("ip-replacer-tooltip--visible");
104-
});
105-
}
106-
10788
// IP input handler
10889
input.addEventListener("input", function () {
10990
var val = input.value;

docs/stylesheets/extra.css

Lines changed: 23 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,39 @@
66
margin: 0 2px;
77
}
88

9-
/* IP Replacer — sticky input bar below header */
9+
/* IP Replacer — announcement bar below header */
1010
.ip-replacer {
1111
display: flex;
1212
align-items: center;
13-
gap: 0.75rem;
14-
padding: 0.4rem 1rem;
13+
gap: 0.6rem;
14+
padding: 0.35rem 1rem;
1515
background: var(--md-code-bg-color);
1616
border-bottom: 1px solid var(--md-default-fg-color--lightest);
17-
font-size: 0.82rem;
17+
font-size: 0.8rem;
1818
flex-wrap: wrap;
1919
}
2020

2121
.ip-replacer label {
2222
font-weight: 600;
2323
white-space: nowrap;
24+
display: inline-flex;
25+
align-items: center;
26+
gap: 0.3rem;
27+
}
28+
29+
.ip-replacer-icon {
30+
font-size: 0.9rem;
2431
}
2532

2633
.ip-replacer input {
2734
font-family: var(--md-code-font-family);
28-
font-size: 0.82rem;
29-
padding: 0.25rem 0.5rem;
35+
font-size: 0.8rem;
36+
padding: 0.2rem 0.5rem;
3037
border: 1px solid var(--md-default-fg-color--lighter);
3138
border-radius: 4px;
3239
background: var(--md-default-bg-color);
3340
color: var(--md-default-fg-color);
34-
width: 10rem;
41+
width: 9rem;
3542
}
3643

3744
.ip-replacer input:focus {
@@ -40,8 +47,8 @@
4047
}
4148

4249
.ip-replacer button {
43-
font-size: 0.78rem;
44-
padding: 0.2rem 0.6rem;
50+
font-size: 0.75rem;
51+
padding: 0.15rem 0.5rem;
4552
border: 1px solid var(--md-default-fg-color--lighter);
4653
border-radius: 4px;
4754
background: var(--md-default-bg-color);
@@ -53,63 +60,16 @@
5360
background: var(--md-accent-fg-color--transparent);
5461
}
5562

56-
.ip-replacer .ip-replacer-disclaimer {
63+
.ip-replacer-hint {
5764
color: var(--md-default-fg-color--light);
58-
font-size: 0.72rem;
59-
font-style: italic;
60-
}
61-
62-
/* Info button (?) */
63-
.ip-replacer-info-wrapper {
64-
position: relative;
65-
display: inline-flex;
66-
}
67-
68-
.ip-replacer-info-btn {
69-
width: 1.5rem;
70-
height: 1.5rem;
71-
padding: 0;
72-
border-radius: 50%;
73-
font-weight: 700;
74-
font-size: 0.75rem;
75-
line-height: 1;
76-
display: inline-flex;
77-
align-items: center;
78-
justify-content: center;
79-
border: 1px solid var(--md-default-fg-color--lighter);
80-
background: var(--md-default-bg-color);
81-
color: var(--md-default-fg-color);
82-
cursor: pointer;
83-
}
84-
85-
.ip-replacer-info-btn:hover {
86-
background: var(--md-accent-fg-color--transparent);
87-
}
88-
89-
/* Tooltip */
90-
.ip-replacer-tooltip {
91-
display: none;
92-
position: fixed;
93-
z-index: 999;
94-
width: 20rem;
95-
padding: 0.6rem 0.8rem;
96-
border-radius: 6px;
97-
font-size: 0.78rem;
98-
font-style: normal;
99-
font-weight: 400;
100-
line-height: 1.5;
101-
background: #1a1a2e;
102-
color: #e8e8e8;
103-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
104-
}
105-
106-
[data-md-color-scheme="slate"] .ip-replacer-tooltip {
107-
background: #f0f0f0;
108-
color: #1a1a1a;
65+
font-size: 0.7rem;
10966
}
11067

111-
.ip-replacer-tooltip--visible {
112-
display: block;
68+
.ip-replacer-hint code {
69+
font-size: 0.68rem;
70+
padding: 0.1rem 0.25rem;
71+
border-radius: 3px;
72+
background: var(--md-default-fg-color--lightest);
11373
}
11474

11575
/* Highlighted replaced IP values */

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ theme:
2727
- navigation.top
2828
- navigation.indexes
2929
- navigation.footer
30+
- navigation.path
3031
- content.code.copy
3132
- search.suggest
3233
- search.highlight

overrides/main.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@
22

33
{% block announce %}
44
<div class="ip-replacer">
5-
<span class="ip-replacer-info-wrapper">
6-
<button type="button" class="ip-replacer-info-btn" id="ip-info-btn" title="What is this?">?</button>
7-
<div class="ip-replacer-tooltip" id="ip-tooltip">
8-
Enter your Unraid server IP address here. All placeholders like
9-
&ldquo;&lt;your-unraid-ip&gt;&rdquo; throughout the guide will be replaced
10-
with your IP &mdash; including in copy-able code blocks.
11-
Your IP is saved in your browser only and never transmitted.
12-
</div>
13-
</span>
14-
<label for="ip-input">Your Unraid IP:</label>
5+
<label for="ip-input">
6+
<span class="ip-replacer-icon" aria-hidden="true">&#x1F4E1;</span>
7+
Your Unraid IP:
8+
</label>
159
<input id="ip-input" type="text" placeholder="192.168.1.x" autocomplete="off" spellcheck="false" />
1610
<button id="ip-reset" type="button" title="Reset to placeholder">Reset</button>
17-
<span class="ip-replacer-disclaimer">Browser-only &mdash; no data is sent.</span>
11+
<span class="ip-replacer-hint">Replaces <code>&lt;your-unraid-ip&gt;</code> in all instructions &amp; code blocks. Saved in your browser only.</span>
1812
</div>
1913
{% endblock %}

0 commit comments

Comments
 (0)