diff --git a/README.md b/README.md index df004fe..11e3e82 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ OpenMC est un projet communautaire open-source dédié à la création d'un serveur Minecraft innovant et collaboratif. +**Ceci est le code source de son site web.** + Contributeurs @@ -17,9 +19,8 @@ OpenMC est un projet communautaire open-source dédié à la création d'un serv ``` Si des erreurs ou des warnings apparaissent, corrigez-les. 5. Une fois une fonctionnalité implémentée et fonctionnelle, créez une pull request. -6. Après approbation, la fonctionnalité sera disponible sur le serveur de développement pour des tests. +6. Après approbation, la fonctionnalité sera disponible sur le site [openmc.fr](openmc.fr). -- **IP du serveur** : `play.openmc.fr` (Minecraft Java Edition 26.2) - **Site web** : [openmc.fr](https://openmc.fr) ## 🚧 Démarrage diff --git a/app/changelog/page.tsx b/app/changelog/page.tsx index 523bbb9..4c7ebc8 100644 --- a/app/changelog/page.tsx +++ b/app/changelog/page.tsx @@ -628,7 +628,7 @@ export default function ChangelogPage() { Commits récents - Les dernières modifications du code source + Les dernières modifications du code source du plugin @@ -748,10 +748,10 @@ export default function ChangelogPage() { transition={{ duration: 0.6, delay: 0.6 }} className="text-center mt-12 pb-8" > - - + +

- Données récupérées depuis le repository{" "} + Le repository du plugin{" "}

- Mis à jour automatiquement • Développé avec Next.js et shadcn/ui + Mis à jour automatiquement via le dépôt Github

+ ); diff --git a/app/dance/backgroundaudio.tsx b/app/dance/backgroundaudio.tsx new file mode 100644 index 0000000..8640e43 --- /dev/null +++ b/app/dance/backgroundaudio.tsx @@ -0,0 +1,113 @@ +"use client"; + +import { useEffect, useRef, useState } from "react"; +import { Pause, Play, Volume2, VolumeX } from "lucide-react"; + +type BackgroundAudioProps = { + onStateChange: (isPlaying: boolean) => void; +}; + +export default function BackgroundAudio({ + onStateChange, +}: BackgroundAudioProps) { + const audioRef = useRef(null); + const [isPlaying, setIsPlaying] = useState(false); + const [volume, setVolume] = useState(0.4); + + const audioSrc = `./songs/jonasblakewood-dance-pop.mp3`; + + const setPlaying = (playing: boolean) => { + setIsPlaying(playing); + onStateChange(playing); + }; + + const play = async () => { + try { + await audioRef.current?.play(); + setPlaying(true); + } catch {} + } + + const togglePlay = () => { + const audio = audioRef.current; + if (!audio) return; + + if (audio.paused) { + play(); + } else { + audio.pause(); + setPlaying(false); + } + } + + const toggleMute = () => { + setVolume(volume === 0 ? 0.4 : 0); + } + + useEffect(() => { + if (audioRef.current) { + audioRef.current.volume = volume; + } + }, [volume]); + + useEffect(() => { + const handleInteraction = () => { + play(); + window.removeEventListener("pointerdown", handleInteraction); + window.removeEventListener("keydown", handleInteraction); + }; + + play(); + + window.addEventListener("pointerdown", handleInteraction); + window.addEventListener("keydown", handleInteraction); + + return () => { + window.removeEventListener("pointerdown", handleInteraction); + window.removeEventListener("keydown", handleInteraction); + }; + }, []); + + return ( + <> +
+ {contributors.map((user, index) => { + const delay = `${(index % 5) * 0.25}s`; + + return ( + +
+ {user.login} +
+ + {user.login} + +
+ ); + })} +
+ + ); +} \ No newline at end of file diff --git a/app/dance/page.tsx b/app/dance/page.tsx new file mode 100644 index 0000000..6d5dd41 --- /dev/null +++ b/app/dance/page.tsx @@ -0,0 +1,86 @@ +"use client"; + +import { useEffect, useState } from "react"; +import Image from "next/image"; +import BackgroundAudio from "./backgroundaudio"; +import { GitHubApi, type GitHubContributor } from "@/lib/github-cache"; + +export default function Dance() { + const [contributors, setContributors] = useState([]); + const [isPlaying, setIsPlaying] = useState(false); + const [loading, setLoading] = useState(true); + + useEffect(() => { + async function fetchAllContributors() { + try { + const repos = ["PluginV2", "Plugin", "Website"]; + const requests = repos.map((repo) => + GitHubApi.getContributors("ServerOpenMC", repo).catch(() => []) + ); + + const rawResults = await Promise.all(requests); + const allContributors = rawResults.flat(); + const uniqueContributors = Array.from( + new Map(allContributors.map((user) => [user.id, user])).values() + ); + + setContributors(uniqueContributors); + } catch (error) { + console.error("Erreur lors de la récupération des contributeurs:", error); + } finally { + setLoading(false); + } + } + + fetchAllContributors(); + }, []); + + return ( +
+

+ Les contributeurs dansent (easter egg sympa xD) ! +

+ + + + {loading ? ( +

Chargement des contributeurs...

+ ) : ( +
+ {contributors.map((user, index) => { + const delay = `${(index % 5) * 0.15}s`; + + return ( + +
+ {user.login} +
+ + {user.login} + +
+ ); + })} +
+ )} +
+ ); +} \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 360681f..0719f32 100644 --- a/app/globals.css +++ b/app/globals.css @@ -185,3 +185,25 @@ .animate-shimmer { animation: shimmer 2s infinite; } + +@keyframes dance { + 0%, 100% { + transform: translate3d(0, 0, 0) rotate(-8deg); + } + 50% { + transform: translate3d(0, -16px, 0) rotate(8deg); + } +} + +.animate-dance { + animation: dance 0.6s infinite ease-in-out; + will-change: transform; + backface-visibility: hidden; +} + +.dance-stopping { + animation-duration: 1.2s; + animation-delay: 0s; + animation-iteration-count: 1; + animation-timing-function: ease-out; +} \ No newline at end of file diff --git a/app/join/page.tsx b/app/join/page.tsx index 5720e42..d160dbb 100644 --- a/app/join/page.tsx +++ b/app/join/page.tsx @@ -180,7 +180,7 @@ export default function JoinPage() { Rejoindre OpenMC

- Connectez-vous à notre serveur Minecraft open-source + Connectez-vous à votre serveur Minecraft open-source

@@ -399,7 +399,7 @@ export default function JoinPage() {
- +
@@ -247,7 +251,7 @@ export default function Footer() { href="/join" className="hover:text-foreground transition-colors" > - Rejoindre le serveur + Rejoindre le serveur Minecraft
  • @@ -275,7 +279,7 @@ export default function Footer() {
    • @@ -306,9 +310,11 @@ export default function Footer() {

      - © 2025 OpenMC. Fait avec{" "} - par - la communauté. + © {year} OpenMC. Fait avec{" "} + + + + par la communauté.

      { expiresIn: number; // en millisecondes } -interface GitHubContributor { +export interface GitHubContributor { id: number; login: string; avatar_url: string; diff --git a/package-lock.json b/package-lock.json index 29fe45d..36ffa7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "my-app", + "name": "website_openmc", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "my-app", + "name": "website_openmc", "version": "0.1.0", "dependencies": { "@radix-ui/react-avatar": "^1.1.10", @@ -295,41 +295,41 @@ "license": "MIT" }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -875,9 +875,9 @@ } }, "node_modules/@next/env": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.24.tgz", - "integrity": "sha512-mBDF7T0XKZjs9SpUAl0buizVO+O02ULjOvWX8o/AZo/5AGw/UAS1Zzcylmd4pqbftzmKQi+L/nB4jgBYKEAl5Q==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.5.25.tgz", + "integrity": "sha512-42h1lLr07vl4gawALP1hsgRZjHB1xYa58JfUfHwr0f7jG/zhPakh5GHkADHXOC9ZxUvlQFOPIrp7s6qX4DezPQ==", "license": "MIT" }, "node_modules/@next/eslint-plugin-next": { @@ -891,9 +891,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.24.tgz", - "integrity": "sha512-AGdNLvxZNY6eR2iSnV+6wUa8CiHTMr4F7g3uHH7fT4ICIJBE00R9u4tzN/Vuwsw0cOi8MTD2HJcTCb6siMH88Q==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.25.tgz", + "integrity": "sha512-w+RR0v/QuApnWEjRGm1z6gcObKwGMb5YPA7V3bzBEVSBpMFUXprer0tS27UxjUcEnqbhL7Zuzohej79B6rYmBg==", "cpu": [ "arm64" ], @@ -907,9 +907,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.24.tgz", - "integrity": "sha512-9HrQajBMmGcrrrvDfRimiCrbAPh3E6uHJmwBovYr6Yrmi9p9PZqI876BrXX280wICh3o2XwUlp4blkB0NNBqFg==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.25.tgz", + "integrity": "sha512-QiGGBUSakt8S1H4Lt9Ehsh6Ja87axiBnQQgysOObvCbI7iUfJnRGntF1P64S4/ijuHFnSB8KLsEddkY3nN26uw==", "cpu": [ "x64" ], @@ -923,9 +923,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.24.tgz", - "integrity": "sha512-rl9LSfE75si0WT3cDgdUC1XYCKS+TgxC+/IjitmeycrAG18X/plIP1/vy8dd/HPycYcIvE688PD7FuvEAiEAew==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.25.tgz", + "integrity": "sha512-ehLos/66zo0d/mJCU5u96a/VDcr01aaUrX0o/i16UdInxz8qPTCDSxGtjk/Lps1sIr1RJFdiX3hxc0fxJo+cPA==", "cpu": [ "arm64" ], @@ -939,9 +939,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.24.tgz", - "integrity": "sha512-TlNAnpsjxSF3aAUtqnfmtXXf8m9sIDBlmF3c7bTAlnshUYu2U0OxN2uf5d0gcFwqHVEdivJNBcCaqNOwPGNimw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.25.tgz", + "integrity": "sha512-ZVMrqLiJ7DiChgmbkQwFtdhAnUkSH/4p7tB29QY+giATb0Q/XGHNRSKAb/B8XGDHRUaA67NepOW5W8u3ZRJBAA==", "cpu": [ "arm64" ], @@ -955,9 +955,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.24.tgz", - "integrity": "sha512-7dwtlhr0SLndqTG1z9ncRkbJswDZiKWlxzFyXDvJ2RDZRDRHp8zyMJ4D9UH/FgnQeXxxB6gZy2pMcIUoNKQ4pA==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.25.tgz", + "integrity": "sha512-UOewtDGkTMJTiODrEdeLZ50yGb59xCZSriNpXkfPMxRRgwDkGc7i8mLWqV5076wEdb+Ca/XN7MhJyM3CupyNyQ==", "cpu": [ "x64" ], @@ -971,9 +971,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.24.tgz", - "integrity": "sha512-kGZxM+WhkYs0276lFrMkj7PRtXT3Btp6cwvfSO/cCVLxJJttB5Ccnl2niaCgUja8HgSbEVnMHpg3FJWoOJ9e/g==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.25.tgz", + "integrity": "sha512-UBHwA8AhkCZgtRfU1aJpunuAJe/6gZv6jDESQe4p5MjTb5V0YEeJBWCdNqx15Vj3x+5jmauRfeMJSjfQj9HGFQ==", "cpu": [ "x64" ], @@ -987,9 +987,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.24.tgz", - "integrity": "sha512-jBDDkZ/qKAqkWivWDMkJSXUzbzV0QKRBKJjEHUAvSB97Hzw7NLzJ6yV56Lts/wjir7s4P31GYgpbS6ZL+hasAA==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.25.tgz", + "integrity": "sha512-QcFcPRr16djk5IqK5+e8O80eZfgWzIvVBXfitIq0tQ/uc+eyfdoZ0NmKc0cnbIJyfVwREapKuG97YcxWA9gcpA==", "cpu": [ "arm64" ], @@ -1003,9 +1003,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.24.tgz", - "integrity": "sha512-JqtwjvvorjacQ0spgjmUJoxySoYgPwdT1sFdQ0/zmW4iMlP2hjYlCoJIyS7o6Epb4Fug8eco3HXFoBDUCDeH7Q==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.25.tgz", + "integrity": "sha512-zREeykps3ndWr9egJgvJKqVkkDuaw6Zrrg23cYBos0ygydFkAWYU4+PaPVwXzP1eAYQJe53ShSK45iDM529BOg==", "cpu": [ "x64" ], @@ -6927,12 +6927,12 @@ "license": "MIT" }, "node_modules/next": { - "version": "15.5.24", - "resolved": "https://registry.npmjs.org/next/-/next-15.5.24.tgz", - "integrity": "sha512-Y+xn8EQCoC3ZbsFPyzE+tE8XOdrWeUdUF7NeXbmg9DsgAxl5UYxlsrvgVESHTyTGigoTa1bCUrxn70F5bqt0Gw==", + "version": "15.5.25", + "resolved": "https://registry.npmjs.org/next/-/next-15.5.25.tgz", + "integrity": "sha512-OMWNulIIqKM2ykvC2qMjIt0IoavB4UB2SCs4iXJ6z6847FvyH8jBmBWcvrF5iuhTu8Przh20Fo/aoszIdqx4PA==", "license": "MIT", "dependencies": { - "@next/env": "15.5.24", + "@next/env": "15.5.25", "@swc/helpers": "0.5.15", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", @@ -6945,15 +6945,15 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.5.24", - "@next/swc-darwin-x64": "15.5.24", - "@next/swc-linux-arm64-gnu": "15.5.24", - "@next/swc-linux-arm64-musl": "15.5.24", - "@next/swc-linux-x64-gnu": "15.5.24", - "@next/swc-linux-x64-musl": "15.5.24", - "@next/swc-win32-arm64-msvc": "15.5.24", - "@next/swc-win32-x64-msvc": "15.5.24", - "sharp": "^0.34.3 || ^0.35.3" + "@next/swc-darwin-arm64": "15.5.25", + "@next/swc-darwin-x64": "15.5.25", + "@next/swc-linux-arm64-gnu": "15.5.25", + "@next/swc-linux-arm64-musl": "15.5.25", + "@next/swc-linux-x64-gnu": "15.5.25", + "@next/swc-linux-x64-musl": "15.5.25", + "@next/swc-win32-arm64-msvc": "15.5.25", + "@next/swc-win32-x64-msvc": "15.5.25", + "sharp": "^0.34.3 || ^0.35.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", diff --git a/package.json b/package.json index 4f62e1b..f86a148 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "my-app", + "name": "website_openmc", "version": "0.1.0", "private": true, "scripts": { diff --git a/public/songs/jonasblakewood-dance-pop-licence.txt b/public/songs/jonasblakewood-dance-pop-licence.txt new file mode 100644 index 0000000..5eb5914 --- /dev/null +++ b/public/songs/jonasblakewood-dance-pop-licence.txt @@ -0,0 +1,34 @@ +PIXABAY LICENSE CERTIFICATE +============================================== + +This document confirms the download of an audio file pursuant to the Content License as defined in the Pixabay Terms of Service available at https://pixabay.com/service/terms/ + +Licensor's Username: +https://pixabay.com/users/jonasblakewood-48502311/ + +Licensee: +u_2sdv1bun8d + +Audio File Title: +Dance Pop + +Audio File URL: +https://pixabay.com/music/dance-dance-pop-573476/ + +Audio File ID: +573476 + +Date of download: +2026-09-19 12:29:37 UTC + +Pixabay, a Canva Germany GmbH brand +Pappelallee 78/79 +10437 Berlin +Germany + +Pixabay is a user-contributed stock content website. The above-named Licensor is responsible for this audio file. Pixabay monitors uploaded audio files only to a reasonable extent. Pixabay cannot be held responsible for the acts or omissions of its users and does not represent or warrant that any required third-party consents or licenses have been obtained. + +For any queries related to this document please contact Pixabay via info@pixabay.com. + + +==== THIS IS NOT A TAX RECEIPT OR INVOICE ==== \ No newline at end of file diff --git a/public/songs/jonasblakewood-dance-pop.mp3 b/public/songs/jonasblakewood-dance-pop.mp3 new file mode 100644 index 0000000..d4834cc Binary files /dev/null and b/public/songs/jonasblakewood-dance-pop.mp3 differ