All checks were successful
Tests / unit-tests (push) Successful in 25s
- autofocus na inputu u hidden modalu izazivao prikaz forme na nekim browserima pri učitavanju stranice - Fokus se sada daje programski tek kad se modal otvori - Isto rešenje primenjeno i na projects.html i chat.html Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
69 lines
2.6 KiB
HTML
69 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="sr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Claude Web Chat — Projekti</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body>
|
|
<div class="projects-container">
|
|
<div class="projects-header">
|
|
<h1>Projekti</h1>
|
|
<div>
|
|
<button class="btn btn-secondary" onclick="showCreateModal()">Novi projekat</button>
|
|
<a href="/change-password" class="btn btn-secondary">Promeni lozinku</a>
|
|
<a href="/logout" class="btn">Odjavi se</a>
|
|
</div>
|
|
</div>
|
|
|
|
{{if .Error}}
|
|
<div class="error-msg">{{.Error}}</div>
|
|
{{end}}
|
|
|
|
<div id="createModal" class="modal-overlay hidden" onclick="if(event.target===this)this.classList.add('hidden')">
|
|
<div class="modal-box">
|
|
<h2>Novi projekat</h2>
|
|
<form method="POST" action="/projects/create">
|
|
<div class="form-group">
|
|
<label for="projectName">Ime projekta</label>
|
|
<input type="text" id="projectName" name="name" placeholder="moj-projekat" required>
|
|
</div>
|
|
<p class="modal-hint">Dozvoljeni karakteri: slova, brojevi, - i _</p>
|
|
<div class="modal-actions">
|
|
<button type="button" class="btn btn-secondary" onclick="document.getElementById('createModal').classList.add('hidden')">Otkaži</button>
|
|
<button type="submit" class="btn">Kreiraj</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{{if .Projects}}
|
|
<div class="projects-grid">
|
|
{{range .Projects}}
|
|
<a href="/chat/{{.Name}}" class="project-card">
|
|
<h3>{{.Name}}</h3>
|
|
{{if .Description}}
|
|
<p>{{.Description}}</p>
|
|
{{else}}
|
|
<p>Bez opisa</p>
|
|
{{end}}
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<p style="color: var(--text-secondary);">Nema projekata u {{.ProjectsPath}}</p>
|
|
{{end}}
|
|
</div>
|
|
<script>
|
|
function showCreateModal() {
|
|
var modal = document.getElementById('createModal');
|
|
modal.classList.remove('hidden');
|
|
// Focus input after modal is visible
|
|
setTimeout(function() {
|
|
document.getElementById('projectName').focus();
|
|
}, 50);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|