Skip to content

Commit b7b13f0

Browse files
committed
fix animation on page load
1 parent e635db7 commit b7b13f0

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

dist/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/scss/style.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
max-width: 100%;
88
overflow: auto;
99
z-index: 9999;
10-
transition: transform 0ms ease-out,
11-
opacity 0ms ease-out;
10+
transition: transform 200ms ease-out,
11+
opacity 200ms ease-out;
1212

1313
&--closing {
1414
opacity: 0;
1515
transform: translateY(10px);
1616
}
17+
&--pre-init {
18+
transition: none;
19+
}
1720
&--show {
1821
.cookies__btn {
1922
&--customize {

resources/views/cookies.blade.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@
6767
</div>
6868
</aside>
6969

70-
{{-- STYLES & SCRIPT : feel free to remove them and add your own --}}
71-
72-
<script id="cookies-script" data-cookie-consent data-config="{{ $scriptConfig }}">
73-
{!! file_get_contents(LCC_ROOT . '/dist/script.js') !!}
70+
{{-- STYLES & SCRIPT : feel free to remove them and add your own
71+
This script can't be removed --}}
72+
<script data-cookie-consent>
73+
const element = document.querySelector('#cookies-policy');
74+
element.classList.add('cookies--pre-init');
75+
element.classList.add('cookies--closing');
7476
</script>
7577
<style data-cookie-consent>
7678
{!! file_get_contents(LCC_ROOT . '/dist/style.css') !!}

0 commit comments

Comments
 (0)