Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
fallais committed Feb 12, 2022
1 parent 5f04245 commit 3e36d75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions internal/routes/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (ctrl *MiscController) Index(w http.ResponseWriter, r *auth.AuthenticatedRe
// Note the call to ParseFS instead of Parse
t, err := template.ParseFS(TemplatesFS, "templates/index.html.tmpl")
if err != nil {
log.Fatal(err)
logrus.Fatalln(err)
}

// Header
Expand Down Expand Up @@ -116,7 +116,7 @@ func (ctrl *MiscController) getConfiguration(w http.ResponseWriter, r *auth.Auth
// Note the call to ParseFS instead of Parse
t, err := template.ParseFS(TemplatesFS, "templates/configuration.html.tmpl")
if err != nil {
log.Fatal(err)
logrus.Fatalln(err)
}

// Header
Expand Down
4 changes: 2 additions & 2 deletions templates/configuration.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@

</fieldset>

<p class="text-center">
<input type="submit" class="btn btn-success" value="Save the settings">
<p class="text-center mt-2">
<input type="submit" class="btn btn-success mt-2" value="Save the settings">
</p>
</form>
</div>
Expand Down
8 changes: 4 additions & 4 deletions templates/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@
</div>

{{ range $key, $value := .Cameras }}
<div class="col-12 mb-4 col-md-6 col-lg-6">
<div class="col-12 col-md-6 col-lg-6">
<div class="card bg-light">
<h5 class="card-header">Camera <i class="fa fa-camera pull-right" aria-hidden="true"></i></h5>
<h5 class="card-header">Camera <small class="text-capitalize">({{ $key }})</small></h5>
<div class="card-body">
<p class="card-text"><img class="img-fluid" [src]="camera.value" /></p>
<p class="text-center"><a target="_blank" href="{{ .camera.value }}"><button class="btn btn-info"><i class="fa fa-search-plus" aria-hidden="true"></i> Larger view</button></a></p>
<p class="card-text"><img class="img-fluid" src="{{ $value }}" /></p>
<p class="text-center"><a target="_blank" href="{{ $value }}"><button class="btn btn-info"><i class="fa fa-search-plus" aria-hidden="true"></i> Larger view</button></a></p>
</div>
</div>
</div>
Expand Down

0 comments on commit 3e36d75

Please sign in to comment.