Skip to content

Commit b47fc9c

Browse files
committed
CrateSidebar: Add Package URL help link
1 parent ea59266 commit b47fc9c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

app/components/crate-sidebar.hbs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<span local-class="purl-text">{{@version.purl}}</span>
1717
<Tooltip local-class="purl-tooltip"><strong>Package URL:</strong> {{@version.purl}} <small>(click to copy)</small></Tooltip>
1818
</CopyButton>
19+
<a
20+
href="https://github.com/package-url/purl-spec"
21+
target="_blank"
22+
rel="noopener noreferrer"
23+
local-class="purl-help-link"
24+
aria-label="Learn more"
25+
>
26+
{{svg-jar "circle-question"}}
27+
<Tooltip @text="Learn more about Package URLs" />
28+
</a>
1929
</div>
2030

2131
<time

app/components/crate-sidebar.module.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,26 @@
8787
}
8888
}
8989

90+
.purl-help-link {
91+
color: unset;
92+
margin-left: var(--space-2xs);
93+
flex-shrink: 0;
94+
95+
&:hover {
96+
color: unset;
97+
}
98+
99+
&:focus {
100+
outline: 2px solid var(--yellow500);
101+
outline-offset: 1px;
102+
border-radius: var(--space-3xs);
103+
}
104+
105+
svg {
106+
margin: 0;
107+
}
108+
}
109+
90110
.links {
91111
> * + * {
92112
margin-top: var(--space-m);

0 commit comments

Comments
 (0)