Dodavanje base šablona, sidebara, topbara i dashboard stranice
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
{{define "sidebar"}}
|
||||
<aside class="sidebar" id="sidebar">
|
||||
<!-- vrh sidebara — hamburger i logo -->
|
||||
<div class="sidebar-vrh">
|
||||
<button class="hamburger" id="hamburger" aria-label="Otvori/zatvori meni">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<line x1="3" y1="6" x2="21" y2="6"/>
|
||||
<line x1="3" y1="12" x2="21" y2="12"/>
|
||||
<line x1="3" y1="18" x2="21" y2="18"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="logo-zona">
|
||||
{{if .Logo}}
|
||||
<img src="/static/{{.Logo}}" alt="Logo" style="width:36px;height:36px;object-fit:contain;border-radius:6px;">
|
||||
{{else}}
|
||||
<div style="width:36px;height:36px;border-radius:8px;background:rgba(255,255,255,0.1);border:1.5px dashed rgba(255,255,255,0.25);flex-shrink:0;"></div>
|
||||
{{end}}
|
||||
<div>
|
||||
<div class="logo-naziv">{{if .NazivFirme}}{{.NazivFirme}}{{else}}NTech{{end}}</div>
|
||||
<div class="logo-podnazlov">Servis računara</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- navigacija -->
|
||||
<nav class="sidebar-nav" aria-label="Glavna navigacija">
|
||||
<div class="nav-oznaka">Glavni meni</div>
|
||||
|
||||
<a href="/dashboard" class="nav-stavka {{if eq .Stranica "dashboard"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
|
||||
<span>Dashboard</span>
|
||||
<span class="nav-tooltip">Dashboard</span>
|
||||
</a>
|
||||
|
||||
<a href="/magacin" class="nav-stavka {{if eq .Stranica "magacin"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/></svg>
|
||||
<span>Magacin</span>
|
||||
<span class="nav-tooltip">Magacin</span>
|
||||
</a>
|
||||
|
||||
<a href="/servis" class="nav-stavka {{if eq .Stranica "servis"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>
|
||||
<span>Servis</span>
|
||||
<span class="nav-tooltip">Servis</span>
|
||||
</a>
|
||||
|
||||
<a href="/prodaja" class="nav-stavka {{if eq .Stranica "prodaja"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>
|
||||
<span>Prodaja</span>
|
||||
<span class="nav-tooltip">Prodaja</span>
|
||||
</a>
|
||||
|
||||
<a href="/klijenti" class="nav-stavka {{if eq .Stranica "klijenti"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
|
||||
<span>Klijenti</span>
|
||||
<span class="nav-tooltip">Klijenti</span>
|
||||
</a>
|
||||
|
||||
<a href="/izvestaji" class="nav-stavka {{if eq .Stranica "izvestaji"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="20" x2="18" y2="10"/><line x1="12" y1="20" x2="12" y2="4"/><line x1="6" y1="20" x2="6" y2="14"/></svg>
|
||||
<span>Izveštaji</span>
|
||||
<span class="nav-tooltip">Izveštaji</span>
|
||||
</a>
|
||||
|
||||
<div class="nav-separator"></div>
|
||||
<div class="nav-oznaka">Sistem</div>
|
||||
|
||||
<a href="/podesavanja" class="nav-stavka {{if eq .Stranica "podesavanja"}}aktivan{{end}}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
|
||||
<span>Podešavanja</span>
|
||||
<span class="nav-tooltip">Podešavanja</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<!-- dno sidebara -->
|
||||
<div class="sidebar-dno">
|
||||
<a href="/odjava" class="nav-stavka">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>
|
||||
<span>Odjava</span>
|
||||
<span class="nav-tooltip">Odjava</span>
|
||||
</a>
|
||||
</div>
|
||||
</aside>
|
||||
{{end}}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{define "topbar"}}
|
||||
<header class="topbar">
|
||||
<span class="topbar-naslov">{{.NaslovStranice}}</span>
|
||||
|
||||
<!-- dugme za promenu teme -->
|
||||
<div style="display:flex;align-items:center;gap:8px;">
|
||||
<a href="/tema/tamna" style="width:20px;height:20px;border-radius:50%;background:#1a1d2e;border:2px solid {{if eq .Tema "tamna"}}#fff{{else}}transparent{{end}};display:inline-block;" title="Tamna"></a>
|
||||
<a href="/tema/svetla" style="width:20px;height:20px;border-radius:50%;background:#f8fafc;border:2px solid {{if eq .Tema "svetla"}}#1a1d2e{{else}}#cbd5e1{{end}};display:inline-block;" title="Svetla"></a>
|
||||
<a href="/tema/zelena" style="width:20px;height:20px;border-radius:50%;background:#0f2818;border:2px solid {{if eq .Tema "zelena"}}#fff{{else}}transparent{{end}};display:inline-block;" title="Zelena"></a>
|
||||
<a href="/tema/ljubicasta" style="width:20px;height:20px;border-radius:50%;background:#1e1535;border:2px solid {{if eq .Tema "ljubicasta"}}#fff{{else}}transparent{{end}};display:inline-block;" title="Ljubičasta"></a>
|
||||
</div>
|
||||
|
||||
<!-- korisnik -->
|
||||
<div style="width:32px;height:32px;border-radius:50%;background:var(--sb-aktivan);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;color:#fff;flex-shrink:0;">
|
||||
{{if .Korisnik}}{{slice .Korisnik 0 2}}{{else}}NT{{end}}
|
||||
</div>
|
||||
</header>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user