diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..c3a254a Binary files /dev/null and b/.DS_Store differ diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index 1d8fb93..1e90de3 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -39,7 +39,7 @@ type TemplateData struct { } func favicon(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, "favicon.ico") + http.ServeFile(w, r, "ui/static/favicon.ico") } func authenticatedUser(w http.ResponseWriter, r *http.Request) int32 { @@ -84,7 +84,7 @@ func home(w http.ResponseWriter, r *http.Request) { active_subscription := subscriptions.HasActiveSubscription(id) - text, err := template.ParseFiles("ui/html/base.html", "ui/html/index.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/index.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -113,7 +113,7 @@ func news(w http.ResponseWriter, r *http.Request) { active_subscription := subscriptions.HasActiveSubscription(id) - text, err := template.ParseFiles("ui/html/base.html", "ui/html/news.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/news.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -137,7 +137,7 @@ func news(w http.ResponseWriter, r *http.Request) { } func login(w http.ResponseWriter, r *http.Request) { - text, err := template.ParseFiles("ui/html/base.html", "ui/html/login.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/login.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Fatal(err) @@ -203,7 +203,7 @@ func login(w http.ResponseWriter, r *http.Request) { } func logout(w http.ResponseWriter, r *http.Request) { - text, err := template.ParseFiles("ui/html/base.html", "ui/html/logout.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/logout.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -238,7 +238,7 @@ func logout(w http.ResponseWriter, r *http.Request) { } func register(w http.ResponseWriter, r *http.Request) { - text, err := template.ParseFiles("ui/html/base.html", "ui/html/register.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/register.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -320,7 +320,7 @@ func account(w http.ResponseWriter, r *http.Request) { //log.Println(id, account) - text, err := template.ParseFiles("ui/html/base.html", "ui/html/account.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/account.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -392,7 +392,7 @@ func subscribe(w http.ResponseWriter, r *http.Request) { }, } - text, err := template.New("base.html").Funcs(fm).ParseFiles("ui/html/base.html", "ui/html/subscribe.html") + text, err := template.New("base.html").Funcs(fm).ParseFiles("ui/html/base.layout.html", "ui/html/subscribe.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) @@ -428,7 +428,7 @@ func subscribeStripe(w http.ResponseWriter, r *http.Request) { log.Println(err) } - text, err := template.ParseFiles("ui/html/base.html", "ui/html/subscribe_stripe.html") + text, err := template.ParseFiles("ui/html/base.layout.html", "ui/html/subscribe_stripe.page.html") if err != nil { http.Error(w, "Internal Server Error", 500) log.Println(err) diff --git a/ui/.DS_Store b/ui/.DS_Store new file mode 100644 index 0000000..42da15e Binary files /dev/null and b/ui/.DS_Store differ diff --git a/ui/html/account.html b/ui/html/account.page.html similarity index 100% rename from ui/html/account.html rename to ui/html/account.page.html diff --git a/ui/html/base.html b/ui/html/base.layout.html similarity index 100% rename from ui/html/base.html rename to ui/html/base.layout.html diff --git a/ui/html/index.html b/ui/html/index.page.html similarity index 53% rename from ui/html/index.html rename to ui/html/index.page.html index 05fb507..bd8da64 100644 --- a/ui/html/index.html +++ b/ui/html/index.page.html @@ -1,9 +1,9 @@ {{define "body"}} -

Alfheim is a game about humanity: our own will, and our place in the world at large.

+

Alfheim is a game about humanity: our own will, and our place in the world.

Alfheim is an MMO where you—the player—administer a medieval settlement of elves. -In an infinite world, and with thousands of other players, you will have to design an efficient command economy, if you wish to be able to compete with your enemies... Or your friends?

+In an infinite world, and with thousands of other players, you will have to design an efficient command economy. Do you want to claim victory over your enemies... Or forge alliances with your friends?


- +
-Alfheim +Alfheim {{end}} diff --git a/ui/html/login.html b/ui/html/login.page.html similarity index 100% rename from ui/html/login.html rename to ui/html/login.page.html diff --git a/ui/html/logout.html b/ui/html/logout.page.html similarity index 100% rename from ui/html/logout.html rename to ui/html/logout.page.html diff --git a/ui/html/news.html b/ui/html/news.page.html similarity index 100% rename from ui/html/news.html rename to ui/html/news.page.html diff --git a/ui/html/register.html b/ui/html/register.page.html similarity index 100% rename from ui/html/register.html rename to ui/html/register.page.html diff --git a/ui/html/subscribe.html b/ui/html/subscribe.page.html similarity index 100% rename from ui/html/subscribe.html rename to ui/html/subscribe.page.html diff --git a/ui/html/subscribe_stripe.html b/ui/html/subscribe_stripe.page.html similarity index 100% rename from ui/html/subscribe_stripe.html rename to ui/html/subscribe_stripe.page.html diff --git a/ui/static/.DS_Store b/ui/static/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/ui/static/.DS_Store differ diff --git a/ui/static/noise-texture.png b/ui/static/noise-texture.png new file mode 100644 index 0000000..0c46682 Binary files /dev/null and b/ui/static/noise-texture.png differ diff --git a/ui/static/style.css b/ui/static/style.css index a459e2b..0fef759 100644 --- a/ui/static/style.css +++ b/ui/static/style.css @@ -3,7 +3,7 @@ html { background-size: cover; background-position: center;*/ height: 100vh; - background-color: black; + background-color: #000000; box-sizing: border-box; } @@ -56,10 +56,10 @@ nav { border: 12px solid; border-image-source: url("/static/panel-000.png"); border-image-slice: 12 fill; - padding-top: 15px; - padding-right: 20px; - padding-bottom: 15px; - padding-left: 20px; + padding-top: 10px; + padding-right: 15px; + padding-bottom: 10px; + padding-left: 15px; color: black; /*box-shadow: 10px 10px 5px lightblue;*/ } @@ -75,6 +75,9 @@ main { max-height: 100%; margin-left: auto; margin-right: auto; + background-image: url('noise-texture.png'); + background-repeat: repeat; + background-size: auto; } p {