Skip to content

Commit 0dff3b9

Browse files
committed
Replace the always-shown anchors by ones that appear on hover
This seems to be a common behavior on the 'net. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent a7c2369 commit 0dff3b9

File tree

3 files changed

+584
-581
lines changed

3 files changed

+584
-581
lines changed

GitForWindows.css

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,11 @@ footer li {
374374
clear: both;
375375
}
376376

377-
.ref {
378-
float: right;
379-
font-size: 16px;
380-
padding-right: 1em;
377+
.anchor {
378+
transform: translateX(-80%) scale(.6);
379+
position: absolute;
380+
}
381+
382+
h2:not(:hover) .anchor {
383+
display: none;
381384
}

add-entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ const main = async (...args) => {
7373

7474
const insert = [
7575
`<h2 id="${id}">`,
76+
`<a class="anchor" href="#${id}">&#128279;</a>`,
7677
date,
77-
`<a class="ref" href="#${id}">&#128279;</a>`,
7878
'<br />',
7979
`(commit <a href="https://github.com/git-for-windows/git/commit/${commit}">${commit}</a>)</h2>\n`,
8080
'\n',

0 commit comments

Comments
 (0)