From 0c23b0d721aed854d35262380080936435ab21e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Markovi=C4=87?= Date: Fri, 12 Jun 2026 23:58:00 +0200 Subject: [PATCH] =?UTF-8?q?refactor(css):=20inline=20dugmad=20na=20semanti?= =?UTF-8?q?=C4=8Dke=20.btn-*=20klase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dodate klase .btn-opasno (puno crveno) i .btn-upozorenje (narandžasto/storno); .btn-primarno-malo dobio cursor:pointer (nedostajao). Inline dugmad zamenjena klasama u: admin_profil (lozinka/2FA/regeneriši/podesi/deaktiviraj), prodaja/ servis/nabavka_detalji (obriši/storno), servis (traži), magacin (premesti), admin_login_istorija (nazad). Override-i tipa class=btn-primarno style=background uklonjeni u korist .btn-opasno/.btn-upozorenje. Ostala samo kontekstualna inline svojstva (width/align-self/veličina po instanci). Bez promene izgleda — samo izdvajanje ponovljenog stila. Šabloni parsiraju. --- web/static/css/main.css | 37 +++++++++++++++++++ .../stranice/admin_login_istorija.html | 2 +- web/templates/stranice/admin_profil.html | 10 ++--- web/templates/stranice/magacin.html | 2 +- web/templates/stranice/nabavka_detalji.html | 2 +- web/templates/stranice/prodaja_detalji.html | 4 +- web/templates/stranice/servis.html | 2 +- web/templates/stranice/servis_detalji.html | 2 +- 8 files changed, 49 insertions(+), 12 deletions(-) diff --git a/web/static/css/main.css b/web/static/css/main.css index 4ecfdb8..f2adef1 100644 --- a/web/static/css/main.css +++ b/web/static/css/main.css @@ -455,6 +455,7 @@ body { padding: 4px 10px; font-size: 12px; font-weight: 500; + cursor: pointer; text-decoration: none; transition: opacity 0.2s; } @@ -493,6 +494,42 @@ body { } .btn-obrisi-malo:hover { opacity: 0.8; } +/* opasno dugme (Obriši/Deaktiviraj) — pun format, crveno */ +.btn-opasno { + display: inline-flex; + align-items: center; + background: #dc2626; + color: #fff; + border: none; + border-radius: 8px; + padding: 8px 16px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + text-decoration: none; + white-space: nowrap; + transition: opacity 0.2s; +} +.btn-opasno:hover { opacity: 0.85; } + +/* upozoravajuće dugme (Storno) — pun format, narandžasto */ +.btn-upozorenje { + display: inline-flex; + align-items: center; + background: #f97316; + color: #fff; + border: none; + border-radius: 8px; + padding: 8px 16px; + font-size: 14px; + font-weight: 500; + cursor: pointer; + text-decoration: none; + white-space: nowrap; + transition: opacity 0.2s; +} +.btn-upozorenje:hover { opacity: 0.85; } + /* nazad link na formama */ .nazad-link { display: inline-flex; diff --git a/web/templates/stranice/admin_login_istorija.html b/web/templates/stranice/admin_login_istorija.html index d383c8a..d0d2953 100644 --- a/web/templates/stranice/admin_login_istorija.html +++ b/web/templates/stranice/admin_login_istorija.html @@ -8,7 +8,7 @@ {{end}} {{define "sadrzaj"}}
- ← Nazad + ← Nazad Istorija prijava — {{.PrikazKorisnik.KorisnickoIme}}
diff --git a/web/templates/stranice/admin_profil.html b/web/templates/stranice/admin_profil.html index 400f0c1..d4bd5c5 100644 --- a/web/templates/stranice/admin_profil.html +++ b/web/templates/stranice/admin_profil.html @@ -29,7 +29,7 @@
- +
@@ -62,7 +62,7 @@ - + {{ else if .TotpAktivan }} @@ -73,7 +73,7 @@
Prijava zahteva TOTP kod pored lozinke.
- +
@@ -90,7 +90,7 @@
Rezervni kodovi: preostalo {{ .BrojRezervnih }}. Koriste se za prijavu kada nemate pristup aplikaciji sa kodovima.
{{ end }}
- +
@@ -104,7 +104,7 @@
Preporučujemo uključivanje dvostepene verifikacije.
- Podesi 2FA + Podesi 2FA {{ end }} diff --git a/web/templates/stranice/magacin.html b/web/templates/stranice/magacin.html index 01b8af2..cd1a634 100644 --- a/web/templates/stranice/magacin.html +++ b/web/templates/stranice/magacin.html @@ -183,7 +183,7 @@ {{/* padajući meni za premeštanje artikla — prima dict {ID, Kategorije}; koristi se i u tabeli i u mobilnoj kartici */}} {{define "premestiMeni"}} - {{/* nativni modal — showModal() ga stavlja u „top layer", pa je uvek iznad svega bez obzira na z-index/overflow */}} diff --git a/web/templates/stranice/nabavka_detalji.html b/web/templates/stranice/nabavka_detalji.html index 3e720af..6dc57b1 100644 --- a/web/templates/stranice/nabavka_detalji.html +++ b/web/templates/stranice/nabavka_detalji.html @@ -136,7 +136,7 @@
- diff --git a/web/templates/stranice/prodaja_detalji.html b/web/templates/stranice/prodaja_detalji.html index ad5d3d6..9c4ed79 100644 --- a/web/templates/stranice/prodaja_detalji.html +++ b/web/templates/stranice/prodaja_detalji.html @@ -239,7 +239,7 @@ - @@ -257,7 +257,7 @@ - diff --git a/web/templates/stranice/servis.html b/web/templates/stranice/servis.html index 872cd09..c34d2ce 100644 --- a/web/templates/stranice/servis.html +++ b/web/templates/stranice/servis.html @@ -69,7 +69,7 @@ + Novi nalog
- +
diff --git a/web/templates/stranice/servis_detalji.html b/web/templates/stranice/servis_detalji.html index 39bd4d8..e6b3a7b 100644 --- a/web/templates/stranice/servis_detalji.html +++ b/web/templates/stranice/servis_detalji.html @@ -248,7 +248,7 @@
-