Add a sidebar
This commit is contained in:
parent
c550f2cd22
commit
160f5d94c4
|
@ -1,15 +1,19 @@
|
|||
{{ template "base.html" . }}
|
||||
|
||||
{{ define "content" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ if .User.IsEduAuthor }}
|
||||
<div class="optionbar">
|
||||
<div class="options">
|
||||
</div>
|
||||
<div class="options">
|
||||
<a class="edit action button" href="{{ .EditUrl }}" title="Edit">✎ Edit</a>
|
||||
<a class="delete action button" href="{{ .DeleteUrl }}" title="Delete">✖ Delete</a>
|
||||
</div>
|
||||
<div class="mb3">
|
||||
<a href="{{ .EditUrl }}" title="Edit">✎ Edit</a>
|
||||
<a href="{{ .DeleteUrl }}" title="Delete">✖ Delete</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ .Article.Content }}
|
||||
<div class="flex">
|
||||
<div class="flex-grow-1 post-content">
|
||||
{{ .Article.Content }}
|
||||
</div>
|
||||
<div class="ml3 flex-shrink-0 w5">
|
||||
I'm a sidebar!
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -83,6 +83,10 @@ func EducationArticle(c *RequestContext) ResponseData {
|
|||
tmpl.OpenGraphItems = append(tmpl.OpenGraphItems,
|
||||
templates.OpenGraphItem{Property: "og:description", Value: string(article.Description)},
|
||||
)
|
||||
tmpl.Breadcrumbs = []templates.Breadcrumb{
|
||||
{Name: "Education", Url: hmnurl.BuildEducationIndex()},
|
||||
{Name: article.Title, Url: hmnurl.BuildEducationArticle(article.Slug)},
|
||||
}
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("education_article.html", tmpl, c.Perf)
|
||||
|
|
Loading…
Reference in New Issue