frontend: add BANNER_COLOR to control jumbotron bg
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
1bc817a013
commit
432c5462a0
2 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"frontend/money"
|
"frontend/money"
|
||||||
"html/template"
|
"html/template"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ func (fe *frontendServer) homeHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
"currencies": currencies,
|
"currencies": currencies,
|
||||||
"products": ps,
|
"products": ps,
|
||||||
"cart_size": len(cart),
|
"cart_size": len(cart),
|
||||||
|
"banner_color": os.Getenv("BANNER_COLOR"), // illustrates canary deployments
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
{{ template "header" . }}
|
{{ template "header" . }}
|
||||||
<main role="main">
|
<main role="main">
|
||||||
<section class="jumbotron text-center mb-0">
|
<section class="jumbotron text-center mb-0"
|
||||||
|
{{ with $.banner_color }}
|
||||||
|
style="background-color: {{.}};"
|
||||||
|
{{ end }}
|
||||||
|
>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 class="jumbotron-heading">
|
<h1 class="jumbotron-heading">
|
||||||
One-stop for Hipster Fashion & Style Online
|
One-stop for Hipster Fashion & Style Online
|
||||||
|
|
Loading…
Add table
Reference in a new issue