Fix page count and comment form styling
This commit is contained in:
parent
92887a6472
commit
efeb2e934e
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"math"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
|
@ -33,7 +34,7 @@ func partialIndex(r *http.Request, tag, privacy string) template.HTML {
|
|||
stop := offset + perPage
|
||||
|
||||
// Calculate page total.
|
||||
var pages = int(len(pool) / perPage)
|
||||
var pages = math.Ceil(float64(len(pool)) / float64(perPage))
|
||||
if pages == 0 {
|
||||
pages = 1
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
{{ define "comment-form" }}
|
||||
{{ if not .IsAuthenticated }}
|
||||
<div class="form-group row">
|
||||
<label for="name" class="col-2 col-form-label">Your name:</label>
|
||||
<div class="col-10">
|
||||
<label for="name" class="col-12 col-lg-2 col-form-label">Your name:</label>
|
||||
<div class="col-12 col-lg-10">
|
||||
<input type="text"
|
||||
id="name"
|
||||
name="name"
|
||||
|
@ -67,8 +67,8 @@
|
|||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="email" class="col-2 col-form-label">Your email:</label>
|
||||
<div class="col-10">
|
||||
<label for="email" class="col-12 col-lg-2 col-form-label">Your email:</label>
|
||||
<div class="col-12 col-lg-10">
|
||||
<input type="email"
|
||||
id="email"
|
||||
name="email"
|
||||
|
|
Loading…
Reference in New Issue
Block a user