Refactor al nuovo nome del repo anche qua

main-old
Antonio De Lucreziis 3 years ago
parent 8bd5f83fc0
commit 349fb9bcf1

@ -3,8 +3,8 @@ MODE=development
HOST=localhost:8000
# Separate services
GIT_URL=https://git.example.org
FORUM_URL=https://forum.example.org
GIT_URL=https://git.phc.dm.unipi.it
CHAT_URL=https://chat.phc.dm.unipi.it
# Other
EMAIL=mail@example.org

@ -7,7 +7,7 @@ Repo del server del nuovo sito per il PHC.
Per clonare il progetto usare
```bash
$ git clone https://github.com/phc-dm/phc-server
$ git clone https://git.phc.dm.unipi.it/phc/website
```
## Development
@ -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).
Per ora ci sono solo `GIT_URL` e `FORUM_URL`.
Per ora ci sono solo `GIT_URL` e `CHAT_URL`.

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/phc-dm/phc-server/config"
"git.phc.dm.unipi.it/phc/website/config"
"gopkg.in/yaml.v3"
)

@ -5,15 +5,15 @@ import (
"os"
"strings"
"git.phc.dm.unipi.it/phc/website/util"
"github.com/joho/godotenv"
"github.com/phc-dm/phc-server/util"
)
var Mode string
var Host string
var GitUrl string
var ForumUrl string
var ChatUrl string
var Email string
func loadEnv(target *string, name, defaultValue string) {
@ -34,7 +34,7 @@ func Load() {
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(&ChatUrl, "CHAT_URL", "https://chat.example.org")
loadEnv(&Email, "EMAIL", "mail@example.org")
}
@ -43,7 +43,7 @@ func Object() util.H {
"Mode": Mode,
"Host": Host,
"GitUrl": GitUrl,
"ForumUrl": ForumUrl,
"ChatUrl": ChatUrl,
"Email": Email,
}
}

@ -1,4 +1,4 @@
module github.com/phc-dm/phc-server
module git.phc.dm.unipi.it/phc/website
go 1.13

@ -5,12 +5,12 @@ import (
"log"
"net/http"
"git.phc.dm.unipi.it/phc/website/articles"
"git.phc.dm.unipi.it/phc/website/config"
"git.phc.dm.unipi.it/phc/website/templates"
"git.phc.dm.unipi.it/phc/website/util"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/phc-dm/phc-server/articles"
"github.com/phc-dm/phc-server/config"
"github.com/phc-dm/phc-server/templates"
"github.com/phc-dm/phc-server/util"
)
func main() {

@ -6,8 +6,8 @@ import (
"path"
"strings"
"github.com/phc-dm/phc-server/config"
"github.com/phc-dm/phc-server/util"
"git.phc.dm.unipi.it/phc/website/config"
"git.phc.dm.unipi.it/phc/website/util"
)
type LoadTemplate interface {

@ -26,7 +26,7 @@
<a class="nav-element" href="{{ .Config.GitUrl }}">Gitea</a>
</div>
<div class="nav-item">
<a class="nav-element" href="{{ .Config.ForumUrl }}">Zulip</a>
<a class="nav-element" href="{{ .Config.ChatUrl }}">Zulip</a>
</div>
<div class="nav-item">
<a class="nav-element" href="/seminari">Seminari</a>

Loading…
Cancel
Save