mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2024-12-22 07:55:01 +00:00
HTTPD now supports dark mode
This commit is contained in:
parent
46ff09bf58
commit
7a996004f0
4 changed files with 17 additions and 14 deletions
|
@ -30,7 +30,7 @@ repositories {
|
|||
dependencies {
|
||||
implementation("org.projectlombok:lombok:1.18.26")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.26")
|
||||
implementation("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
||||
implementation("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
|
||||
implementation("dev.plex:server:1.3-SNAPSHOT")
|
||||
implementation("org.json:json:20230227")
|
||||
implementation("org.reflections:reflections:0.10.2")
|
||||
|
|
|
@ -6,6 +6,7 @@ import dev.plex.request.GetMapping;
|
|||
import dev.plex.util.PlexLog;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -15,6 +16,8 @@ import java.util.List;
|
|||
|
||||
public class SchematicDownloadEndpoint extends AbstractServlet
|
||||
{
|
||||
List<File> files = new ArrayList<>();
|
||||
|
||||
@GetMapping(endpoint = "/api/schematics/download/")
|
||||
public String downloadSchematic(HttpServletRequest request, HttpServletResponse response)
|
||||
{
|
||||
|
@ -86,11 +89,10 @@ public class SchematicDownloadEndpoint extends AbstractServlet
|
|||
" </tr>\n");
|
||||
}
|
||||
file = file.replace("${schematics}", sb.toString());
|
||||
files.clear();
|
||||
return file;
|
||||
}
|
||||
|
||||
List<File> files = new ArrayList<>();
|
||||
|
||||
public List<File> listFilesForFolder(final File folder)
|
||||
{
|
||||
for (File fileEntry : folder.listFiles())
|
||||
|
@ -105,7 +107,6 @@ public class SchematicDownloadEndpoint extends AbstractServlet
|
|||
files.add(fileEntry);
|
||||
}
|
||||
}
|
||||
PlexLog.debug(files.toString());
|
||||
return files;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,18 +2,19 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/Telesphoreo/bootstrap-color-switcher@master/script.js"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@200;400&display=swap" rel="stylesheet">
|
||||
<title>${TITLE} - Plex HTTPD</title>
|
||||
</head>
|
||||
<body style="font-family: 'IBM Plex Sans', sans-serif;">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/" style="font-weight:200;">Plex HTTPD</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
|
|
|
@ -2,18 +2,19 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2"
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
|
||||
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/Telesphoreo/bootstrap-color-switcher@master/script.js"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@200;400&display=swap" rel="stylesheet">
|
||||
<title>${TITLE} - Plex HTTPD</title>
|
||||
</head>
|
||||
<body style="font-family: 'IBM Plex Sans', sans-serif;">
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/" style="font-weight:200;">Plex HTTPD</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
|
|
Loading…
Reference in a new issue