diff options
author | 2021-04-26 16:54:20 -0500 | |
---|---|---|
committer | 2021-04-26 15:54:20 -0600 | |
commit | dea1a6dfc9dec54034d2b872b4cd36c0174814c6 (patch) | |
tree | 49569a511201b4defc23b6654b475e458452596a /www/src/components/Stars.astro | |
parent | 0ea4a986e207238bf0ac1db841b2a5d5b567d84d (diff) | |
download | astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.tar.gz astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.tar.zst astro-dea1a6dfc9dec54034d2b872b4cd36c0174814c6.zip |
Update defaults directory structure to `src` and `dist` (#132)
* chore: update defaults in docs
* chore: update config defaults
* test: update tests to config defaults
* chore: update gitignore to new defaults
* docs: update readme to new defaults
* chore: update examples to new defaults
* chore: update default exclude in lang server
* chore: update tests
* test: fix failing tests
* chore: update www defaults
Diffstat (limited to 'www/src/components/Stars.astro')
-rw-r--r-- | www/src/components/Stars.astro | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/www/src/components/Stars.astro b/www/src/components/Stars.astro new file mode 100644 index 000000000..952bc0340 --- /dev/null +++ b/www/src/components/Stars.astro @@ -0,0 +1,123 @@ +<div class="stars"> + <svg class="meteor meteor-a" width="245" height="8" viewBox="0 0 245 8" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fill-rule="evenodd" clip-rule="evenodd" d="M244.056 4.01L4.16456 7.94042C1.96643 7.97644 0.165161 6.20444 0.165161 4.00602V4.00602C0.165161 1.80754 1.9665 0.0355242 4.16468 0.0716125L244.056 4.01Z" fill="url(#paint0_linear)"/> + <defs> + <linearGradient id="paint0_linear" x1="11.8939" y1="8.00591" x2="256.078" y2="8.00591" gradientUnits="userSpaceOnUse"> + <stop stop-color="white"/> + <stop offset="1" stop-color="white" stop-opacity="0"/> + </linearGradient> + </defs> + </svg> + + <svg class="meteor meteor-b" width="245" height="8" viewBox="0 0 245 8" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fill-rule="evenodd" clip-rule="evenodd" d="M244.056 4.01L4.16456 7.94042C1.96643 7.97644 0.165161 6.20444 0.165161 4.00602V4.00602C0.165161 1.80754 1.9665 0.0355242 4.16468 0.0716125L244.056 4.01Z" fill="url(#paint0_linear)"/> + <defs> + <linearGradient id="paint0_linear" x1="11.8939" y1="8.00591" x2="256.078" y2="8.00591" gradientUnits="userSpaceOnUse"> + <stop stop-color="white"/> + <stop offset="1" stop-color="white" stop-opacity="0"/> + </linearGradient> + </defs> + </svg> + + <svg class="meteor meteor-c" width="245" height="8" viewBox="0 0 245 8" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fill-rule="evenodd" clip-rule="evenodd" d="M244.056 4.01L4.16456 7.94042C1.96643 7.97644 0.165161 6.20444 0.165161 4.00602V4.00602C0.165161 1.80754 1.9665 0.0355242 4.16468 0.0716125L244.056 4.01Z" fill="url(#paint0_linear)"/> + <defs> + <linearGradient id="paint0_linear" x1="11.8939" y1="8.00591" x2="256.078" y2="8.00591" gradientUnits="userSpaceOnUse"> + <stop stop-color="white"/> + <stop offset="1" stop-color="white" stop-opacity="0"/> + </linearGradient> + </defs> + </svg> + + <svg class="bg" width="1440" height="1090" viewBox="0 0 1440 1090" fill="none" + xmlns="http://www.w3.org/2000/svg"> + <circle cx="58" cy="226.5" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="534.857" cy="127.5" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="90.1501" cy="37.3223" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="1009" cy="100.5" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="166" cy="493.833" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="1386" cy="412.833" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="100" cy="857.167" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="1296.01" cy="748.988" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="1017" cy="767.167" r="2" fill="white" fill-opacity="0.4" /> + <circle cx="84.1501" cy="212.209" r="6" fill="white" fill-opacity="0.4" /> + <circle cx="1351" cy="119.5" r="6" fill="white" fill-opacity="0.4" /> + <circle cx="1179" cy="785" r="6" fill="white" fill-opacity="0.4" /> + <path d="M983.911 60.1743L975.34 55.0487L967.148 60.7596L972.274 52.1889L966.563 43.9965L975.133 49.1221L983.326 43.4111L978.2 51.9819L983.911 60.1743Z" fill="white" fill-opacity="0.4" /> + </svg> +</div> + + +<style> + .stars { + --duration: 10s; + --delay: 0s; + --dist: 480px; + position: absolute; + pointer-events: none; + width: 100%; + height: 100%; + top: 0; + right: 0; + bottom: 0; + left: 0; + inset: 0; + z-index: 0; + } + .bg { + object-position: top center; + object-fit: fill; + min-width: 1200px; + min-height: 100vh; + width: 100%; + height: 100%; + margin: auto; + } + .meteor { + display: none; + position: absolute; + transform: scale(var(--scale)) rotate(-34deg); + animation: meteor var(--duration) var(--delay) cubic-bezier(0.895, 0.030, 0.685, 0.220) infinite both; + } + @media (prefers-reduced-motion: no-preference) { + .meteor { + display: block; + } + } + .meteor-a { + --duration: 10s; + --scale: 1; + top: calc(var(--dist) * -0.25); + left: calc(var(--dist)); + } + .meteor-b { + --duration: 9s; + --delay: 9s; + --scale: 0.8; + top: -5%; + right: 10%; + } + .meteor-c { + --duration: 12s; + --delay: 6s; + --scale: 1.5; + bottom: 10%; + right: -256px; + transform-origin: bottom left; + } + + @keyframes meteor { + 0% { + transform: scale(calc(var(--scale) * 0.75)) rotate(-34deg) translateX(0); + opacity: 0; + } + 10% { + opacity: 1; + } + 40%, + 100% { + transform: scale(calc(var(--scale) * 1.1)) rotate(-34deg) translateX(calc(var(--dist) * -1)); + opacity: 0; + } + } +</style> |