Commit e0eaecda authored by zauberstuhl's avatar zauberstuhl

Remove latest users from index page

it will be replaced by static images for more privacy
parent 18fc3f7f
......@@ -5,12 +5,16 @@
<div class="container">
<h1 class="jumbotron-heading">Unmappd - Your beer map</h1>
<p class="lead text-muted">Login and display all venues you checked in via Untappd</p>
<p class="text-muted">Latest users:</p>
<ul class="list-group list-group-flush">
{{range .Users}}
<li class="list-group-item"><a href="{{rwNginx .Username}}">{{.Username}}</a></li>
{{end}}
</ul>
<div class="row">
<div class="col-lg-6 col-12">
<h2>Marker Map</h2>
<img class="img-fluid" src="/assets/images/venue_map.png" alt="Venue Map" />
</div>
<div class="col-lg-6 col-12">
<h2>Clustered Map</h2>
<img class="img-fluid" src="/assets/images/clustered_map.png" alt="Clustered Venue Map" />
</div>
</div>
</div>
</section>
</main>
......
No preview for this file type
......@@ -33,7 +33,6 @@ import (
type TemplateParams struct{
Viper *viper.Viper
CurrentUser User
Users Users
}
var TemplateFuncs = map[string]interface{}{
......@@ -108,17 +107,9 @@ func index_handler(w http.ResponseWriter, r *http.Request) {
return
}
var users Users
err = db.Order("created_at desc").
Limit(5).Find(&users).Error
if err != nil {
log.Print(err)
}
tmpl := prepare_templates("index.html")
if err = tmpl.Execute(w, TemplateParams{
Viper: viper.GetViper(),
Users: users,
}); err != nil {
log.Print(err)
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment