diff --git a/src/frontend/handlers.go b/src/frontend/handlers.go
index a57e19c..8d40327 100644
--- a/src/frontend/handlers.go
+++ b/src/frontend/handlers.go
@@ -40,9 +40,10 @@ type platformDetails struct {
var (
templates = template.Must(template.New("").
- Funcs(template.FuncMap{
+ Funcs(template.FuncMap{
"renderMoney": renderMoney,
}).ParseGlob("templates/*.html"))
+ plat platformDetails
)
func (fe *frontendServer) homeHandler(w http.ResponseWriter, r *http.Request) {
@@ -80,7 +81,7 @@ func (fe *frontendServer) homeHandler(w http.ResponseWriter, r *http.Request) {
//get env and render correct platform banner.
var env = os.Getenv("ENV_PLATFORM")
- plat := platformDetails{}
+ plat = platformDetails{}
plat.setPlatformDetails(strings.ToLower(env))
if err := templates.ExecuteTemplate(w, "home", map[string]interface{}{
@@ -168,6 +169,8 @@ func (fe *frontendServer) productHandler(w http.ResponseWriter, r *http.Request)
"product": product,
"recommendations": recommendations,
"cart_size": cartSize(cart),
+ "platform_css": plat.css,
+ "platform_name": plat.provider,
}); err != nil {
log.Println(err)
}
@@ -275,6 +278,8 @@ func (fe *frontendServer) viewCartHandler(w http.ResponseWriter, r *http.Request
"total_cost": totalPrice,
"items": items,
"expiration_years": []int{year, year + 1, year + 2, year + 3, year + 4},
+ "platform_css": plat.css,
+ "platform_name": plat.provider,
}); err != nil {
log.Println(err)
}
@@ -335,6 +340,8 @@ func (fe *frontendServer) placeOrderHandler(w http.ResponseWriter, r *http.Reque
"order": order.GetOrder(),
"total_paid": &totalPaid,
"recommendations": recommendations,
+ "platform_css": plat.css,
+ "platform_name": plat.provider,
}); err != nil {
log.Println(err)
}
diff --git a/src/frontend/static/styles/styles.css b/src/frontend/static/styles/styles.css
index a32b0a9..0e6ce19 100755
--- a/src/frontend/static/styles/styles.css
+++ b/src/frontend/static/styles/styles.css
@@ -6,9 +6,7 @@ body {
font-family: 'Roboto', sans-serif;
}
-hr {
- border-top: 1px solid #b4b2bb;
-}
+
.text-muted {
color: #707070;
@@ -232,7 +230,6 @@ footer .footer-top .app {
footer .footer-top .footer-social {
padding: 31px;
- border-bottom: 1px solid #b4b2bb;
}
footer .footer-top .footer-social h4 {
@@ -243,9 +240,6 @@ footer .footer-top .footer-social div {
width: 50%;
}
-.footer-top .social {
- border-right: 1px solid #b4b2bb;
-}
.footer-top .social h4 {
font-size: 24px;
@@ -264,6 +258,7 @@ footer .footer-top .footer-social div {
.footer-top .app {
justify-content: flex-end;
+ padding-left: 100px;
}
.footer-top .app h4 {
@@ -546,7 +541,6 @@ main.home {
.aws-platform,
.aws-platform .platform-flag {
background-color: #ff9900;
- color: #000000;
}
.onprem-platform,
@@ -561,7 +555,7 @@ main.home {
.azure-platform,
.azure-platform .platform-flag {
- background-color:#F25022;
+ background-color: #f35426;
}
.platform-flag {
@@ -620,4 +614,4 @@ form #currency_form {
display: flex;
align-items: center;
outline:none !important;
-}
\ No newline at end of file
+}
diff --git a/src/frontend/templates/cart.html b/src/frontend/templates/cart.html
index 857cffe..f010cc2 100755
--- a/src/frontend/templates/cart.html
+++ b/src/frontend/templates/cart.html
@@ -1,6 +1,10 @@
{{ define "cart" }}
{{ template "header" . }}
-
+
+
+ {{$.platform_name}}
+
+
-
+
{{ range $.items }}
{{ end }}
-
+
{{ if $.recommendations}}
{{ template "recommendations" $.recommendations }}
diff --git a/src/frontend/templates/error.html b/src/frontend/templates/error.html
index 0c9d163..91255c3 100755
--- a/src/frontend/templates/error.html
+++ b/src/frontend/templates/error.html
@@ -1,12 +1,16 @@
{{ define "error" }}
{{ template "header" . }}
-
+
+
+ {{$.platform_name}}
+
+
Uh, oh!
Something has failed. Below are some details for debugging.
-
+
HTTP Status: {{.status_code}} {{.status}}
diff --git a/src/frontend/templates/footer.html b/src/frontend/templates/footer.html
index 140c302..0c79c18 100755
--- a/src/frontend/templates/footer.html
+++ b/src/frontend/templates/footer.html
@@ -3,12 +3,8 @@
diff --git a/src/frontend/templates/product.html b/src/frontend/templates/product.html
index ab8402f..31092af 100755
--- a/src/frontend/templates/product.html
+++ b/src/frontend/templates/product.html
@@ -1,5 +1,10 @@
{{ define "product" }}
{{ template "header" . }}
+
+
+ {{$.platform_name}}
+
+