@everymatrix/casino-promotions-slider 1.13.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/README.md +30 -0
- package/dist/casino-promotions-slider.js +699 -0
- package/dist/casino-promotions-slider.js.map +1 -0
- package/img/slider-line.svg +3 -0
- package/index.html +105 -0
- package/index.js +1 -0
- package/package.json +41 -0
- package/public/favicon.png +0 -0
- package/public/reset.css +48 -0
- package/rollup.config.js +59 -0
- package/src/CasinoPromotionsSlider.svelte +737 -0
- package/src/i18n.js +27 -0
- package/src/index.ts +4 -0
- package/src/translations.js +51 -0
- package/stories/CasinoPromotionsSlider.stories.js +13 -0
- package/tsconfig.json +6 -0
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
<svelte:options tag={null} />
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
|
|
4
|
+
// start implement slider
|
|
5
|
+
import Siema from 'siema';
|
|
6
|
+
import { createEventDispatcher, onMount } from 'svelte';
|
|
7
|
+
// end implement slider
|
|
8
|
+
|
|
9
|
+
import { getDevice } from 'rvhelper'; // Start implement Fetch data from CMS(api)
|
|
10
|
+
// Start implement translation
|
|
11
|
+
import { _, addNewMessages, setLocale, setupI18n } from './i18n';
|
|
12
|
+
import { TRANSLATIONS } from './translations';
|
|
13
|
+
// End implement translation
|
|
14
|
+
|
|
15
|
+
// Start implement Fetch data from CMS(api)
|
|
16
|
+
export let endpoint:string = "";
|
|
17
|
+
export let lang:string = '';
|
|
18
|
+
export let env:string = '';
|
|
19
|
+
export let userroles: string = '';
|
|
20
|
+
export let translationurl:string = '';
|
|
21
|
+
export let clientstyling:string = '';
|
|
22
|
+
export let clientstylingurl:string = '';
|
|
23
|
+
|
|
24
|
+
let customStylingContainer:HTMLElement;
|
|
25
|
+
|
|
26
|
+
let isLoading:boolean = false;
|
|
27
|
+
let promotions:Array<Object> = [];
|
|
28
|
+
let promotionsSlider:HTMLElement;
|
|
29
|
+
let totalDots = 0;
|
|
30
|
+
// End implement Fetch data from CMS(api)
|
|
31
|
+
|
|
32
|
+
// Start implement translation
|
|
33
|
+
setupI18n({ withLocale: 'en', translations: {}});
|
|
34
|
+
|
|
35
|
+
const setTranslationUrl = ():void => {
|
|
36
|
+
let url:string = translationurl;
|
|
37
|
+
|
|
38
|
+
fetch(url).then((res:any) => res.json())
|
|
39
|
+
.then((res) => {
|
|
40
|
+
Object.keys(res).forEach((item:any):void => {
|
|
41
|
+
addNewMessages(item, res[item]);
|
|
42
|
+
});
|
|
43
|
+
}).catch((err:any) => {
|
|
44
|
+
console.log(err);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
Object.keys(TRANSLATIONS).forEach((item:any) => {
|
|
49
|
+
addNewMessages(item, TRANSLATIONS[item]);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const setActiveLanguage = ():void => {
|
|
53
|
+
setLocale(lang);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// End implement translation
|
|
57
|
+
|
|
58
|
+
let userAgent:string = window.navigator.userAgent;
|
|
59
|
+
// Start implement Fetch data from CMS(api)
|
|
60
|
+
const getCmsData = ():void => {
|
|
61
|
+
isLoading = true;
|
|
62
|
+
|
|
63
|
+
let url:URL = new URL(`${endpoint}/${lang}/promotions?env=${env}`);
|
|
64
|
+
|
|
65
|
+
let device = getDevice(userAgent)
|
|
66
|
+
|
|
67
|
+
if(device){
|
|
68
|
+
if(device === 'PC'){
|
|
69
|
+
url.searchParams.append('device', 'dk')
|
|
70
|
+
} else if(device === 'iPad' || device === 'iPhone') {
|
|
71
|
+
url.searchParams.append('device', 'ios')
|
|
72
|
+
} else {
|
|
73
|
+
url.searchParams.append('device', 'mtWeb')
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
fetch(url.href)
|
|
78
|
+
.then((res: any) => res.json())
|
|
79
|
+
.then((data: any) => {
|
|
80
|
+
isLoading = false;
|
|
81
|
+
promotions = data;
|
|
82
|
+
})
|
|
83
|
+
.catch((err: any) => {
|
|
84
|
+
isLoading = false;
|
|
85
|
+
console.error(err);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
// End implement Fetch data from CMS(api)
|
|
89
|
+
|
|
90
|
+
// Start clientstyling & clientstylingurl functionality
|
|
91
|
+
const setClientStyling = () => {
|
|
92
|
+
let sheet = document.createElement('style');
|
|
93
|
+
sheet.innerHTML = clientstyling;
|
|
94
|
+
customStylingContainer.appendChild(sheet);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const setClientStylingURL = () => {
|
|
98
|
+
let cssFile:HTMLElement = document.createElement('style');
|
|
99
|
+
|
|
100
|
+
fetch(new URL(clientstylingurl))
|
|
101
|
+
.then((res:any) => res.text())
|
|
102
|
+
.then((data:any) => {
|
|
103
|
+
cssFile.innerHTML = data
|
|
104
|
+
|
|
105
|
+
setTimeout(() => { customStylingContainer.appendChild(cssFile); }, 1);
|
|
106
|
+
});
|
|
107
|
+
} // End clientstyling & clientstylingurl functionality
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
// start implement slider
|
|
111
|
+
let perPage = 4;
|
|
112
|
+
let loop = true;
|
|
113
|
+
let autoplay = 4000;
|
|
114
|
+
let duration = 200;
|
|
115
|
+
let easing = 'ease-out';
|
|
116
|
+
let startIndex = 0;
|
|
117
|
+
let draggable = true;
|
|
118
|
+
let multipleDrag = true ;
|
|
119
|
+
let dots = true ;
|
|
120
|
+
let controls = true;
|
|
121
|
+
let threshold = 20;
|
|
122
|
+
let rtl = false;
|
|
123
|
+
let currentIndex = startIndex;
|
|
124
|
+
let siema;
|
|
125
|
+
let controller;
|
|
126
|
+
let timer;
|
|
127
|
+
const dispatch = createEventDispatcher();
|
|
128
|
+
let sliderWidth;
|
|
129
|
+
const debounce = (func, delay) => {
|
|
130
|
+
let timer;
|
|
131
|
+
|
|
132
|
+
return function () {
|
|
133
|
+
const context = this;
|
|
134
|
+
const args = arguments;
|
|
135
|
+
clearTimeout(timer);
|
|
136
|
+
timer = setTimeout(() => func.apply(context, args), delay);
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const getPerPage = () => {
|
|
141
|
+
if(sliderWidth>=1536){
|
|
142
|
+
perPage = 4
|
|
143
|
+
} else if(sliderWidth>=1024){
|
|
144
|
+
perPage = 3
|
|
145
|
+
} else if(sliderWidth>=768){
|
|
146
|
+
perPage = 2
|
|
147
|
+
} else if(sliderWidth>=320){
|
|
148
|
+
perPage = 1
|
|
149
|
+
}
|
|
150
|
+
return typeof perPage === 'object' ? perPage : Number(perPage);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const setCurrentPerPage = () => {
|
|
154
|
+
return controller ? controller.perPage : perPage;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const setTotalDots = () => {
|
|
158
|
+
return controller ? Math.ceil(controller.innerElements.length / currentPerPage) : 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const getLoop = () => {
|
|
162
|
+
return promotions.length <= getPerPage() ? false : true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const setController = () => {
|
|
166
|
+
if(controller){
|
|
167
|
+
perPage = currentPerPage = setCurrentPerPage();
|
|
168
|
+
totalDots = setTotalDots();
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const debouncedSetController = debounce(setController, 300);
|
|
173
|
+
|
|
174
|
+
onMount(() => {
|
|
175
|
+
window.addEventListener('resize', debouncedSetController);
|
|
176
|
+
|
|
177
|
+
return () => {
|
|
178
|
+
window.removeEventListener('resize', debouncedSetController);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
const initSliders = () => {
|
|
184
|
+
|
|
185
|
+
controller = new Siema({
|
|
186
|
+
selector: siema,
|
|
187
|
+
loop: getLoop(),
|
|
188
|
+
duration,
|
|
189
|
+
easing,
|
|
190
|
+
startIndex,
|
|
191
|
+
draggable,
|
|
192
|
+
multipleDrag,
|
|
193
|
+
threshold,
|
|
194
|
+
rtl,
|
|
195
|
+
onChange: handleChange,
|
|
196
|
+
perPage: {
|
|
197
|
+
320: 1, // wider than 320px show 1 promo.card
|
|
198
|
+
768: 2, // wider than 850px show 2 promo.cards
|
|
199
|
+
1024: 3, // wider than 1200px show 3 promo.cards
|
|
200
|
+
1536: 4, // wider than 1600px show 4 promo.cards
|
|
201
|
+
},
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
if(autoplay) {
|
|
205
|
+
timer = setInterval(() => (controller.next()), autoplay);
|
|
206
|
+
}
|
|
207
|
+
return () => {
|
|
208
|
+
autoplay && clearInterval(timer)
|
|
209
|
+
controller.destroy()
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
function handleChange () {
|
|
215
|
+
currentIndex = controller.currentSlide;
|
|
216
|
+
dispatch('change', {
|
|
217
|
+
currentSlide: controller.currentSlide,
|
|
218
|
+
slideCount: controller.innerElements.length
|
|
219
|
+
} )
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Get number of page
|
|
223
|
+
const getCurrentNumber = (currentIndex, currentPerPage) => {
|
|
224
|
+
const number = Math.ceil((currentIndex+1) / currentPerPage);
|
|
225
|
+
return number===0 ? totalDots : number;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
let modalItem = {};
|
|
229
|
+
let modalIsOpen = false;
|
|
230
|
+
|
|
231
|
+
const handleOpenModal = (item) =>{
|
|
232
|
+
modalItem = item;
|
|
233
|
+
modalIsOpen = true;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const handleCloseModal = () =>{
|
|
237
|
+
modalItem = {};
|
|
238
|
+
modalIsOpen = false;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
$: lang && setActiveLanguage(); // Start implement translation
|
|
242
|
+
$: translationurl && setTranslationUrl(); // TranslationUrl functionality
|
|
243
|
+
$: endpoint && lang && env && getCmsData(); // Start implement Fetch data from CMS(api)
|
|
244
|
+
$: clientstyling && customStylingContainer && setClientStyling();
|
|
245
|
+
$: clientstylingurl && customStylingContainer && setClientStylingURL();
|
|
246
|
+
$: currentPerPage = controller ? controller.perPage : perPage;
|
|
247
|
+
$: totalDots = controller ? Math.ceil(controller.innerElements.length / currentPerPage) : 0;
|
|
248
|
+
$: promotions && promotionsSlider && initSliders(); // waiting promotions data and slider elements before initial siema module.
|
|
249
|
+
$: controller && setController();
|
|
250
|
+
|
|
251
|
+
</script>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
<div class="CasinoPromotionsSlider" bind:this={customStylingContainer}>
|
|
255
|
+
|
|
256
|
+
<section class="PromotionSlider" bind:clientWidth={sliderWidth}>
|
|
257
|
+
|
|
258
|
+
<h2 class="title">{$_('promotionsTitle')}</h2>
|
|
259
|
+
<p class="SubTitle">{$_('promotionsSubTitle')}</p>
|
|
260
|
+
|
|
261
|
+
<div class="container">
|
|
262
|
+
<!-- Promotion cards -->
|
|
263
|
+
{#if isLoading}
|
|
264
|
+
<p class="text__center w__100"> {$_('promotionsLoading')}</p>
|
|
265
|
+
{:else}
|
|
266
|
+
{#if promotions.length > 0}
|
|
267
|
+
<div class="carousel" bind:this={promotionsSlider}>
|
|
268
|
+
<div class="slides" bind:this={siema}>
|
|
269
|
+
{#each promotions as promotion}
|
|
270
|
+
<div class="d-flex">
|
|
271
|
+
<div class="PromotionCard">
|
|
272
|
+
<picture class="PromotionImg" part="PromotionImg">
|
|
273
|
+
{#each promotion.image.sources as imgSource}
|
|
274
|
+
<source
|
|
275
|
+
srcset={imgSource.pictureSource}
|
|
276
|
+
media="({imgSource.media})"
|
|
277
|
+
/>
|
|
278
|
+
{/each}
|
|
279
|
+
<img src={promotion.image.src} alt={promotion.title}>
|
|
280
|
+
</picture>
|
|
281
|
+
<h3 class="PromotionTitle" part="PromotionTitle"> {@html promotion.title}</h3>
|
|
282
|
+
<div class="description" part="description">{@html promotion.content.split('</div>')[0]}</div>
|
|
283
|
+
<div class="btnArea">
|
|
284
|
+
<a href="javascript:void(0)" class="btn"
|
|
285
|
+
on:click={
|
|
286
|
+
()=> {handleOpenModal(promotion)}}
|
|
287
|
+
> <b>{$_('promotionsButton')}</b>
|
|
288
|
+
<svg class="arrow" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
289
|
+
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
|
290
|
+
<style type="text/css">
|
|
291
|
+
.st0{fill:#FFFFFF;}
|
|
292
|
+
</style>
|
|
293
|
+
<path class="st0" d="M9.5,13.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L12.4,9H1.2C0.9,9,0.7,8.9,0.5,8.7
|
|
294
|
+
C0.3,8.5,0.2,8.3,0.2,8s0.1-0.5,0.3-0.7C0.7,7.1,0.9,7,1.2,7h11.1L9.5,4.1C9.3,3.9,9.2,3.7,9.2,3.4c0-0.3,0.1-0.5,0.3-0.7
|
|
295
|
+
c0.2-0.2,0.4-0.3,0.7-0.3c0.3,0,0.5,0.1,0.7,0.3l4.6,4.6c0.1,0.1,0.2,0.2,0.2,0.3c0,0.1,0.1,0.2,0.1,0.4s0,0.3-0.1,0.4
|
|
296
|
+
c0,0.1-0.1,0.2-0.2,0.3l-4.6,4.6c-0.2,0.2-0.4,0.3-0.7,0.3C10,13.6,9.7,13.5,9.5,13.3z"/>
|
|
297
|
+
</svg>
|
|
298
|
+
</a>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
{/each}
|
|
303
|
+
</div>
|
|
304
|
+
|
|
305
|
+
{#if totalDots > 1}
|
|
306
|
+
<div class="numberOfPage">
|
|
307
|
+
{`${getCurrentNumber(currentIndex, currentPerPage)} / ${totalDots}`}
|
|
308
|
+
</div>
|
|
309
|
+
{/if}
|
|
310
|
+
</div>
|
|
311
|
+
{:else}
|
|
312
|
+
<p class="text__center w__100">{$_('promotionsNone')}</p>
|
|
313
|
+
{/if}
|
|
314
|
+
{/if}
|
|
315
|
+
|
|
316
|
+
</div>
|
|
317
|
+
</section>
|
|
318
|
+
{#if modalIsOpen}
|
|
319
|
+
<div class="modal__overlay" on:click={()=>handleCloseModal()}></div>
|
|
320
|
+
<div class="modal">
|
|
321
|
+
<div class="wrapper">
|
|
322
|
+
<a href="#" class="IconClose" on:click={()=>handleCloseModal()}>
|
|
323
|
+
<svg
|
|
324
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
325
|
+
fill="none"
|
|
326
|
+
viewBox="0 0 24 24"
|
|
327
|
+
stroke-width="1.5"
|
|
328
|
+
stroke="currentColor"
|
|
329
|
+
class="close_multi"
|
|
330
|
+
>
|
|
331
|
+
<path
|
|
332
|
+
stroke-linecap="round"
|
|
333
|
+
stroke-linejoin="round"
|
|
334
|
+
d="M6 18L18 6M6 6l12 12"
|
|
335
|
+
/>
|
|
336
|
+
</svg>
|
|
337
|
+
</a>
|
|
338
|
+
</div>
|
|
339
|
+
|
|
340
|
+
<picture class="modal__img" part="modal-img">
|
|
341
|
+
{#each modalItem.image.sources as imgSource}
|
|
342
|
+
<source
|
|
343
|
+
srcset={imgSource.pictureSource}
|
|
344
|
+
media="({imgSource.media})"
|
|
345
|
+
/>
|
|
346
|
+
{/each}
|
|
347
|
+
<img src={modalItem.image.src} alt={modalItem.title}>
|
|
348
|
+
</picture>
|
|
349
|
+
<h3 class="modal__title">{@html modalItem['title']}</h3>
|
|
350
|
+
<div class="modal__description">{@html modalItem['content']}</div>
|
|
351
|
+
</div>
|
|
352
|
+
{/if}
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
<style lang="scss">
|
|
357
|
+
:host {
|
|
358
|
+
font-family: 'Montserrat', sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
$bp-largest: 1700px;
|
|
362
|
+
// 1600: 4, wider than 1600px show 4 promo.card
|
|
363
|
+
$bp-large: 1300px;
|
|
364
|
+
// 1200: 3, wider than 1200px show 3 promo.card
|
|
365
|
+
$bp-medium: 950px;
|
|
366
|
+
// 850: 2, wider than 850px show 2 promo.card
|
|
367
|
+
$bp-small: 720px;
|
|
368
|
+
$bp-smallest: 600px;
|
|
369
|
+
// 320: 1, wider than 320px show 1 promo.card
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
*,
|
|
374
|
+
*::before,
|
|
375
|
+
*::after {
|
|
376
|
+
padding: 0;
|
|
377
|
+
list-style: none;
|
|
378
|
+
text-decoration: none;
|
|
379
|
+
outline: none;
|
|
380
|
+
box-sizing: border-box;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
$color-button: linear-gradient(180deg, #F9253C, #D50866);
|
|
384
|
+
$color-text: #080843;
|
|
385
|
+
|
|
386
|
+
.CasinoPromotionsSlider {
|
|
387
|
+
height: 590px;
|
|
388
|
+
background: linear-gradient(180deg, #F3F1FF, #ECE8FF);
|
|
389
|
+
color: $color-text;
|
|
390
|
+
text-align: center;
|
|
391
|
+
container-type: inline-size;
|
|
392
|
+
container-name: container-slider;
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
.title {
|
|
396
|
+
margin-bottom: 4px;
|
|
397
|
+
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
.SubTitle {
|
|
402
|
+
margin-bottom: 20px;
|
|
403
|
+
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.sliders {
|
|
407
|
+
.carousel {
|
|
408
|
+
position: relative;
|
|
409
|
+
width: 100%;
|
|
410
|
+
justify-content: center;
|
|
411
|
+
align-items: center;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
.PromotionSlider {
|
|
417
|
+
overflow: hidden;
|
|
418
|
+
position: relative;
|
|
419
|
+
|
|
420
|
+
padding: 20px 130px;
|
|
421
|
+
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.container {
|
|
425
|
+
display: flex;
|
|
426
|
+
justify-content: space-between;
|
|
427
|
+
width: 100%;
|
|
428
|
+
|
|
429
|
+
.carousel {
|
|
430
|
+
width: 100%;
|
|
431
|
+
position: relative;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.slides {
|
|
435
|
+
height: 440px;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.PromotionCard {
|
|
441
|
+
height: 420px;
|
|
442
|
+
background: #fff;
|
|
443
|
+
box-shadow: 0 4px 6px rgba($color: #000000, $alpha: 0.2);
|
|
444
|
+
border-radius: 4px;
|
|
445
|
+
padding: 10px 10px 20px 10px;
|
|
446
|
+
text-align: center;
|
|
447
|
+
margin: 0 10px;
|
|
448
|
+
max-width: 450px;
|
|
449
|
+
color: $color-text;
|
|
450
|
+
position: relative;
|
|
451
|
+
|
|
452
|
+
.PromotionImg img {
|
|
453
|
+
object-fit: cover;
|
|
454
|
+
border-radius: 4px;
|
|
455
|
+
width: 100%;
|
|
456
|
+
height: 214px;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.PromotionTitle {
|
|
460
|
+
margin-bottom: 4px;
|
|
461
|
+
text-align: left;
|
|
462
|
+
font-size: 18px;
|
|
463
|
+
display: -webkit-box !important;
|
|
464
|
+
-webkit-line-clamp: 2;
|
|
465
|
+
-webkit-box-orient: vertical;
|
|
466
|
+
overflow: hidden;
|
|
467
|
+
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.description {
|
|
471
|
+
margin-bottom: 20px;
|
|
472
|
+
text-align: left;
|
|
473
|
+
font-size: 14px;
|
|
474
|
+
line-height: 16px;
|
|
475
|
+
display: -webkit-box !important;
|
|
476
|
+
-webkit-line-clamp: 4;
|
|
477
|
+
-webkit-box-orient: vertical;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.arrow {
|
|
483
|
+
width: 19px;
|
|
484
|
+
height: 19px;
|
|
485
|
+
position: absolute;
|
|
486
|
+
transform: translateX(10px) translateY(-3px);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.btnArea {
|
|
490
|
+
display: flex;
|
|
491
|
+
align-items: center;
|
|
492
|
+
height: 60px;
|
|
493
|
+
width: 93%;
|
|
494
|
+
position: absolute;
|
|
495
|
+
bottom: 0;
|
|
496
|
+
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.btn:link,
|
|
500
|
+
.btn:visited {
|
|
501
|
+
text-transform: uppercase;
|
|
502
|
+
padding: 10px 60px;
|
|
503
|
+
background: $color-button;
|
|
504
|
+
color: #fff;
|
|
505
|
+
display: inline-block;
|
|
506
|
+
border-radius: 100px;
|
|
507
|
+
transition: all .2s;
|
|
508
|
+
transition-timing-function: ease-out;
|
|
509
|
+
position: relative;
|
|
510
|
+
font-size: 14px;
|
|
511
|
+
justify-content: center;
|
|
512
|
+
margin: 0 auto;
|
|
513
|
+
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.btn:hover {
|
|
517
|
+
padding: 12px 62px;
|
|
518
|
+
|
|
519
|
+
.arrow {
|
|
520
|
+
transform: translateX(20px) translateY(-3px);
|
|
521
|
+
transition: all .2s;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.text__center {
|
|
527
|
+
text-align: center;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.w__100 {
|
|
531
|
+
width: 100%;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.d-flex{
|
|
535
|
+
display: flex;
|
|
536
|
+
justify-content: space-around;
|
|
537
|
+
align-items: center;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
.numberOfPage {
|
|
542
|
+
color: #D50866;
|
|
543
|
+
font-size: 18px;
|
|
544
|
+
margin-top: 15px;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// MODAL //////////////
|
|
548
|
+
.modal {
|
|
549
|
+
background: #fff;
|
|
550
|
+
box-shadow: 0 4px 6px rgba($color: #000000, $alpha: 0.2);
|
|
551
|
+
border-radius: 4px;
|
|
552
|
+
padding: 40px;
|
|
553
|
+
max-height: 90%;
|
|
554
|
+
width: 1000px;
|
|
555
|
+
color: $color-text;
|
|
556
|
+
position: absolute;
|
|
557
|
+
z-index: 10;
|
|
558
|
+
top: 50%;
|
|
559
|
+
left: 50%;
|
|
560
|
+
transform: translate(-50%, -50%);
|
|
561
|
+
overflow-y: auto;
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-direction: column;
|
|
564
|
+
|
|
565
|
+
.wrapper {
|
|
566
|
+
position: sticky;
|
|
567
|
+
top: 0;
|
|
568
|
+
right: 0;
|
|
569
|
+
z-index: 10;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.IconClose {
|
|
573
|
+
width: 24px;
|
|
574
|
+
height: 24px;
|
|
575
|
+
color: #888;
|
|
576
|
+
position: absolute;
|
|
577
|
+
top: -30px;
|
|
578
|
+
right: -30px;
|
|
579
|
+
z-index: 20;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.IconClose:hover,
|
|
583
|
+
.IconClose:focus {
|
|
584
|
+
cursor: pointer;
|
|
585
|
+
color: #222;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.modal::-webkit-scrollbar {
|
|
590
|
+
display: none;}
|
|
591
|
+
|
|
592
|
+
.modal__img {
|
|
593
|
+
display: block;
|
|
594
|
+
position: relative;
|
|
595
|
+
|
|
596
|
+
img {
|
|
597
|
+
object-fit: cover;
|
|
598
|
+
border-radius: 4px;
|
|
599
|
+
max-height: 300px;
|
|
600
|
+
width: 100%;
|
|
601
|
+
height: 100%;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
.modal__title {
|
|
607
|
+
margin-bottom: 4px;
|
|
608
|
+
text-align: left;
|
|
609
|
+
font-size: 18px;
|
|
610
|
+
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.modal__description {
|
|
614
|
+
margin-bottom: 20px;
|
|
615
|
+
text-align: left;
|
|
616
|
+
font-size: 14px;
|
|
617
|
+
line-height: 16px;
|
|
618
|
+
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.modal__overlay{
|
|
622
|
+
position: fixed;
|
|
623
|
+
left: 0;
|
|
624
|
+
top: 0;
|
|
625
|
+
width: 100%;
|
|
626
|
+
height: 100%;
|
|
627
|
+
overflow: auto;
|
|
628
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
629
|
+
z-index: 5;
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
.CasinoPromotionsSlider {
|
|
635
|
+
@container container-slider (max-width: 1700px) {
|
|
636
|
+
.PromotionSlider {
|
|
637
|
+
padding: 20px 100px;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.CasinoPromotionsSlider {
|
|
643
|
+
@container container-slider (max-width: 1300px) {
|
|
644
|
+
.title {
|
|
645
|
+
font-size: 22px;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.SubTitle {
|
|
649
|
+
font-size: 15px;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.PromotionSlider {
|
|
653
|
+
padding: 20px 80px;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.PromotionTitle {
|
|
657
|
+
font-size: 16px;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.description {
|
|
661
|
+
font-size: 13px;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.btn:link,
|
|
665
|
+
.btn:visited {
|
|
666
|
+
font-size: 13px;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.numberOfPage {
|
|
670
|
+
font-size: 16px;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.modal {
|
|
674
|
+
width: 900px;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.modal__title {
|
|
678
|
+
font-size: 16px;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.modal__description {
|
|
682
|
+
font-size: 13px;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.CasinoPromotionsSlider {
|
|
688
|
+
@container container-slider (max-width: 950px) {
|
|
689
|
+
.PromotionSlider {
|
|
690
|
+
padding: 20px 20px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.modal {
|
|
694
|
+
padding: 30px;
|
|
695
|
+
width: 600px;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.modal .IconClose {
|
|
699
|
+
width: 20px;
|
|
700
|
+
height: 20px;
|
|
701
|
+
top: -24px;
|
|
702
|
+
right: -24px;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.CasinoPromotionsSlider {
|
|
708
|
+
@container container-slider (max-width: 720px) {
|
|
709
|
+
.PromotionSlider {
|
|
710
|
+
padding: 20px 10px;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.modal {
|
|
714
|
+
padding: 30px;
|
|
715
|
+
width: 500px;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.CasinoPromotionsSlider {
|
|
722
|
+
@container container-slider (max-width: 600px) {
|
|
723
|
+
.modal {
|
|
724
|
+
padding: 26px;
|
|
725
|
+
width: 90%;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
.modal .IconClose {
|
|
729
|
+
width: 20px;
|
|
730
|
+
height: 20px;
|
|
731
|
+
top: -20px;
|
|
732
|
+
right: -20px;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
</style>
|