Merge branch 'main' of git.phc.dm.unipi.it:phc/website
This commit is contained in:
@@ -3,8 +3,8 @@ MODE=development
|
|||||||
HOST=localhost:8000
|
HOST=localhost:8000
|
||||||
|
|
||||||
# Separate services
|
# Separate services
|
||||||
GIT_URL=https://git.example.org
|
GIT_URL=https://git.phc.dm.unipi.it
|
||||||
FORUM_URL=https://forum.example.org
|
CHAT_URL=https://chat.phc.dm.unipi.it
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
EMAIL=mail@example.org
|
EMAIL=mail@example.org
|
||||||
|
|||||||
@@ -39,4 +39,4 @@ $ find . -type f -name '*.go' | entr -r go run .
|
|||||||
|
|
||||||
Rappresentano link ad altri servizi forniti, è comodo impostarli così in modo da poter anche provare tutto insieme in locale su varie porte (e poi in produzione i vari url diventano link a sotto-domini del sito principale).
|
Rappresentano link ad altri servizi forniti, è comodo impostarli così in modo da poter anche provare tutto insieme in locale su varie porte (e poi in produzione i vari url diventano link a sotto-domini del sito principale).
|
||||||
|
|
||||||
Per ora ci sono solo `GIT_URL` e `FORUM_URL`.
|
Per ora ci sono solo `GIT_URL` e `CHAT_URL`.
|
||||||
|
|||||||
+7
-7
@@ -13,7 +13,7 @@ var Mode string
|
|||||||
var Host string
|
var Host string
|
||||||
|
|
||||||
var GitUrl string
|
var GitUrl string
|
||||||
var ForumUrl string
|
var ChatUrl string
|
||||||
var Email string
|
var Email string
|
||||||
|
|
||||||
func loadEnv(target *string, name, defaultValue string) {
|
func loadEnv(target *string, name, defaultValue string) {
|
||||||
@@ -34,16 +34,16 @@ func Load() {
|
|||||||
loadEnv(&Mode, "MODE", "production")
|
loadEnv(&Mode, "MODE", "production")
|
||||||
loadEnv(&Host, "HOST", "localhost:8080")
|
loadEnv(&Host, "HOST", "localhost:8080")
|
||||||
loadEnv(&GitUrl, "GIT_URL", "https://git.example.org")
|
loadEnv(&GitUrl, "GIT_URL", "https://git.example.org")
|
||||||
loadEnv(&ForumUrl, "FORUM_URL", "https://forum.example.org")
|
loadEnv(&ChatUrl, "CHAT_URL", "https://chat.example.org")
|
||||||
loadEnv(&Email, "EMAIL", "mail@example.org")
|
loadEnv(&Email, "EMAIL", "mail@example.org")
|
||||||
}
|
}
|
||||||
|
|
||||||
func Object() util.H {
|
func Object() util.H {
|
||||||
return util.H{
|
return util.H{
|
||||||
"Mode": Mode,
|
"Mode": Mode,
|
||||||
"Host": Host,
|
"Host": Host,
|
||||||
"GitUrl": GitUrl,
|
"GitUrl": GitUrl,
|
||||||
"ForumUrl": ForumUrl,
|
"ChatUrl": ChatUrl,
|
||||||
"Email": Email,
|
"Email": Email,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<a href="https://github.com/BachoSeven/dotfiles/blob/master/.local/bin/scripts/printa4">Stampare da terminale in dipartimento</a>
|
<a href="https://git.phc.dm.unipi.it/phc/dm-scripts/src/branch/main/printa4">Script per stampare in dipartimento direttamente dal tuo PC</a>
|
||||||
<i class="fas fa-external-link-alt"></i>
|
<i class="fas fa-external-link-alt"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<a class="nav-element" href="{{ .Config.GitUrl }}">Gitea</a>
|
<a class="nav-element" href="{{ .Config.GitUrl }}">Gitea</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-item">
|
<div class="nav-item">
|
||||||
<a class="nav-element" href="{{ .Config.ForumUrl }}">Zulip</a>
|
<a class="nav-element" href="{{ .Config.ChatUrl }}">Zulip</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-item">
|
<div class="nav-item">
|
||||||
<a class="nav-element" href="/seminari">Seminari</a>
|
<a class="nav-element" href="/seminari">Seminari</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user