Update Manager/Color/Logo

This commit is contained in:
Ralex91 committed 2024-02-01 15:50:31 +01:00
1 parent f63bf33c6f
commit 1839f31a21
19 files changed
+64 -46

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="100%" height="100%" viewBox="5.989999771118164 -63.970001220703125 88.26000213623047 65.80000305175781"><g fill="#ff9900"><path d="M65.97 -41.84C65.97 -45.17 65.2 -48.32 63.68 -51.28C62.15 -54.25 59.98 -56.62 57.15 -58.4C55.98 -59.12 54.67 -59.7 53.2 -60.14C51.73 -60.59 50.2 -60.93 48.62 -61.18C47.04 -61.43 45.48 -61.59 43.92 -61.64C42.37 -61.7 40.93 -61.72 39.6 -61.72C34.38 -61.72 29.18 -61.56 24 -61.23C18.81 -60.89 13.61 -60.59 8.4 -60.31C8.07 -51.33 7.82 -42.34 7.65 -33.36C7.6 -28.31 7.4 -23.25 7.07 -18.18C6.74 -13.1 6.38 -8.01 5.99 -2.91C7.54 -2.75 9.08 -2.63 10.61 -2.58C12.13 -2.52 13.7 -2.5 15.31 -2.5C18.47 -2.5 21.63 -2.58 24.79 -2.75L24.37 -21.63C26.15 -21.74 27.94 -21.88 29.74 -22.04C31.54 -22.21 33.36 -22.35 35.19 -22.46C36.8 -18.3 38.04 -14.34 38.93 -10.56C39.82 -6.79 40.48 -2.66 40.93 1.83L65.22 1.25C61.11 -8.35 56.32 -17.72 50.83 -26.87C55.37 -27.09 59.04 -28.51 61.81 -31.11C64.58 -33.72 65.97 -37.3 65.97 -41.84ZM46.67 -43.17C46.67 -42.9 46.65 -42.43 46.63 -41.76C46.6 -41.09 46.57 -40.42 46.54 -39.72C46.52 -39.03 46.45 -38.36 46.34 -37.73C46.22 -37.09 46.09 -36.66 45.92 -36.44C45.53 -35.94 44.85 -35.53 43.88 -35.23C42.91 -34.92 41.86 -34.69 40.72 -34.52C39.58 -34.36 38.47 -34.25 37.39 -34.19C36.31 -34.13 35.49 -34.11 34.94 -34.11C33.66 -34.11 32.36 -34.16 31.03 -34.27C29.7 -34.38 28.42 -34.58 27.2 -34.86L24.96 -50.99C27.06 -51.33 29.18 -51.6 31.32 -51.83C33.46 -52.05 35.63 -52.16 37.85 -52.16C38.13 -52.16 38.61 -52.14 39.31 -52.12C40 -52.09 40.72 -52.03 41.47 -51.95C42.22 -51.87 42.92 -51.77 43.59 -51.66C44.26 -51.55 44.73 -51.38 45 -51.16C45.39 -50.83 45.7 -50.31 45.92 -49.62C46.14 -48.93 46.31 -48.18 46.42 -47.38C46.53 -46.57 46.6 -45.78 46.63 -45C46.65 -44.23 46.67 -43.62 46.67 -43.17Z M94.25 -63.97L74.87 -62.39C75.09 -58.56 75.28 -54.75 75.45 -50.95C75.62 -47.15 75.89 -43.37 76.28 -39.6L78.36 -18.63L87.51 -19.47C88.34 -23.63 89.19 -27.73 90.05 -31.78C90.91 -35.83 91.76 -39.93 92.59 -44.09C92.86 -45.53 93.1 -47.1 93.29 -48.79C93.49 -50.48 93.64 -52.21 93.75 -53.99C93.86 -55.76 93.96 -57.51 94.04 -59.23C94.13 -60.95 94.2 -62.53 94.25 -63.97ZM92.75 -6.65C92.75 -6.88 92.74 -7.08 92.71 -7.28C92.69 -7.47 92.62 -7.68 92.5 -7.9C91.89 -9.34 90.97 -10.43 89.72 -11.15C88.47 -11.87 87.07 -12.23 85.52 -12.23C84.57 -12.23 83.56 -12.08 82.48 -11.77C81.4 -11.47 80.4 -11.02 79.49 -10.44C78.57 -9.86 77.79 -9.14 77.16 -8.28C76.52 -7.42 76.2 -6.46 76.2 -5.41C76.2 -4.41 76.44 -3.52 76.91 -2.75C77.38 -1.97 77.99 -1.32 78.74 -0.79C79.49 -0.26 80.32 0.15 81.23 0.46C82.15 0.76 83.02 0.92 83.85 0.92C84.74 0.92 85.71 0.71 86.76 0.29C87.82 -0.12 88.79 -0.69 89.68 -1.41C90.56 -2.14 91.3 -2.95 91.88 -3.87C92.46 -4.78 92.75 -5.71 92.75 -6.65Z"></path></g></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>

