margue animation added

This commit is contained in:
Burak Civan 2022-10-17 09:33:09 +03:00
parent 5ae875711e
commit 6e1ee934e9
4 changed files with 57 additions and 2 deletions

7
presets.js vendored
View File

@ -231,6 +231,10 @@ module.exports = {
'0%': { boxShadow: '0 28px 0 -28px #55588b' }, '0%': { boxShadow: '0 28px 0 -28px #55588b' },
'100%': { boxShadow: '0 28px 0 #55588b' }, '100%': { boxShadow: '0 28px 0 #55588b' },
}, },
marquee: {
'0%': { transform: 'translateX(0%)' },
'100%': { transform: 'translateX(-100%)' },
}
}, },
animation: { animation: {
@ -239,7 +243,8 @@ module.exports = {
pulsate: 'pulsate 1500ms ease infinite;', pulsate: 'pulsate 1500ms ease infinite;',
spin: 'spin 1000ms infinite', spin: 'spin 1000ms infinite',
submit: 'submit 0.7s ease alternate infinite', submit: 'submit 0.7s ease alternate infinite',
submit_second: 'submit_second 0.7s ease alternate infinite' submit_second: 'submit_second 0.7s ease alternate infinite',
marquee: 'marquee 15s linear infinite'
}, },
transitionProperty: { transitionProperty: {

View File

@ -357,3 +357,25 @@ if (navigator.userAgent.search("Firefox") >= 0) {
} }
} }
//Firefox show modal for icon set //Firefox show modal for icon set
document.querySelectorAll('[data-truncate]').forEach((truncate) => {
let truncateText = truncate.textContent.split(" ").join("");
truncate.addEventListener('mouseover', function () {
if (truncateText.length > 20) {
truncate.style.animationPlayState = 'running';
truncate.classList.add('animate-marquee');
if (truncate.classList.contains('truncate')) {
truncate.classList.remove('truncate');
}
}
});
truncate.addEventListener('mouseout', function () {
if (truncateText.length > 20) {
truncate.style.animationPlayState = 'paused';
truncate.classList.add('truncate');
}
});
});

28
public/css/app.css vendored
View File

@ -10011,6 +10011,34 @@ input[type="date"]::-webkit-inner-spin-button,
-webkit-animation: submit_second 0.7s ease alternate infinite; -webkit-animation: submit_second 0.7s ease alternate infinite;
animation: submit_second 0.7s ease alternate infinite; animation: submit_second 0.7s ease alternate infinite;
} }
@-webkit-keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
@keyframes marquee{
0%{
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
100%{
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
}
.animate-marquee{
-webkit-animation: marquee 15s linear infinite;
animation: marquee 15s linear infinite;
}
.cursor-auto{ .cursor-auto{
cursor: auto; cursor: auto;
} }

View File

@ -85,7 +85,7 @@
<x-table.td class="w-6/12 sm:w-4/12"> <x-table.td class="w-6/12 sm:w-4/12">
<x-slot name="first" class="flex items-center font-bold" override="class"> <x-slot name="first" class="flex items-center font-bold" override="class">
<div class="truncate"> <div class="w-48 overflow-x-hidden truncate" data-truncate>
{{ $item->name }} {{ $item->name }}
</div> </div>