Skip to content

Commit e2acc29

Browse files
committed
Change name to section-links and added pointer effect
1 parent a600298 commit e2acc29

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

docs/_layouts/guidance-page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<!--Scripts-->
2727
<script src="assets/scripts/expandable-sections.js"></script>
28-
<script src="assets/scripts/permalinks.js" defer></script>
28+
<script src="assets/scripts/section-links.js" defer></script>
2929

3030
</head>
3131
<body>

docs/assets/scripts/permalinks.js renamed to docs/assets/scripts/section-links.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Function to copy link to clipboard
22
function copylink(text) {
33
navigator.clipboard.writeText(text).then(() => {
4-
alert(`Link copied to clipboard: ${text}`);
4+
alert(`Link copied to clipboard:\n${text}`);
55
}).catch(err => {
66
console.error('Failed to copy link', err);
77
});
@@ -16,8 +16,8 @@ document.querySelectorAll('h1, h2, h3, h4, h5').forEach(heading => {
1616

1717
// Create the icon element
1818
const iconWrapper = document.createElement('span');
19-
iconWrapper.className = 'permalink';
20-
iconWrapper.title = 'Permalink';
19+
iconWrapper.className = 'section-link';
20+
iconWrapper.title = 'Section link';
2121
iconWrapper.innerHTML = ' ';
2222

2323
// Append the icon to the heading

docs/assets/styles.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ ul, ol{
143143
}
144144

145145

146-
/*Permalinks*/
147-
.permalink{
146+
/*Section links*/
147+
.section-link{
148148
background-image: url('img/permalink.png');
149149
width: 18px;
150150
height: 18px;
@@ -154,6 +154,10 @@ ul, ol{
154154
background-size: cover;
155155
}
156156

157+
.section-link:hover{
158+
cursor: pointer;
159+
}
160+
157161
h1 span, h2 span, h3 span, h4 span, h5 span {
158162
transition: opacity 0.3s ease-in-out;
159163
}
@@ -163,7 +167,6 @@ h1:hover span, h2:hover span, h3:hover span, h4:hover span, h5:hover span{
163167
}
164168

165169

166-
167170
/*Fancy elements*/
168171
blockquote{
169172
margin: 1em 0 2em 0;

0 commit comments

Comments
 (0)