first commit

This commit is contained in:
2025-08-02 16:30:27 +02:00
commit 23646bfcee
14851 changed files with 1750626 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
@font-face {
font-family: "{{fontName}}";
src: {{{src}}};
}
{{baseSelector}}:before {
display: inline-block;
font-family: {{fontName}};
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: 1;
text-decoration: inherit;
text-rendering: optimizeLegibility;
text-transform: none;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
width: 1em;
height: 1em;
}
{{#each codepoints}}
.{{../classPrefix}}{{@key}}:before {
content: "\\{{this}}";
}
{{/each}}

View File

@@ -0,0 +1,35 @@
<style>
.preview {
margin: 5px 0;
}
.preview__icon {
margin-right: 10px;
}
.preview__list {
column-count: 3;
font-size: 20px;
}
/* @formatter:off */
.preview__list {{baseSelector}} {
background: #eee;
}
{{{styles}}}
/* @formatter:on */
</style>
<h1 class="text-center m-b-1">{{fontName}}</h1>
<div class="preview__list">
{{#each names}}
<div class="preview">
<span class="preview__icon">
<span class="fc {{../classPrefix}}{{this}}"></span>
</span>
<span>{{this}}</span>
</div>
{{/each}}
</div>

View File

@@ -0,0 +1,31 @@
const process = require('process');
const fs = require('fs');
const path = require('path');
const currDir = process.cwd();
let icons = [];
let iconsNames = [];
if (fs.existsSync(currDir + '/templates/icons/')) {
const filesShop = fs.readdirSync(currDir + '/templates/icons/');
filesShop.forEach(file => {
if (path.extname(file) === '.svg') {
icons.push(currDir + '/templates/icons/' + file);
iconsNames.push(file);
}
});
}
if (fs.existsSync(currDir + '/admin/static/icons/')) {
const filesEngine = fs.readdirSync(currDir + '/admin/static/icons/');
filesEngine.forEach(file => {
if (path.extname(file) === '.svg' && !iconsNames.includes(file)) {
icons.push(currDir + '/admin/static/icons/' + file);
}
});
}
module.exports = icons;

View File

@@ -0,0 +1,19 @@
const icons = require('./icons-merge');
const handlebars = require('handlebars');
handlebars.registerHelper('toHex', int => {
return '\\' + int.toString(16);
});
module.exports = {
'files': icons,
'fontName': '_icons',
'types': [],
'emitCodepoints': [{fileName:'icons-list.json', type: 'json'}],
'html': true,
'htmlDest': '_icons.scss',
'htmlTemplate': 'scss.hbs',
'cssTemplate': 'scss.hbs',
'classPrefix': '',
'baseSelector': '.fc',
};

View File

@@ -0,0 +1,14 @@
const icons = require('./icons-merge');
// const Encore = require('@symfony/webpack-encore');
// const filename = Encore.isProduction() ? 'app.[fontname].[chunkhash].[ext]' : 'app.[fontname].[ext]';
const filename = 'app.[fontname].[chunkhash].[ext]';
module.exports = {
files: icons,
fontName: 'icons',
classPrefix: '',
baseSelector: '.fc',
types: ['woff2', 'woff'],
fileName: filename,
cssTemplate: './css.hbs'
};

View File

@@ -0,0 +1,4 @@
[{"name":"Bez ikony", "value":"","icon":""}
{{#each names}}
,{"name":"{{this}}", "value":"{{this}}","icon":"{{../classPrefix}}{{this}}"}
{{/each}}]

View File

@@ -0,0 +1,30 @@
$webfont-icons: () !default;
$webfont-icons: map-merge($webfont-icons, (
{{#each codepoints}}
'{{@key}}': ('icons' '{{this}}'),
{{/each}}
));
@mixin webfont-icon($name) {
line-height: 1;
$icon: map-get($webfont-icons, $name);
&:before {
font-family: nth($icon, 1) !important;
font-style: normal;
font-weight: normal !important;
vertical-align: top;
content: str-slice('\x', 1, 1) + nth($icon, 2);
}
}
@mixin webfont-content($name) {
$icon: map-get($webfont-icons, $name);
content: str-slice('\x', 1, 1) + nth($icon, 2);
}
{{#each codepoints}}
${{@key}}: '{{toHex this}}';
{{/each}}