diff --git a/.env.dev b/.env.dev index 60223fd..0ff81ad 100644 --- a/.env.dev +++ b/.env.dev @@ -1,3 +1,10 @@ - +# Server config MODE=development HOST=localhost:8000 + +# Separate services +GIT_URL=https://git.example.org +FORUM_URL=https://forum.example.org + +# Other +EMAIL=mail@example.org diff --git a/assets/style.css b/assets/style.css index ba034a9..d061648 100644 --- a/assets/style.css +++ b/assets/style.css @@ -110,6 +110,12 @@ nav .nav-logo { border-radius: 4px; border: 1px solid var(--bg-darker-2); box-shadow: var(--shadow-1); + + transition: transform 150ms ease-in-out; +} + +nav .nav-logo:hover { + transform: scale(1.05); } nav .nav-logo img { @@ -180,6 +186,11 @@ nav .nav-main .nav-item.dropdown { z-index: 1; } +nav .nav-main .nav-item.dropdown .nav-items .nav-item:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; +} + nav .nav-main .nav-item.dropdown .name { width: 100%; height: 100%; @@ -209,7 +220,6 @@ nav .nav-main .nav-item.dropdown .nav-items { border-radius: 4px; border: 1px solid var(--bg-darker-2); box-shadow: var(--shadow-1); - } /* nav .nav-main .nav-item.dropdown .nav-items::before { @@ -330,6 +340,7 @@ p { a { color: var(--accent-1-fg); + font-weight: var(--font-weight-medium); text-decoration: none; } diff --git a/config/config.go b/config/config.go index ba69b02..a388947 100644 --- a/config/config.go +++ b/config/config.go @@ -14,13 +14,16 @@ var Host string var GitUrl string var ForumUrl string +var Email string -func stringOrDefault(value, defaultValue string) string { +func loadEnv(target *string, name, defaultValue string) { + value := os.Getenv(name) if len(strings.TrimSpace(value)) == 0 { - return defaultValue + *target = defaultValue + } else { + *target = value } - - return value + log.Printf("%s = %v", name, *target) } func Load() { @@ -28,17 +31,11 @@ func Load() { log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile) - Mode = stringOrDefault(os.Getenv("MODE"), "production") - log.Printf("MODE = %v", Mode) - - Host = stringOrDefault(os.Getenv("HOST"), "localhost:8080") - log.Printf("HOST = %v", Host) - - GitUrl = stringOrDefault(os.Getenv("GIT_URL"), "https://git.phc.dm.unipi.it") - log.Printf("GIT_URL = %v", GitUrl) - - ForumUrl = stringOrDefault(os.Getenv("FORUM_URL"), "https://forum.phc.dm.unipi.it") - log.Printf("FORUM_URL = %v", ForumUrl) + loadEnv(&Mode, "MODE", "production") + loadEnv(&Host, "HOST", "localhost:8080") + loadEnv(&GitUrl, "GIT_URL", "https://git.example.org") + loadEnv(&ForumUrl, "FORUM_URL", "https://forum.example.org") + loadEnv(&Email, "EMAIL", "mail@example.org") } func Object() util.H { @@ -47,5 +44,6 @@ func Object() util.H { "Host": Host, "GitUrl": GitUrl, "ForumUrl": ForumUrl, + "Email": Email, } } diff --git a/views/base.html b/views/base.html index 38edfb6..6bde1ec 100644 --- a/views/base.html +++ b/views/base.html @@ -135,7 +135,7 @@ diff --git a/views/login.html b/views/login.html index b6c0384..00d68b8 100644 --- a/views/login.html +++ b/views/login.html @@ -5,20 +5,16 @@ {{define "body"}}
-

- + Accedi

-

Inserisci le tue credenziali di Poisson per accedere.

-

- Per il recupero credenziali vieni direttamente al PHC per parlarne con calma o inviaci una mail. + Per il recupero credenziali vieni direttamente al PHC a parlarne con calma con noi altrimenti puoi inviaci una email all'indirizzo {{ .Config.Email }}.

-
@@ -32,7 +28,6 @@
-
{{end}} \ No newline at end of file diff --git a/views/utenti.html b/views/utenti.html index 1ae1e1c..3c0661b 100644 --- a/views/utenti.html +++ b/views/utenti.html @@ -5,18 +5,17 @@ {{define "body"}}

- + Utenti

- -

- Questa è la lista di tutti gli utenti con un account su Poisson. Scrivi nome, cognome o username di un utente - per filtrare la lista in tempo reale. + +

+ Questa è la lista di tutti gli utenti con un account su Poisson. Scrivi nome, cognome o username di un utente per filtrare la lista in tempo reale.

@@ -24,39 +23,7 @@
{{end}} \ No newline at end of file