A web blog and personal homepage engine written in Go.
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.
 
 

199 lines
6.6 KiB

  1. {{ define "title" }}{{ end }}
  2. {{ define "scripts" }}{{ end }}
  3. {{ define "layout" }}
  4. <!DOCTYPE html>
  5. <html lang="en">
  6. <head>
  7. <meta charset="utf-8">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  9. <title>{{ template "title" . }} - {{ .Title }}</title>
  10. <!-- Bootstrap core CSS -->
  11. <link rel="stylesheet" href="/_builtin/bootstrap/css/bootstrap.min.css">
  12. <link rel="stylesheet" href="/_builtin/theme/theme.css">
  13. <link rel="stylesheet" href="/_builtin/blog-core.css">
  14. <!-- <link rel="stylesheet" href="/css/gfm.css"> -->
  15. </head>
  16. <body>
  17. <nav class="navbar navbar-expand-md fixed-top bluez-navbar">
  18. <a href="#" class="navbar-brand">{{ .Title }}</a>
  19. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
  20. <span class="navbar-toggler-icon"></span>
  21. </button>
  22. <div class="collapse navbar-collapse" id="navbarCollapse">
  23. <ul class="navbar-nav mr-auto">
  24. <li class="nav-item active">
  25. <a href="/" class="nav-link">Home <span class="sr-only">(current)</span></a>
  26. </li>
  27. <li class="nav-item">
  28. <a href="/about" class="nav-link">About</a>
  29. </li>
  30. <li class="nav-item">
  31. <a href="/archive" class="nav-link">Archive</a>
  32. </li>
  33. <li class="nav-item">
  34. <a href="/contact" class="nav-link">Contact Me</a>
  35. </li>
  36. </ul>
  37. <form class="form-inline mt-2 mt-md-0">
  38. <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
  39. <button class="btn btn-outline-light my-2 my-sm-0" type="submit">Search</button>
  40. </form>
  41. </div>
  42. </nav>
  43. <div class="bluez-header">
  44. <div class="container">
  45. <h1 class="bluez-title">{{ .Title }}</h1>
  46. <p class="lead bluez-description">{{ .Description }}</p>
  47. </div>
  48. </div>
  49. <div class="container mb-5">
  50. <div class="row">
  51. <div class="col-9">
  52. {{ if .SetupNeeded }}
  53. <div class="alert alert-success">
  54. Your web blog needs to be set up!
  55. Please <a href="/initial-setup">click here</a> to
  56. configure your blog.
  57. </div>
  58. {{ end }}
  59. {{ range .Flashes }}
  60. <div class="alert alert-success">
  61. {{ . }}
  62. </div>
  63. {{ end }}
  64. {{ if .Error }}
  65. <div class="alert alert-danger">
  66. <strong>Error:</strong> {{ .Error }}
  67. </div>
  68. {{ end }}
  69. {{ template "content" . }}
  70. </div>
  71. <div class="col-3">
  72. <div class="card mb-4">
  73. <div class="card-body">
  74. <h4 class="card-title">About</h4>
  75. <p>Hello, world!</p>
  76. </div>
  77. </div>
  78. {{ if .LoggedIn }}
  79. <div class="card mb-4">
  80. <div class="card-body">
  81. <h4 class="cart-title">Control Center</h4>
  82. <p>
  83. Logged in as: <a href="/account">{{ .CurrentUser.Username }}</a>
  84. </p>
  85. <ul class="list-unstyled">
  86. {{ if .CurrentUser.Admin }}
  87. <li class="list-item"><a href="/admin">Admin Center</a></li>
  88. {{ end }}
  89. <li class="list-item"><a href="/logout">Log out</a></li>
  90. </ul>
  91. <h5>Manage Blog</h5>
  92. <ul class="list-unstyled">
  93. <li class="list-item"><a href="/blog/edit">Post Blog Entry</a></li>
  94. <li class="list-item"><a href="/blog/drafts">View Drafts</a></li>
  95. <li class="list-item"><a href="/blog/private">View Private</a></li>
  96. </ul>
  97. </div>
  98. </div>
  99. {{ end }}
  100. <div class="card mb-4">
  101. <div class="card-body">
  102. <h4 class="card-title">Archives</h4>
  103. <ul class="nav flex-column">
  104. <li class="nav-item">
  105. <a class="nav-link" href="#">March 2018</a>
  106. </li>
  107. <li class="nav-item">
  108. <a class="nav-link" href="#">February 2018</a>
  109. </li>
  110. <li class="nav-item">
  111. <a class="nav-link" href="#">January 2018</a>
  112. </li>
  113. </ul>
  114. </div>
  115. </div>
  116. <div class="card">
  117. <div class="card-body">
  118. <h4 class="card-title">Elsewhere</h4>
  119. <ul class="nav flex-column">
  120. <li class="nav-item">
  121. <a class="nav-link" href="#">Facebook</a>
  122. </li>
  123. <li class="nav-item">
  124. <a class="nav-link" href="#">Twitter</a>
  125. </li>
  126. </ul>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. <footer class="bluez-footer">
  133. <div class="container">
  134. <div class="row">
  135. <div class="col-8">
  136. <ul class="nav">
  137. <li class="nav-item">
  138. <a class="nav-link" href="#">RSS</a>
  139. </li>
  140. <li class="nav-item">
  141. <a class="nav-link" href="#">Random</a>
  142. </li>
  143. <li class="nav-item">
  144. <a class="nav-link" href="#">Archive</a>
  145. </li>
  146. <li class="nav-item">
  147. <a class="nav-link" href="#">Ask me anything</a>
  148. </li>
  149. <li class="nav-item">
  150. <a class="nav-link" href="#">Back to top</a>
  151. </li>
  152. {{ if .LoggedIn }}
  153. <li class="nav-item">
  154. <a class="nav-link" href="/logout">Log out</a>
  155. </li>
  156. {{ else }}
  157. <li class="nav-item">
  158. <a class="nav-link" href="/login">Log in</a>
  159. </li>
  160. {{ end }}
  161. </ul>
  162. </div>
  163. <div class="col-4">
  164. Copyright 2017
  165. </div>
  166. </div>
  167. </div>
  168. </footer>
  169. {{ template "scripts" or "" }}
  170. </body>
  171. </html>
  172. {{ end }}