diff options
author | LynithDev <61880709+LynithDev@users.noreply.github.com> | 2023-12-30 12:53:40 +0100 |
---|---|---|
committer | LynithDev <61880709+LynithDev@users.noreply.github.com> | 2023-12-30 12:53:40 +0100 |
commit | 5b5bc9e0d79877f0554278ab6a609ef688858d8f (patch) | |
tree | c7f0d36d052b04e66a0edb84d5e08cb17ce1dafd /apps/website/src/components/base/Section.astro | |
parent | d568fe0235de920f2b97f70777bab94c114d5654 (diff) | |
download | Nexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.tar.gz Nexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.tar.bz2 Nexus-5b5bc9e0d79877f0554278ab6a609ef688858d8f.zip |
Add locomotive
Diffstat (limited to 'apps/website/src/components/base/Section.astro')
-rw-r--r-- | apps/website/src/components/base/Section.astro | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/website/src/components/base/Section.astro b/apps/website/src/components/base/Section.astro index c463a16..5f3cc1d 100644 --- a/apps/website/src/components/base/Section.astro +++ b/apps/website/src/components/base/Section.astro @@ -7,6 +7,7 @@ interface Props extends HTMLAttributes<'section'> { wrapperClass?: string wFull?: boolean hFull?: boolean + scrollSection?: boolean } const { @@ -15,6 +16,7 @@ const { wrapperClass = '', wFull = true, hFull = false, + scrollSection = true, ...props } = Astro.props; @@ -24,9 +26,13 @@ const twoColumnClasses = ` ${maxWidth === 'none' ? 'justify-center' : 'justify-c ${colReverse ? 'flex-col-reverse' : 'flex-col'} lg:flex-row items-center`; const className = `max-w-[${maxWidth}] ${hFull ? 'min-h-screen' : 'h-auto'} ${wFull ? 'w-full' : `w-[${maxWidth}]`} px-5 xl:px-0 flex gap-x-20 gap-y-4${twoColumn ? twoColumnClasses : ''}${props.class ? ` ${props.class}` : ''}`; + +const sectionAttr = { + ...(scrollSection ? { 'data-scroll-section': '' } : {}), +}; --- -<section class={`w-full outline-none flex justify-center ${wrapperClass ?? ''}`}> +<section {...sectionAttr} class={`w-full outline-none flex justify-center ${wrapperClass ?? ''}`}> <div class={className} {...props}> {twoColumn ? ( |