diff --git a/apps/blog/components/Author/index.tsx b/apps/blog/components/Author/index.tsx index 1a1aa469..0edd9c29 100644 --- a/apps/blog/components/Author/index.tsx +++ b/apps/blog/components/Author/index.tsx @@ -4,15 +4,17 @@ import Image from "next/image"; export default function Author({ name, photo, username }: IAuthor) { return ( -
  • +
  • - + avatar -

    +

    {name}

    diff --git a/apps/blog/components/Entry/index.tsx b/apps/blog/components/Entry/index.tsx index 7e0ebebc..1ff64c15 100644 --- a/apps/blog/components/Entry/index.tsx +++ b/apps/blog/components/Entry/index.tsx @@ -37,12 +37,14 @@ export default function Entry({
    -

    +

    {author?.name}

    avatar
    diff --git a/apps/blog/components/Featured/index.tsx b/apps/blog/components/Featured/index.tsx index 651a03f3..d45f5a51 100644 --- a/apps/blog/components/Featured/index.tsx +++ b/apps/blog/components/Featured/index.tsx @@ -28,6 +28,8 @@ export default function Featured({ title, author, date, topic, slug }: Props) { avatar

    diff --git a/apps/maintenance/pages/index.tsx b/apps/maintenance/pages/index.tsx index d9d847f2..ec59cdf8 100644 --- a/apps/maintenance/pages/index.tsx +++ b/apps/maintenance/pages/index.tsx @@ -27,20 +27,9 @@ const MaintenancePage = () => { Pedimos desculpa por qualquer inconveniente e obrigado pela sua paciência.

    -

    - Clique no dinossauro e dê o seu melhor! -

    Estaremos de volta em breve!

    -
    - -

    diff --git a/apps/maintenance/public/chrome-dino-game/README.md b/apps/maintenance/public/chrome-dino-game/README.md deleted file mode 100644 index 74030b28..00000000 --- a/apps/maintenance/public/chrome-dino-game/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Chrome Dino Game - -> This is a recreation of everyone's favorite offline companion, google chrome dinosaur game, with the same classic monochrome interface. - -## Instructions - -- Press `Any Key` to start the game. -- Press `Space Bar` to jump and avoid cactus. - -## Features - -- Cactus obstacles -- Score counter -- Collision detection -- Gradual increase in game speed - -## Screenshot - -![Screenshot](https://user-images.githubusercontent.com/77227201/174440360-c3c3d692-a9cd-4fe3-ad1c-43fdebf4c55a.png) diff --git a/apps/maintenance/public/chrome-dino-game/assets/cactus.png b/apps/maintenance/public/chrome-dino-game/assets/cactus.png deleted file mode 100644 index 18534a44..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/cactus.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/assets/dino-lose.png b/apps/maintenance/public/chrome-dino-game/assets/dino-lose.png deleted file mode 100644 index 3dc22d11..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/dino-lose.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/assets/dino-run-0.png b/apps/maintenance/public/chrome-dino-game/assets/dino-run-0.png deleted file mode 100644 index 6ba88a0a..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/dino-run-0.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/assets/dino-run-1.png b/apps/maintenance/public/chrome-dino-game/assets/dino-run-1.png deleted file mode 100644 index 872142a5..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/dino-run-1.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/assets/dino-stationary.png b/apps/maintenance/public/chrome-dino-game/assets/dino-stationary.png deleted file mode 100644 index b0653191..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/dino-stationary.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/assets/ground.png b/apps/maintenance/public/chrome-dino-game/assets/ground.png deleted file mode 100644 index be13348f..00000000 Binary files a/apps/maintenance/public/chrome-dino-game/assets/ground.png and /dev/null differ diff --git a/apps/maintenance/public/chrome-dino-game/index.html b/apps/maintenance/public/chrome-dino-game/index.html deleted file mode 100644 index d22f1b74..00000000 --- a/apps/maintenance/public/chrome-dino-game/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Chrome Dino Game - - - - - - -
    -
    0
    -
    Pressione qualquer tecla para iniciar
    - - - -
    -

    Não funciona? Abre PR!

    - Pressione qualquer tecla para recomeçar -
    -
    - - - diff --git a/apps/maintenance/public/chrome-dino-game/script.js b/apps/maintenance/public/chrome-dino-game/script.js deleted file mode 100644 index 2583e452..00000000 --- a/apps/maintenance/public/chrome-dino-game/script.js +++ /dev/null @@ -1,254 +0,0 @@ -const SPEED_SCALE = 0.00001; - -const game = document.querySelector("#game"); -const scoreDisplay = document.querySelector("#score"); -const startMessage = document.querySelector("#start-message"); -const gameoverMessage = document.querySelector("#gameover-message"); - -document.addEventListener("keydown", startGame, { once: true }); - -/* general variables */ -let lastTime; -let speedScale; -let score; - -/* frame update */ -function update(time) { - if (lastTime == null) { - lastTime = time; - window.requestAnimationFrame(update); - return; - } - - const delta = time - lastTime; - - updateGround(delta, speedScale); - updateDino(delta, speedScale); - updateCactus(delta, speedScale); - updateSpeedScale(delta); - updateScore(delta); - - if (checkGameOver()) return handleGameOver(); - - lastTime = time; - window.requestAnimationFrame(update); -} - -function startGame() { - lastTime = null; - speedScale = 1; - score = 0; - setupGround(); - setupDino(); - setupCactus(); - startMessage.classList.add("hide"); - gameoverMessage.classList.add("hide"); - window.requestAnimationFrame(update); -} - -/* speeds up the game over time */ -function updateSpeedScale(delta) { - speedScale += delta * SPEED_SCALE; -} - -function updateScore(delta) { - score += delta * 0.01; - scoreDisplay.textContent = Math.floor(score); -} - -/* collision conditions */ -function checkCollision(rect1, rect2) { - return ( - rect1.left < rect2.right && - rect1.top < rect2.bottom && - rect1.right > rect2.left && - rect1.bottom > rect2.top - ); -} - -function checkGameOver() { - const dinoRect = getDinoRect(); - return getCactusRects().some((rect) => - checkCollision(rect, dinoRect) - ); /* check collision with any of the cactus */ -} - -function handleGameOver() { - setDinoLose(); - setTimeout(() => { - document.addEventListener("keydown", startGame, { - once: true, - }); /* prevents accidental click */ - gameoverMessage.classList.remove("hide"); - }, 100); -} - -/* HANDLING CSS PROPERTIES */ - -/* get property value */ -function getCustomProperty(elem, prop) { - return parseFloat(getComputedStyle(elem).getPropertyValue(prop)) || 0; -} - -/* set property value */ -function setCustomProperty(elem, prop, value) { - elem.style.setProperty(prop, value); -} - -/* increment the property value */ -function incrementCustomProperty(elem, prop, inc) { - setCustomProperty(elem, prop, getCustomProperty(elem, prop) + inc); -} - -/* GROUND MOVEMENT */ - -const GROUND_SPEED = 0.05; -const grounds = document.querySelectorAll(".ground"); - -function setupGround() { - setCustomProperty(grounds[0], "--left", 0); - setCustomProperty(grounds[1], "--left", 300); -} - -function updateGround(delta, speedScale) { - grounds.forEach((ground) => { - incrementCustomProperty( - ground, - "--left", - delta * speedScale * GROUND_SPEED * -1 - ); /* moves the ground according to game speed */ - - if (getCustomProperty(ground, "--left") <= -300) { - incrementCustomProperty(ground, "--left", 600); /* loop the elements */ - } - }); -} - -/* DINOSAUR MOVEMENT */ - -const dino = document.querySelector("#dino"); -const JUMP_SPEED = 0.45; -const GRAVITY = 0.0015; -const DINO_FRAME_COUNT = 2; -const FRAME_TIME = 100; - -let isJumping; -let dinoFrame; -let currentFrameTime; -let yVelocity; - -function setupDino() { - isJumping = false; - dinoFrame = 0; - currentFrameTime = 0; - yVelocity = 0; - - setCustomProperty(dino, "--bottom", 0); - document.removeEventListener( - "keydown", - onJump - ); /* reset the dinosaur if the player dies while jumping */ - document.addEventListener("keydown", onJump); -} - -function updateDino(delta, speedScale) { - handleRun(delta, speedScale); - handleJump(delta); -} - -function getDinoRect() { - return dino.getBoundingClientRect(); /* get the dinosaur hitbox */ -} - -function setDinoLose() { - dino.src = "assets/dino-lose.png"; -} - -function handleRun(delta, speedScale) { - if (isJumping) { - dino.src = `assets/dino-stationary.png`; - return; - } - - if (currentFrameTime >= FRAME_TIME) { - dinoFrame = (dinoFrame + 1) % DINO_FRAME_COUNT; - dino.src = `assets/dino-run-${dinoFrame}.png`; /* switch between images to simulate movement */ - currentFrameTime -= FRAME_TIME; - } - currentFrameTime += delta * speedScale; -} - -function handleJump(delta) { - if (!isJumping) return; - - incrementCustomProperty(dino, "--bottom", yVelocity * delta); - - if (getCustomProperty(dino, "--bottom") <= 0) { - setCustomProperty(dino, "--bottom", 0); - isJumping = false; - } - - yVelocity -= GRAVITY * delta; -} - -function onJump(e) { - if (e.code !== "Space" || isJumping) return; - - yVelocity = JUMP_SPEED; - isJumping = true; -} - -/* ADD CACTUS */ - -const CACTUS_SPEED = 0.05; -const CACTUS_INTERVAL_MIN = 500; -const CACTUS_INTERVAL_MAX = 2000; - -let nextCactusTime; - -function setupCactus() { - nextCactusTime = CACTUS_INTERVAL_MIN; - document.querySelectorAll(".cactus").forEach((cactus) => { - cactus.remove(); /* remove cactus when game restart */ - }); -} - -function updateCactus(delta, speedScale) { - document.querySelectorAll(".cactus").forEach((cactus) => { - incrementCustomProperty( - cactus, - "--left", - delta * speedScale * CACTUS_SPEED * -1 - ); - if (getCustomProperty(cactus, "--left") <= -100) { - cactus.remove(); /* remove cactus off screen so it doesn't impair game performance */ - } - }); - - if (nextCactusTime <= 0) { - createCactus(); - nextCactusTime = - randomizer(CACTUS_INTERVAL_MIN, CACTUS_INTERVAL_MAX) / speedScale; - } - nextCactusTime -= delta; -} - -function getCactusRects() { - return [...document.querySelectorAll(".cactus")].map((cactus) => { - return cactus.getBoundingClientRect(); /* get the hitbox of all the cactus on the screen */ - }); -} - -function createCactus() { - const cactus = document.createElement("img"); - cactus.src = "assets/cactus.png"; - cactus.classList.add("cactus"); - setCustomProperty(cactus, "--left", 100); - game.append(cactus); -} - -function randomizer(min, max) { - return Math.floor( - Math.random() * (max - min + 1) + min - ); /* choose a number between minimum and maximum */ -} diff --git a/apps/maintenance/public/chrome-dino-game/style.css b/apps/maintenance/public/chrome-dino-game/style.css deleted file mode 100644 index e0aae902..00000000 --- a/apps/maintenance/public/chrome-dino-game/style.css +++ /dev/null @@ -1,93 +0,0 @@ -:root { - --txt-primary: #535353; - --txt-hover: #292929; - --background: transparent; -} - -*, -*::before, -*::after { - box-sizing: border-box; - user-select: none; -} - -body { - min-height: 100vh; - display: flex; - justify-content: center; - align-items: center; - font-family: 'Press Start 2P', cursive; - color: var(--txt-primary); - background-color: var(--background); - margin: 0; -} - -.game { - position: relative; - width: 600px; - height: 200px; - overflow: hidden; -} - -.score { - position: absolute; - right: 5vmin; - top: 1vmin; - font-size: .8rem; -} - -.start-message { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - font-size: .8rem; - text-align: center; - text-transform: uppercase; -} - -.gameover-message { - position: absolute; - top: 35%; - left: 50%; - transform: translate(-50%, -50%); - font-size: .8rem; - text-align: center; - text-transform: uppercase; -} - -.gameover-message p { - letter-spacing: .5em; -} - -.gameover-message span { - font-size: .6rem; - text-transform: none; -} - -.ground { - --left: 0; - width: 300%; - position: absolute; - bottom: 0; - left: calc(var(--left) * 1%); -} - -.dino { - --bottom: 0; - height: 30%; - position: absolute; - left: 1%; - bottom: calc(var(--bottom) * 1%); -} - -.cactus { - height: 30%; - position: absolute; - bottom: 0; - left: calc(var(--left) * 1%); -} - -.hide { - display: none; -} diff --git a/apps/web/components/Champion/index.js b/apps/web/components/Champion/index.js index 3461dc61..c004499c 100644 --- a/apps/web/components/Champion/index.js +++ b/apps/web/components/Champion/index.js @@ -5,7 +5,9 @@ export default function Champion({ picture, name, role }) {
    {name}
    diff --git a/apps/web/components/Member/index.tsx b/apps/web/components/Member/index.tsx index 59aa5627..8941667e 100644 --- a/apps/web/components/Member/index.tsx +++ b/apps/web/components/Member/index.tsx @@ -5,13 +5,15 @@ import { ITeamMember } from "~/lib/types"; export default function Member({ name, picture, role }: ITeamMember) { return (
    - {name} +
    + {name} +

    {name}

    diff --git a/apps/web/components/Speaker/index.js b/apps/web/components/Speaker/index.js index 0a7d2e70..89bf9a92 100644 --- a/apps/web/components/Speaker/index.js +++ b/apps/web/components/Speaker/index.js @@ -3,11 +3,15 @@ import Image from "next/image"; export default function Speaker({ picture, name, role }) { return (

    - {name} +
    + {name} +

    {name}