';
}
visitsListHtml += '
';
++visitsCpt;
@@ -114,7 +114,7 @@
allVisits.forEach((v, i) => {
// Turn Unix epoch into Javascript Date object
v.date = new Date(Math.floor(v.date * 1000));
- let visitLink = '
' + v.formatted_date + '';
+ let visitLink = '
' + v.formatted_date + '';
if (v.status === 'full') {
if (!firstFullVisit) {
firstFullVisit = v;
diff --git a/swh/web/assets/src/bundles/save/index.js b/swh/web/assets/src/bundles/save/index.js
--- a/swh/web/assets/src/bundles/save/index.js
+++ b/swh/web/assets/src/bundles/save/index.js
@@ -95,7 +95,7 @@
} else {
html += sanitizedURL;
}
- html += `
`;
+ html += `
`;
return html;
}
return data;
diff --git a/swh/web/assets/src/bundles/vault/vault-ui.js b/swh/web/assets/src/bundles/vault/vault-ui.js
--- a/swh/web/assets/src/bundles/vault/vault-ui.js
+++ b/swh/web/assets/src/bundles/vault/vault-ui.js
@@ -176,13 +176,13 @@
`following commands:\n\n$ git init\n$ zcat ${cookingTask.object_id}.gitfast.gz | git fast-import">`;
}
tableRow += '
| ';
- tableRow += `
${cookingTask.object_type} | `;
+ tableRow += `
${cookingTask.object_type} | `;
tableRow += `
${cookingTask.object_id} | `;
tableRow += `
${progressBar.outerHTML} | `;
let downloadLink = downloadLinkWait;
if (cookingTask.status === 'done') {
downloadLink = `
';
+ '">
Download';
} else if (cookingTask.status === 'failed') {
downloadLink = '';
}
@@ -195,7 +195,7 @@
let downloadLink = rowTask.find('.vault-dl-link');
if (cookingTask.status === 'done') {
downloadLink[0].innerHTML = `
';
+ '">
Download';
} else if (cookingTask.status === 'failed') {
downloadLink[0].innerHTML = '';
} else if (cookingTask.status === 'new') {
diff --git a/swh/web/assets/src/bundles/vendors/index.js b/swh/web/assets/src/bundles/vendors/index.js
--- a/swh/web/assets/src/bundles/vendors/index.js
+++ b/swh/web/assets/src/bundles/vendors/index.js
@@ -41,8 +41,7 @@
// web fonts
import 'typeface-alegreya';
import 'typeface-alegreya-sans';
-import 'font-awesome/css/font-awesome.css';
-import './octicons.css';
+import '@mdi/font/css/materialdesignicons.css';
// Monitoring
import '@sentry/browser';
diff --git a/swh/web/assets/src/bundles/vendors/octicons.css b/swh/web/assets/src/bundles/vendors/octicons.css
deleted file mode 100644
--- a/swh/web/assets/src/bundles/vendors/octicons.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Copyright (C) 2019 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
- */
-
-.octicon-git-commit::before {
- display: inline-block;
- width: 14px;
- height: 14px;
- vertical-align: middle;
- text-align: center;
- content: '';
- mask: url('~octicons/build/svg/git-commit.svg') no-repeat 50% 50%;
- mask-size: cover;
- background-color: currentColor;
- margin-left: 2px;
- margin-right: 2px;
-}
diff --git a/swh/web/assets/src/bundles/webapp/webapp.css b/swh/web/assets/src/bundles/webapp/webapp.css
--- a/swh/web/assets/src/bundles/webapp/webapp.css
+++ b/swh/web/assets/src/bundles/webapp/webapp.css
@@ -174,6 +174,10 @@
white-space: pre-wrap;
}
+.swh-list-unstyled {
+ list-style: none;
+}
+
.popover {
max-width: 97%;
z-index: 40000;
@@ -216,8 +220,8 @@
}
a.dropdown-left::before {
- content: "\f0d9";
- font-family: 'FontAwesome';
+ content: "\f035e";
+ font-family: 'Material Design Icons';
display: block;
width: 20px;
height: 20px;
@@ -622,3 +626,46 @@
.swh-badge-rst {
white-space: pre-wrap;
}
+
+/* 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;
+}
diff --git a/swh/web/common/utils.py b/swh/web/common/utils.py
--- a/swh/web/common/utils.py
+++ b/swh/web/common/utils.py
@@ -34,17 +34,17 @@
SWH_WEB_METRICS_REGISTRY = CollectorRegistry(auto_describe=True)
swh_object_icons = {
- "branch": "fa fa-code-fork",
- "branches": "fa fa-code-fork",
- "content": "fa fa-file-text",
- "directory": "fa fa-folder",
- "person": "fa fa-user",
- "revisions history": "fa fa-history",
- "release": "fa fa-tag",
- "releases": "fa fa-tag",
- "revision": "octicon-git-commit",
- "snapshot": "fa fa-camera",
- "visits": "fa fa-calendar",
+ "branch": "mdi mdi-source-branch",
+ "branches": "mdi mdi-source-branch",
+ "content": "mdi mdi-file-document",
+ "directory": "mdi mdi-folder",
+ "person": "mdi mdi-account",
+ "revisions history": "mdi mdi-history",
+ "release": "mdi mdi-tag",
+ "releases": "mdi mdi-tag",
+ "revision": "mdi mdi-rotate-90 mdi-source-commit",
+ "snapshot": "mdi mdi-camera",
+ "visits": "mdi mdi-calendar-month",
}
diff --git a/swh/web/templates/api/apidoc.html b/swh/web/templates/api/apidoc.html
--- a/swh/web/templates/api/apidoc.html
+++ b/swh/web/templates/api/apidoc.html
@@ -15,10 +15,10 @@