The backend for the AiteStory website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.4 KiB

7 years ago
  1. {{ define "content" }}
  2. <article class="narrow">
  3. {{$.Page.Content}}
  4. </article>
  5. {{ end }}
  6. {{ define "menu" }}
  7. <a href="/page/{{$.Page.ID}}"><h1>Page</h1></a>
  8. {{ if $.Page.Dated}}
  9. <div class="page-property">{{$.Page.FictionalDate | formatDate}}</div>
  10. {{ else }}
  11. <div class="page-property">{{$.Page.PublishDate | formatDate}}</div>
  12. {{ end }}
  13. <ul>
  14. {{ range $.Page.Tags }}
  15. <li><a href="/{{.Hook}}"><div class="mg-icon">{{.Icon}}</div><div class="mg-label {{.CSSCLass}}">{{.Name}}</div></a></li>
  16. {{ end }}
  17. </ul>
  18. {{ if eq $.User.ID $.Page.Author}}
  19. <ul>
  20. <li><a href="/page/edit/{{$.Page.ID}}"><div class="mg-icon">E</div><div class="mg-label">Edit</div></a></li>
  21. <li><a href="/page/delete/{{$.Page.ID}}"><div class="mg-icon">X</div><div class="mg-label">Delete</div></a></li>
  22. </ul>
  23. {{ end }}
  24. <ul>
  25. <li><a href="/"><div class="mg-icon">&lt;</div><div class="mg-label">Back</div></a></li>
  26. </ul>
  27. {{ if $.User.LoggedIn }}
  28. <ul>
  29. <li><a href="/user/logout"><div class="mg-icon">A</div><div class="mg-label">Logout</div></a></li>
  30. </ul>
  31. {{ else }}
  32. <ul>
  33. <li><a href="/user/login"><div class="mg-icon">A</div><div class="mg-label">Login</div></a></li>
  34. </ul>
  35. {{ end }}
  36. {{ end }}
  37. {{ define "head" }}
  38. {{ end }}