Skip to content

Commit

Permalink
feat: squiggly animation (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo authored Feb 20, 2024
1 parent 0180e17 commit f723423
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 17 deletions.
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import react from "@astrojs/react";
// https://astro.build/config
export default defineConfig({
site: "https://astro-moon-landing.netlify.app/",
integrations: [tailwind(), icon(), react()]
});
integrations: [tailwind(), icon(), react()],
});
4 changes: 3 additions & 1 deletion src/components/splash.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Image } from "astro:assets";
import { Icon } from "astro-icon/components";
import gubImage from "~/assets/Bicho.svg";
import background from "/public/background.jpg";
import SquigglyAnimation from "~/components/squigglyAnimation.astro";
---

<section class="relative h-full bg-black overflow-y-hidden select-none">
Expand Down Expand Up @@ -32,7 +33,7 @@ import background from "/public/background.jpg";
>
<div class="tracking-tighter text-5xl sm:text-7xl text-center">
<h2 class="text-left text-4xl tracking-wider">HACKATHON</h2>
<h1 class="tracking-wide">BUGSBYTE</h1>
<h1 class="tracking-wide animate-squiggle">BUGSBYTE</h1>
<p class="text-left tracking-wide text-3xl">5 - 7 APRIL</p>
</div>
<div class="flex flex-row sm:hidden">
Expand All @@ -41,6 +42,7 @@ import background from "/public/background.jpg";
</div>
</div>
</section>
<SquigglyAnimation />

<noscript>
<style>
Expand Down
61 changes: 61 additions & 0 deletions src/components/squigglyAnimation.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<div class="hidden">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="squiggly-0">
<feTurbulence
id="turbulence"
baseFrequency="0.01"
numOctaves="3"
result="noise"
seed="0"></feTurbulence>
<feDisplacementMap
id="displacement"
in="SourceGraphic"
in2="noise"
scale="6"></feDisplacementMap>
</filter>
<filter id="squiggly-1">
<feTurbulence
id="turbulence"
baseFrequency="0.01"
numOctaves="3"
result="noise"
seed="1"></feTurbulence>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="8"
></feDisplacementMap>
</filter>

<filter id="squiggly-2">
<feTurbulence
id="turbulence"
baseFrequency="0.01"
numOctaves="3"
result="noise"
seed="2"></feTurbulence>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="6"
></feDisplacementMap>
</filter>
<filter id="squiggly-3">
<feTurbulence
id="turbulence"
baseFrequency="0.01"
numOctaves="3"
result="noise"
seed="3"></feTurbulence>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="8"
></feDisplacementMap>
</filter>

<filter id="squiggly-4">
<feTurbulence
id="turbulence"
baseFrequency="0.01"
numOctaves="3"
result="noise"
seed="4"></feTurbulence>
<feDisplacementMap in="SourceGraphic" in2="noise" scale="6"
></feDisplacementMap>
</filter>
</defs>
</svg>
</div>
21 changes: 7 additions & 14 deletions src/data/faqs.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,35 @@
[
{
"question":
"I'm not a student from Universidade do Minho, can I still participate in the event?",
"answer":
"Yes, all higher education students over 18 can participate in the event."
"question": "I'm not a student from Universidade do Minho, can I still participate in the event?",
"answer": "Yes, all higher education students over 18 can participate in the event."
},
{
"question": "Is it free to participate in the BugsByte Hackathon?",
"answer": "Yes, the event is completely free."
},
{
"question": "Do I need to register to be able to participate in the event?",
"answer":
"Yes, it is necessary to register to be able to participate in the event. Very soon we'll make a link available on our website to do so."
"answer": "Yes, it is necessary to register to be able to participate in the event. Very soon we'll make a link available on our website to do so."
},
{
"question": "Do I need to register as a team?",
"answer":
"No, only individual registration is required. Once registered, you can form a team with other participants at your convenience."
"answer": "No, only individual registration is required. Once registered, you can form a team with other participants at your convenience."
},
{
"question": "How many people can a team contain?",
"answer": "The sizes of the teams may vary between 2 to 5 elements."
},
{
"question": "Can I leave the space of the event during the weekend?",
"answer":
"Yes, you're completely free to enter and exit the premisses of the event during the weekend."
"answer": "Yes, you're completely free to enter and exit the premisses of the event during the weekend."
},
{
"question": "Which technology/tools are we gonna work with?",
"answer":
"You're going to be totally free to choose the stack you'll work on."
"answer": "You're going to be totally free to choose the stack you'll work on."
},
{
"question": "Where am I going to sleep?",
"answer":
"If you intend to sleep during the event, we will have a dedicated place for you to rest. Only bring what you find essential such as pillows, sleeping bags, blankets, etc."
"answer": "If you intend to sleep during the event, we will have a dedicated place for you to rest. Only bring what you find essential such as pillows, sleeping bags, blankets, etc."
},
{
"question": "What am I going to eat during the event?",
Expand Down
12 changes: 12 additions & 0 deletions tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@ module.exports = {
borderColor: {
default: "var(--color-border)",
},
keyframes: {
squiggle: {
"0%": { filter: "url('#squiggly-0')" },
"25%": { filter: "url('#squiggly-1')" },
"50%": { filter: "url('#squiggly-2')" },
"75%": { filter: "url('#squiggly-3')" },
"100%": { filter: "url('#squiggly-4')" },
},
},
animation: {
squiggle: "squiggle 0.45s ease-in-out infinite",
},
},
},
corePlugins: {
Expand Down

0 comments on commit f723423

Please sign in to comment.