1
0
Fork 0

Adding upstream version 1.9.1+dfsg.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-17 07:10:40 +01:00
parent c6123b914a
commit dafef1aa3b
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
1847 changed files with 36221 additions and 0 deletions

62
build/build-pages.js Normal file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env node
'use strict'
const fs = require('fs').promises
const path = require('path')
const picocolors = require('picocolors')
const iconsDir = path.join(__dirname, '../icons/')
const pagesDir = path.join(__dirname, '../docs/content/icons/')
const VERBOSE = process.argv.includes('--verbose')
function capitalizeFirstLetter(string) {
return (string.charAt(0).toUpperCase() + string.slice(1)).split('-').join(' ')
}
async function main(file) {
const iconBasename = path.basename(file, path.extname(file))
const iconTitle = capitalizeFirstLetter(iconBasename)
const pageName = path.join(pagesDir, `${iconBasename}.md`)
const pageTemplate = `---
title: ${iconTitle}
categories:
tags:
---
`
try {
await fs.access(pageName, fs.F_OK)
if (VERBOSE) {
console.log(`${picocolors.cyan(iconBasename)}: Page already exists; skipping`)
}
} catch {
await fs.writeFile(pageName, pageTemplate)
console.log(picocolors.green(`${iconBasename}: Page created`))
}
}
(async () => {
try {
const basename = path.basename(__filename)
const timeLabel = picocolors.cyan(`[${basename}] finished`)
console.log(picocolors.cyan(`[${basename}] started`))
console.time(timeLabel)
const files = await fs.readdir(iconsDir)
await Promise.all(files.map(file => main(file)))
const filesLength = files.length
console.log(picocolors.green('\nSuccess, %s page%s prepared!'), filesLength, filesLength !== 1 ? 's' : '')
console.timeEnd(timeLabel)
} catch (error) {
console.error(error)
process.exit(1)
}
})()

55
build/build-svgs.js Normal file
View file

@ -0,0 +1,55 @@
#!/usr/bin/env node
'use strict'
const fs = require('fs').promises
const path = require('path')
const process = require('process')
const picocolors = require('picocolors')
const { loadConfig, optimize } = require('svgo')
const iconsDir = path.join(__dirname, '../icons/')
const VERBOSE = process.argv.includes('--verbose')
async function processFile(file, config) {
const filepath = path.join(iconsDir, file)
const basename = path.basename(file, '.svg')
const originalSvg = await fs.readFile(filepath, 'utf8')
const { data: optimizedSvg } = await optimize(originalSvg, { path: filepath, ...config })
// svgo will always add a final newline when in pretty mode
const resultSvg = optimizedSvg.trim()
if (resultSvg !== originalSvg) {
await fs.writeFile(filepath, resultSvg, 'utf8')
}
if (VERBOSE) {
console.log(`- ${basename}`)
}
}
(async () => {
try {
const basename = path.basename(__filename)
const timeLabel = picocolors.cyan(`[${basename}] finished`)
console.log(picocolors.cyan(`[${basename}] started`))
console.time(timeLabel)
const files = await fs.readdir(iconsDir)
const config = await loadConfig(path.join(__dirname, '../svgo.config.js'))
await Promise.all(files.map(file => processFile(file, config)))
const filesLength = files.length
console.log(picocolors.green('\nSuccess, prepared %s icon%s!'), filesLength, filesLength !== 1 ? 's' : '')
console.timeEnd(timeLabel)
} catch (error) {
console.error(error)
process.exit(1)
}
})()

24
build/font/css.hbs Normal file
View file

@ -0,0 +1,24 @@
@font-face {
font-display: block;
font-family: "{{ name }}";
src: {{{ fontSrc }}};
}
.{{prefix}}::before,
[class^="{{prefix}}-"]::before,
[class*=" {{prefix}}-"]::before {
display: inline-block;
font-family: {{ name }} !important;
font-style: normal;
font-weight: normal !important;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: -.125em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
{{# each codepoints }}
.{{ ../prefix }}-{{ @key }}::before { content: "\\{{ codepoint this }}"; }
{{/ each }}

53
build/font/html.hbs Normal file
View file

@ -0,0 +1,53 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ name }}</title>
<style>
.icons {
display: grid;
max-width: 100%;
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr) );
gap: 1.25rem;
}
.icon {
background-color: var(--bs-light);
border-radius: .25rem;
}
.bi {
margin: .25rem;
font-size: 2.5rem;
}
.label {
font-family: var(--bs-font-monospace);
}
.label {
display: inline-block;
width: 100%;
overflow: hidden;
padding: .25rem;
font-size: .625rem;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<link rel="stylesheet" href="/assets/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ name }}.css">
</head>
<body class="text-center">
<h1>{{ name }}</h1>
<div class="icons">
{{# each assets }}
<div class="icon">
<{{ ../tag }} class="{{ ../prefix }} {{ ../prefix }}-{{ @key }}"></{{ ../tag }}>
<div class="label">{{ @key }}</div>
</div>
{{/ each }}
</div>
</body>
</html>

36
build/font/scss.hbs Normal file
View file

@ -0,0 +1,36 @@
${{ name }}-font: "{{ name }}" !default;
${{ name }}-font-dir: "{{ fontsUrl }}" !default;
${{ name }}-font-file: #{${{ name }}-font-dir}/#{${{ name }}-font} !default;
${{ name }}-font-hash: "8d200481aa7f02a2d63a331fc782cfaf" !default;
${{ name }}-font-src: url("#{${{ name }}-font-file}.woff2?#{${{ name }}-font-hash}") format("woff2"), url("#{${{ name }}-font-file}.woff?#{${{ name }}-font-hash}") format("woff") !default;
@font-face {
font-display: block;
font-family: ${{ name }}-font;
src: ${{ name }}-font-src;
}
.{{prefix}}::before,
[class^="{{prefix}}-"]::before,
[class*=" {{prefix}}-"]::before {
display: inline-block;
font-family: ${{ name }}-font !important;
font-style: normal;
font-weight: normal !important;
font-variant: normal;
text-transform: none;
line-height: 1;
vertical-align: -.125em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
${{ name }}-map: (
{{# each codepoints }}
"{{ @key }}": "\\{{ codepoint this }}",
{{/ each }}
);
{{# each codepoints }}
.{{ ../prefix }}-{{ @key }}::before { content: map-get(${{ ../name }}-map, "{{ @key }}"); }
{{/ each }}

48
build/vnu-jar.js Normal file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env node
/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
'use strict'
const { execFile, spawn } = require('child_process')
const vnu = require('vnu-jar')
execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) {
console.error('Skipping vnu-jar test; Java is missing.')
return
}
const is32bitJava = !/64-Bit/.test(stderr)
// vnu-jar accepts multiple ignores joined with a `|`.
// Also note that the ignores are string regular expressions.
const ignores = [
].join('|')
const args = [
'-jar',
`"${vnu}"`,
'--asciiquotes',
'--skip-non-html',
'--Werror',
`--filterpattern "${ignores}"`,
'_site/'
]
// For the 32-bit Java we need to pass `-Xss512k`
if (is32bitJava) {
args.splice(0, 0, '-Xss512k')
}
return spawn('java', args, {
shell: true,
stdio: 'inherit'
})
.on('exit', process.exit)
})