added content to blog posts, forgot about that somehow ...
This commit is contained in:
@@ -25,5 +25,6 @@ type BlogPost struct {
|
|||||||
Url string `json:"url" gorm:"primaryKey"`
|
Url string `json:"url" gorm:"primaryKey"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
|
Content string `json:"content"`
|
||||||
Comments []Comment `gorm:"foreignKey:Id"`
|
Comments []Comment `gorm:"foreignKey:Id"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{{ template "header.tmpl" . }}
|
{{ template "header.tmpl" . }}
|
||||||
<div>
|
<div>
|
||||||
|
<h3>{{ .Title }}</h3>
|
||||||
|
<div>{{ .Content }}</div>
|
||||||
{{ range $comment := .Comments }}
|
{{ range $comment := .Comments }}
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
<div>
|
<div>
|
||||||
@@ -15,7 +17,7 @@
|
|||||||
<form method="POST" action="">
|
<form method="POST" action="">
|
||||||
<input type="text" placeholder="Name" name="author"/>
|
<input type="text" placeholder="Name" name="author"/>
|
||||||
<input type="field" name="content" />
|
<input type="field" name="content" />
|
||||||
<input type="text" value="{{ .Url }}" readonly />
|
<input type="text" style="display: none;" value="{{ .Url }}" readonly />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{ template "footer.tmpl" . }}
|
{{ template "footer.tmpl" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user