Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sticky div to Package details template #1294

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vulnerabilities/templates/package_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</div>
</article>

<div class="pl-3 pr-3 mb-5">
<div class="pl-3 pr-3 mb-5 floating-purl">
<table class="table vcio-table width-100-pct mt-2">
<tbody>
<tr>
<td class="two-col-left">
<td class="two-col-left" style="width: 175px;">
<span
class="has-tooltip-multiline has-tooltip-black has-tooltip-arrow has-tooltip-text-left"
data-tooltip="The package url or purl is a URL string used to identify and locate a software package."
Expand Down
16 changes: 16 additions & 0 deletions vulnerablecode/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -367,3 +367,19 @@ a.small_page_button {
span.tag.custom {
margin: 0px 0px 6px 10px;
}

/* Floating container to display the PURL on the Package details page as the user scrolls down. */
.floating-purl {
position: sticky;
top: 0;
width: 100%;
z-index: 100;
margin-bottom: 0px;
}

.floating-purl .table td,
.floating-purl .table tbody tr:last-child td,
.floating-purl .table th {
border: solid 1px #dbdbdb;
background-color: #ffffff;
}
Loading