Skip to content

Commit 4e46cc3

Browse files
authored
Add sticky div to Package details template #1263 (#1294)
Reference: #1263 Signed-off-by: John M. Horan <[email protected]>
1 parent a3b0ec8 commit 4e46cc3

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

vulnerabilities/templates/package_details.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
</div>
2121
</article>
2222

23-
<div class="pl-3 pr-3 mb-5">
23+
<div class="pl-3 pr-3 mb-5 floating-purl">
2424
<table class="table vcio-table width-100-pct mt-2">
2525
<tbody>
2626
<tr>
27-
<td class="two-col-left">
27+
<td class="two-col-left" style="width: 175px;">
2828
<span
2929
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
3030
data-tooltip="The package url or purl is a URL string used to identify and locate a software package."

vulnerablecode/static/css/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,19 @@ a.small_page_button {
367367
span.tag.custom {
368368
margin: 0px 0px 6px 10px;
369369
}
370+
371+
/* Floating container to display the PURL on the Package details page as the user scrolls down. */
372+
.floating-purl {
373+
position: sticky;
374+
top: 0;
375+
width: 100%;
376+
z-index: 100;
377+
margin-bottom: 0px;
378+
}
379+
380+
.floating-purl .table td,
381+
.floating-purl .table tbody tr:last-child td,
382+
.floating-purl .table th {
383+
border: solid 1px #dbdbdb;
384+
background-color: #ffffff;
385+
}

0 commit comments

Comments
 (0)