Add dropdown to navbar instead

This commit is contained in:
Telesphoreo 2022-04-17 18:37:01 -05:00
parent 1ec17ce7e7
commit 0b3c6ddbec
9 changed files with 64 additions and 70 deletions

View File

@ -13,7 +13,7 @@ import org.bukkit.Bukkit;
public class SchematicEndpoint extends AbstractServlet
{
@GetMapping(endpoint = "/api/schematics/download/")
@GetMapping(endpoint = "/api/download_schematic/")
public String schematicIndex(HttpServletRequest request, HttpServletResponse response)
{
if (request.getPathInfo() == null || request.getPathInfo().equals("/"))

View File

@ -34,8 +34,15 @@
<li class="nav-item">
<a class="nav-link" href="/api/punishments/">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -34,8 +34,15 @@
<li class="nav-item">
<a class="nav-link" href="../punishments/">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -34,8 +34,15 @@
<li class="nav-item">
<a class="nav-link" href="/api/punishments/">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -34,8 +34,15 @@
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -34,8 +34,15 @@
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -33,9 +33,15 @@
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/schematics/">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>

View File

@ -1,53 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
<title>Schematic Download - Plex HTTPD</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="/">Plex HTTPD</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Admins</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/indefbans/">Indefinite Bans</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/list/">List</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/api/punishments/">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Schematics</a>
</li>
</ul>
</div>
</div>
</nav>
<div style="text-align: center;" class="col-auto m-0 row justify-content-center p-4">
<h2>Plex HTTPD</h2>
<h5>Welcome to the schematic page. Please select if you would like to download or upload a schematic.</h5>
<div class="d-grid gap-2 col-2 mx-auto">
<button type="button" class="btn btn-outline-info btn-sm p-2"><a href="/api/schematics/download/">Download</a></button>
<button type="button" class="btn btn-outline-info btn-sm p-2"><a href="/api/schematics/upload/">Upload</a></button>
</div>
</div>
</body>
</html>

View File

@ -33,9 +33,15 @@
</li>
<li class="nav-item">
<a class="nav-link" href="/api/punishments/">Punishments</a>
</li>
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Schematics</a>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" role="button"
data-bs-toggle="dropdown" aria-expanded="false">
Schematics
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/api/download_schematic/">Download</a></li>
<li><a class="dropdown-item" href="/api/upload_schematic/">Upload</a></li>
</ul>
</li>
</ul>
</div>