Skip to content

Commit d647611

Browse files
committed
Adding JS to stop scrolling to links
1 parent f0a22ce commit d647611

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

source/presentation/4.0/model.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ __Previous Version:__ [3.0][prezi30]
5252
----
5353

5454
# IIIF Presentation API Data Model
55-
55+
<script>
56+
if (location.hash) {
57+
const y = window.scrollY;
58+
setTimeout(() => {
59+
window.scrollTo({ top: y, behavior: "instant" });
60+
}, 0);
61+
}
62+
</script>
5663
<style>
5764
.content, .api-content .highlight, .api-content .code-header {
5865
max-width:100%;
@@ -70,6 +77,26 @@ pre.highlight code {
7077
.highlight .s2 {
7178
color: #a0f0f0
7279
}
80+
81+
a > code::after {
82+
content: "";
83+
font-size: 0.65em;
84+
opacity: 0.6;
85+
margin-left: 0.2em;
86+
vertical-align: super;
87+
text-decoration: none;
88+
}
89+
90+
a > code {
91+
/* text-decoration: underline;*/
92+
color: var(--link-color);
93+
cursor: pointer;
94+
}
95+
96+
a:hover > code {
97+
background-color: rgba(0,0,0,0.05);
98+
text-decoration: underline;
99+
}
73100
</style>
74101

75102

0 commit comments

Comments
 (0)