generate elem with go

This commit is contained in:
Ettore Di Giacinto
2024-04-14 00:31:24 +02:00
parent 7c0f615952
commit 80508001c7
7 changed files with 75 additions and 59 deletions

View File

@@ -69,12 +69,12 @@
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<button hx-put="/start/{{.}}" class="text-indigo-500 hover:text-indigo-400">
<button hx-put="/start/{{.}}">
Start
</button>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<button hx-put="/pause/{{.}}" class="text-indigo-500 hover:text-indigo-400">
<button hx-put="/pause/{{.}}">
Pause
</button>
</td>

View File

@@ -3,50 +3,8 @@
<head>
<title>KnowledgeBase</title>
{{template "views/partials/header"}}
<script src="https://unpkg.com/htmx.org"></script>
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
<script src="https://unpkg.com/hyperscript.org@0.9.12"></script>
<style>
.section-box {
background-color: #2a2a2a; /* Darker background for the form */
padding: 20px;
margin-bottom: 20px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body {
background-color: #1a1a1a; /* Lighter overall background */
color: #ffffff;
font-family: sans-serif;
padding: 20px;
}
input, button {
width: 100%;
padding: 10px;
margin-top: 5px;
border-radius: 5px;
border: none;
}
input[type="text"], input[type="file"] {
background-color: #333333;
color: white;
}
button {
background-color: #4a76a8; /* Blue color for buttons */
color: white;
cursor: pointer;
}
button:hover {
background-color: #5a86b8;
}
</style>
</head>
<body>
<body class="bg-gray-900 p-4 text-white font-sans">
{{template "views/partials/menu"}}
<header class="text-center mb-8">
<h1 class="text-3xl md:text-5xl font-bold">Knowledgebase (items: {{.KnowledgebaseItemsCount}})</h1>

View File

@@ -10,4 +10,41 @@
body {
font-family: 'Roboto', sans-serif;
}
.section-box {
background-color: #2a2a2a; /* Darker background for the form */
padding: 20px;
margin-bottom: 20px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
body {
background-color: #1a1a1a; /* Lighter overall background */
color: #ffffff;
font-family: sans-serif;
padding: 20px;
}
input, button {
width: 100%;
padding: 10px;
margin-top: 5px;
border-radius: 5px;
border: none;
}
input[type="text"], input[type="file"] {
background-color: #333333;
color: white;
}
button {
background-color: #4a76a8; /* Blue color for buttons */
color: white;
cursor: pointer;
}
button:hover {
background-color: #5a86b8;
}
</style>

View File

@@ -50,6 +50,15 @@
</header>
<div class="max-w-4xl mx-auto">
<div class="section-box">
<button hx-put="/start/{{.Name}}" class="text-indigo-500 hover:text-indigo-400">
Start
</button>
<button hx-put="/pause/{{.Name}}" class="text-indigo-500 hover:text-indigo-400">
Pause
</button>
</div>
<div class="section-box">
<h2>Export</h2>
<a href="/settings/export/{{.Name}}" >Export</a>