@total_onion/onion-library 1.0.245 → 1.0.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/block-post-info-v3/post-info-v3/post-categories.twig +2 -2
- package/components/block-post-info-v3/post-info-v3.twig +2 -1
- package/components/fields-core-wordpress-block-editor-preview-v3/core-wordpress-block-editor-preview-v3.scss +3 -8
- package/createDynamicBlockScss-v3.js +4 -5
- package/createJsAssets-v3.js +40 -0
- package/package.json +1 -1
- package/createJsAssets.js +0 -27
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
{{gridLayoutElement}}
|
|
11
11
|
}
|
|
12
12
|
</style>
|
|
13
|
-
<div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{block.id}}">
|
|
14
|
-
<{{elementType|default('p')}} class="{{blockClassName}}__post-categories {{
|
|
13
|
+
<div class="{{blockClassName}}__content-container {{blockClassName}}__post-categories {{blockClassName}}__info-item {{textEditorContainerClasses}} {{block.id}}">
|
|
14
|
+
<{{elementType|default('p')}} class="{{blockClassName}}__post-categories {{field.text_style.typography_style|ru}} {{block.id}}" data-pattern-post-info="post_categories.0.name">{{post.categories.0.name}}</{{elementType|default('p')}}>
|
|
15
15
|
</div>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
3
|
-
@use '
|
|
4
|
-
@use 'Assets/scss/theme/font-face';
|
|
5
|
-
@use 'Assets/scss/theme/typography';
|
|
6
|
-
@use 'NodeModules/swiper/swiper-bundle';
|
|
1
|
+
@use '../fields-core-typography-mixins-v3/core-typography-mixins-v3';
|
|
2
|
+
@use '../fields-core-critical-v3/core-critical-v3';
|
|
3
|
+
@use '../../public/dynamicBlockScss-v3.scss';
|
|
7
4
|
@include core-critical-v3.coreCriticalV3();
|
|
8
5
|
|
|
9
6
|
/* Box sizing rules */
|
|
@@ -33,8 +30,6 @@ html :where([style*='border-width'][data-assetkey]) {
|
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
.acf-block-component.acf-block-body .acf-block-preview {
|
|
36
|
-
@include typography.typography();
|
|
37
|
-
|
|
38
33
|
.swiper {
|
|
39
34
|
&::before {
|
|
40
35
|
content: '';
|
|
@@ -6,17 +6,16 @@ const themePath =
|
|
|
6
6
|
process.env.THEME_PATH || 'web/wp-content/themes/global-theme';
|
|
7
7
|
|
|
8
8
|
// Create the directory path for the target file
|
|
9
|
-
const scssModulePath = path.join(
|
|
9
|
+
const scssModulePath = path.join(
|
|
10
|
+
'./node_modules/@total_onion/onion-library/public'
|
|
11
|
+
);
|
|
10
12
|
const scssFilePath = path.join(scssModulePath, 'dynamicBlockScss-v3.scss');
|
|
11
13
|
|
|
12
14
|
// Create directories if they don't exist
|
|
13
15
|
fs.mkdirSync(scssModulePath, {recursive: true});
|
|
14
16
|
|
|
15
17
|
// Write the initial content to the target file
|
|
16
|
-
fs.writeFileSync(
|
|
17
|
-
scssFilePath,
|
|
18
|
-
'// This file is auto-generated. To include assets for the lazyloader, just add your .scss file to Assets/scss/blocks/ and it will be included here.\n'
|
|
19
|
-
);
|
|
18
|
+
fs.writeFileSync(scssFilePath, '// This file is auto-generated.\n');
|
|
20
19
|
|
|
21
20
|
const dynamicEntryPoints = globSync(
|
|
22
21
|
`${themePath}/node_modules/@total_onion/onion-library/components/block-*/*-v3.scss`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const {globSync} = require('glob');
|
|
4
|
+
|
|
5
|
+
const dynamicEntryPoints = globSync(
|
|
6
|
+
`./node_modules/@total_onion/onion-library/components/block-*/*.js`
|
|
7
|
+
).map((filePath) => {
|
|
8
|
+
const assetKey = path.basename(filePath, '.js');
|
|
9
|
+
return assetKey;
|
|
10
|
+
});
|
|
11
|
+
const assetArray = dynamicEntryPoints.map((entry) => {
|
|
12
|
+
return {assetKey: entry};
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Create the directory path for the target file
|
|
16
|
+
const jsModulePath = path.join(
|
|
17
|
+
'./node_modules/@total_onion/onion-library/public'
|
|
18
|
+
);
|
|
19
|
+
const jsAssetsFilePath = path.join(jsModulePath, 'jsAssets.mjs');
|
|
20
|
+
|
|
21
|
+
// Create directories if they don't exist
|
|
22
|
+
fs.mkdirSync(jsModulePath, {recursive: true});
|
|
23
|
+
|
|
24
|
+
// Write the initial content to the target file
|
|
25
|
+
fs.writeFileSync(
|
|
26
|
+
jsAssetsFilePath,
|
|
27
|
+
'// This file is auto-generated. To include assets for the lazyloader, just add your .scss file to Assets/scss/blocks/ and it will be included here.\n'
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// Create directories if they don't exist
|
|
31
|
+
const dirPath = path.dirname(jsAssetsFilePath);
|
|
32
|
+
fs.mkdirSync(dirPath, {recursive: true});
|
|
33
|
+
|
|
34
|
+
const data = `
|
|
35
|
+
const dynamicAssets = ${JSON.stringify(assetArray)};
|
|
36
|
+
const api = {dynamicAssets};
|
|
37
|
+
export default api;
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
fs.writeFileSync(jsAssetsFilePath, data);
|
package/package.json
CHANGED
package/createJsAssets.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const {globSync} = require('glob');
|
|
4
|
-
|
|
5
|
-
const dynamicEntryPoints = globSync(`./components/block-*/*.js`).map(
|
|
6
|
-
(filePath) => {
|
|
7
|
-
const assetKey = path.basename(filePath, '.js');
|
|
8
|
-
return assetKey;
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
const assetArray = dynamicEntryPoints.map((entry) => {
|
|
12
|
-
return {assetKey: entry};
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
const jsAssetsFilePath = './jsAssets.mjs';
|
|
16
|
-
|
|
17
|
-
// Create directories if they don't exist
|
|
18
|
-
const dirPath = path.dirname(jsAssetsFilePath);
|
|
19
|
-
fs.mkdirSync(dirPath, {recursive: true});
|
|
20
|
-
|
|
21
|
-
const data = `
|
|
22
|
-
const dynamicAssets = ${JSON.stringify(assetArray)};
|
|
23
|
-
const api = {dynamicAssets};
|
|
24
|
-
export default api;
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
fs.writeFileSync(jsAssetsFilePath, data);
|