summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/js/lines.js12
-rw-r--r--assets/mumi.scss11
2 files changed, 18 insertions, 5 deletions
diff --git a/assets/js/lines.js b/assets/js/lines.js
new file mode 100644
index 0000000..f22057d
--- /dev/null
+++ b/assets/js/lines.js
@@ -0,0 +1,12 @@
+// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0-or-later
+window.addEventListener('DOMContentLoaded', function () {
+ let lineClickHandler = (evt) => {
+ if (evt.target.classList.contains("line")) {
+ window.location.hash = evt.target.id;
+ return;
+ }
+ };
+ var root = document.querySelector("div.conversation");
+ root.addEventListener("click", lineClickHandler);
+});
+// @license-end
diff --git a/assets/mumi.scss b/assets/mumi.scss
index 963ebd8..f2c6d07 100644
--- a/assets/mumi.scss
+++ b/assets/mumi.scss
@@ -344,17 +344,18 @@ details.search-hints summary:after{
margin-left: 0;
}
-a.line-anchor {
+div.line:before {
position: absolute;
+ display: inline-block;
visibility: hidden;
-}
-a.line-anchor:before {
content: "# ";
margin-left: -1em;
padding-right: 1em;
+ text-align: right;
+ cursor: pointer;
+ color: $grey-300;
}
-
-div.line:hover a.line-anchor {
+div.line:hover:before {
visibility: visible;
}