Skip to content

Commit fe6f0f3

Browse files
committed
fix: title link to Chroma
Also store closed state of notification block.
1 parent 610afd8 commit fe6f0f3

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

cmd/chromad/static/index.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ textarea {
2424
:root[data-theme="dark"] {
2525
color-scheme: dark;
2626
}
27+
28+
.title a {
29+
color: inherit;
30+
text-decoration: none;
31+
}
32+
33+
.title a:hover {
34+
text-decoration: underline;
35+
}

cmd/chromad/static/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,14 @@ function init() {
9797

9898
(document.querySelectorAll(".notification .delete") || []).forEach((el) => {
9999
const notification = el.parentNode;
100+
101+
// Check if notification was previously closed
102+
if (localStorage.getItem("notificationClosed") === "true") {
103+
notification.parentNode.removeChild(notification);
104+
}
105+
100106
el.addEventListener("click", () => {
107+
localStorage.setItem("notificationClosed", "true");
101108
notification.parentNode.removeChild(notification);
102109
});
103110
});

cmd/chromad/templates/index.html.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<nav class="level">
1616
<div class="level-left">
1717
<div class="level-item">
18-
<h1 class="title">Chroma Playground ({{.Version}})</h1>
18+
<h1 class="title"><a href="https://github.com/alecthomas/chroma">Chroma</a> Playground ({{.Version}})</h1>
1919
</div>
2020
</div>
2121
<div class="level-right">

0 commit comments

Comments
 (0)