Skip to content

Commit 3077ca4

Browse files
authored
Merge pull request #54 from carpentries/add-anchor
Add anchor links
2 parents f2df91f + 02ac789 commit 3077ca4

File tree

6 files changed

+27
-6
lines changed

6 files changed

+27
-6
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: varnish
22
Title: Front-end for The Carpentries Lesson Template
3-
Version: 0.2.2
3+
Version: 0.2.3
44
Authors@R: c(
55
person(given = "Zhian N.",
66
family = "Kamvar",

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# varnish 0.2.3
2+
3+
* Add support for displaying anchor links (requested @fiveop,
4+
https://github.com/carpentries/sandpaper/issues/285 and @anenadic,
5+
https://github.com/carpentries/workbench/issues/28; added: #54 by @zkamvar)
6+
17
# varnish 0.2.2
28

39
* Formatting of list elements in the solutions and instructor notes now follows

inst/pkgdown/assets/assets/scripts.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/pkgdown/assets/assets/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/pkgdown/assets/assets/styles.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/stylesheets/styles.css.scss

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ h2 {
9090
}
9191

9292
h3 {
93-
font-size: 24px;
94-
font-weight:400;
93+
font-size: 24px;
94+
font-weight: 400;
9595
font-style: normal;
9696
font-weight: 400;
9797
line-height: 31px;
@@ -123,6 +123,21 @@ a {
123123
text-decoration: none;
124124
}
125125

126+
a.anchor {
127+
display: none;
128+
margin-left: 5px;
129+
width: Min(0.9em, 20px);
130+
height: Min(0.9em, 20px);
131+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-link'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'%3E%3C/path%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'%3E%3C/path%3E%3C/svg%3E");
132+
background-repeat: no-repeat;
133+
background-size: Min(0.9em, 20px) Min(0.9em, 20px);
134+
background-position: center center;
135+
}
136+
137+
h2, h3, h4, h5, h6 {
138+
&:hover .anchor {display: inline-block;}
139+
}
140+
126141
a:hover {
127142
text-decoration: underline;
128143
}

0 commit comments

Comments
 (0)