diff --git a/assets/src/bundles/webapp/coverage.css b/assets/src/bundles/webapp/coverage.css
index 5ce90f6c..9f63e0a4 100644
--- a/assets/src/bundles/webapp/coverage.css
+++ b/assets/src/bundles/webapp/coverage.css
@@ -1,83 +1,83 @@
/**
* Copyright (C) 2021-2022 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
.swh-coverage {
padding-top: 0.3rem;
border: none;
overflow: visible;
}
.swh-coverage a {
text-decoration: none;
}
.swh-coverage-col {
padding-left: 10px;
padding-right: 10px;
}
.swh-coverage-header {
padding-top: 0;
padding-bottom: 0;
}
.swh-coverage-logo {
display: block;
width: 100%;
height: 50px;
margin-left: auto;
margin-right: auto;
object-fit: contain;
/* polyfill for old browsers, see https://github.com/bfred-it/object-fit-images */
font-family: "object-fit: contain;";
}
-.swh-coverage-list {
+.swh-coverage-iframe {
width: 100%;
height: 320px;
border: none;
}
.swh-coverage-chevron {
position: absolute;
right: 0;
}
.swh-coverage .card-header .mdi {
transition: 0.3s transform ease-in-out;
}
.swh-coverage .card-header .collapsed .mdi {
transform: rotate(90deg);
}
.swh-coverage-info-body {
max-height: 150px;
overflow-y: auto;
overflow-x: hidden;
scrollbar-width: thin; /* Firefox only */
padding: 0;
}
.swh-coverage-focus {
border: 2px solid #e20026;
}
/* Thin scrollbar for chromium based browsers */
.swh-coverage-info-body::-webkit-scrollbar {
width: 4px;
}
.swh-coverage-info-body::-webkit-scrollbar-track {
background: #eff0f1;
}
.swh-coverage-info-body::-webkit-scrollbar-thumb {
background: #909396;
}
diff --git a/assets/src/bundles/webapp/webapp-utils.js b/assets/src/bundles/webapp/webapp-utils.js
index c278ca63..c951265a 100644
--- a/assets/src/bundles/webapp/webapp-utils.js
+++ b/assets/src/bundles/webapp/webapp-utils.js
@@ -1,377 +1,377 @@
/**
* Copyright (C) 2018-2022 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
import objectFitImages from 'object-fit-images';
import {selectText} from 'utils/functions';
import {BREAKPOINT_MD} from 'utils/constants';
import Cookies from 'js-cookie';
$(document).on('collapsed.lte.pushmenu', event => {
if ($('body').width() >= BREAKPOINT_MD) {
$('.swh-words-logo-swh').css('visibility', 'visible');
}
});
$(document).on('shown.lte.pushmenu', event => {
$('.swh-words-logo-swh').css('visibility', 'hidden');
});
function ensureNoFooterOverflow() {
$('body').css('padding-bottom', $('footer').outerHeight() + 'px');
}
$(document).ready(() => {
// redirect to last browse page if any when clicking on the 'Browse' entry
// in the sidebar
$(`.swh-browse-link`).click(event => {
const lastBrowsePage = sessionStorage.getItem('last-browse-page');
if (lastBrowsePage) {
event.preventDefault();
window.location = lastBrowsePage;
}
});
const mainSideBar = $('.main-sidebar');
function updateSidebarState() {
const body = $('body');
if (body.hasClass('sidebar-collapse') &&
!mainSideBar.hasClass('swh-sidebar-collapsed')) {
mainSideBar.removeClass('swh-sidebar-expanded');
mainSideBar.addClass('swh-sidebar-collapsed');
$('.swh-words-logo-swh').css('visibility', 'visible');
Cookies.set('sidebar-state', 'collapsed');
} else if (!body.hasClass('sidebar-collapse') &&
!mainSideBar.hasClass('swh-sidebar-expanded')) {
mainSideBar.removeClass('swh-sidebar-collapsed');
mainSideBar.addClass('swh-sidebar-expanded');
$('.swh-words-logo-swh').css('visibility', 'hidden');
Cookies.set('sidebar-state', 'expanded');
}
// ensure correct sidebar state when loading a page
if (body.hasClass('hold-transition')) {
setTimeout(() => {
updateSidebarState();
});
}
}
// set sidebar state after collapse / expand animation
mainSideBar.on('transitionend', evt => {
updateSidebarState();
});
updateSidebarState();
// ensure footer do not overflow main content for mobile devices
// or after resizing the browser window
ensureNoFooterOverflow();
$(window).resize(function() {
ensureNoFooterOverflow();
if ($('body').hasClass('sidebar-collapse') && $('body').width() >= BREAKPOINT_MD) {
$('.swh-words-logo-swh').css('visibility', 'visible');
}
});
// activate css polyfill 'object-fit: contain' in old browsers
objectFitImages();
// reparent the modals to the top navigation div in order to be able
// to display them
$('.swh-browse-top-navigation').append($('.modal'));
let selectedCode = null;
function getCodeOrPreEltUnderPointer(e) {
if (e.clientX && e.clientY) {
const elts = document.elementsFromPoint(e.clientX, e.clientY);
for (const elt of elts) {
if (elt.nodeName === 'CODE' || elt.nodeName === 'PRE') {
return elt;
}
}
}
return null;
}
// click handler to set focus on code block for copy
$(document).click(e => {
selectedCode = getCodeOrPreEltUnderPointer(e);
});
function selectCode(event, selectedCode) {
if (selectedCode) {
const hljsLnCodeElts = $(selectedCode).find('.hljs-ln-code');
if (hljsLnCodeElts.length) {
selectText(hljsLnCodeElts[0], hljsLnCodeElts[hljsLnCodeElts.length - 1]);
} else {
selectText(selectedCode.firstChild, selectedCode.lastChild);
}
event.preventDefault();
}
}
// select the whole text of focused code block when user
// double clicks or hits Ctrl+A
$(document).dblclick(e => {
if ((e.ctrlKey || e.metaKey)) {
selectCode(e, getCodeOrPreEltUnderPointer(e));
}
});
$(document).keydown(e => {
if ((e.ctrlKey || e.metaKey) && e.key === 'a') {
selectCode(e, selectedCode);
}
});
// show/hide back-to-top button
let scrollThreshold = 0;
scrollThreshold += $('.swh-top-bar').height() || 0;
scrollThreshold += $('.navbar').height() || 0;
$(window).scroll(() => {
if ($(window).scrollTop() > scrollThreshold) {
$('#back-to-top').css('display', 'block');
} else {
$('#back-to-top').css('display', 'none');
}
});
// navbar search form submission callback
$('#swh-origins-search-top').submit(event => {
event.preventDefault();
if (event.target.checkValidity()) {
$(event.target).removeClass('was-validated');
const searchQueryText = $('#swh-origins-search-top-input').val().trim();
const queryParameters = new URLSearchParams();
queryParameters.append('q', searchQueryText);
queryParameters.append('with_visit', true);
queryParameters.append('with_content', true);
window.location = `${Urls.browse_search()}?${queryParameters.toString()}`;
} else {
$(event.target).addClass('was-validated');
}
});
});
export function initPage(page) {
$(document).ready(() => {
// set relevant sidebar link to page active
$(`.swh-${page}-item`).addClass('active');
$(`.swh-${page}-link`).addClass('active');
// triggered when unloading the current page
$(window).on('unload', () => {
// backup current browse page
if (page === 'browse') {
sessionStorage.setItem('last-browse-page', window.location);
}
});
});
}
export function initHomePage() {
$(document).ready(async() => {
- $('.swh-coverage-list').iFrameResize({heightCalculationMethod: 'taggedElement'});
+ $('.swh-coverage-iframe').iFrameResize({heightCalculationMethod: 'taggedElement'});
const response = await fetch(Urls.stat_counters());
const data = await response.json();
if (data.stat_counters && !$.isEmptyObject(data.stat_counters)) {
for (const objectType of ['content', 'revision', 'origin', 'directory', 'person', 'release']) {
const count = data.stat_counters[objectType];
if (count !== undefined) {
$(`#swh-${objectType}-count`).html(count.toLocaleString());
} else {
$(`#swh-${objectType}-count`).closest('.swh-counter-container').hide();
}
}
} else {
$('.swh-counter').html('0');
}
if (data.stat_counters_history && !$.isEmptyObject(data.stat_counters_history)) {
for (const objectType of ['content', 'revision', 'origin']) {
const history = data.stat_counters_history[objectType];
if (history) {
swh.webapp.drawHistoryCounterGraph(`#swh-${objectType}-count-history`, history);
} else {
$(`#swh-${objectType}-count-history`).hide();
}
}
} else {
$('.swh-counter-history').hide();
}
});
initPage('home');
}
export function showModalMessage(title, message) {
$('#swh-web-modal-message .modal-title').text(title);
$('#swh-web-modal-message .modal-content p').text(message);
$('#swh-web-modal-message').modal('show');
}
export function showModalConfirm(title, message, callback) {
$('#swh-web-modal-confirm .modal-title').text(title);
$('#swh-web-modal-confirm .modal-content p').text(message);
$('#swh-web-modal-confirm #swh-web-modal-confirm-ok-btn').bind('click', () => {
callback();
$('#swh-web-modal-confirm').modal('hide');
$('#swh-web-modal-confirm #swh-web-modal-confirm-ok-btn').unbind('click');
});
$('#swh-web-modal-confirm').modal('show');
}
export function showModalHtml(title, html, width = '500px') {
$('#swh-web-modal-html .modal-title').text(title);
$('#swh-web-modal-html .modal-body').html(html);
$('#swh-web-modal-html .modal-dialog').css('max-width', width);
$('#swh-web-modal-html .modal-dialog').css('width', width);
$('#swh-web-modal-html').modal('show');
}
export function addJumpToPagePopoverToDataTable(dataTableElt) {
dataTableElt.on('draw.dt', function() {
$('.paginate_button.disabled').css('cursor', 'pointer');
$('.paginate_button.disabled').on('click', event => {
const pageInfo = dataTableElt.page.info();
let content = ' / ${pageInfo.pages}`;
$(event.target).popover({
'title': 'Jump to page',
'content': content,
'html': true,
'placement': 'top',
'sanitizeFn': swh.webapp.filterXSS
});
$(event.target).popover('show');
$('.jump-to-page').on('change', function() {
$('.paginate_button.disabled').popover('hide');
const pageNumber = parseInt($(this).val()) - 1;
dataTableElt.page(pageNumber).draw('page');
});
});
});
dataTableElt.on('preXhr.dt', () => {
$('.paginate_button.disabled').popover('hide');
});
}
let swhObjectIcons;
export function setSwhObjectIcons(icons) {
swhObjectIcons = icons;
}
export function getSwhObjectIcon(swhObjectType) {
return swhObjectIcons[swhObjectType];
}
let browsedSwhObjectMetadata = {};
export function setBrowsedSwhObjectMetadata(metadata) {
browsedSwhObjectMetadata = metadata;
}
export function getBrowsedSwhObjectMetadata() {
return browsedSwhObjectMetadata;
}
// This will contain a mapping between an archived object type
// and its related SWHID metadata for each object reachable from
// the current browse view.
// SWHID metadata contain the following keys:
// * object_type: type of archived object
// * object_id: sha1 object identifier
// * swhid: SWHID without contextual info
// * swhid_url: URL to resolve SWHID without contextual info
// * context: object describing SWHID context
// * swhid_with_context: SWHID with contextual info
// * swhid_with_context_url: URL to resolve SWHID with contextual info
let swhidsContext_ = {};
export function setSwhIdsContext(swhidsContext) {
swhidsContext_ = {};
for (const swhidContext of swhidsContext) {
swhidsContext_[swhidContext.object_type] = swhidContext;
}
}
export function getSwhIdsContext() {
return swhidsContext_;
}
function setFullWidth(fullWidth) {
if (fullWidth) {
$('#swh-web-content').removeClass('container');
$('#swh-web-content').addClass('container-fluid');
} else {
$('#swh-web-content').removeClass('container-fluid');
$('#swh-web-content').addClass('container');
}
localStorage.setItem('swh-web-full-width', JSON.stringify(fullWidth));
$('#swh-full-width-switch').prop('checked', fullWidth);
}
export function fullWidthToggled(event) {
setFullWidth($(event.target).prop('checked'));
}
export function setContainerFullWidth() {
const previousFullWidthState = JSON.parse(localStorage.getItem('swh-web-full-width'));
if (previousFullWidthState !== null) {
setFullWidth(previousFullWidthState);
}
}
function coreSWHIDIsLowerCase(swhid) {
const qualifiersPos = swhid.indexOf(';');
let coreSWHID = swhid;
if (qualifiersPos !== -1) {
coreSWHID = swhid.slice(0, qualifiersPos);
}
return coreSWHID.toLowerCase() === coreSWHID;
}
export async function validateSWHIDInput(swhidInputElt) {
const swhidInput = swhidInputElt.value.trim();
let customValidity = '';
if (swhidInput.toLowerCase().startsWith('swh:')) {
if (coreSWHIDIsLowerCase(swhidInput)) {
const resolveSWHIDUrl = Urls.api_1_resolve_swhid(swhidInput);
const response = await fetch(resolveSWHIDUrl);
const responseData = await response.json();
if (responseData.hasOwnProperty('exception')) {
customValidity = responseData.reason;
}
} else {
const qualifiersPos = swhidInput.indexOf(';');
if (qualifiersPos === -1) {
customValidity = 'Invalid SWHID: all characters must be in lowercase. ';
customValidity += `Valid SWHID is ${swhidInput.toLowerCase()}`;
} else {
customValidity = 'Invalid SWHID: the core part must be in lowercase. ';
const coreSWHID = swhidInput.slice(0, qualifiersPos);
customValidity += `Valid SWHID is ${swhidInput.replace(coreSWHID, coreSWHID.toLowerCase())}`;
}
}
}
swhidInputElt.setCustomValidity(customValidity);
$(swhidInputElt).siblings('.invalid-feedback').text(customValidity);
}
export function isUserLoggedIn() {
return JSON.parse($('#swh_user_logged_in').text());
}
diff --git a/assets/src/bundles/webapp/webapp.css b/assets/src/bundles/webapp/webapp.css
index 4cf0ba95..7d8da293 100644
--- a/assets/src/bundles/webapp/webapp.css
+++ b/assets/src/bundles/webapp/webapp.css
@@ -1,787 +1,787 @@
/**
* Copyright (C) 2018-2022 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
html {
height: 100%;
overflow-x: hidden;
scroll-behavior: auto !important;
}
body {
min-height: 100%;
margin: 0;
position: relative;
padding-bottom: 120px;
}
/* The Alegreya font used in swh-web ships some ligatures producing
confusing text rendering, for instance the ligatures for `~` and some
characters like e, y, u, ... so disable font common ligatures */
* {
font-variant-ligatures: no-common-ligatures;
}
a:active,
a.active {
outline: none;
}
code {
background-color: #f9f2f4;
}
pre code {
background-color: transparent;
}
footer {
background-color: #262626;
color: #fff;
font-size: 0.8rem;
position: absolute;
bottom: 0;
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
}
footer a,
footer a:visited,
footer a:hover {
color: #fecd1b;
}
footer a:hover {
text-decoration: underline;
}
.link-color {
color: #fecd1b;
}
pre {
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
padding: 9.5px;
font-size: 0.8rem;
}
.btn.active {
background-color: #e7e7e7;
}
.card {
margin-bottom: 5px !important;
overflow-x: auto;
}
.navbar-brand {
padding: 5px;
margin-right: 0;
}
.table {
margin-bottom: 0;
}
.swh-table thead {
background-color: #f2f4f5;
border-top: 1px solid rgb(0 0 0 / 20%);
font-weight: normal;
}
.swh-table-striped th {
border-top: none;
}
.swh-table-striped tbody tr:nth-child(even) {
background-color: #f2f4f5;
}
.swh-table-striped tbody tr:nth-child(odd) {
background-color: #fff;
}
.swh-web-app-link a {
text-decoration: none;
border: none;
}
.swh-web-app-link:hover {
background-color: #efeff2;
}
.table > thead > tr > th {
border-top: none;
border-bottom: 1px solid #e20026;
}
.table > tbody > tr > td {
border-style: none;
}
.sitename .first-word,
.sitename .second-word {
color: rgb(0 0 0 / 75%);
font-weight: normal;
font-size: 1.2rem;
}
.sitename .first-word {
font-family: "Alegreya Sans", sans-serif;
}
.sitename .second-word {
font-family: Alegreya, serif;
}
.swh-counter {
font-size: 150%;
}
@media (max-width: 600px) {
.swh-counter-container {
margin-top: 1rem;
}
}
.swh-http-error {
margin: 0 auto;
text-align: center;
}
.swh-http-error-head {
color: #2d353c;
font-size: 30px;
}
.swh-http-error-code {
bottom: 60%;
color: #2d353c;
font-size: 96px;
line-height: 80px;
margin-bottom: 10px !important;
}
.swh-http-error-desc {
font-size: 12px;
color: #647788;
text-align: center;
}
.swh-http-error-desc pre {
display: inline-block;
text-align: left;
max-width: 800px;
white-space: pre-wrap;
}
.swh-list-unstyled {
list-style: none;
}
.popover {
max-width: 97%;
z-index: 40000;
}
.modal {
text-align: center;
padding: 0 !important;
z-index: 50000;
}
.modal::before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
margin-right: -4px;
}
.modal-dialog {
display: inline-block;
text-align: left;
vertical-align: middle;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu .dropdown-menu {
top: 0;
left: -100%;
margin-top: -5px;
margin-left: -2px;
}
.dropdown-item:hover,
.dropdown-item:focus {
background-color: rgb(0 0 0 / 10%);
}
a.dropdown-left::before {
content: "\f035e";
font-family: "Material Design Icons";
display: block;
width: 20px;
height: 20px;
float: left;
margin-left: 0;
}
#swh-navbar {
border-style: solid;
border-top-style: none;
border-left-style: none;
border-right-style: none;
border-bottom-width: 5px;
border-image:
linear-gradient(
to right,
rgb(226 0 38) 0%,
rgb(254 205 27) 100%
)
1 1 1 1;
width: 100%;
padding: 5px;
margin-bottom: 10px;
margin-top: 60px;
justify-content: normal;
flex-wrap: nowrap;
height: 72px;
overflow: hidden;
}
#back-to-top {
display: none;
position: fixed;
bottom: 30px;
right: 30px;
z-index: 10;
}
#back-to-top a img {
display: block;
width: 32px;
height: 32px;
background-size: 32px 32px;
text-indent: -999px;
overflow: hidden;
}
.swh-top-bar {
direction: ltr;
height: 30px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 99999;
background-color: #262626;
color: #fff;
text-align: center;
font-size: 14px;
}
.swh-top-bar ul {
margin-top: 4px;
padding-left: 0;
white-space: nowrap;
}
.swh-top-bar li {
display: inline-block;
margin-left: 10px;
margin-right: 10px;
}
.swh-top-bar a,
.swh-top-bar a:visited {
color: white;
}
.swh-top-bar a.swh-current-site,
.swh-top-bar a.swh-current-site:visited {
color: #fecd1b;
}
.swh-banner {
height: 30px;
position: fixed;
top: 30px;
left: 0;
width: 100%;
z-index: 99999;
border: none;
}
.swh-banner .row {
height: 30px;
background-color: #fecd1b;
color: #e20026;
font-size: larger;
}
.swh-position-left {
position: absolute;
left: 0;
}
.swh-position-right {
position: absolute;
right: 0;
}
.swh-background-gray {
background: #efeff2;
}
.swh-donate-link {
border: 1px solid #fecd1b;
background-color: #e20026;
color: white !important;
padding: 3px;
border-radius: 3px;
}
.swh-navbar-content h4 {
padding-top: 7px;
}
.swh-navbar-content .bread-crumbs {
display: block;
margin-left: -40px;
}
.swh-navbar-content .bread-crumbs li.bc-no-root {
padding-top: 7px;
}
.main-sidebar {
margin-top: 60px;
}
.sidebar {
height: calc(100% - 7rem);
}
.content-wrapper {
background: none;
}
.brand-image {
max-height: 40px;
}
.brand-link {
padding-top: 18.5px;
padding-bottom: 18px;
padding-left: 4px;
border-bottom: 5px solid #e20026 !important;
}
.navbar-header a,
ul.dropdown-menu a,
ul.navbar-nav a,
ul.nav-sidebar a {
border-bottom-style: none;
color: #323232;
}
.swh-sidebar .nav-link.active {
color: #323232 !important;
background-color: #e7e7e7 !important;
}
.nav-tabs .nav-link.active {
border-top: 3px solid #e20026;
}
.swh-image-error {
width: 80px;
height: auto;
}
@media (max-width: 600px) {
.card {
min-width: 80%;
}
.swh-image-error {
width: 40px;
height: auto;
}
.swh-donate-link {
display: none;
}
}
.form-check-label {
padding-top: 4px;
}
.swhid {
white-space: pre-wrap;
}
.swhid .swhid-option {
display: inline-block;
margin-right: 5px;
line-height: 1rem;
}
.nav-pills .nav-link:not(.active):hover {
color: rgb(0 0 0 / 55%);
}
.swh-heading-color {
color: #e20026 !important;
}
.sidebar-mini.sidebar-collapse .main-sidebar:hover {
width: 4.6rem;
}
.sidebar-mini.sidebar-collapse .main-sidebar:hover .user-panel > .info,
.sidebar-mini.sidebar-collapse .main-sidebar:hover .nav-sidebar .nav-link p,
.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-text {
visibility: hidden !important;
}
.sidebar .nav-link p,
.main-sidebar .brand-text,
.sidebar .user-panel .info {
transition: none;
}
.sidebar-mini.sidebar-mini.sidebar-collapse .sidebar {
padding-right: 0;
}
.swh-words-logo {
position: absolute;
top: 0;
left: 0;
width: 73px;
height: 73px;
text-align: center;
font-size: 10pt;
color: rgb(0 0 0 / 75%);
}
.swh-words-logo:hover {
text-decoration: none;
}
.swh-words-logo-swh {
line-height: 1;
padding-top: 13px;
visibility: hidden;
}
.sidebar-collapse .swh-words-logo-swh {
visibility: visible;
}
hr.swh-faded-line {
border: 0;
height: 1px;
background-image: linear-gradient(to left, #f0f0f0, #8c8b8b, #f0f0f0);
}
/* Ensure that section title with link is colored like standard section title */
.swh-readme h1 a,
.swh-readme h2 a,
.swh-readme h3 a,
.swh-readme h4 a,
.swh-readme h5 a,
.swh-readme h6 a {
color: #e20026;
}
/* Make list compact in reStructuredText rendering */
.swh-rst li p {
margin-bottom: 0;
}
.swh-readme-txt pre {
background: none;
border: none;
}
.swh-coverage {
padding-top: 0.3rem;
border: none;
overflow: visible;
}
.swh-coverage a {
text-decoration: none;
}
.swh-coverage-col {
padding-left: 10px;
padding-right: 10px;
}
.swh-coverage-header {
padding-top: 0;
padding-bottom: 0;
}
.swh-coverage-logo {
display: block;
width: 100%;
height: 50px;
margin-left: auto;
margin-right: auto;
object-fit: contain;
/* polyfill for old browsers, see https://github.com/bfred-it/object-fit-images */
font-family: "object-fit: contain;";
}
-.swh-coverage-list {
+.swh-coverage-iframe {
width: 100%;
height: 320px;
border: none;
}
.swh-coverage-chevron {
position: absolute;
right: 0;
}
.swh-coverage .card-header .mdi {
transition: 0.3s transform ease-in-out;
}
.swh-coverage .card-header .collapsed .mdi {
transform: rotate(90deg);
}
.swh-coverage-info-body {
max-height: 150px;
overflow-y: auto;
overflow-x: hidden;
scrollbar-width: thin; /* Firefox only */
padding: 0;
}
/* Thin scrollbar for chromium based browsers */
.swh-coverage-info-body::-webkit-scrollbar {
width: 4px;
}
.swh-coverage-info-body::-webkit-scrollbar-track {
background: #eff0f1;
}
.swh-coverage-info-body::-webkit-scrollbar-thumb {
background: #909396;
}
tr.swh-tr-hover-highlight:hover td {
background: #ededed;
}
tr.swh-api-doc-route a {
text-decoration: none;
}
.swh-apidoc .col {
margin: 10px;
}
.swh-apidoc .swh-rst blockquote {
border: 0;
margin: 0;
padding: 0;
}
a.toggle-col {
text-decoration: none;
}
a.toggle-col.col-hidden {
text-decoration: line-through;
}
.admonition.warning {
background: #fcf8e3;
border: 1px solid #faebcc;
padding: 15px;
border-radius: 4px;
}
.admonition.warning p {
margin-bottom: 0;
}
.admonition.warning .first {
font-size: 1.5rem;
}
.swh-popover {
max-height: 50vh;
overflow-y: auto;
overflow-x: auto;
padding: 0;
}
@media screen and (min-width: 768px) {
.swh-popover {
max-width: 50vw;
}
}
.swh-popover pre {
white-space: pre-wrap;
margin-bottom: 0;
}
.d3-wrapper {
position: relative;
height: 0;
width: 100%;
padding: 0;
/* padding-bottom will be overwritten by JavaScript later */
padding-bottom: 100%;
}
.d3-wrapper > svg {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
}
div.d3-tooltip {
position: absolute;
text-align: center;
width: auto;
height: auto;
padding: 2px;
font: 12px sans-serif;
background: white;
border: 1px solid black;
border-radius: 4px;
pointer-events: none;
}
.page-link {
cursor: pointer;
}
.wrapper {
overflow: hidden;
}
.swh-badge {
padding-bottom: 1rem;
cursor: pointer;
}
.swh-badge-html,
.swh-iframe-html,
.swh-badge-md,
.swh-badge-rst {
white-space: pre-wrap !important;
}
/* Material Design icons alignment tweaks */
.mdi {
display: inline-block;
}
.mdi-camera {
transform: translateY(1px);
}
.mdi-source-commit {
transform: translateY(2px);
}
/* To set icons at a fixed width. Great to use when different
icon widths throw off alignment. Courtesy of Font Awesome. */
.mdi-fw {
text-align: center;
width: 1.25em;
}
.main-header .nav-link {
height: inherit;
}
.nav-sidebar .nav-header:not(:first-of-type) {
padding-top: 1rem;
}
.nav-sidebar .nav-link {
padding-top: 0;
padding-bottom: 0;
}
.nav-sidebar > .nav-item .nav-icon {
vertical-align: sub;
}
.swh-search-icon {
line-height: 1rem;
vertical-align: middle;
}
.swh-search-navbar {
position: absolute;
top: 0.7rem;
right: 15rem;
z-index: 50000;
width: 500px;
}
.sidebar-collapse .swh-search-navbar {
right: 4rem;
}
.swh-corner-ribbon {
width: 200px;
background: #fecd1b;
color: #e20026;
position: absolute;
text-align: center;
letter-spacing: 1px;
box-shadow: 0 0 3px rgb(0 0 0 / 30%);
top: 85px;
right: -50px;
left: auto;
transform: rotate(45deg);
z-index: 2000;
}
@media screen and (max-width: 600px) {
.swh-corner-ribbon {
top: 53px;
right: -65px;
}
}
.invalid-feedback {
font-size: 100%;
}
.swh-required-label::after {
content: "*";
color: #f00;
}