Skip to content

Commit 1eda525

Browse files
chore: pause marquee
1 parent 4901573 commit 1eda525

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

apps/sim/app/(home)/components/enterprise/enterprise.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,27 @@ import { GithubIcon } from '@/components/icons'
2121
import { AccessControlPanel } from '@/app/(home)/components/enterprise/components/access-control-panel'
2222
import { AuditLogPreview } from '@/app/(home)/components/enterprise/components/audit-log-preview'
2323

24-
const MARQUEE_KEYFRAMES = `
25-
@keyframes marquee {
24+
const ENTERPRISE_FEATURE_MARQUEE_STYLES = `
25+
@keyframes enterprise-feature-marquee {
2626
0% { transform: translateX(0); }
2727
100% { transform: translateX(-25%); }
2828
}
29+
.enterprise-feature-marquee-track {
30+
animation: enterprise-feature-marquee 30s linear infinite;
31+
}
32+
.enterprise-feature-marquee:hover .enterprise-feature-marquee-track {
33+
animation-play-state: paused;
34+
}
35+
.enterprise-feature-marquee-tag {
36+
transition: background-color 0.3s ease, color 0.3s ease;
37+
}
2938
@media (prefers-reduced-motion: reduce) {
30-
@keyframes marquee { 0%, 100% { transform: none; } }
39+
.enterprise-feature-marquee-track {
40+
animation: none;
41+
}
42+
.enterprise-feature-marquee-tag {
43+
transition: none;
44+
}
3145
}
3246
`
3347

@@ -171,9 +185,9 @@ export default function Enterprise() {
171185

172186
<TrustStrip />
173187

174-
{/* Scrolling feature ticker */}
175-
<div className='relative mt-6 overflow-hidden border-[#2A2A2A] border-t'>
176-
<style dangerouslySetInnerHTML={{ __html: MARQUEE_KEYFRAMES }} />
188+
{/* Scrolling feature ticker — keyframe loop; pause on hover. Tags use transitions for hover. */}
189+
<div className='enterprise-feature-marquee relative mt-6 overflow-hidden border-[#2A2A2A] border-t'>
190+
<style dangerouslySetInnerHTML={{ __html: ENTERPRISE_FEATURE_MARQUEE_STYLES }} />
177191
{/* Fade edges */}
178192
<div
179193
aria-hidden='true'
@@ -186,12 +200,12 @@ export default function Enterprise() {
186200
style={{ background: 'linear-gradient(to left, #1C1C1C, transparent)' }}
187201
/>
188202
{/* Duplicate tags for seamless loop */}
189-
<div className='flex w-max' style={{ animation: 'marquee 30s linear infinite' }}>
203+
<div className='enterprise-feature-marquee-track flex w-max'>
190204
{[...FEATURE_TAGS, ...FEATURE_TAGS, ...FEATURE_TAGS, ...FEATURE_TAGS].map(
191205
(tag, i) => (
192206
<span
193207
key={i}
194-
className='whitespace-nowrap border-[#2A2A2A] border-r px-5 py-4 font-[430] font-season text-[#F6F6F6]/40 text-[13px] leading-none tracking-[0.02em]'
208+
className='enterprise-feature-marquee-tag whitespace-nowrap border-[#2A2A2A] border-r px-5 py-4 font-[430] font-season text-[#F6F6F6]/40 text-[13px] leading-none tracking-[0.02em] hover:bg-white/[0.04] hover:text-[#F6F6F6]/55'
195209
>
196210
{tag}
197211
</span>

0 commit comments

Comments
 (0)