Skip to content

Commit 312cb42

Browse files
authored
Merge pull request #1234 from helsinki-systems/feat/squiggly-line
Add a squiggly line to the Hydra link on hover
2 parents a67d3b4 + 9addaeb commit 312cb42

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/root/layout.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<footer class="navbar">
9494
<hr />
9595
<small>
96-
<em><a href="http://nixos.org/hydra" target="_blank">Hydra</a> [% HTML.escape(version) %] (using [% HTML.escape(nixVersion) %]).</em>
96+
<em><a href="http://nixos.org/hydra" target="_blank" class="squiggle">Hydra</a> [% HTML.escape(version) %] (using [% HTML.escape(nixVersion) %]).</em>
9797
[% IF c.user_exists %]
9898
You are signed in as <tt>[% HTML.escape(c.user.username) %]</tt>
9999
[%- IF c.user.type == 'google' %] via Google[% END %].

src/root/static/css/hydra.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ body {
171171
line-height: 1.5;
172172
}
173173

174+
a.squiggle:hover {
175+
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg id='squiggle-link' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:ev='http://www.w3.org/2001/xml-events' viewBox='0 0 10 18'%3E%3Cstyle type='text/css'%3E.squiggle{animation:shift .5s linear infinite;}@keyframes shift {from {transform:translateX(-10px);}to {transform:translateX(0);}}%3C/style%3E%3Cpath fill='none' stroke='%230056b3' stroke-width='0.65' class='squiggle' d='M0,17.5 c 2.5,0,2.5,-1.5,5,-1.5 s 2.5,1.5,5,1.5 c 2.5,0,2.5,-1.5,5,-1.5 s 2.5,1.5,5,1.5' /%3E%3C/svg%3E");
176+
background-position: 0 100%;
177+
background-size: auto 24px;
178+
background-repeat: repeat;
179+
text-decoration: none;
180+
border-bottom: none;
181+
padding-bottom: 1px;
182+
}
183+
174184
@media (prefers-color-scheme: dark) {
175185
/* Prevent some flickering */
176186
html {

0 commit comments

Comments
 (0)