Initial commit: LuHost - Luanti Server Management Web Interface
A modern web interface for Luanti (Minetest) server management with ContentDB integration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
109
views/layout.ejs
Normal file
109
views/layout.ejs
Normal file
@@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><%= title %> | LuHost</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- Header -->
|
||||
<header class="header">
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 1rem;">
|
||||
<div style="text-align: left;">
|
||||
<h1>LuHost</h1>
|
||||
<p>Hosting Luanti made easy</p>
|
||||
</div>
|
||||
|
||||
<% if (typeof isAuthenticated !== 'undefined' && isAuthenticated && typeof user !== 'undefined') { %>
|
||||
<div style="text-align: right;">
|
||||
<div style="color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 0.5rem;">
|
||||
Welcome, <strong><%= user.username %></strong>
|
||||
</div>
|
||||
<div style="display: flex; gap: 0.5rem; align-items: center;">
|
||||
<span id="connection-status" class="status status-running">Connected</span>
|
||||
<a href="/logout" class="btn btn-sm btn-secondary">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div style="margin-top: 1rem;">
|
||||
<span id="connection-status" class="status status-running">Connected</span>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Navigation (only show when authenticated) -->
|
||||
<% if (typeof isAuthenticated !== 'undefined' && isAuthenticated) { %>
|
||||
<nav class="nav">
|
||||
<div class="nav-item">
|
||||
<a href="/" class="nav-link <%= currentPage === 'dashboard' ? 'active' : '' %>">
|
||||
Dashboard
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item">
|
||||
<a href="/worlds" class="nav-link <%= currentPage === 'worlds' ? 'active' : '' %>">
|
||||
Worlds
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item">
|
||||
<a href="/extensions" class="nav-link <%= currentPage === 'extensions' ? 'active' : '' %>">
|
||||
Extensions
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item">
|
||||
<a href="/server" class="nav-link <%= currentPage === 'server' ? 'active' : '' %>">
|
||||
Server
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item">
|
||||
<a href="/config" class="nav-link <%= currentPage === 'config' ? 'active' : '' %>">
|
||||
Configuration
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item">
|
||||
<a href="/users" class="nav-link <%= currentPage === 'users' ? 'active' : '' %>">
|
||||
Users
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<% } %>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main>
|
||||
<%- body %>
|
||||
</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer style="margin-top: 2rem; padding: 2rem; text-align: center; color: var(--text-secondary); font-size: 0.875rem;">
|
||||
<p><a href="https://git.medlab.host/Modpol/luhost" target="_blank" style="color: var(--primary-color);">LuHost</a> |
|
||||
<a href="https://luanti.org" target="_blank" style="color: var(--primary-color);">Luanti</a> |
|
||||
<a href="https://content.luanti.org" target="_blank" style="color: var(--primary-color);">ContentDB</a>
|
||||
</p>
|
||||
<p>A project of the <a href="https://www.colorado.edu/lab/medlab/" target="_blank" style="color: var(--primary-color);">Media Economies Design Lab</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!-- Socket.IO -->
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
|
||||
<!-- Main JavaScript -->
|
||||
<script src="/static/js/main.js"></script>
|
||||
|
||||
<!-- Page-specific scripts -->
|
||||
<% if (typeof scripts !== 'undefined') { %>
|
||||
<% scripts.forEach(function(script) { %>
|
||||
<script src="/static/js/<%= script %>"></script>
|
||||
<% }); %>
|
||||
<% } %>
|
||||
|
||||
<!-- Inline scripts -->
|
||||
<% if (typeof inlineScript !== 'undefined') { %>
|
||||
<script>
|
||||
<%- inlineScript %>
|
||||
</script>
|
||||
<% } %>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user