diff --git a/assets/config/webpack.config.development.js b/assets/config/webpack.config.development.js index 0c3a5aae..090ff97e 100644 --- a/assets/config/webpack.config.development.js +++ b/assets/config/webpack.config.development.js @@ -1,451 +1,452 @@ /** * Copyright (C) 2018-2021 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 */ // webpack configuration for compiling static assets in development mode // import required node modules and webpack plugins const chalk = require('chalk'); const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); const BundleTracker = require('webpack-bundle-tracker'); const RobotstxtPlugin = require('robotstxt-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin').CleanWebpackPlugin; const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const FixSwhSourceMapsPlugin = require('./webpack-plugins/fix-swh-source-maps-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const GenerateWebLabelsPlugin = require('./webpack-plugins/generate-weblabels-webpack-plugin'); const ProgressBarPlugin = require('progress-bar-webpack-plugin'); const DumpHighlightjsLanguagesDataPlugin = require('./webpack-plugins/dump-highlightjs-languages-data-plugin'); const ESLintPlugin = require('eslint-webpack-plugin'); // are we running webpack-dev-server ? const isDevServer = process.argv.find(v => v.includes('serve')) !== undefined; // webpack-dev-server configuration const devServerPort = 3000; const devServerPublicPath = 'http://localhost:' + devServerPort + '/static/'; // set publicPath according if we are using webpack-dev-server to serve // our assets or not const publicPath = isDevServer ? devServerPublicPath : '/static/'; const nodeModules = path.resolve(__dirname, '../../node_modules/'); // collect all bundles we want to produce with webpack var bundles = {}; const bundlesDir = path.join(__dirname, '../src/bundles'); fs.readdirSync(bundlesDir).forEach(file => { bundles[file] = ['bundles/' + file + '/index.js']; }); // common loaders for css related assets (css, sass) const cssLoaders = [ MiniCssExtractPlugin.loader, { loader: 'cache-loader' }, { loader: 'css-loader', options: { sourceMap: !isDevServer } }, { loader: 'postcss-loader', options: { sourceMap: !isDevServer, postcssOptions: { plugins: [ // lint swh-web stylesheets ['stylelint', { 'config': { 'extends': 'stylelint-config-standard', 'rules': { 'indentation': 4, 'font-family-no-missing-generic-family-keyword': null, - 'no-descending-specificity': null + 'no-descending-specificity': null, + 'selector-class-pattern': null }, 'ignoreFiles': ['node_modules/**/*.css', 'assets/src/thirdparty/**/*.css'] } }], // automatically add vendor prefixes to css rules 'autoprefixer', 'postcss-normalize', ['postcss-reporter', { clearReportedMessages: true }] ] } } } ]; // webpack development configuration module.exports = { // use caching to speedup incremental builds cache: { type: 'memory' }, // set mode to development mode: 'development', // workaround for https://github.com/webpack/webpack-dev-server/issues/2758 target: process.env.NODE_ENV === 'development' ? 'web' : 'browserslist', // use eval source maps when using webpack-dev-server for quick debugging, // otherwise generate source map files (more expensive) devtool: isDevServer ? 'eval' : 'source-map', // webpack-dev-server configuration devServer: { client: { logging: 'warn', overlay: { warnings: true, errors: true }, progress: true }, devMiddleware: { publicPath: devServerPublicPath, stats: 'errors-only' }, host: '0.0.0.0', port: devServerPort, // enable to serve static assets not managed by webpack static: { directory: path.resolve('./'), watch: { ignored: /node_modules/ } }, // we do not use hot reloading here (as a framework like React needs to be used in order to fully benefit from that feature) // and prefer to fully reload the frontend application in the browser instead hot: false, historyApiFallback: true, headers: { 'Access-Control-Allow-Origin': '*' } }, // set entries to the bundles we want to produce entry: bundles, // assets output configuration output: { path: path.resolve('./static/'), filename: 'js/[name].[contenthash].js', chunkFilename: 'js/[name].[contenthash].js', publicPath: publicPath, // each bundle will be compiled as a umd module with its own namespace // in order to easily use them in django templates library: ['swh', '[name]'], libraryTarget: 'umd' }, // module resolving configuration resolve: { // alias pdfjs to its minified version alias: { 'pdfjs-dist': 'pdfjs-dist/build/pdf.min.js' }, // configure base paths for resolving modules with webpack modules: [ 'node_modules', path.resolve(__dirname, '../src') ] }, stats: 'errors-warnings', // module import configuration module: { rules: [ { // Use babel-loader in order to use es6 syntax in js files // but also advanced js features like async/await syntax. // All code get transpiled to es5 in order to be executed // in a large majority of browsers. test: /\.js$/, exclude: /node_modules/, use: [ { loader: 'cache-loader' }, { loader: 'babel-loader', options: { presets: [ // use env babel presets to benefit from es6 syntax ['@babel/preset-env', { // Do not transform es6 module syntax to another module type // in order to benefit from dead code elimination (aka tree shaking) // when running webpack in production mode 'loose': true, 'modules': false }] ], plugins: [ // use babel transform-runtime plugin in order to use aync/await syntax ['@babel/plugin-transform-runtime', { 'regenerator': true }], // use other babel plugins to benefit from advanced js features (es2017) '@babel/plugin-syntax-dynamic-import' ], env: { test: { plugins: ['istanbul'] } } } }] }, { test: /\.ejs$/, use: [{ loader: 'ejs-compiled-loader', options: { htmlmin: true, htmlminOptions: { removeComments: true } } }] }, // expose jquery to the global context as $ and jQuery when importing it { test: require.resolve('jquery'), use: [{ loader: 'expose-loader', options: { exposes: [ { globalName: '$', override: true }, { globalName: 'jQuery', override: true } ] } }] }, // expose highlightjs to the global context as hljs when importing it { test: require.resolve('highlight.js'), use: [{ loader: 'expose-loader', options: { exposes: { globalName: 'hljs', override: true } } }] }, // css import configuration: // - first process it with postcss // - then extract it to a dedicated file associated to each bundle { test: /\.css$/, use: cssLoaders }, // sass import configuration: // - generate css with sass-loader // - process it with postcss // - then extract it to a dedicated file associated to each bundle { test: /\.scss$/, use: cssLoaders.concat([ { loader: 'sass-loader', options: { sourceMap: !isDevServer } } ]) }, // web fonts import configuration { test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource', generator: { filename: 'fonts/[name][ext][query]' } }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource', generator: { filename: 'fonts/[name][ext][query]' } }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource', generator: { filename: 'fonts/[name][ext][query]' } }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource', generator: { filename: 'fonts/[name][ext][query]' } }, { test: /\.otf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource', generator: { filename: 'fonts/[name][ext][query]' } }, { test: /\.png$/, type: 'asset/resource', generator: { filename: 'img/thirdParty/[name][ext][query]' } }, { test: /\.ya?ml$/, type: 'json', use: 'yaml-loader' } ], // tell webpack to not parse already minified files to speedup build process noParse: [path.resolve(nodeModules, 'pdfjs-dist/build/pdf.min.js'), path.resolve(nodeModules, 'mathjax/es5/tex-mml-chtml.js')] }, // webpack plugins plugins: [ // cleanup previously generated assets new CleanWebpackPlugin({ cleanOnceBeforeBuildPatterns: ['**/*', '!xml', '!xml/*', '!img', '!img/*', '!img/logos', '!img/logos/*', '!img/icons', '!img/icons/*', '!json', '!json/*'] }), // needed in order to use django_webpack_loader new BundleTracker({ filename: './static/webpack-stats.json' }), // for generating the robots.txt file new RobotstxtPlugin({ policy: [{ userAgent: '*', disallow: '/api/' }] }), // for extracting all stylesheets in separate css files new MiniCssExtractPlugin({ filename: 'css/[name].[contenthash].css', chunkFilename: 'css/[name].[contenthash].css' }), // fix generated asset sourcemaps to workaround a Firefox issue new FixSwhSourceMapsPlugin(), // define some global variables accessible from js code new webpack.DefinePlugin({ __STATIC__: JSON.stringify(publicPath) }), // needed in order to use bootstrap 4.x new webpack.ProvidePlugin({ Popper: ['popper.js', 'default'], Alert: 'exports-loader?Alert!bootstrap/js/dist/alert', Button: 'exports-loader?Button!bootstrap/js/dist/button', Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel', Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse', Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown', Modal: 'exports-loader?Modal!bootstrap/js/dist/modal', Popover: 'exports-loader?Popover!bootstrap/js/dist/popover', Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy', Tab: 'exports-loader?Tab!bootstrap/js/dist/tab', Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip', Util: 'exports-loader?Util!bootstrap/js/dist/util' }), // needed in order to use pdf.js new webpack.IgnorePlugin({resourceRegExp: /^\.\/pdf.worker.js$/}), new CopyWebpackPlugin({ patterns: [ { from: path.resolve(nodeModules, 'pdfjs-dist/build/pdf.worker.min.js'), to: path.resolve(__dirname, '../../static/js/') }, { from: path.resolve(nodeModules, 'mathjax/es5/output/chtml/fonts/woff-v2/**'), to: path.resolve(__dirname, '../../static/fonts/[name][ext]') } ] }), new GenerateWebLabelsPlugin({ outputType: 'json', exclude: ['mini-css-extract-plugin', 'bootstrap-loader'], srcReplace: { './node_modules/pdfjs-dist/build/pdf.min.js': './node_modules/pdfjs-dist/build/pdf.js', './node_modules/admin-lte/dist/js/adminlte.min.js': './node_modules/admin-lte/dist/js/adminlte.js' }, licenseOverride: { './assets/src/thirdparty/jquery.tabSlideOut/jquery.tabSlideOut.js': { 'spdxLicenseExpression': 'GPL-3.0', 'licenseFilePath': './assets/src/thirdparty/jquery.tabSlideOut/LICENSE' } }, additionalScripts: Object.assign( { 'js/pdf.worker.min.js': [ { 'id': 'pdfjs-dist/build/pdf.worker.js', 'path': './node_modules/pdfjs-dist/build/pdf.worker.js', 'spdxLicenseExpression': 'Apache-2.0', 'licenseFilePath': './node_modules/pdfjs-dist/LICENSE' } ], '/jsreverse/': [ { 'id': 'jsreverse', 'path': '/jsreverse/', 'spdxLicenseExpression': 'AGPL-3.0-or-later', 'licenseFilePath': './LICENSE' } ], 'https://piwik.inria.fr/matomo.js': [ { 'id': 'matomo.js', 'path': 'https://github.com/matomo-org/matomo/blob/master/js/piwik.js', 'spdxLicenseExpression': 'BSD-3-Clause', 'licenseFilePath': 'https://github.com/matomo-org/matomo/blob/master/js/LICENSE.txt' } ] } ) }), new ProgressBarPlugin({ format: chalk.cyan.bold('webpack build of swh-web assets') + ' [:bar] ' + chalk.green.bold(':percent') + ' (:elapsed seconds)', width: 50 }), new DumpHighlightjsLanguagesDataPlugin(), // Process all js files with eslint for consistent code style // and avoid bad js development practices. new ESLintPlugin({ overrideConfigFile: path.join(__dirname, '.eslintrc'), ignorePath: path.join(__dirname, '.eslintignore'), cache: true, emitWarning: true }) ], // webpack optimizations optimization: { // ensure the vendors bundle gets emitted in a single chunk splitChunks: { cacheGroups: { defaultVendors: { test: 'vendors', chunks: 'all', name: 'vendors', enforce: true } } } }, // disable webpack warnings about bundle sizes performance: { hints: false } }; diff --git a/assets/src/bundles/browse/snapshot-navigation.css b/assets/src/bundles/browse/snapshot-navigation.css index 7c0109b1..ede7c1bf 100644 --- a/assets/src/bundles/browse/snapshot-navigation.css +++ b/assets/src/bundles/browse/snapshot-navigation.css @@ -1,49 +1,49 @@ /** - * Copyright (C) 2018-2019 The Software Heritage developers + * Copyright (C) 2018-2021 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-browse-top-navigation { - padding: 4px 5px 7px 5px; + padding: 4px 5px 7px; } .swh-branches-releases { min-width: 200px; } .swh-branches-switch, .swh-releases-switch { padding: 5px 15px !important; } li.swh-branch:hover, li.swh-release:hover { background-color: #e8e8e8; } .swh-branch a:hover, .swh-release a:hover { text-decoration: none; } .swh-origin-visit-details, .swh-snapshot-details { text-align: center; } .swh-origin-visit-details ul, .swh-snapshot-details ul { list-style: none; margin: 0; padding: 0; } .swh-origin-visit-details li, .swh-snapshot-details li { display: inline-block; vertical-align: middle; margin-left: 10px; margin-right: 10px; } diff --git a/assets/src/bundles/origin/visits-reporting.css b/assets/src/bundles/origin/visits-reporting.css index ee292e07..c654f4f5 100644 --- a/assets/src/bundles/origin/visits-reporting.css +++ b/assets/src/bundles/origin/visits-reporting.css @@ -1,108 +1,108 @@ /** * Copyright (C) 2018-2021 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-visit-icon { left: -20px; top: -2px; position: relative; } .swh-visit-icon::before { - font-family: 'Material Design Icons'; + font-family: "Material Design Icons"; margin-right: 3px; vertical-align: bottom; } .swh-visit-full { color: green; } .swh-visit-full::before { /* mdi-check-bold */ - content: '\f0e1e'; + content: "\f0e1e"; } .swh-visit-partial { color: #edc344; } .swh-visit-partial::before { /* mdi-alter */ - content: '\f0026'; + content: "\f0026"; } .swh-visit-failed { color: #f00; } .swh-visit-failed::before { /* mdi-close-thick */ - content: '\f1398'; + content: "\f1398"; } .swh-visit-ongoing { color: #00f; } .swh-visit-ongoing::before { /* mdi-sync */ - content: '\f04e6'; + content: "\f04e6"; } .swh-visit-created { color: #7d8080; } .swh-visit-created::before { /* mdi-camera-plus */ - content: '\f0edb'; + content: "\f0edb"; } .swh-visit-not_found { color: #000; } .swh-visit-not_found::before { /* mdi-web-off */ - content: '\f0a8e'; + content: "\f0a8e"; } #swh-visits-calendar.calendar { min-height: 700px; overflow: visible; } #swh-visits-calendar.calendar table td { width: 28px; height: 28px; padding: 0; } svg .grid line { stroke: lightgrey; stroke-opacity: 0.7; shape-rendering: crispEdges; } svg .grid path { stroke-width: 0; } .swh-visits-list-column { float: left; padding: 10px; } .swh-visits-list-row { padding-left: 50px; } .swh-visits-list-row::after { content: ""; display: table; clear: both; } diff --git a/assets/src/bundles/revision/revision.css b/assets/src/bundles/revision/revision.css index 824605af..5d37ae5e 100644 --- a/assets/src/bundles/revision/revision.css +++ b/assets/src/bundles/revision/revision.css @@ -1,56 +1,56 @@ /** - * Copyright (C) 2018 The Software Heritage developers + * Copyright (C) 2018-2021 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-diff-lines-info { - background-color: rgba(0, 0, 255, 0.1) !important; + background-color: rgb(0 0 255 / 10%) !important; } .swh-diff-added-line { - background-color: rgba(0, 255, 0, 0.1) !important; + background-color: rgb(0 255 0 / 10%) !important; } .swh-diff-removed-line { - background-color: rgba(255, 0, 0, 0.1) !important; + background-color: rgb(255 0 0 / 10%) !important; } span.no-nl-marker { position: relative; color: #cb2431; vertical-align: middle; } span.no-nl-marker svg { vertical-align: text-bottom; } span.no-nl-marker svg path { fill: currentColor; } .swh-revision-log-entry-id { min-width: 110px; max-width: 110px; width: 110px; } .swh-revision-log-entry-author { min-width: 160px; max-width: 160px; width: 160px; } .swh-revision-log-entry-date { min-width: 200px; max-width: 200px; width: 200px; } .swh-revision-log-entry-commit-date { min-width: 200px; max-width: 200px; width: 200px; } diff --git a/assets/src/bundles/vendors/datatables.css b/assets/src/bundles/vendors/datatables.css index 932dbaac..eb576d64 100644 --- a/assets/src/bundles/vendors/datatables.css +++ b/assets/src/bundles/vendors/datatables.css @@ -1,50 +1,50 @@ /** - * Copyright (C) 2018 The Software Heritage developers + * Copyright (C) 2018-2021 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 */ .dataTables_filter { margin-top: 15px; } .dataTables_filter input { width: 70%; float: right; } .dataTables_filter label { font-weight: bold !important; white-space: inherit !important; } .dataTables_wrapper { position: static; } .swh-table.dataTable { border-collapse: collapse !important; } .swh-table.dataTable th { border-top: none; } .swh-table.dataTable tr.selected { background: #fecd1b; } .page-item.active .page-link { - color: rgba(0, 0, 0, 0.75); + color: rgb(0 0 0 / 75%); background-color: #e9ecef; border-color: #dee2e6; } .dataTables_scrollBody .swh-table.dataTable thead { border-top: none; } .dataTables_scrollBody { min-height: 300px; } diff --git a/assets/src/bundles/webapp/breadcrumbs.css b/assets/src/bundles/webapp/breadcrumbs.css index 51e655b7..d08caed0 100644 --- a/assets/src/bundles/webapp/breadcrumbs.css +++ b/assets/src/bundles/webapp/breadcrumbs.css @@ -1,32 +1,32 @@ /** - * Copyright (C) 2018 The Software Heritage developers + * Copyright (C) 2018-2021 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 */ .bread-crumbs { display: inline-block; overflow: hidden; - color: rgba(0, 0, 0, 0.55); + color: rgb(0 0 0 / 55%); } .bread-crumbs ul { list-style-type: none; height: 100%; } .bread-crumbs li { float: left; list-style-type: none; } .bread-crumbs a { - color: rgba(0, 0, 0, 0.75); + color: rgb(0 0 0 / 75%); border-bottom-style: none; } .bread-crumbs a:hover { - color: rgba(0, 0, 0, 0.85); + color: rgb(0 0 0 / 85%); text-decoration: underline; } diff --git a/assets/src/bundles/webapp/notebook.css b/assets/src/bundles/webapp/notebook.css index a09c1dac..8dd94afc 100644 --- a/assets/src/bundles/webapp/notebook.css +++ b/assets/src/bundles/webapp/notebook.css @@ -1,155 +1,155 @@ /** - * Copyright (C) 2019 The Software Heritage developers + * Copyright (C) 2019-2021 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 */ /* Adapted from https://github.com/jsvine/nbpreview/blob/master/css/vendor/notebook.css */ .nb-notebook { line-height: 1.5; padding-left: 6em; overflow-y: hidden; } .nb-worksheet { width: 99%; } .nb-stdout, .nb-stderr { white-space: pre-wrap; margin: 1em 0; padding: 0.1em 0.5em; } .nb-stderr { background-color: #faa; } .nb-cell + .nb-cell { margin-top: 0.5em; } .nb-output table { border: 1px solid #000; border-collapse: collapse; } .nb-output th { font-weight: bold; } .nb-output th, .nb-output td { border: 1px solid #000; padding: 0.25em; text-align: left; vertical-align: middle; border-collapse: collapse; } .nb-cell { position: relative; } .nb-raw-cell { white-space: pre-wrap; background-color: #f5f2f0; - font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-family: Consolas, Monaco, "Andale Mono", monospace; padding: 1em; margin: 0 0.5em; } .nb-input { border: 1px solid #cfcfcf; border-radius: 2px; background: #f7f7f7; margin: 0.4em; padding: 0; } .nb-notebook pre { margin: 0.4em !important; border: none; padding: 0; background-color: transparent; min-height: 1rem; } .nb-output { min-height: 1em; overflow-x: auto; margin-left: 0.5em; margin-right: 0.5em; } .nb-output img { max-width: 100%; } .nb-output::before, .nb-input::before { position: absolute; font-family: monospace; color: #999; left: -7.5em; width: 7em; text-align: right; font-size: 14px; } .nb-input::before { content: "In [" attr(data-prompt-number) "]:"; color: #303f9f; } .nb-output::before { content: "Out [" attr(data-prompt-number) "]:"; color: #d84315; } .nb-latex-output .MathJax_Display { text-align: left !important; } .nb-markdown-cell, .nb-heading-cell { margin-left: 1em; margin-right: 1em; } .nb-code-cell { margin: 0.4em; } .nb-output pre { margin-top: 0.2em !important; } @media screen and (max-width: 600px) { .nb-notebook { padding-left: 0; } .nb-input { margin-top: 2em !important; } .nb-output::before, .nb-input::before { text-align: left; } .nb-input::before { left: 0.5em; top: -2em; } .nb-output::before { position: relative; left: 0; top: 0; } } diff --git a/assets/src/bundles/webapp/webapp.css b/assets/src/bundles/webapp/webapp.css index 0b5f2a9e..2f8e6c39 100644 --- a/assets/src/bundles/webapp/webapp.css +++ b/assets/src/bundles/webapp/webapp.css @@ -1,750 +1,750 @@ /** * Copyright (C) 2018-2021 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; } 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 rgba(0, 0, 0, 0.2); + 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: rgba(0, 0, 0, 0.75); + 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; + 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: rgba(0, 0, 0, 0.1); + 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-style: solid; border-bottom-width: 5px; border-image: linear-gradient( to right, - rgb(226, 0, 38) 0%, - rgb(254, 205, 27) 100% + rgb(226 0 38) 0%, + rgb(254 205 27) 100% ) 1 1 1 1; width: 100%; padding: 5px; margin-bottom: 10px; margin-top: 30px; 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-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: 30px; } .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: rgba(0, 0, 0, 0.55); + 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: rgba(0, 0, 0, 0.75); + 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; } 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 { 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 rgba(0, 0, 0, 0.3); + box-shadow: 0 0 3px rgb(0 0 0 / 30%); top: 55px; 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%; } diff --git a/assets/src/utils/org.css b/assets/src/utils/org.css index bff0407e..ec444a54 100644 --- a/assets/src/utils/org.css +++ b/assets/src/utils/org.css @@ -1,51 +1,51 @@ /** - * Copyright (C) 2018 The Software Heritage developers + * Copyright (C) 2018-2021 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-org dl dd { margin-left: 9px; } .swh-org table, .swh-org img { margin-bottom: 1rem; } .swh-org table, .swh-org table th, .swh-org table td { padding: 6px 13px; border: 1px solid #dfe2e5; } .swh-org table tr:nth-child(even) { background-color: #f2f2f2; } .swh-org span.task-status { padding: 0 0.2em; margin-right: 10px; color: white; } .swh-org span.task-status.todo { color: white; - background-color: rgb(39, 149, 182); + background-color: rgb(39 149 182); } .swh-org span.task-status.done { color: white; - background-color: rgb(81, 143, 31); + background-color: rgb(81 143 31); } .swh-org .section-number { padding-right: 5px; font-weight: bold; } .swh-org .org-subscript-child { font-size: 85%; }