mirror of
https://github.com/JustusPlays78/ChangelogApp.git
synced 2025-06-27 20:35:16 +00:00
feat: adding settings and pushSite, siteswitch via header, basic frontend stuff
This commit is contained in:
147
index.html
147
index.html
@ -3,125 +3,38 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Task Management</title>
|
||||
<!--<link href="./main.css" rel="stylesheet">-->
|
||||
<title>Changelog App</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||
<script defer src="renderer.js"></script>
|
||||
<script defer src="components/js/renderer.js"></script>
|
||||
</head>
|
||||
<body class="bg-gray-900 text-gray-100 dark:bg-gray-900 dark:text-gray-100">
|
||||
<header class="bg-blue-600 text-white shadow-lg dark:bg-blue-800 dark:text-gray-200">
|
||||
<nav class="container mx-auto flex justify-between items-center py-4 px-6">
|
||||
<h1 class="text-2xl font-bold">Task Manager</h1>
|
||||
<ul class="flex space-x-6">
|
||||
<li><a href="#" class="hover:underline transition">Home</a></li>
|
||||
<li><a href="#" class="hover:underline transition">Tasks</a></li>
|
||||
<li><a href="#" class="hover:underline transition">Settings</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<section class="container mx-auto p-6 bg-gray-800 shadow-md rounded-lg mt-6">
|
||||
<div class="space-y-6">
|
||||
<div class="flex space-x-4">
|
||||
<div class="w-full">
|
||||
<label for="day-dropdown" class="block text-sm font-medium text-gray-300">Day</label>
|
||||
<select id="day-dropdown" class="mt-1 block w-full p-2 border border-gray-600 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white dark:border-gray-600" style="background-color: #2d3748 !important;" onchange="handleDayChange()">
|
||||
<option value="">Choose Day</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="w-full">
|
||||
<label for="type-dropdown" class="block text-sm font-medium text-gray-300">Change Type:</label>
|
||||
<select id="type-dropdown" class="mt-1 block w-full p-2 border border-gray-600 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white dark:border-gray-600" style="background-color: #2d3748 !important;">
|
||||
<option value="Fix">Fix</option>
|
||||
<option value="Feat">Feat</option>
|
||||
<option value="Sonst">Sonst</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex space-x-4">
|
||||
<div class="w-full">
|
||||
<label for="role-dropdown" class="block text-sm font-medium text-gray-300">Ticket:</label>
|
||||
<select id="role-dropdown" class="mt-1 block w-full p-2 border border-gray-600 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white dark:border-gray-600" style="background-color: #2d3748 !important;">
|
||||
<option value="QA">QA</option>
|
||||
<option value="DEV">DEV</option>
|
||||
<option value="DEV">GD</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="short-input" class="block text-sm font-medium text-gray-300">Ticketnumber:</label>
|
||||
<input id="short-input" type="text" maxlength="7" class="mt-1 block w-full p-2 border border-gray-600 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:text-white dark:border-gray-600" style="background-color: #2d3748 !important;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<label for="long-input" class="block text-sm font-medium text-gray-300">Description:</label>
|
||||
<input id="long-input" type="text" class="mt-1 block w-full p-2 border border-gray-600 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-800 dark:text-white dark:border-gray-600" style="background-color: #2d3748 !important;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-right">
|
||||
<button id="add-button" class="bg-blue-600 text-white px-4 py-2 rounded-md shadow hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:bg-blue-700 dark:hover:bg-blue-600">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="container mx-auto p-6 bg-gray-800 shadow-md rounded-lg mt-6">
|
||||
<h3 class="text-xl font-bold">Day</h3>
|
||||
<table class="w-full table-auto border-collapse">
|
||||
<thead class="bg-gray-700">
|
||||
<tr>
|
||||
<th class="px-4 py-2 border border-gray-600 text-left text-gray-200">Type</th>
|
||||
<th class="px-4 py-2 border border-gray-600 text-left text-gray-200">Role</th>
|
||||
<th class="px-4 py-2 border border-gray-600 text-left text-gray-200">Short Input</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="task-table-body">
|
||||
<!-- Dynamically populated rows -->
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
// JavaScript Logic
|
||||
|
||||
function handleDayChange() {
|
||||
const selectedDay = document.getElementById('day-dropdown').value;
|
||||
console.log('Selected day:', selectedDay);
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
const day = document.getElementById('day-dropdown').value;
|
||||
const type = document.getElementById('type-dropdown').value;
|
||||
const role = document.getElementById('role-dropdown').value;
|
||||
const shortInput = document.getElementById('short-input').value;
|
||||
const longInput = document.getElementById('long-input').value;
|
||||
|
||||
if (!day || !type || !role || !shortInput || !longInput) {
|
||||
alert('Please fill in all fields!');
|
||||
return;
|
||||
}
|
||||
|
||||
const tableBody = document.getElementById('task-table-body');
|
||||
const newRow = document.createElement('tr');
|
||||
|
||||
newRow.innerHTML = `
|
||||
<td class="px-4 py-2 border border-gray-300 dark:text-gray-200">${type}</td>
|
||||
<td class="px-4 py-2 border border-gray-300 dark:text-gray-200">${role}</td>
|
||||
<td class="px-4 py-2 border border-gray-300 dark:text-gray-200">${shortInput}</td>
|
||||
`;
|
||||
|
||||
tableBody.appendChild(newRow);
|
||||
|
||||
console.log('Added task:', { day, type, role, shortInput, longInput });
|
||||
}
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
$("#header").load("./components/html/header.html");
|
||||
$("#homeDiv").load("./components/html/home.html");
|
||||
$("#pushDiv").load("./components/html/push.html");
|
||||
$("#settingsDiv").load("./components/html/settings.html");
|
||||
$("#footer").load("./components/html/footer.html");
|
||||
});
|
||||
</script>
|
||||
|
||||
<body class="bg-gray-900 text-gray-100">
|
||||
<!--Header-->
|
||||
<div id="header"></div>
|
||||
|
||||
<!--Home-->
|
||||
<div id="homeDiv"></div>
|
||||
<!--Days-->
|
||||
<div id="pushDiv" style="display: none;"></div>
|
||||
<!--Settings-->
|
||||
<div id="settingsDiv" style="display: none;"></div>
|
||||
|
||||
<!--Footer-->
|
||||
<div id="footer"></div>
|
||||
|
||||
|
||||
<script src="components/js/frontend_handle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user