Smooth scroll behavior

This commit is contained in:
prototypa
2022-08-26 18:16:36 -04:00
parent b67eca0cc9
commit 44a0607d4d
3 changed files with 262 additions and 144 deletions

View File

@ -40,7 +40,7 @@ const {} = Astro.props;
<div> <div>
<a <a
class="btn text-white bg-gray-900 hover:bg-gray-800 dark:bg-gray-700 dark:hover:bg-gray-800 ml-4" class="btn text-white bg-gray-900 hover:bg-gray-800 dark:bg-gray-700 dark:hover:bg-gray-800 ml-4"
href="#" href="#features"
>Learn more >Learn more
</a> </a>
</div> </div>

View File

@ -2,160 +2,278 @@
const {} = Astro.props; const {} = Astro.props;
--- ---
<section class="px-4 py-16 mx-auto max-w-6xl lg:px-8 lg:py-20 bg-blue-50 dark:bg-slate-800"> <section class="scroll-mt-16" id="features">
<div class="max-w-xl mb-10 md:mx-auto sm:text-center lg:max-w-2xl md:mb-12"> <div
<p class="text-base text-blue-600 dark:text-blue-200 font-semibold tracking-wide uppercase">Features</p> class="px-4 py-16 mx-auto max-w-6xl lg:px-8 lg:py-20 bg-blue-50 dark:bg-slate-800"
<h2 class="text-4xl md:text-5xl font-bold leading-tighter tracking-tighter mb-4"> >
What's interesting about <span <div class="max-w-xl mb-10 md:mx-auto sm:text-center lg:max-w-2xl md:mb-12">
class="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-pink-500 whitespace-nowrap" <p
>AstroWind class="text-base text-blue-600 dark:text-blue-200 font-semibold tracking-wide uppercase"
</span> >
</h2> Features
<p class="max-w-3xl mx-auto sm:text-center text-xl text-gray-600 dark:text-slate-400"> </p>
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque rem aperiam, eaque ipsa <h2
quae. class="text-4xl md:text-5xl font-bold leading-tighter tracking-tighter mb-4"
</p> >
</div> What's interesting about <span
<div class="grid mx-auto space-y-6 md:grid-cols-2 md:space-y-0"> class="bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-pink-500 whitespace-nowrap"
<div class="space-y-8 sm:px-8"> >AstroWind
<div class="flex flex-row max-w-md"> </span>
<div class="mb-4 mr-4"> </h2>
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"> <p
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> class="max-w-3xl mx-auto sm:text-center text-xl text-gray-600 dark:text-slate-400"
<g fill="none" fill-rule="evenodd"> >
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect> Sed ut perspiciatis unde omnis iste natus error sit voluptatem
<g stroke-linecap="square" stroke-width="2"> accusantium doloremque rem aperiam, eaque ipsa quae.
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path> </p>
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58">
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Integration with Tailwind CSS</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi
risus tempus nulla.
</p>
</div>
</div>
<div class="flex flex-row max-w-md">
<div class="mb-4 mr-4">
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500">
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path>
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58">
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Ready-to-use Components</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi
risus tempus nulla.
</p>
</div>
</div>
<div class="flex flex-row max-w-md">
<div class="mb-4 mr-4">
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500">
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path>
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58">
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Best Practices</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi
risus tempus nulla.
</p>
</div>
</div>
</div> </div>
<div class="space-y-8 sm:px-8"> <div class="grid mx-auto space-y-6 md:grid-cols-2 md:space-y-0">
<div class="flex flex-row max-w-md"> <div class="space-y-8 sm:px-8">
<div class="mb-4 mr-4"> <div class="flex flex-row max-w-md">
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"> <div class="mb-4 mr-4">
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <div
<g fill="none" fill-rule="evenodd"> class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect> >
<g stroke-linecap="square" stroke-width="2"> <svg
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path> class="w-12 h-12 p-0.5"
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"> viewBox="0 0 64 64"
</path> xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<rect
class="fill-current text-blue-600"
width="64"
height="64"
rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g> </g>
</g> </svg>
</svg> </div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">
Integration with Tailwind CSS
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div> </div>
</div> </div>
<div> <div class="flex flex-row max-w-md">
<h3 class="mb-3 text-xl font-bold">Excelent Page Speed</h3> <div class="mb-4 mr-4">
<p> <div
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
risus tempus nulla. >
</p> <svg
class="w-12 h-12 p-0.5"
viewBox="0 0 64 64"
xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<rect
class="fill-current text-blue-600"
width="64"
height="64"
rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Ready-to-use Components</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div>
</div>
<div class="flex flex-row max-w-md">
<div class="mb-4 mr-4">
<div
class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
>
<svg
class="w-12 h-12 p-0.5"
viewBox="0 0 64 64"
xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<rect
class="fill-current text-blue-600"
width="64"
height="64"
rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Best Practices</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div>
</div> </div>
</div> </div>
<div class="flex flex-row max-w-md"> <div class="space-y-8 sm:px-8">
<div class="mb-4 mr-4"> <div class="flex flex-row max-w-md">
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"> <div class="mb-4 mr-4">
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <div
<g fill="none" fill-rule="evenodd"> class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect> >
<g stroke-linecap="square" stroke-width="2"> <svg
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path> class="w-12 h-12 p-0.5"
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"> viewBox="0 0 64 64"
</path> xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<rect
class="fill-current text-blue-600"
width="64"
height="64"
rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g> </g>
</g> </svg>
</svg> </div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Excelent Page Speed</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div> </div>
</div> </div>
<div> <div class="flex flex-row max-w-md">
<h3 class="mb-3 text-xl font-bold">Frequently updated</h3> <div class="mb-4 mr-4">
<p> <div
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
risus tempus nulla. >
</p> <svg
</div> class="w-12 h-12 p-0.5"
</div> viewBox="0 0 64 64"
<div class="flex flex-row max-w-md"> xmlns="http://www.w3.org/2000/svg"
<div class="mb-4 mr-4"> >
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"> <g fill="none" fill-rule="evenodd">
<svg class="w-12 h-12 p-0.5" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"> <rect
<g fill="none" fill-rule="evenodd"> class="fill-current text-blue-600"
<rect class="fill-current text-blue-600" width="64" height="64" rx="32"></rect> width="64"
<g stroke-linecap="square" stroke-width="2"> height="64"
<path class="stroke-current text-white" d="M20.571 20.571h13.714v17.143H20.571z"> </path> rx="32"></rect>
<path class="stroke-current text-blue-300" d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"> <g stroke-linecap="square" stroke-width="2">
</path> <path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g> </g>
</g> </svg>
</svg> </div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">Frequently updated</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div> </div>
</div> </div>
<div> <div class="flex flex-row max-w-md">
<h3 class="mb-3 text-xl font-bold">Open to new ideas and contributions</h3> <div class="mb-4 mr-4">
<p> <div
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sagittis, quam nec venenatis lobortis, mi class="flex items-center justify-center w-12 h-12 rounded-full bg-blue-500"
risus tempus nulla. >
</p> <svg
class="w-12 h-12 p-0.5"
viewBox="0 0 64 64"
xmlns="http://www.w3.org/2000/svg"
>
<g fill="none" fill-rule="evenodd">
<rect
class="fill-current text-blue-600"
width="64"
height="64"
rx="32"></rect>
<g stroke-linecap="square" stroke-width="2">
<path
class="stroke-current text-white"
d="M20.571 20.571h13.714v17.143H20.571z"
>
</path>
<path
class="stroke-current text-blue-300"
d="M38.858 26.993l6.397 1.73-4.473 16.549-13.24-3.58"
>
</path>
</g>
</g>
</svg>
</div>
</div>
<div>
<h3 class="mb-3 text-xl font-bold">
Open to new ideas and contributions
</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi
sagittis, quam nec venenatis lobortis, mi risus tempus nulla.
</p>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,7 +8,7 @@ const { meta = {} } = Astro.props;
--- ---
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="2xl:text-[24px]"> <html lang="en" class="motion-safe:scroll-smooth 2xl:text-[24px]">
<head> <head>
<MetaTags {...meta} /> <MetaTags {...meta} />
</head> </head>