mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 14:50:27 +00:00
Don't count hits on article that were not found, centered images.
This commit is contained in:
4
main.go
4
main.go
@@ -89,7 +89,6 @@ func serveBlogPage() http.HandlerFunc {
|
|||||||
|
|
||||||
func serveBlogArticle() http.HandlerFunc {
|
func serveBlogArticle() http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
tracker.Hit(r)
|
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
slug := strings.Split(vars["slug"], "-")
|
slug := strings.Split(vars["slug"], "-")
|
||||||
|
|
||||||
@@ -105,6 +104,9 @@ func serveBlogArticle() http.HandlerFunc {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// track the hit if the article was found, otherwise we don't care
|
||||||
|
tracker.Hit(r)
|
||||||
|
|
||||||
tplCache.Render(w, "article.html", struct {
|
tplCache.Render(w, "article.html", struct {
|
||||||
Title string
|
Title string
|
||||||
Content template.HTML
|
Content template.HTML
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ p {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
body {
|
body {
|
||||||
padding: 40px 20px 80px 20px;
|
padding: 40px 20px 80px 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user