refactor(css): bedž statusa servisa na jedno mesto u main.css
Status bedž (.status-badge i .status-* boje) je bio dupliran u servis.html i servis_detalji.html sa sitnom razlikom u veličini. Ujednačena veličina i prebačeno u main.css — sad se menja na jednom mestu i radi pod HTMX navigacijom. Uklonjen i prazan <style> blok iz magacin.html.
This commit is contained in:
@@ -1003,6 +1003,16 @@ select {
|
|||||||
[class*="-kartice"] > .animiraj:nth-child(4) { animation-delay: 0.22s; }
|
[class*="-kartice"] > .animiraj:nth-child(4) { animation-delay: 0.22s; }
|
||||||
[class*="-kartice"] > .animiraj:nth-child(5) { animation-delay: 0.28s; }
|
[class*="-kartice"] > .animiraj:nth-child(5) { animation-delay: 0.28s; }
|
||||||
|
|
||||||
|
/* Bedž statusa servisnog naloga — JEDNO mesto za izgled i boje statusa (lista i detalji).
|
||||||
|
Mora biti u main.css: HTMX navigacija odbacuje <head>, pa page <style> ne bi važio. */
|
||||||
|
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
|
||||||
|
.status-primljeno { background: rgba(148,163,184,0.15); color: #94a3b8; }
|
||||||
|
.status-dijagnostika { background: rgba(59,130,246,0.15); color: #3b82f6; }
|
||||||
|
.status-ceka { background: rgba(249,115,22,0.15); color: #f97316; }
|
||||||
|
.status-popravka { background: rgba(234,179,8,0.15); color: #ca8a04; }
|
||||||
|
.status-zavrseno { background: rgba(34,197,94,0.15); color: #16a34a; }
|
||||||
|
.status-preuzeto { background: rgba(21,128,61,0.15); color: #15803d; }
|
||||||
|
|
||||||
/* responsive prikaz — tabela/kartice za sve liste (mora biti u main.css jer HTMX ne učitava head ponovo) */
|
/* responsive prikaz — tabela/kartice za sve liste (mora biti u main.css jer HTMX ne učitava head ponovo) */
|
||||||
.nabavke-kartice { display: none; flex-direction: column; gap: 12px; }
|
.nabavke-kartice { display: none; flex-direction: column; gap: 12px; }
|
||||||
.dobavljaci-kartice { display: none; flex-direction: column; gap: 12px; }
|
.dobavljaci-kartice { display: none; flex-direction: column; gap: 12px; }
|
||||||
|
|||||||
@@ -2,13 +2,6 @@
|
|||||||
|
|
||||||
{{define "naslov"}}Magacin — NTech{{end}}
|
{{define "naslov"}}Magacin — NTech{{end}}
|
||||||
|
|
||||||
{{define "dodatni-css"}}
|
|
||||||
<style>
|
|
||||||
|
|
||||||
/* CSS modala „premesti" je u main.css — mora preživeti HTMX swap (header se ne menja) */
|
|
||||||
</style>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{define "sadrzaj"}}
|
{{define "sadrzaj"}}
|
||||||
<div class="kolona" style="gap:16px;">
|
<div class="kolona" style="gap:16px;">
|
||||||
|
|
||||||
|
|||||||
@@ -2,21 +2,6 @@
|
|||||||
|
|
||||||
{{define "naslov"}}Servis — NTech{{end}}
|
{{define "naslov"}}Servis — NTech{{end}}
|
||||||
|
|
||||||
{{define "dodatni-css"}}
|
|
||||||
<style>
|
|
||||||
|
|
||||||
|
|
||||||
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
|
|
||||||
|
|
||||||
.status-primljeno { background: rgba(148,163,184,0.15); color: #94a3b8; }
|
|
||||||
.status-dijagnostika { background: rgba(59,130,246,0.15); color: #3b82f6; }
|
|
||||||
.status-ceka { background: rgba(249,115,22,0.15); color: #f97316; }
|
|
||||||
.status-popravka { background: rgba(234,179,8,0.15); color: #ca8a04; }
|
|
||||||
.status-zavrseno { background: rgba(34,197,94,0.15); color: #16a34a; }
|
|
||||||
.status-preuzeto { background: rgba(21,128,61,0.15); color: #15803d; }
|
|
||||||
</style>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{define "status-badge"}}
|
{{define "status-badge"}}
|
||||||
{{if eq . "Primljeno"}}<span class="status-badge status-primljeno">{{.}}</span>
|
{{if eq . "Primljeno"}}<span class="status-badge status-primljeno">{{.}}</span>
|
||||||
{{else if eq . "U dijagnostici"}}<span class="status-badge status-dijagnostika">{{.}}</span>
|
{{else if eq . "U dijagnostici"}}<span class="status-badge status-dijagnostika">{{.}}</span>
|
||||||
|
|||||||
@@ -9,13 +9,6 @@
|
|||||||
.detalji-kartica:nth-child(3) { animation-delay: 0.20s; }
|
.detalji-kartica:nth-child(3) { animation-delay: 0.20s; }
|
||||||
.detalji-kartica:nth-child(4) { animation-delay: 0.28s; }
|
.detalji-kartica:nth-child(4) { animation-delay: 0.28s; }
|
||||||
.detalji-kartica:nth-child(5) { animation-delay: 0.36s; }
|
.detalji-kartica:nth-child(5) { animation-delay: 0.36s; }
|
||||||
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 500; white-space: nowrap; }
|
|
||||||
.status-primljeno { background: rgba(148,163,184,0.15); color: #94a3b8; }
|
|
||||||
.status-dijagnostika { background: rgba(59,130,246,0.15); color: #3b82f6; }
|
|
||||||
.status-ceka { background: rgba(249,115,22,0.15); color: #f97316; }
|
|
||||||
.status-popravka { background: rgba(234,179,8,0.15); color: #ca8a04; }
|
|
||||||
.status-zavrseno { background: rgba(34,197,94,0.15); color: #16a34a; }
|
|
||||||
.status-preuzeto { background: rgba(21,128,61,0.15); color: #15803d; }
|
|
||||||
</style>
|
</style>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user