Before

Width:  |  Height:  |  Size: 629 B

+1 -1
View File
@@ -12,7 +12,7 @@ const io = new Server({
path: "/ws/",
})
io.listen(5057)
io.listen(5157)
io.on("connection", (socket) => {
console.log(`A user connected ${socket.id}`)
+1 -1
View File
@@ -9,7 +9,7 @@ const Manager = {
return
}
let roomInvite = "207223" //generateRoomId()
let roomInvite = generateRoomId()
game.room = roomInvite
game.manager = socket.id
+1 -13
View File
@@ -1,13 +1 @@
<svg
xmlns="http://www.w3.org/2000/svg"
version="1.1"
xlink="http://www.w3.org/1999/xlink"
xmlns:svgjs="http://svgjs.com/svgjs"
width="100%"
height="100%"
viewBox="10.34000015258789 -73.18000030517578 461.989990234375 77.19000244140625"
>
<g fill="#ff9900">
<path d="M32.84 -26.89L61.68 4.01L69.05 -0.13L51.33 -33.88C61.5 -39.74 66.59 -47.11 66.59 -55.99C66.59 -59.18 65.99 -62.67 64.78 -66.46C59.35 -69.82 52.11 -71.5 43.06 -71.5C37.37 -71.5 31.42 -71.01 25.21 -70.02C19.01 -69.02 14.05 -67.93 10.34 -66.72L16.42 1.42L27.02 0.39L29.87 -26.25C30.64 -26.25 31.64 -26.46 32.84 -26.89ZM46.16 -53.01C46.16 -49.31 44.8 -45.6 42.09 -41.89C39.37 -38.19 35.56 -35.21 30.64 -32.97L33.88 -63.49C35.95 -64.26 37.84 -64.65 39.57 -64.65C43.96 -61.89 46.16 -58.01 46.16 -53.01Z M90.69 0L101.16 1.55L104.78 -13.71L132.97 -16.03L140.34 1.55L149.78 0L136.08 -68.92L110.47 -70.47ZM115.13 -57.15L115.9 -57.15L130.65 -21.59L106.72 -21.85Z M222.63 1.68L233.23 0.65L240.73 -70.21L216.68 -68.66L219.78 -32.2L198.84 -32.33L202.85 -70.47L178.67 -68.92L184.74 1.42L195.35 0.39L197.93 -24.18L220.3 -26.12Z M320.04 -21.98C320.04 -34.14 317.31 -44.87 311.83 -54.18C306.36 -63.49 299.49 -69.82 291.21 -73.18C285.35 -69.22 280.22 -62.62 275.82 -53.4C271.43 -44.18 269.23 -33.7 269.23 -21.98C269.23 -16.21 269.83 -10.34 271.04 -4.4C276.64 0.26 284.51 2.56 294.64 2.52C304.77 2.48 311.6 0.43 315.13 -3.62C316.94 -5.86 318.21 -8.4 318.95 -11.25C319.68 -14.09 320.04 -17.67 320.04 -21.98ZM307.11 -26.64C307.11 -21.12 306.51 -15.6 305.3 -10.09C300.56 -8.53 295.76 -7.76 290.89 -7.76C286.02 -7.76 282.37 -8.02 279.96 -8.53C279.96 -16.46 281.9 -24.55 285.78 -32.78C289.66 -41.01 295 -48.27 301.81 -54.56C305.35 -46.81 307.11 -37.5 307.11 -26.64Z M395.61 -21.98C395.61 -34.14 392.87 -44.87 387.4 -54.18C381.92 -63.49 375.05 -69.82 366.77 -73.18C360.91 -69.22 355.78 -62.62 351.39 -53.4C346.99 -44.18 344.79 -33.7 344.79 -21.98C344.79 -16.21 345.4 -10.34 346.6 -4.4C352.21 0.26 360.07 2.56 370.2 2.52C380.33 2.48 387.16 0.43 390.69 -3.62C392.5 -5.86 393.78 -8.4 394.51 -11.25C395.24 -14.09 395.61 -17.67 395.61 -21.98ZM382.68 -26.64C382.68 -21.12 382.07 -15.6 380.87 -10.09C376.13 -8.53 371.32 -7.76 366.45 -7.76C361.58 -7.76 357.94 -8.02 355.52 -8.53C355.52 -16.46 357.46 -24.55 361.34 -32.78C365.22 -41.01 370.57 -48.27 377.38 -54.56C380.91 -46.81 382.68 -37.5 382.68 -26.64Z M418.29 -69.05L418.93 -58.06L433.67 -59.48L439.1 1.42L450.61 0.39L457.21 -61.81L472.08 -63.36L472.33 -70.47Z"></path>
</g>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="100%" height="100%" viewBox="5.039999961853027 -54.5099983215332 358.2699890136719 56.39999771118164"><g fill="#ff9900"><path d="M55.56 -35.24C55.56 -38.05 54.92 -40.7 53.64 -43.2C52.35 -45.7 50.52 -47.69 48.14 -49.19C47.16 -49.8 46.05 -50.29 44.81 -50.66C43.57 -51.03 42.29 -51.33 40.96 -51.54C39.62 -51.75 38.3 -51.87 37 -51.92C35.69 -51.97 34.47 -51.99 33.35 -51.99C28.96 -51.99 24.58 -51.85 20.21 -51.57C15.85 -51.29 11.47 -51.03 7.08 -50.8C6.8 -43.23 6.59 -35.67 6.45 -28.1C6.4 -23.85 6.24 -19.58 5.96 -15.31C5.68 -11.04 5.37 -6.75 5.04 -2.45C6.35 -2.31 7.65 -2.22 8.93 -2.17C10.22 -2.13 11.54 -2.1 12.89 -2.1C15.56 -2.1 18.22 -2.17 20.88 -2.31L20.53 -18.22C22.03 -18.31 23.53 -18.43 25.05 -18.57C26.57 -18.71 28.1 -18.83 29.64 -18.92C30.99 -15.42 32.04 -12.08 32.79 -8.9C33.54 -5.72 34.1 -2.24 34.47 1.54L54.93 1.05C51.48 -7.03 47.44 -14.92 42.81 -22.63C46.64 -22.82 49.73 -24.01 52.06 -26.21C54.4 -28.4 55.56 -31.41 55.56 -35.24ZM39.31 -36.37C39.31 -36.13 39.3 -35.74 39.27 -35.17C39.25 -34.61 39.23 -34.04 39.2 -33.46C39.18 -32.87 39.12 -32.31 39.03 -31.78C38.94 -31.24 38.82 -30.88 38.68 -30.69C38.35 -30.27 37.78 -29.93 36.96 -29.67C36.14 -29.42 35.26 -29.22 34.3 -29.08C33.34 -28.94 32.41 -28.85 31.5 -28.8C30.59 -28.75 29.9 -28.73 29.43 -28.73C28.35 -28.73 27.26 -28.78 26.14 -28.87C25.01 -28.96 23.94 -29.13 22.91 -29.36L21.02 -42.95C22.8 -43.23 24.58 -43.47 26.38 -43.65C28.18 -43.84 30.01 -43.93 31.88 -43.93C32.12 -43.93 32.52 -43.92 33.11 -43.9C33.69 -43.87 34.3 -43.83 34.93 -43.76C35.56 -43.69 36.16 -43.61 36.72 -43.51C37.28 -43.42 37.67 -43.28 37.91 -43.09C38.23 -42.81 38.49 -42.38 38.68 -41.8C38.87 -41.21 39.01 -40.58 39.1 -39.9C39.19 -39.23 39.25 -38.56 39.27 -37.91C39.3 -37.25 39.31 -36.74 39.31 -36.37Z M111.69 -31.6L111.69 -32.3L111.69 -33.39C111.69 -33.78 111.68 -34.15 111.66 -34.47C111.63 -34.8 111.6 -35.03 111.55 -35.17C111.18 -36.48 110.57 -37.71 109.73 -38.85C108.89 -40 107.91 -41.01 106.79 -41.9C105.66 -42.79 104.46 -43.54 103.18 -44.14C101.89 -44.75 100.6 -45.17 99.29 -45.4C98.03 -45.64 96.66 -45.83 95.19 -45.97C93.72 -46.11 92.23 -46.21 90.74 -46.28C89.24 -46.35 87.75 -46.4 86.26 -46.42C84.76 -46.44 83.38 -46.46 82.12 -46.46C78.62 -46.46 75.15 -46.33 71.72 -46.07C68.28 -45.81 64.86 -45.38 61.45 -44.77C61.54 -43 61.53 -41.2 61.42 -39.38C61.3 -37.56 61.15 -35.76 60.96 -33.98C63.9 -34.08 66.85 -34.18 69.79 -34.3C72.73 -34.42 75.67 -34.47 78.62 -34.47L80.65 -34.47L83.87 -34.47C85.09 -34.47 86.34 -34.44 87.62 -34.37C88.91 -34.3 90.1 -34.22 91.19 -34.12C92.29 -34.03 93.22 -33.89 93.96 -33.7C94.71 -33.52 95.15 -33.28 95.29 -33C95.34 -32.91 95.36 -32.66 95.36 -32.27L95.36 -31.53C95.36 -30.55 95.29 -29.55 95.15 -28.52L91.44 -28.52C89.71 -28.52 87.75 -28.48 85.55 -28.41C83.36 -28.34 81.06 -28.24 78.65 -28.1C76.25 -27.96 74 -27.77 71.93 -27.54C69.85 -27.3 68.06 -26.99 66.57 -26.59C65.07 -26.19 64.11 -25.72 63.69 -25.15C63.37 -24.73 63.09 -24.08 62.85 -23.19C62.62 -22.31 62.43 -21.35 62.29 -20.32C62.15 -19.29 62.06 -18.31 62.01 -17.38C61.96 -16.44 61.94 -15.7 61.94 -15.13C61.94 -13.5 62.24 -12.04 62.85 -10.76C63.46 -9.47 64.53 -8.41 66.08 -7.57C66.5 -7.33 67.34 -7.16 68.6 -7.04C69.86 -6.93 71.19 -6.83 72.59 -6.76C73.99 -6.69 75.32 -6.64 76.59 -6.62C77.85 -6.6 78.71 -6.59 79.18 -6.59C84.41 -6.59 89.62 -6.75 94.8 -7.08C99.99 -7.4 105.2 -7.8 110.43 -8.27L111.27 -19.9C111.55 -23.78 111.69 -27.68 111.69 -31.6ZM96.06 -15.13C94.99 -14.99 93.82 -14.84 92.56 -14.68C91.3 -14.52 90 -14.38 88.67 -14.26C87.34 -14.14 86.03 -14.04 84.75 -13.94C83.46 -13.85 82.26 -13.8 81.14 -13.8C80.86 -13.8 80.46 -13.82 79.95 -13.84C79.44 -13.86 78.92 -13.91 78.41 -13.98C77.89 -14.05 77.41 -14.14 76.97 -14.26C76.53 -14.38 76.21 -14.55 76.03 -14.78C75.79 -15.02 75.6 -15.39 75.46 -15.91C75.32 -16.42 75.2 -16.98 75.08 -17.59C74.96 -18.19 74.88 -18.78 74.83 -19.34C74.79 -19.9 74.76 -20.34 74.76 -20.67C74.76 -21.09 74.8 -21.5 74.87 -21.9C74.94 -22.29 75.09 -22.68 75.32 -23.05C75.51 -23.33 76.21 -23.54 77.43 -23.68C78.64 -23.82 79.98 -23.94 81.46 -24.03C82.93 -24.13 84.3 -24.19 85.59 -24.21C86.87 -24.23 87.66 -24.24 87.94 -24.24C89.29 -24.24 90.65 -24.23 92 -24.21C93.36 -24.19 94.71 -24.15 96.06 -24.1Z M166.27 -27.33L166.27 -27.61C166.27 -27.7 166.25 -27.79 166.2 -27.89C165.69 -29.99 164.69 -31.62 163.19 -32.79C161.7 -33.96 159.98 -34.81 158.04 -35.35C156.1 -35.89 154.07 -36.21 151.94 -36.33C149.82 -36.45 147.92 -36.51 146.23 -36.51L142.73 -36.51C141.52 -36.51 140.31 -36.44 139.12 -36.3C137.93 -36.16 136.77 -35.89 135.65 -35.49C134.53 -35.09 133.53 -34.52 132.64 -33.77C132.73 -36.86 132.83 -39.93 132.92 -42.99C133.01 -46.05 133.11 -49.12 133.2 -52.2L117.79 -51.22C118.21 -42.81 118.65 -34.44 119.12 -26.1C119.58 -17.76 120.08 -9.39 120.59 -0.98L130.47 -0.49C130.61 -4.32 130.95 -8.1 131.48 -11.84C132.02 -15.58 132.48 -19.34 132.85 -23.12C133.55 -23.5 134.43 -23.86 135.48 -24.21C136.53 -24.56 137.64 -24.87 138.81 -25.1Line truncated

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

+1 -1
View File
@@ -29,7 +29,7 @@ export default function GameWrapper({ children, textNext, onNext, manager }) {
<div className="p-4 w-full flex justify-between">
{questionState && (
<div className="bg-white shadow-inset text-black px-4 font-bold rounded-md flex items-center text-lg">
<div className="bg-white shadow-inset text-black px-4 font-bold rounded-md flex items-center text-lg p-2">
{`${questionState.current} / ${questionState.total}`}
</div>
)}
+5 -5
View File
@@ -69,7 +69,7 @@ export default function Answers({
return (
<div className="flex h-full flex-col justify-between flex-1">
<div className="h-full max-w-7xl mx-auto w-full inline-flex flex-col items-center justify-center gap-5 flex-1">
<h2 className="text-white text-2xl md:text-4xl font-bold drop-shadow-lg text-center">
<h2 className="text-white text-2xl md:text-4xl lg:text-5xl font-bold drop-shadow-lg text-center">
{question}
</h2>
@@ -101,12 +101,12 @@ export default function Answers({
{!responses && (
<div className="max-w-7xl mx-auto mb-4 w-full flex justify-between gap-1 font-bold text-white text-lg md:text-xl px-2">
<div className="bg-black/40 px-4 font-bold rounded-full flex flex-col items-center text-lg">
<span className="text-sm">Time</span>
<span className="-translate-y-1">{cooldown}</span>
<span className="text-sm translate-y-1">Time</span>
<span>{cooldown}</span>
</div>
<div className="bg-black/40 px-4 font-bold rounded-full flex flex-col items-center text-lg">
<span className="text-sm">Answers</span>
<span className="-translate-y-1">{totalAnswer}</span>
<span className="text-sm translate-y-1">Answers</span>
<span>{totalAnswer}</span>
</div>
</div>
)}
+1 -1
View File
@@ -6,7 +6,7 @@ export default function Leaderboard({ data: { leaderboard } }) {
</h2>
<div className="w-full flex-col flex gap-2">
{leaderboard.map(({ username, points }) => (
<div className="bg-primary rounded-md p-3 flex justify-between w-full text-white font-bold text-2xl">
<div className="bg-primary rounded-md p-3 flex justify-between w-full font-bold text-white text-2xl">
<span className="drop-shadow-md">{username}</span>
<span className="drop-shadow-md">{points}</span>
</div>
+2 -2
View File
@@ -7,13 +7,13 @@ export default function Question({ data: { question } }) {
return (
<section className="max-w-7xl mx-auto w-full flex-1 relative items-center flex flex-col px-4 h-full">
<div className="flex items-center flex-1">
<h2 className="text-white text-2xl md:text-4xl font-bold drop-shadow-lg text-center">
<h2 className="text-white text-2xl md:text-4xl lg:text-5xl anim-show font-bold drop-shadow-lg text-center">
{question}
</h2>
</div>
<div
ref={barRef}
className="h-6 bg-primary mb-32 rounded-full self-start justify-self-end"
className="h-4 bg-primary mb-20 rounded-full self-start justify-self-end"
style={{ animation: `progressBar ${6}s linear forwards` }}
></div>
</section>
+6 -7
View File
@@ -1,8 +1,7 @@
import Loader from "@/components/Loader"
import { useSocketContext } from "@/context/socket"
import { useEffect, useState } from "react"
import { useState } from "react"
export default function Start({ data: { text } }) {
export default function Start({ data: { text, inviteCode } }) {
const { socket } = useSocketContext()
const [playerList, setPlayerList] = useState([])
@@ -10,12 +9,12 @@ export default function Start({ data: { text } }) {
setPlayerList([...playerList, player])
})
useEffect(() => {
socket.emit("manager:createRoom")
}, [])
return (
<section className="max-w-7xl mx-auto w-full flex-1 relative items-center justify-center flex flex-col px-2">
<div className="py-4 px-6 mb-10 rotate-3 bg-white rounded-md text-6xl font-extrabold">
{inviteCode}
</div>
<h2 className="text-white font-bold text-4xl drop-shadow-lg mb-4">
{text}
</h2>
+2 -2
View File
@@ -1,12 +1,12 @@
export default function CricleCheck({ className }) {
return (
<svg
fill="#28d524"
fill="#22c55e"
width="800px"
height="800px"
viewBox="0 0 56.00 56.00"
xmlns="http://www.w3.org/2000/svg"
stroke="#28d524"
stroke="#22c55e"
strokeWidth="0.00056"
className={className}
>
+2 -2
View File
@@ -1,12 +1,12 @@
export default function CricleXmark({ className }) {
return (
<svg
fill="#fb1e1e"
fill="#ef4444"
width="800px"
height="800px"
viewBox="0 0 56.00 56.00"
xmlns="http://www.w3.org/2000/svg"
stroke="#fb1e1e"
stroke="#ef4444"
className={className}
>
<g strokeWidth="0" transform="translate(12.4,12.4), scale(0.6)">
+1 -1
View File
@@ -2,7 +2,7 @@ import { io } from "socket.io-client"
import { createContext, useContext, useState } from "react"
import { WEBSOCKET_URL } from "@/constants"
export const socket = io("http://localhost:5057", {
export const socket = io("http://localhost:5157", {
path: "/ws/",
//addTrailingSlash: false,
transports: ["websocket"],
+4 -1
View File
@@ -3,7 +3,10 @@ import { Html, Head, Main, NextScript } from "next/document"
export default function Document() {
return (
<Html lang="en">
<Head />
<Head>
<link rel="shortcut icon" href="/icon.svg" />
<title>Rahoot !</title>
</Head>
<body className="bg-secondary">
<Main />
<NextScript />
+1 -1
View File
@@ -28,7 +28,7 @@ export default function Home() {
</div>
)}
<Image src={logo} className="h-10 mb-6" />
<Image src={logo} className="h-32 mb-6" />
{!player ? <Room /> : <Username />}
</section>
+34 -6
View File
@@ -1,3 +1,4 @@
import Button from "@/components/Button"
import GameWrapper from "@/components/game/GameWrapper"
import Answers from "@/components/game/states/Answers"
import Leaderboard from "@/components/game/states/Leaderboard"
@@ -24,6 +25,7 @@ export default function Manager() {
const [nextText, setNextText] = useState("Start")
const [state, setState] = useState({
created: false,
status: {
name: "SHOW_START",
data: { text: "Waiting for the players" },
@@ -45,6 +47,24 @@ export default function Manager() {
})
})
socket.on("manager:inviteCode", (inviteCode) => {
setState({
...state,
created: true,
status: {
...state.status,
data: {
...state.status.data,
inviteCode: inviteCode,
},
},
})
})
const handleCreate = () => {
socket.emit("manager:createRoom")
}
const handleSkip = () => {
setNextText("Skip")
@@ -64,11 +84,19 @@ export default function Manager() {
}
return (
<GameWrapper textNext={nextText} onNext={handleSkip} manager>
{gameStateComponent[state.status.name] &&
createElement(gameStateComponent[state.status.name], {
data: state.status.data,
})}
</GameWrapper>
<>
{!state.created ? (
<div>
<Button onClick={handleCreate}>Create Room</Button>
</div>
) : (
<GameWrapper textNext={nextText} onNext={handleSkip} manager>
{gameStateComponent[state.status.name] &&
createElement(gameStateComponent[state.status.name], {
data: state.status.data,
})}
</GameWrapper>
)}
</>
)
}
+1
View File
@@ -13,5 +13,6 @@ module.exports = {
},
},
},
safelist: ["grid-cols-4", "grid-cols-3", "grid-cols-2"],
plugins: [],
}