diff --git a/Servers/ArkServer/Dockerfile b/Servers/ArkServer/Dockerfile new file mode 100644 index 0000000..a713680 --- /dev/null +++ b/Servers/ArkServer/Dockerfile @@ -0,0 +1,32 @@ +FROM ubuntu:latest + +WORKDIR /app + +COPY ./run.sh ./run.sh + +RUN apt -y update +RUN apt -y upgrade + +RUN apt -y install sudo software-properties-common +RUN dpkg --add-architecture i386 +RUN apt-add-repository multiverse +RUN apt -y update +RUN echo steam steam/question select "I AGREE" | sudo debconf-set-selections +RUN echo steam steam/license note '' | sudo debconf-set-selections +RUN apt install -y steamcmd lib32gcc-s1 +RUN echo "fs.file-max=100000" > /etc/sysctl.conf +RUN echo "* soft nofile 100000" > /etc/security/limits.conf +RUN echo "* hard nofile 100000" > /etc/security/limits.conf +RUN echo "session required pam_limits.so" > /etc/pam.d/common-session + +RUN useradd -m ark +RUN chown -R ark:ark . +RUN sudo -u ark -s + +RUN chmod +x ./run.sh +RUN ulimit -n 100000 +RUN /usr/games/steamcmd +force_install_dir /app +login anonymous +app_update 376030 validate +exit +#RUN chmod +x ./ShooterGame/Binaries/Linux/ShooterGameServer + + +ENTRYPOINT [ "./run.sh" ] \ No newline at end of file diff --git a/Servers/ArkServer/pre-run.sh b/Servers/ArkServer/pre-run.sh new file mode 100644 index 0000000..e69de29 diff --git a/Servers/ArkServer/run.sh b/Servers/ArkServer/run.sh new file mode 100644 index 0000000..f5fac60 --- /dev/null +++ b/Servers/ArkServer/run.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +#./ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=ArkServer?ServerPassword=123456?ServerAdminPassword=123456 -server -log -crossplay +./ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=ArkServer -server -log -crossplay \ No newline at end of file diff --git a/Servers/MinecraftBedrock/Dockerfile b/Servers/MinecraftBedrock/Dockerfile new file mode 100644 index 0000000..c3de304 --- /dev/null +++ b/Servers/MinecraftBedrock/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:latest + +WORKDIR /app + +ENV LD_LIBRARY_PATH=. + +COPY ./bedrock-server-1.21.60.10.zip ./bedrock-server.zip + +RUN apt -y update +RUN apt -y upgrade +RUN apt install -y 7zip curl +RUN 7z x ./bedrock-server.zip +RUN chmod +x ./bedrock_server +RUN rm -rf ./bedrock-server.zip +VOLUME [ "/app" ] + +ENTRYPOINT [ "./bedrock_server" ] + \ No newline at end of file diff --git a/Servers/MinecraftBedrock/bedrock-server-1.21.60.10.zip b/Servers/MinecraftBedrock/bedrock-server-1.21.60.10.zip new file mode 100644 index 0000000..f26596a Binary files /dev/null and b/Servers/MinecraftBedrock/bedrock-server-1.21.60.10.zip differ diff --git a/Dockerfile b/Servers/MinecraftJava/Dockerfile similarity index 99% rename from Dockerfile rename to Servers/MinecraftJava/Dockerfile index c68cdce..56fb66e 100644 --- a/Dockerfile +++ b/Servers/MinecraftJava/Dockerfile @@ -2,13 +2,11 @@ FROM ubuntu:latest WORKDIR /app - RUN apt -y update RUN apt -y upgrade RUN apt install -y default-jre wget RUN wget https://piston-data.mojang.com/v1/objects/4707d00eb834b446575d89a61a11b5d548d8c001/server.jar RUN echo 'eula=true' > eula.txt - VOLUME [ "/app" ] ENTRYPOINT ["java", "-Xmx2048M", "-Xms1024M", "-jar", "./server.jar", "nogui"] diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 0000000..007b939 --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,34 @@ +call(function() { + Log::info("Hello"); + })->everyThreeMinutes(); + } + /** + * Register the commands for the application. + * + * @return void + */ + protected function commands() + { + $this->load(__DIR__.'/Commands'); + require base_path('routes/console.php'); + } +} \ No newline at end of file diff --git a/app/Docker/Container.php b/app/Docker/Container.php index a46d6ad..31b0e8c 100644 --- a/app/Docker/Container.php +++ b/app/Docker/Container.php @@ -3,6 +3,7 @@ namespace App\Docker; use Exception; +use Illuminate\Support\Facades\Log; use Psr\Http\Message\ResponseInterface; use React\Http\Browser; use React\Socket\FixedUriConnector; @@ -83,7 +84,7 @@ public function kill($context) public function inspect($size = false) { try { - $response = await($this->browser->post( + $response = await($this->browser->get( Docker::endpoint("/containers/" . $this->id . "/json?size=" . $size), [ "Content-Type" => "text/plain" ] )); @@ -93,13 +94,44 @@ public function inspect($size = false) } } + public function logs($args = []) + { + try { + $response = await($this->browser->requestStreaming("GET", + Docker::endpoint("/containers/" . $this->id . "/logs?stdout=true?stderr=true"), + [ "Content-Type" => "text/plain" ] + )); + return $response->getBody(); + } catch (Exception $e) { + throw $e; + } + } + + public function exec($command) + { + try { + $response = await($this->browser->post( + Docker::endpoint("/containers/" . $this->id . "/exec"), + [ "Content-Type" => "application/json" ], + json_encode([ + 'AttachStdout' => true, + 'AttachStderr' => true, + 'Cmd' => $command + ]) + )); + return new Exec(json_decode($response->getBody())->Id); + } catch (Exception $e) { + throw $e; + } + } + public static function create($name, $config) { try { $connection = Docker::connect(); $response = await($connection->browser->post(Docker::endpoint('/containers/create?name='. $name), [ "Content-Type" => "application/json" ], - json_encode($config) + json_encode($config, JSON_UNESCAPED_SLASHES) )); $data = json_decode($response->getBody()); $container = new Container($data->Id); diff --git a/app/Docker/Docker.php b/app/Docker/Docker.php index 15573e6..f11ec53 100644 --- a/app/Docker/Docker.php +++ b/app/Docker/Docker.php @@ -6,21 +6,24 @@ use Psr\Http\Message\ResponseInterface; use React\Http\Browser; use React\Socket\FixedUriConnector; -use React\Socket\ConnectorInterFace; +use React\Socket\Connector; use React\Socket\UnixConnector; use function React\Async\await; class Docker { + static protected $connection = null; + public static function connect($fromSocket = true, $socket = 'unix:///var/run/docker.sock') { $connector = $fromSocket ? new FixedUriConnector( $socket, new UnixConnector() - ) : new ConnectorInterface(); + ) : null; $browser = new Browser($connector); - return (object)[ "connector" => $connector, "browser" => $browser ]; + Docker::$connection = (object)[ "connector" => $connector, "browser" => $browser ]; + return Docker::$connection; } public static function endpoint($url) diff --git a/app/Docker/Exec.php b/app/Docker/Exec.php new file mode 100644 index 0000000..3829501 --- /dev/null +++ b/app/Docker/Exec.php @@ -0,0 +1,56 @@ +id = $id; + $connection = Docker::connect(); + $this->connector = $connection->connector; + $this->browser = $connection->browser; + } + + public function getId() { return $this->id; } + + public function start($args = []) + { + try { + Log::info("Starting exec :" . Docker::endpoint("/exec/" . $this->id . "/start")); + $response = await($this->browser->post( + Docker::endpoint("/exec/" . $this->id . "/start"), + [ "Content-Type" => "application/json"], + )); + return json_decode($response->getBody()); + } catch (Exception $e) { + throw $e; + } + } + + public function inspect() + { + try { + $response = await($this->browser->get( + Docker::endpoint("/exec/" . $this->id . "/json"), + [ "Content-Type" => "text/plain" ] + )); + return json_decode($response->getBody()); + } catch (Exception $e) { + throw $e; + } + } +} \ No newline at end of file diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php new file mode 100644 index 0000000..ba06b2a --- /dev/null +++ b/app/Http/Controllers/ServerController.php @@ -0,0 +1,96 @@ + Server::all()->jsonSerialize(), + ]); + } + + /** + * Show the form for creating a new resource. + */ + public function create() + { + return Inertia::render('Server/Create', [ + "services" => Service::all() + ]); + } + + /** + * Store a newly created resource in storage. + */ + public function store(Request $request) + { + $request->validate([ + "name" => "required|string", + "service" => "required|string", + ]); + + $service = Service::where("uuid", $request->service)->firstOrFail(); + $server = Server::create([ + "uuid" => Str::uuid(), + "name" => preg_replace('/[^a-zA-Z0-9_.-]/', '', $request->name), + "service_id" => $service->id, + "status_id" => 3, + "user_id" => Auth::user()->id + ]); + dispatch(new InitServer($server)); + return redirect(route("servers.index")); + } + + /** + * Display the specified resource. + */ + public function show(Request $request) + { + $server = Server::where("uuid", $request->id)->firstOrFail(); + return Inertia::render("Server/Show", [ + "server" => $server + ]); + } + + /** + * Show the form for editing the specified resource. + */ + public function edit(string $id) + { + // + } + + /** + * Update the specified resource in storage. + */ + public function update(Request $request, string $id) + { + // + } + + /** + * Remove the specified resource from storage. + */ + public function destroy(string $id) + { + // + } +} diff --git a/app/Jobs/InitServer.php b/app/Jobs/InitServer.php new file mode 100644 index 0000000..f5bec01 --- /dev/null +++ b/app/Jobs/InitServer.php @@ -0,0 +1,65 @@ +server = $server; + $server->update(["status_id" => 2]); + } + + /** + * Execute the job. + */ + public function handle(): void + { + try { + $config = config($this->server->service->config); + $ports = explode("|", $this->server->service->ports); + for ($i = 0; $i < count($ports); $i++) { + $port = ExposedPort::where("usable", true)->first(); + if(!$port) throw new Exception("All ports are used, please try later."); + $this->server->exposedPorts()->attach($port->id); + $port->update(["usable" => false]); + $config["ExposedPorts"][$ports[$i] . "/" . $this->server->service->protocol] = (object)[]; + $config["HostConfig"]["PortBindings"][$ports[$i] . "/" . $this->server->service->protocol] = [[ "HostPort" => "" . $port->number ]]; + } + Log::info(json_encode($config, JSON_UNESCAPED_SLASHES)); + $container = Container::create($this->server->name . Str::random(5), $config); + $container->start(); + $this->server->update([ + "container" => $container->getId(), + "status_id" => 1, + "start" => now() + ]); + }catch(Exception $e) { + $this->fail($e); + } + } + + public function fail($e): void + { + $this->server->update([ + "status_id" => 4, + "end" => now() + ]); + $this->server->exposedPorts()->detach(); + Log::info($e->getResponse()->getBody()); + } +} diff --git a/app/Models/ExposedPort.php b/app/Models/ExposedPort.php new file mode 100644 index 0000000..8baddf3 --- /dev/null +++ b/app/Models/ExposedPort.php @@ -0,0 +1,13 @@ + $this->uuid, + 'name' => $this->name, + "start" => $this->start, + "end" => $this->end, + "service" => $this->service, + "user" => $this->user, + "status" => $this->status, + "ports" => $this->exposedPorts()->pluck("number"), + ]; + } + + public function exposedPorts() + { + return $this->belongsToMany(ExposedPort::class); + } + + public function service() + { + return $this->belongsTo(Service::class); + } + + public function status() + { + return $this->belongsTo(Status::class); + } + + public function user() + { + return $this->belongsTo(User::class); + } +} diff --git a/app/Models/Service.php b/app/Models/Service.php new file mode 100644 index 0000000..0786722 --- /dev/null +++ b/app/Models/Service.php @@ -0,0 +1,22 @@ +hasMany(Server::class); + } +} diff --git a/app/Models/Spec.php b/app/Models/Spec.php new file mode 100644 index 0000000..170f231 --- /dev/null +++ b/app/Models/Spec.php @@ -0,0 +1,15 @@ +hasMany(Server::class); + } + /** * The attributes that should be hidden for serialization. * diff --git a/app/Netstat.php b/app/Netstat.php new file mode 100644 index 0000000..9a76ada --- /dev/null +++ b/app/Netstat.php @@ -0,0 +1,40 @@ + $matches[1], // e.g., LISTEN + 'Recv-Q' => $matches[2], // e.g., 0 + 'Send-Q' => $matches[3], // e.g., 128 + 'LocalAddress' => $matches[4], // e.g., 0.0.0.0:80 + 'ForeignAddress' => $matches[5], // e.g., 0.0.0.0:* + 'Program' => $matches[6], // e.g., nginx + 'PID' => $matches[7], // e.g., 1234 + 'FD' => $matches[8], // e.g., 6 + ]; + } + } + return $connections; + + } +} + diff --git a/config/docker.php b/config/docker.php new file mode 100644 index 0000000..e0070ad --- /dev/null +++ b/config/docker.php @@ -0,0 +1,45 @@ + "http://localhost", + "minecraftJava" => [ + "Hostname" => "mincraft-server", + "User" => "root", + "Image" => "minecraftjava:latest", + "AttachStdout" => false, + "AttachStderr" => false, + "OpenStdin" => true, + "Tty" => true, + "ExposedPorts" => [], + "HostConfig" => [ + "PortBindings" => [], + ] + ], + "minecraftBedrock" => [ + "Hostname" => "mincraft-server", + "User" => "root", + "Image" => "minecraftbedrock:latest", + "OpenStdin" => true, + "AttachStdout" => false, + "AttachStderr" => false, + "Tty" => true, + "ExposedPorts" => [], + "HostConfig" => [ + "PortBindings" => [], + ] + ], + "arkserver" => [ + "Hostname" => "ark-server", + "User" => "root", + "Image" => "arkserver:latest", + "OpenStdin" => true, + "AttachStdout" => false, + "AttachStderr" => false, + "Tty" => true, + "ExposedPorts" => [], + "HostConfig" => [ + "PortBindings" => [], + ] + ] + +]; \ No newline at end of file diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index 05fb5d9..aeaa367 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -14,6 +14,7 @@ public function up(): void Schema::create('users', function (Blueprint $table) { $table->id(); $table->string('name'); + $table->boolean("admin")->default(false); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); $table->string('password'); diff --git a/database/migrations/2025_02_14_231757_create_ports_table.php b/database/migrations/2025_02_14_231757_create_ports_table.php new file mode 100644 index 0000000..09f90e1 --- /dev/null +++ b/database/migrations/2025_02_14_231757_create_ports_table.php @@ -0,0 +1,32 @@ +id(); + $table->unsignedSmallInteger("number"); + $table->boolean("usable"); + $table->timestamps(); + }); + for($i = 25000; $i < 30000; $i++) ExposedPort::create([ "number" => $i, "usable" => true ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('exposed_ports'); + } +}; diff --git a/database/migrations/2025_02_14_231822_create_services_table.php b/database/migrations/2025_02_14_231822_create_services_table.php new file mode 100644 index 0000000..08a1253 --- /dev/null +++ b/database/migrations/2025_02_14_231822_create_services_table.php @@ -0,0 +1,62 @@ +id(); + $table->uuid(); + $table->string("name"); + $table->string("image"); + $table->string("config"); + $table->string("protocol"); + $table->string("ports"); + $table->timestamps(); + }); + + Service::create([ + "uuid" => Str::uuid(), + "name" => "Minecraft Java edition", + "image" => "/img/minecraft-java.webp", + "config" => "docker.minecraftJava", + "protocol" => "tcp", + "ports" => "25565" + ]); + + Service::create([ + "uuid" => Str::uuid(), + "name" => "Minecraft Bedrock edition", + "image" => "/img/minecraft-bedrock.webp", + "config" => "docker.minecraftBedrock", + "protocol" => "udp", + "ports" => "19132|19133" + ]); + + Service::create([ + "uuid" => Str::uuid(), + "name" => "Ark Survial Evolved", + "image" => "/img/ark.jpeg", + "config" => "docker.arkserver", + "protocol" => "udp", + "ports" => "27015|7777" + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('services'); + } +}; diff --git a/database/migrations/2025_02_14_231846_create_server_statuses_table.php b/database/migrations/2025_02_14_231846_create_server_statuses_table.php new file mode 100644 index 0000000..b921214 --- /dev/null +++ b/database/migrations/2025_02_14_231846_create_server_statuses_table.php @@ -0,0 +1,50 @@ +id(); + $table->string("title"); + $table->string("message"); + $table->timestamps(); + }); + + Status::create([ + "title" => "Running", + "message" => "", + ]); + + Status::create([ + "title" => "Pending", + "message" => "", + ]); + + Status::create([ + "title" => "Offline", + "message" => "", + ]); + + Status::create([ + "title" => "Failed", + "message" => "", + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('server_statuses'); + } +}; diff --git a/database/migrations/2025_02_14_232205_create_specs_table.php b/database/migrations/2025_02_14_232205_create_specs_table.php new file mode 100644 index 0000000..2ebd557 --- /dev/null +++ b/database/migrations/2025_02_14_232205_create_specs_table.php @@ -0,0 +1,54 @@ +id(); + $table->uuid("uuid"); + $table->unsignedTinyInteger("cpus"); + $table->unsignedBigInteger("memory"); + $table->unsignedBigInteger("storage"); + $table->timestamps(); + }); + + Spec::create([ + "uuid" => Str::uuid(), + "cpus" => 1, + "memory" => 2000000000, + "storage" => 20000000000 + ]); + + Spec::create([ + "uuid" => Str::uuid(), + "cpus" => 1, + "memory" => 3000000000, + "storage" => 50000000000 + ]); + + Spec::create([ + "uuid" => Str::uuid(), + "cpus" => 2, + "memory" => 5000000000, + "storage" => 40000000000 + ]); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('specs'); + } +}; diff --git a/database/migrations/2025_02_14_234835_create_servers_table.php b/database/migrations/2025_02_14_234835_create_servers_table.php new file mode 100644 index 0000000..f9dab81 --- /dev/null +++ b/database/migrations/2025_02_14_234835_create_servers_table.php @@ -0,0 +1,39 @@ +id(); + $table->uuid("uuid"); + $table->string("container", 511)->nullable(); + $table->string("name"); + $table->dateTime("start")->nullable(); + $table->dateTime("end")->nullable(); + $table->unsignedBigInteger("service_id"); + $table->unsignedBigInteger("user_id"); + $table->unsignedBigInteger("status_id"); + $table->timestamps(); + + $table->foreign("service_id")->references("id")->on("services"); + $table->foreign("user_id")->references("id")->on("users"); + $table->foreign("status_id")->references("id")->on("statuses"); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('servers'); + } +}; diff --git a/database/migrations/2025_02_16_230802_create_server_exposed_port.php b/database/migrations/2025_02_16_230802_create_server_exposed_port.php new file mode 100644 index 0000000..fad100f --- /dev/null +++ b/database/migrations/2025_02_16_230802_create_server_exposed_port.php @@ -0,0 +1,32 @@ +id(); + $table->unsignedBigInteger("server_id"); + $table->unsignedBigInteger("exposed_port_id")->unique(); + $table->timestamps(); + + $table->foreign("server_id")->references("id")->on("servers"); + $table->foreign("exposed_port_id")->references("id")->on("exposed_ports"); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('exposed_port_server'); + } +}; diff --git a/public/icons/arrow-icon.svg b/public/icons/arrow-icon.svg new file mode 100644 index 0000000..7e036d0 --- /dev/null +++ b/public/icons/arrow-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/auto-icon.svg b/public/icons/auto-icon.svg new file mode 100644 index 0000000..2a6f379 --- /dev/null +++ b/public/icons/auto-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/copy-icon.svg b/public/icons/copy-icon.svg new file mode 100644 index 0000000..8d4cb09 --- /dev/null +++ b/public/icons/copy-icon.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/icons/delete-icon.svg b/public/icons/delete-icon.svg new file mode 100644 index 0000000..99d6013 --- /dev/null +++ b/public/icons/delete-icon.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/public/icons/details-icon.svg b/public/icons/details-icon.svg new file mode 100644 index 0000000..3c20b33 --- /dev/null +++ b/public/icons/details-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/edit-icon.svg b/public/icons/edit-icon.svg new file mode 100644 index 0000000..89bfb2d --- /dev/null +++ b/public/icons/edit-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/game-icon.svg b/public/icons/game-icon.svg new file mode 100644 index 0000000..489f4a3 --- /dev/null +++ b/public/icons/game-icon.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/hardware-icon.svg b/public/icons/hardware-icon.svg new file mode 100644 index 0000000..3c90680 --- /dev/null +++ b/public/icons/hardware-icon.svg @@ -0,0 +1,2 @@ + +ionicons-v5-l \ No newline at end of file diff --git a/public/icons/link-icon.svg b/public/icons/link-icon.svg new file mode 100644 index 0000000..33ea66f --- /dev/null +++ b/public/icons/link-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/play-icon.svg b/public/icons/play-icon.svg new file mode 100644 index 0000000..1f437dc --- /dev/null +++ b/public/icons/play-icon.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/process-icon.svg b/public/icons/process-icon.svg new file mode 100644 index 0000000..e5b9072 --- /dev/null +++ b/public/icons/process-icon.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/public-icon.svg b/public/icons/public-icon.svg new file mode 100644 index 0000000..600b990 --- /dev/null +++ b/public/icons/public-icon.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/icons/rocket-icon.svg b/public/icons/rocket-icon.svg new file mode 100644 index 0000000..232e968 --- /dev/null +++ b/public/icons/rocket-icon.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/security-icon.svg b/public/icons/security-icon.svg new file mode 100644 index 0000000..98d598b --- /dev/null +++ b/public/icons/security-icon.svg @@ -0,0 +1,14 @@ + + + + security-verified + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/server-icon.svg b/public/icons/server-icon.svg new file mode 100644 index 0000000..e901bd2 --- /dev/null +++ b/public/icons/server-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/share-icon.svg b/public/icons/share-icon.svg new file mode 100644 index 0000000..6288b9c --- /dev/null +++ b/public/icons/share-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/start-icon.svg b/public/icons/start-icon.svg new file mode 100644 index 0000000..df46c3c --- /dev/null +++ b/public/icons/start-icon.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/stats-icon.svg b/public/icons/stats-icon.svg new file mode 100644 index 0000000..8522839 --- /dev/null +++ b/public/icons/stats-icon.svg @@ -0,0 +1,17 @@ + + + + + stats + Created with Sketch Beta. + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/status-icon.svg b/public/icons/status-icon.svg new file mode 100644 index 0000000..eb66107 --- /dev/null +++ b/public/icons/status-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/stop-icon.svg b/public/icons/stop-icon.svg new file mode 100644 index 0000000..10c9821 --- /dev/null +++ b/public/icons/stop-icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/user.svg b/public/icons/user.svg new file mode 100644 index 0000000..a87da49 --- /dev/null +++ b/public/icons/user.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/img/ark.avif b/public/img/ark.avif new file mode 100644 index 0000000..d05ef9f Binary files /dev/null and b/public/img/ark.avif differ diff --git a/public/img/ark.jpeg b/public/img/ark.jpeg new file mode 100644 index 0000000..78855e6 Binary files /dev/null and b/public/img/ark.jpeg differ diff --git a/public/img/banner.jpg b/public/img/banner.jpg new file mode 100644 index 0000000..d8dfb4c Binary files /dev/null and b/public/img/banner.jpg differ diff --git a/public/img/logo.png b/public/img/logo.png new file mode 100644 index 0000000..01d8678 Binary files /dev/null and b/public/img/logo.png differ diff --git a/public/img/minecraft-bedrock.webp b/public/img/minecraft-bedrock.webp new file mode 100644 index 0000000..28555e5 Binary files /dev/null and b/public/img/minecraft-bedrock.webp differ diff --git a/public/img/minecraft-java.webp b/public/img/minecraft-java.webp new file mode 100644 index 0000000..ca6664e Binary files /dev/null and b/public/img/minecraft-java.webp differ diff --git a/resources/css/app.css b/resources/css/app.css index 258b38a..3e1fa01 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -9,3 +9,44 @@ .scale-hover:hover { transform: scale(1.05); transition: transform 0.3s ease-in- @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } + /* Nouvelle animation : rotation au survol */ +.rotate-on-hover { +transition: transform 0.5s ease-in-out; +} +.rotate-on-hover:hover { +transform: rotate(360deg); +} + +@keyframes pulse { +0%, 100% { transform: scale(1); } +50% { transform: scale(1.05); } +} +.pulse { +animation: pulse 2s infinite; +} +/* Nouvelle animation : Bounce */ +@keyframes bounce { +0%, 20%, 50%, 80%, 100% { transform: translateY(0); } +40% { transform: translateY(-20px); } +60% { transform: translateY(-10px); } +} +.bounce { + animation: bounce 2s infinite; +} +/* Nouvelle animation : Shake */ +@keyframes shake { +0%, 100% { transform: translateX(0); } +25% { transform: translateX(-5px); } +75% { transform: translateX(5px); } +} +.shake { +animation: shake 0.5s ease-in-out; +} +/* Nouvelle animation : Glow on hover */ +.glow-on-hover { + transition: box-shadow transform 0.1s ease-in-out; +} +.glow-on-hover:hover { + transform: scale(1.05); + box-shadow: 0 0 2px 2px rgba(51, 51, 51, 0.8); +} \ No newline at end of file diff --git a/resources/js/Components/TextInput.vue b/resources/js/Components/TextInput.vue index 7e31d8c..4e9a7db 100644 --- a/resources/js/Components/TextInput.vue +++ b/resources/js/Components/TextInput.vue @@ -19,7 +19,7 @@ defineExpose({ focus: () => input.value.focus() }); diff --git a/resources/js/Pages/Dashboard.vue b/resources/js/Pages/Dashboard.vue deleted file mode 100644 index fb0dac9..0000000 --- a/resources/js/Pages/Dashboard.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/resources/js/Pages/Home.vue b/resources/js/Pages/Home.vue index 658170a..1fc3c6f 100644 --- a/resources/js/Pages/Home.vue +++ b/resources/js/Pages/Home.vue @@ -2,18 +2,29 @@ import { Head, Link } from '@inertiajs/vue3'; import Layout from '@/Layouts/Layout.vue'; +const props = defineProps({ + services: { + type: Object, + default: [] + } +}); +