A tumblelog CMS built on AJAX, PHP and MySQL.

index.htm 8.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <title>{Page_Title}</title>
  8. {Sorbet_includes}
  9. <link rel="stylesheet" type="text/css" href="{URL_Tumble}/themes/{Template_name}/css/bootstrap.min.css" />
  10. <link rel="stylesheet" type="text/css" href="{URL_Tumble}/admin/css/lightbox.css" />
  11. <link rel="alternate" type="application/rss+xml" title="RSS" href="{rssFeed}" />
  12. </head>
  13. <body>
  14. <div class="container">
  15. <header>
  16. <h1><a href="{URL_Tumble}">{Title}</a></h1>
  17. <p class="lead">{Description}</p>
  18. </header>
  19. {if $isAuthenticated}
  20. <nav class="navbar navbar-default">
  21. <div class="container-fluid">
  22. <div class="navbar-header">
  23. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
  24. <span class="sr-only">Toggle navigation</span>
  25. <span class="icon-bar"></span>
  26. <span class="icon-bar"></span>
  27. <span class="icon-bar"></span>
  28. </button>
  29. <a class="navbar-brand" href="{URL_Tumble}">{User}</a>
  30. </div>
  31. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  32. <ul class="nav navbar-nav navbar-right">
  33. <li><a target="_top" href="{URL_Tumble}/admin/index.php">{__("Dashboard")}</a></li>
  34. <li><a target="_top" href="{URL_Tumble}/admin/close.php">{__("Sign out")}</a></li>
  35. </ul>
  36. </div>
  37. </div>
  38. </nav>
  39. {/if}
  40. {if $error}
  41. <div>{$error}</div>
  42. {else}
  43. <section>
  44. {block $rows as $row}
  45. <article class="panel panel-default">
  46. {if $row.postType=='post'}
  47. <div class="panel-heading">
  48. <h3><a href="{$row.Permalink}">{$row.Title}</a></h3>
  49. </div>
  50. <div class="panel-body">
  51. <p>{$row.Body}</p>
  52. {if !$id_post}
  53. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  54. {/if}
  55. </div>
  56. {elseif $row.postType=='photo'}
  57. <div class="panel-body">
  58. <a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a>
  59. <h3>{$row.Caption}</h3>
  60. {if !$id_post}
  61. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  62. {/if}
  63. </div>
  64. {elseif $row.postType=='quote'}
  65. <div class="panel-body">
  66. <a href="{$row.Permalink}">
  67. <blockquote>
  68. {$row.Quote}
  69. <cite>- {$row.Source}</cite>
  70. </blockquote>
  71. </a>
  72. {if !$id_post}
  73. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  74. {/if}
  75. </div>
  76. {elseif $row.postType=='url'}
  77. <div class="panel-heading"><a href="{$row.URL}">{$row.Name}</a></div>
  78. <div class="panel-body">
  79. <p>{$row.Description}</p>
  80. {if !$id_post}
  81. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  82. {/if}
  83. </div>
  84. {elseif $row.postType=='conversation'}
  85. <div class="panel-heading">
  86. <a href="{$row.Permalink}">{$row.Title}</a>
  87. </div>
  88. <div class="panel-body">
  89. <pre>
  90. {$row.Conversation}
  91. </pre>
  92. {if !$id_post}
  93. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  94. {/if}
  95. </div>
  96. {elseif $row.postType=='video'}
  97. <div class="panel-body">
  98. {$row.Video}
  99. <p>{$row.Caption}</p>
  100. {if !$id_post}
  101. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  102. {/if}
  103. </div>
  104. {elseif $row.postType=='mp3'}
  105. <div class="panel-body">
  106. {$row.Mp3}
  107. <p>{$row.Caption}</p>
  108. {if !$id_post}
  109. <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
  110. {/if}
  111. </div>
  112. {/if}
  113. </article>
  114. {/block}
  115. </section>
  116. {if $id_post}
  117. {if $row.Comments_Number>0}
  118. <div>
  119. <h3>{$row.Comments_Number} {__("comments on")} &#8220;{$row.Post_Title}&#8221;</h3>
  120. <ol>
  121. {block $comments as $comment}
  122. <li>
  123. <cite>
  124. <a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
  125. {$comment.Comment_Author} {__("said")}:
  126. </cite>
  127. <br />
  128. <span class="timestampComment"> {__("at")} {$comment.Date}</span><br /><br />
  129. {$comment.Comment}
  130. <br /><br />
  131. </li>
  132. {/block}
  133. </ol>
  134. </div>
  135. {/if}
  136. {if $allowComments}
  137. <form action="{Form_Action}" method="post" class="form-horizontal" name="commentForm">
  138. <fieldset>
  139. <legend>{__("Add your comment")}</legend>
  140. <div class="form-group">
  141. <label for="username" class="col-lg-2 control-label">{__("Name:")}</label>
  142. <div class="col-lg-10">
  143. <input type="text" class="form-control" id="username" name="username" value="{whois.User_Cookie}" />
  144. </div>
  145. </div>
  146. <div class="form-group">
  147. <label for="email" class="col-lg-2 control-label">{__("E-mail:")}</label>
  148. <div class="col-lg-10">
  149. <input type="email" class="form-control" name="email" id="email" value="{whois.Email_Cookie}" />
  150. </div>
  151. </div>
  152. <div class="form-group">
  153. <label for="web" class="col-lg-2 control-label">{__("Website:")}</label>
  154. <div class="col-lg-10">
  155. <input type="url" class="form-control" name="web" id="web" value="{whois.Web_Cookie}" />
  156. </div>
  157. </div>
  158. <div class="form-group">
  159. <label for="content" class="col-lg-2 control-label">{__("Comment:")}</label>
  160. <div class="col-lg-10">
  161. <textarea class="form-control" name="content" id="content" rows="10"></textarea>
  162. <span class="help-block">{__("Some HTML allowed:")}
  163. <code>
  164. &lt;blockquote&gt; &lt;code&gt; &lt;em&gt; &lt;strong&gt; &lt;a&gt;
  165. </code>
  166. </span>
  167. </div>
  168. </div>
  169. <div class="form-group">
  170. <div class="col-lg-10 col-lg-offset-2">
  171. <button type="submit" name="btnAdd" class="btn btn-success">Add comment</button>
  172. <input name="id_post" id="id_post" value="{id_post}" type="hidden" />
  173. <input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
  174. </div>
  175. </div>
  176. </fieldset>
  177. </form>
  178. {/if}
  179. {else}
  180. {pagination}
  181. {/if}
  182. {/if}
  183. <footer style="text-align:center;margin:20px">
  184. <a href="{URL_Tumble}/archive.php">{__("Archive")}</a> &nbsp;/&nbsp;
  185. {__("Subscribe via")} <a href="{URL_Tumble}/rss.php">RSS</a> &nbsp;/&nbsp;
  186. {__("Powered by")} Sorbet CMS
  187. </footer>
  188. </div>
  189. <script type="text/javascript" src="{URL_Tumble}/admin/scripts/jquery.js"></script>
  190. <script type="text/javascript" src="{URL_Tumble}/themes/{Template_name}/js/bootstrap.min.js"></script>
  191. <script type="text/javascript" src="{URL_Tumble}/admin/scripts/lightbox.js"></script>
  192. </body>
  193. </html>