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,75 @@
// Font
require('@assets/fonts/icons.font.js');
// create global $ and jQuery variables
$ = require('jquery');
global.$ = global.jQuery = $;
require('@static/js/jquery-ui.1.12.1.js');
require('@static/css/jquery-ui-1.8.16.custom.scss');
//require('@static/bootstrap/bootstrap.scss'); // todo presunuto do style.scss
require('@static/bootstrap/js/bootstrap.js');
require('@static/js/chosen.jquery.js');
require('@static/js/ajax-chosen.js');
require('@static/js/chosen.sortable.js');
require('@static/js/jquery.fs.stepper.min.js');
require('@static/js/bootstrap-filestyle.min.js');
// Custom functions -->
const functions = require('@static/js/functions.js');
// Expose exported to global
(function() {
for (let key in functions) {
if (functions.hasOwnProperty(key)) {
window[key] = functions[key];
}
}
})();
require('@static/js/jquery.history.js');
require('@static/js/jquery.hotkeys.js');
const BigNumber = require('@static/js/bignumber.js');
window.BigNumber = BigNumber;
// Admin autocomplete -->
require('@static/js/wpj.template.js');
require('@static/js/wpj.domUtils.js');
require('@static/js/wpj.autocomplete.js');
require('@static/js/wpj.formUtils.js');
require('@static/js/wpj.windowUtils.js');
require('@static/js/wpj.clipboard.js');
require('@static/js/wpj.buttonLoading.js');
require('@static/js/wpj.translationsFigure.js');
/**
* @typedef WidgetProps require('../../static/sections-autocomplete/index.tsx').WidgetProps
*
* @type {{ prepareRuntime: (runtimeElement?: HTMLElement) => HTMLElement; mountAutocomplete: (target: HTMLElement, options?: WidgetProps) => void }}
*/
wpj.SectionsAutocomplete = require('@static/sections-autocomplete/index.tsx');
wpj.llmModal = require('@static/llm-modal/index.tsx');
// Styles
require('@static/scss/style.scss');
const Favico = require('@static/js/favico.js');
window.FavicoInit = function() {
var bgColor = '#1c6ee8';
var currUrl = window.location.href;
if (currUrl.indexOf('kupshop.local') >= 0) {
bgColor = '#e9573f';
}
var favicon = new Favico({
animation: 'popFade',
bgColor: bgColor
});
favicon.badge('A');
};

View File

@@ -0,0 +1,4 @@
require('@static/scss/board.scss');
require('@static/js/wpj.changelog.js');

View File

@@ -0,0 +1 @@
require('../fonts/icons-sass.font');

View File

@@ -0,0 +1 @@
require('@static/scss/list.scss');

View File

@@ -0,0 +1 @@
require('@static/js/wpj.adminListEdit.js');

View File

@@ -0,0 +1 @@
require('@static/js/translations.js');

View File

@@ -0,0 +1,16 @@
require('@static/scss/window.scss');
require('@static/js/wpj.focus.js');
$(document).ready(function() {
const $lightbox = $('a[data-rel="bigphoto"]');
if ($lightbox.length) {
require('@static/fancybox2/jquery.fancybox.pack.js');
require('@static/fancybox2/jquery.fancybox.css');
$lightbox.fancybox({
openEffect: 'none',
closeEffect: 'none'
});
}
});

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}}