diff --git a/Gloom/779452_-test.swf b/Gloom/779452_-test.swf new file mode 100644 index 00000000..e5abeb10 Binary files /dev/null and b/Gloom/779452_-test.swf differ diff --git a/Gloom/cover.svg b/Gloom/cover.svg new file mode 100644 index 00000000..6a703f8e --- /dev/null +++ b/Gloom/cover.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Gloom/index.html b/Gloom/index.html new file mode 100644 index 00000000..44b50a70 --- /dev/null +++ b/Gloom/index.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Selenite.csproj b/Selenite.csproj new file mode 100644 index 00000000..dbf970a0 --- /dev/null +++ b/Selenite.csproj @@ -0,0 +1,12 @@ + + + + Exe + netcoreapp3.1 + + + + + + + diff --git a/Startup.cs b/Startup.cs new file mode 100644 index 00000000..22f2020b --- /dev/null +++ b/Startup.cs @@ -0,0 +1,56 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using System.IO; + +public class Startup +{ + public void ConfigureServices(IServiceCollection services) + { + + } + + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + else + { + + } + + + app.UseStaticFiles(new StaticFileOptions + { + FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider( + Path.Combine(Directory.GetCurrentDirectory(), "wwwroot")), + RequestPath = "" + }); + + app.Map("/projects", HandleRequest("projects.html")); + app.Map("/bookmarklets", HandleRequest("bookmarklets.html")); + app.Map("/settings", HandleRequest("settings.html")); + app.Map("/support", HandleRequest("support.html")); + app.Map("/about", HandleRequest("about.html")); + app.Map("/transfer", HandleRequest("transfer.html")); + app.Map("/suggest", HandleRequest("suggest.html")); + app.Map("/contact", HandleRequest("contact.html")); + app.Map("/ad", HandleRequest("ad.html")); + + app.Run(async (context) => + { + await context.Response.WriteAsync("Not Found"); + }); + } + + private static Action HandleRequest(string fileName) + { + return app => app.Run(async context => + { + await context.Response.SendFileAsync(Path.Combine(Directory.GetCurrentDirectory(), fileName)); + }); + } +} diff --git a/copter/copter(www.albinoblacksheep.com).swf b/copter/copter(www.albinoblacksheep.com).swf new file mode 100644 index 00000000..dc84b3b4 Binary files /dev/null and b/copter/copter(www.albinoblacksheep.com).swf differ diff --git a/copter/cover.svg b/copter/cover.svg new file mode 100644 index 00000000..89af874f --- /dev/null +++ b/copter/cover.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/copter/index.html b/copter/index.html new file mode 100644 index 00000000..74a3faff --- /dev/null +++ b/copter/index.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/deps.ts b/deps.ts new file mode 100644 index 00000000..e191aad3 --- /dev/null +++ b/deps.ts @@ -0,0 +1,2 @@ +export { serve } from 'https://deno.land/std/http/server.ts'; +export { join } from 'https://deno.land/std/path/mod.ts'; \ No newline at end of file diff --git a/fly/cover.svg b/fly/cover.svg new file mode 100644 index 00000000..23566ab6 --- /dev/null +++ b/fly/cover.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/fly/flybooger(www.albinoblacksheep.com).swf b/fly/flybooger(www.albinoblacksheep.com).swf new file mode 100644 index 00000000..d7ab1a6b Binary files /dev/null and b/fly/flybooger(www.albinoblacksheep.com).swf differ diff --git a/fly/index.html b/fly/index.html new file mode 100644 index 00000000..bc9a9d1d --- /dev/null +++ b/fly/index.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/games.json b/games.json index bfcec628..aec75ca7 100644 --- a/games.json +++ b/games.json @@ -1,4 +1,22 @@ [ + { + "name": "Gloom", + "image": "cover.svg", + "directory": "Gloom", + "recommended": "1" + }, + { + "name": "Fly", + "image": "cover.svg", + "directory": "fly", + "recommended": "1" + }, + { + "name": "Copter", + "image": "cover.svg", + "directory": "copter", + "recommended": "1" + }, { "name": "Minesweeper", "image": "cover.svg", diff --git a/index.html b/index.html index 486bb9d0..a28e5dad 100644 --- a/index.html +++ b/index.html @@ -67,6 +67,7 @@

selenite.

+

...

diff --git a/index.php b/index.php new file mode 100644 index 00000000..166a9c2f --- /dev/null +++ b/index.php @@ -0,0 +1,31 @@ + 'projects.html', + '/bookmarklets' => 'bookmarklets.html', + '/settings' => 'settings.html', + '/support' => 'support.html', + '/about' => 'about.html', + '/transfer' => 'transfer.html', + '/suggest' => 'suggest.html', + '/contact' => 'contact.html', + '/ad' => 'ad.html', +]; + +$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); + +// Check if the requested path exists in the routes array +if (array_key_exists($path, $routes)) { + // Set the content type to HTML + header('Content-Type: text/html'); + + // Send the corresponding HTML file + readfile(__DIR__ . '/' . $routes[$path]); +} else { + // Handle 404 Not Found + http_response_code(404); + echo '404 Not Found'; +} +?> diff --git a/index.ts b/index.ts new file mode 100644 index 00000000..09c0c4fe --- /dev/null +++ b/index.ts @@ -0,0 +1,68 @@ +import { serve } from 'https://deno.land/std/http/server.ts'; +import { join } from 'https://deno.land/std/path/mod.ts'; + +const server = serve({ port: 3000 }); +const __dirname = new URL('.', import.meta.url).pathname; + +console.log(`Selenite is running on port 3000`); + +for await (const req of server) { + let filePath = ''; + + switch (req.url) { + case '/projects': + filePath = 'projects.html'; + break; + case '/bookmarklets': + filePath = 'bookmarklets.html'; + break; + case '/settings': + filePath = 'settings.html'; + break; + case '/support': + filePath = 'support.html'; + break; + case '/about': + filePath = 'about.html'; + break; + case '/transfer': + filePath = 'transfer.html'; + break; + case '/suggest': + filePath = 'suggest.html'; + break; + case '/contact': + filePath = 'contact.html'; + break; + case '/ad': + filePath = 'ad.html'; + break; + default: + filePath = 'index.html'; + break; + } + + try { + const file = await Deno.readFile(join(__dirname, filePath)); + const body = new TextDecoder().decode(file); + const contentType = getFileContentType(filePath); + req.respond({ body, headers: new Headers({ 'Content-Type': contentType }) }); + } catch (error) { + req.respond({ status: 500, body: 'Internal Server Error' }); + } +} + +function getFileContentType(filePath: string): string { + const extension = filePath.split('.').pop(); + switch (extension) { + case 'html': + return 'text/html'; + case 'css': + return 'text/css'; + case 'js': + return 'application/javascript'; + // Add more cases as needed + default: + return 'text/plain'; + } +} diff --git a/projects.html b/projects.html index ff6d47e5..2c2b44d7 100644 --- a/projects.html +++ b/projects.html @@ -8,7 +8,7 @@ - + diff --git a/style.css b/style.css index 54d78434..a9846b0e 100644 --- a/style.css +++ b/style.css @@ -7,7 +7,13 @@ opacity: 100; } } - +:root { + --inputbg: #3c096c; + --inputborder: #5a189a; + --uibg: #240046; + --textcolor: #fff; + --bg: #10002b; +} * { transition-duration: 0.5s; outline: none; diff --git a/themes.css b/themes.css index 9872b370..215ca799 100644 --- a/themes.css +++ b/themes.css @@ -1,9 +1,16 @@ +:root { + --inputbg: #3c096c; + --inputborder: #5a189a; + --uibg: #240046; + --textcolor: #fff; + --bg: #10002b; +} body { - --inputbg: #000000; - --inputborder: #000000; - --uibg: #000000; - --textcolor: #000; - --bg: #000000; + --inputbg: #3c096c; + --inputborder: #5a189a; + --uibg: #240046; + --textcolor: #fff; + --bg: #10002b; } body[theme=custom] { --inputbg: #3c096c;