blog_post_html_file.go 747 B

12345678910111213141516171819202122
  1. package template
  2. var VarBlogPostHtmlFile = []byte(`{{template "header.html" .}}
  3. <div class="card mb-4">
  4. <div class="card-body">
  5. {{if $.Data.IsUserLoggedIn}}
  6. {{if $.Data.CurrentUser.IsAdmin}}
  7. <a href="/cp/blog/modify/{{$.Data.Blog.Post.Id}}/" target="_blank" style="float:right;">Edit</a>
  8. {{end}}
  9. {{end}}
  10. <h2 class="card-title">{{$.Data.Blog.Post.Name}}</h2>
  11. <div class="page-content">
  12. {{$.Data.Blog.Post.Briefly}}
  13. {{$.Data.Blog.Post.Content}}
  14. </div>
  15. </div>
  16. <div class="card-footer text-muted">
  17. <div>Published on {{$.Data.Blog.Post.DateTimeFormat "02/01/2006, 15:04:05"}}</div>
  18. <div>Author: {{$.Data.Blog.Post.User.FirstName}} {{$.Data.Blog.Post.User.LastName}}</div>
  19. </div>
  20. </div>
  21. {{template "footer.html" .}}`)