@everymatrix/promoting-banners 0.1.0
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/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-40277d4b.js +1249 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/promoting-banners-d707e229.js +206 -0
- package/dist/cjs/promoting-banners.cjs.entry.js +10 -0
- package/dist/cjs/promoting-banners.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/promoting-banners/index.js +1 -0
- package/dist/collection/components/promoting-banners/promoting-banners.css +154 -0
- package/dist/collection/components/promoting-banners/promoting-banners.js +260 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +48 -0
- package/dist/collection/utils/utils.js +27 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-936cf61c.js +1223 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/promoting-banners-10e80966.js +204 -0
- package/dist/esm/promoting-banners.entry.js +2 -0
- package/dist/esm/promoting-banners.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/promoting-banners/index.esm.js +1 -0
- package/dist/promoting-banners/p-53a1c74c.js +1 -0
- package/dist/promoting-banners/p-7f9296a7.entry.js +1 -0
- package/dist/promoting-banners/p-a3d905a8.js +2 -0
- package/dist/promoting-banners/p-e1255160.js +1 -0
- package/dist/promoting-banners/promoting-banners.esm.js +1 -0
- package/dist/stencil.config.dev.js +14 -0
- package/dist/stencil.config.js +17 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/promoting-banners/.stencil/packages/stencil/promoting-banners/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/promoting-banners/index.d.ts +1 -0
- package/dist/types/components/promoting-banners/promoting-banners.d.ts +42 -0
- package/dist/types/components.d.ts +85 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/utils/locale.utils.d.ts +2 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-40277d4b.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
const defineCustomElements = async (win, options) => {
|
|
9
|
+
if (typeof window === 'undefined') return undefined;
|
|
10
|
+
await appGlobals.globalScripts();
|
|
11
|
+
return index.bootstrapLazy([["promoting-banners.cjs",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.setNonce = index.setNonce;
|
|
15
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-40277d4b.js');
|
|
4
|
+
|
|
5
|
+
const getDevice = () => {
|
|
6
|
+
let userAgent = window.navigator.userAgent;
|
|
7
|
+
if (userAgent.toLowerCase().match(/android/i)) {
|
|
8
|
+
return 'Android';
|
|
9
|
+
}
|
|
10
|
+
if (userAgent.toLowerCase().match(/iphone/i)) {
|
|
11
|
+
return 'iPhone';
|
|
12
|
+
}
|
|
13
|
+
if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
|
|
14
|
+
return 'iPad';
|
|
15
|
+
}
|
|
16
|
+
return 'PC';
|
|
17
|
+
};
|
|
18
|
+
const getDevicePlatform = () => {
|
|
19
|
+
const device = getDevice();
|
|
20
|
+
if (device) {
|
|
21
|
+
if (device === 'PC') {
|
|
22
|
+
return 'dk';
|
|
23
|
+
}
|
|
24
|
+
else if (device === 'iPad' || device === 'iPhone') {
|
|
25
|
+
return 'mtWeb';
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return 'mtWeb';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const DEFAULT_LANGUAGE = 'en';
|
|
34
|
+
const TRANSLATIONS = {
|
|
35
|
+
en: {
|
|
36
|
+
error: 'Error',
|
|
37
|
+
noResults: 'Loading, please wait ...',
|
|
38
|
+
},
|
|
39
|
+
hu: {
|
|
40
|
+
error: 'Error',
|
|
41
|
+
noResults: 'Loading, please wait ...',
|
|
42
|
+
},
|
|
43
|
+
ro: {
|
|
44
|
+
error: 'Eroare',
|
|
45
|
+
noResults: 'Loading, please wait ...',
|
|
46
|
+
},
|
|
47
|
+
fr: {
|
|
48
|
+
error: 'Error',
|
|
49
|
+
noResults: 'Loading, please wait ...',
|
|
50
|
+
},
|
|
51
|
+
ar: {
|
|
52
|
+
error: 'خطأ',
|
|
53
|
+
noResults: 'Loading, please wait ...',
|
|
54
|
+
},
|
|
55
|
+
hr: {
|
|
56
|
+
error: 'Greška',
|
|
57
|
+
noResults: 'Učitavanje, molimo pričekajte ...',
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const translate = (key, customLang) => {
|
|
61
|
+
const lang = customLang;
|
|
62
|
+
return TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
|
|
63
|
+
};
|
|
64
|
+
const getTranslations = (url) => {
|
|
65
|
+
// fetch url, get the data, replace the TRANSLATIONS content
|
|
66
|
+
return new Promise((resolve, reject) => {
|
|
67
|
+
fetch(url)
|
|
68
|
+
.then((res) => res.json())
|
|
69
|
+
.then((data) => {
|
|
70
|
+
Object.keys(data).forEach((item) => {
|
|
71
|
+
for (let key in data[item]) {
|
|
72
|
+
TRANSLATIONS[item][key] = data[item][key];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
resolve(TRANSLATIONS);
|
|
76
|
+
}).catch(err => {
|
|
77
|
+
reject(err);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const promotingBannersCss = ".PromotingBannersIconContainer img{width:50px;height:50px;border-radius:var(--emw--border-radius-image, 50%);background-size:contain;margin:10px}.PromotingBannersSection{padding:10px;border-radius:var(--emw--border-radius-small, 5px);background-color:var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));background-repeat:no-repeat;background-position:center;color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff));font-family:var(--emw--font-family-primary, \"Montserrat\", sans-serif);overflow:hidden;position:relative}.PromotingBannersGrid{display:grid;grid-gap:30px;background-size:contain;background-repeat:no-repeat;padding:10px;width:100%;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));box-sizing:border-box}.PromotingBannersContent{color:var(--emw--promo-color-primary, var(--emw--color-primary, #fff))}.PromotingBannersContent p{display:block;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;word-break:break-all}.PromotingBannersHeader{display:flex;justify-content:center;flex-direction:column;align-items:center}.PromotingBannersHeader p{text-align:center}.PromotingBannersBox{min-width:200px;display:flex;justify-content:flex-start;overflow:hidden;flex-direction:row;gap:20px;text-decoration:none;color:inherit;background-size:cover;background-position:center;border-radius:var(--emw--border-radius-small, 5px)}.PromotingBannersSectionTitle,.PromotingBannersSectionSubtitle{margin:10px auto;background:transparent}.PromotingBannersTextContainer{margin:5px;overflow:hidden;position:relative;padding-bottom:30px}.PromotingBannersTitle{margin:5px auto}.PromotingBannersButton{cursor:pointer;color:inherit;text-decoration:none;position:absolute;bottom:5px;border:0;background:transparent}.ButtonDisabled{cursor:not-allowed}.PromotionalBannersTextContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.AboutUsError .ErrorInfo{color:var(--emw--promo-color-error, var(--emw--color-error, #ed0909))}.SkeletonGrid{display:grid}.Skeleton{animation:skeleton-loading 0.6s linear infinite alternate}@keyframes skeleton-loading{0%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%)}12%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%)}25%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%)}33%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%)}50%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%)}63%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%)}75%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%)}88%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%)}100%{background:linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%)}}.SkeletonItem{opacity:0.5;margin:0 15px;width:125px;height:150px;border-radius:var(--emw--border-radius-medium, 15px);margin:20px}";
|
|
83
|
+
const PromotingBannersStyle0 = promotingBannersCss;
|
|
84
|
+
|
|
85
|
+
const PromotingBanners = class {
|
|
86
|
+
constructor(hostRef) {
|
|
87
|
+
index.registerInstance(this, hostRef);
|
|
88
|
+
this.setClientStyling = () => {
|
|
89
|
+
let sheet = document.createElement('style');
|
|
90
|
+
sheet.innerHTML = this.clientStyling;
|
|
91
|
+
this.stylingContainer.prepend(sheet);
|
|
92
|
+
};
|
|
93
|
+
this.setClientStylingURL = () => {
|
|
94
|
+
let url = new URL(this.clientStylingUrl);
|
|
95
|
+
let cssFile = document.createElement('style');
|
|
96
|
+
fetch(url.href)
|
|
97
|
+
.then((res) => res.text())
|
|
98
|
+
.then((data) => {
|
|
99
|
+
cssFile.innerHTML = data;
|
|
100
|
+
setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
|
|
101
|
+
})
|
|
102
|
+
.catch((err) => {
|
|
103
|
+
console.log('error ', err);
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
this.componentDidLoad = () => {
|
|
107
|
+
if (this.stylingContainer) {
|
|
108
|
+
if (this.clientStyling)
|
|
109
|
+
this.setClientStyling();
|
|
110
|
+
if (this.clientStylingUrl)
|
|
111
|
+
this.setClientStylingURL();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
this.cmsEndpoint = '';
|
|
115
|
+
this.language = 'en';
|
|
116
|
+
this.cmsEnv = '';
|
|
117
|
+
this.clientStyling = '';
|
|
118
|
+
this.clientStylingUrl = '';
|
|
119
|
+
this.translationUrl = '';
|
|
120
|
+
this.promotingBannersArray = [];
|
|
121
|
+
this.hasErrors = false;
|
|
122
|
+
this.isLoading = true;
|
|
123
|
+
this.translationData = undefined;
|
|
124
|
+
}
|
|
125
|
+
handleStylingChange(newValue, oldValue) {
|
|
126
|
+
if (newValue !== oldValue)
|
|
127
|
+
this.setClientStyling();
|
|
128
|
+
}
|
|
129
|
+
handleNewTranslations() {
|
|
130
|
+
this.isLoading = true;
|
|
131
|
+
getTranslations(this.translationUrl).then(() => {
|
|
132
|
+
this.isLoading = false;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
connectedCallback() {
|
|
136
|
+
if (this.cmsEndpoint && this.language) {
|
|
137
|
+
this.getPromotingBanners();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
getPromotingBanners() {
|
|
141
|
+
const url = new URL(`${this.cmsEndpoint}/${this.language}/homepage`);
|
|
142
|
+
const params = new URLSearchParams();
|
|
143
|
+
params.append('language', this.language);
|
|
144
|
+
params.append('env', this.cmsEnv);
|
|
145
|
+
params.append('device', getDevicePlatform());
|
|
146
|
+
url.search = params.toString();
|
|
147
|
+
let requestOptions = {
|
|
148
|
+
method: 'GET',
|
|
149
|
+
headers: {
|
|
150
|
+
'Content-Type': 'application/json',
|
|
151
|
+
'Accept': 'application/json'
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return new Promise((resolve, reject) => {
|
|
155
|
+
this.isLoading = true;
|
|
156
|
+
fetch(url.href, requestOptions)
|
|
157
|
+
.then(res => res.json())
|
|
158
|
+
.then(data => {
|
|
159
|
+
const { promotingBanners } = data;
|
|
160
|
+
this.promotingBannersArray = promotingBanners;
|
|
161
|
+
resolve(promotingBanners);
|
|
162
|
+
})
|
|
163
|
+
.catch(error => {
|
|
164
|
+
console.error('Error fetching data:', error);
|
|
165
|
+
this.hasErrors = true;
|
|
166
|
+
reject(error);
|
|
167
|
+
}).finally(() => {
|
|
168
|
+
this.isLoading = false;
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
sendOpenLink(url, isExternal, target) {
|
|
173
|
+
window.postMessage({ type: 'NavigateTo', path: url, target: target || null, externalLink: isExternal || false }, window.location.href);
|
|
174
|
+
}
|
|
175
|
+
async componentWillLoad() {
|
|
176
|
+
// Translation url logic
|
|
177
|
+
const promises = [];
|
|
178
|
+
if (this.translationUrl) {
|
|
179
|
+
const translationPromise = getTranslations(this.translationUrl).then((data) => {
|
|
180
|
+
this.translationData = JSON.stringify(data);
|
|
181
|
+
}).catch(err => {
|
|
182
|
+
console.log(err);
|
|
183
|
+
});
|
|
184
|
+
promises.push(translationPromise);
|
|
185
|
+
}
|
|
186
|
+
return Promise.all(promises);
|
|
187
|
+
}
|
|
188
|
+
renderBannersGrid(banner) {
|
|
189
|
+
var _a, _b, _c;
|
|
190
|
+
return index.h("a", { class: "PromotingBannersBox", href: banner === null || banner === void 0 ? void 0 : banner.url, target: banner.targetType, style: { backgroundImage: `url(${banner === null || banner === void 0 ? void 0 : banner.backgroundImage})` } }, index.h("div", { class: "PromotingBannersIconContainer" }, index.h("img", { src: (getDevice() === 'Android' || getDevice() === 'iPhone') ? (_a = banner.icon) === null || _a === void 0 ? void 0 : _a.mobile : (getDevice() === 'iPad') ? (_b = banner.image) === null || _b === void 0 ? void 0 : _b.srcTablet : (_c = banner.icon) === null || _c === void 0 ? void 0 : _c.desktop, alt: "Banner image" })), index.h("div", { class: "PromotingBannersTextContainer" }, index.h("h3", { class: "PromotingBannersTitle" }, banner === null || banner === void 0 ? void 0 : banner.title), index.h("div", { class: "PromotingBannersContent", innerHTML: banner === null || banner === void 0 ? void 0 : banner.description }), banner.button &&
|
|
191
|
+
index.h("button", { class: `PromotingBannersButton ${(banner === null || banner === void 0 ? void 0 : banner.button.text) ? '' : 'ButtonDisabled'}`, innerHTML: banner === null || banner === void 0 ? void 0 : banner.button.text, onClick: this.sendOpenLink.bind(this, banner === null || banner === void 0 ? void 0 : banner.button.url, banner === null || banner === void 0 ? void 0 : banner.button.externalLink, banner === null || banner === void 0 ? void 0 : banner.button.target) })));
|
|
192
|
+
}
|
|
193
|
+
render() {
|
|
194
|
+
var _a, _b, _c, _d;
|
|
195
|
+
return (index.h("div", { key: '80f15f2a7a49290bfd0fb80c6ccfb02b9fe3a0a9', class: "PromotingBannersSection", ref: el => this.stylingContainer = el }, this.hasErrors && index.h("div", { key: '392ef0a6910a457d17efc41a3a2443afc8be4a61', class: "AboutUsError" }, index.h("div", { key: 'c19eb8a49a8c8a422bd47557a7815e0252667005', class: "ErrorInfo" }, translate('error', this.language))), this.isLoading && index.h("div", { key: '28fc923e41227b8ca1529e8e2815ebd70678e50c', class: "SkeletonGrid" }, new Array(4).fill(null).map((index$1) => (index.h("div", { key: index$1, class: "Skeleton SkeletonItem" })))), !this.isLoading &&
|
|
196
|
+
index.h("div", { key: 'aff2d67a139ede5bdcc3c1ad240806594ab5fae7', class: "PromotingBannersWrapper" }, index.h("div", { key: '7d8caf2fee017407a618960ea37fff9d809e3eaa', class: getDevice() === 'PC' ? 'PromotingBannersHeader' : 'PromotingBannersHeader PromotingBannersHeaderMobile' }, ((_a = this.promotingBannersArray) === null || _a === void 0 ? void 0 : _a.title) && index.h("h1", { key: 'd947b41266fdfda8762ebc654c7a1c3516a08be5', class: "PromotingBannersSectionTitle" }, (_b = this.promotingBannersArray) === null || _b === void 0 ? void 0 : _b.title), ((_c = this.promotingBannersArray) === null || _c === void 0 ? void 0 : _c.description) && index.h("h5", { key: '72127f002e53c9e2d7430e222494c4470aca23e9', class: "PromotingBannersSectionSubtitle", style: { 'display': `${getDevice() !== 'PC' ? 'inline-block' : 'none'}` }, innerHTML: (_d = this.promotingBannersArray) === null || _d === void 0 ? void 0 : _d.description })), index.h("div", { key: '50c4fb4ae455f363d128993908016b0245c2bd50', class: "PromotingBannersGrid" }, this.promotingBannersArray.map(banner => (this.renderBannersGrid(banner)))))));
|
|
197
|
+
}
|
|
198
|
+
static get watchers() { return {
|
|
199
|
+
"clientStyling": ["handleStylingChange"],
|
|
200
|
+
"clientStylingUrl": ["handleStylingChange"],
|
|
201
|
+
"translationUrl": ["handleNewTranslations"]
|
|
202
|
+
}; }
|
|
203
|
+
};
|
|
204
|
+
PromotingBanners.style = PromotingBannersStyle0;
|
|
205
|
+
|
|
206
|
+
exports.PromotingBanners = PromotingBanners;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-40277d4b.js');
|
|
6
|
+
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
10
|
+
*/
|
|
11
|
+
var patchBrowser = () => {
|
|
12
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('promoting-banners.cjs.js', document.baseURI).href));
|
|
13
|
+
const opts = {};
|
|
14
|
+
if (importMeta !== "") {
|
|
15
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
16
|
+
}
|
|
17
|
+
return index.promiseResolve(opts);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
patchBrowser().then(async (options) => {
|
|
21
|
+
await appGlobals.globalScripts();
|
|
22
|
+
return index.bootstrapLazy([["promoting-banners.cjs",[[1,"promoting-banners",{"cmsEndpoint":[513,"cms-endpoint"],"language":[513],"cmsEnv":[513,"cms-env"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"promotingBannersArray":[32],"hasErrors":[32],"isLoading":[32],"translationData":[32]},null,{"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingChange"],"translationUrl":["handleNewTranslations"]}]]]], options);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PromotingBanners } from './promoting-banners';
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
.PromotingBannersIconContainer img {
|
|
2
|
+
width: 50px;
|
|
3
|
+
height: 50px;
|
|
4
|
+
border-radius: var(--emw--border-radius-image, 50%);
|
|
5
|
+
background-size: contain;
|
|
6
|
+
margin: 10px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.PromotingBannersSection {
|
|
10
|
+
padding: 10px;
|
|
11
|
+
border-radius: var(--emw--border-radius-small, 5px);
|
|
12
|
+
background-color: var(--emw--promo-color-background, var(--emw--color-background, #2f2f2f));
|
|
13
|
+
background-repeat: no-repeat;
|
|
14
|
+
background-position: center;
|
|
15
|
+
color: var(--emw--promo-color-primary, var(--emw--color-primary, #fff));
|
|
16
|
+
font-family: var(--emw--font-family-primary, "Montserrat", sans-serif);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.PromotingBannersGrid {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-gap: 30px;
|
|
24
|
+
background-size: contain;
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
padding: 10px;
|
|
27
|
+
width: 100%;
|
|
28
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.PromotingBannersContent {
|
|
33
|
+
color: var(--emw--promo-color-primary, var(--emw--color-primary, #fff));
|
|
34
|
+
}
|
|
35
|
+
.PromotingBannersContent p {
|
|
36
|
+
display: block; /* Enable flexbox layout */
|
|
37
|
+
-webkit-box-orient: vertical; /* Define orientation */
|
|
38
|
+
-webkit-line-clamp: 3; /* Limit to 3 lines */
|
|
39
|
+
overflow: hidden; /* Hide overflow */
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
word-break: break-all;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.PromotingBannersHeader {
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
.PromotingBannersHeader p {
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.PromotingBannersBox {
|
|
55
|
+
min-width: 200px;
|
|
56
|
+
display: flex; /* Use Flexbox for internal content */
|
|
57
|
+
justify-content: flex-start; /* Align items at the top */
|
|
58
|
+
overflow: hidden; /* Ensure content doesn't overflow */
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
gap: 20px;
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
color: inherit;
|
|
63
|
+
background-size: cover;
|
|
64
|
+
background-position: center;
|
|
65
|
+
border-radius: var(--emw--border-radius-small, 5px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.PromotingBannersSectionTitle, .PromotingBannersSectionSubtitle {
|
|
69
|
+
margin: 10px auto;
|
|
70
|
+
background: transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.PromotingBannersTextContainer {
|
|
74
|
+
margin: 5px;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
position: relative;
|
|
77
|
+
padding-bottom: 30px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.PromotingBannersTitle {
|
|
81
|
+
margin: 5px auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.PromotingBannersButton {
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
color: inherit;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
position: absolute;
|
|
89
|
+
bottom: 5px;
|
|
90
|
+
border: 0;
|
|
91
|
+
background: transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ButtonDisabled {
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.PromotionalBannersTextContainer {
|
|
99
|
+
/* Text overflow handling */
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.AboutUsError .ErrorInfo {
|
|
106
|
+
color: var(--emw--promo-color-error, var(--emw--color-error, #ed0909));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Skeleton styling below */
|
|
110
|
+
.SkeletonGrid {
|
|
111
|
+
display: grid;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.Skeleton {
|
|
115
|
+
animation: skeleton-loading 0.6s linear infinite alternate;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes skeleton-loading {
|
|
119
|
+
0% {
|
|
120
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.2) 0%, rgba(0, 61, 93, 0.2) 100%);
|
|
121
|
+
}
|
|
122
|
+
12% {
|
|
123
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.225) 0%, rgba(0, 61, 93, 0.225) 100%);
|
|
124
|
+
}
|
|
125
|
+
25% {
|
|
126
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.25) 0%, rgba(0, 61, 93, 0.25) 100%);
|
|
127
|
+
}
|
|
128
|
+
33% {
|
|
129
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.275) 0%, rgba(0, 61, 93, 0.275) 100%);
|
|
130
|
+
}
|
|
131
|
+
50% {
|
|
132
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.3) 0%, rgba(0, 61, 93, 0.3) 100%);
|
|
133
|
+
}
|
|
134
|
+
63% {
|
|
135
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.325) 0%, rgba(0, 61, 93, 0.325) 100%);
|
|
136
|
+
}
|
|
137
|
+
75% {
|
|
138
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.35) 0%, rgba(0, 61, 93, 0.35) 100%);
|
|
139
|
+
}
|
|
140
|
+
88% {
|
|
141
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.375) 0%, rgba(0, 61, 93, 0.375) 100%);
|
|
142
|
+
}
|
|
143
|
+
100% {
|
|
144
|
+
background: linear-gradient(90deg, rgba(35, 178, 78, 0.4) 0%, rgba(0, 61, 93, 0.4) 100%);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.SkeletonItem {
|
|
148
|
+
opacity: 0.5;
|
|
149
|
+
margin: 0 15px;
|
|
150
|
+
width: 125px;
|
|
151
|
+
height: 150px;
|
|
152
|
+
border-radius: var(--emw--border-radius-medium, 15px);
|
|
153
|
+
margin: 20px;
|
|
154
|
+
}
|