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.

274 lines
11 KiB

  1. <div class="card shadow" title="{$c->__('page.feed')}" id="blog" >
  2. <ul class="thick">
  3. {if="$mode == 'blog'"}
  4. <li class="action {if="isset($contact->description)"}condensed{/if}">
  5. <div class="action">
  6. <a
  7. href="{$c->route('feed', array($contact->jid))}"
  8. target="_blank"
  9. title="Atom"
  10. >
  11. <i class="zmdi zmdi-portable-wifi"></i>
  12. </a>
  13. </div>
  14. <span class="icon gray">
  15. <i class="zmdi zmdi-edit"></i>
  16. </span>
  17. {if="$contact"}
  18. <h2>
  19. <a href="{$c->route('blog', array($contact->jid))}">
  20. {$c->__('blog.title', $contact->getTrueName())}
  21. </a>
  22. </h2>
  23. {else}
  24. <h2>
  25. <a href="{$c->route('blog', array($contact->jid))}">
  26. {$c->__('page.blog')}
  27. </a>
  28. </h2>
  29. {/if}
  30. {if="isset($contact->description)"}
  31. <p>{$contact->description}</p>
  32. {/if}
  33. </li>
  34. {elseif="$mode == 'tag'"}
  35. <li class="condensed">
  36. <span class="icon gray">
  37. <i class="zmdi zmdi-tag"></i>
  38. </span>
  39. <h2>
  40. <a href="{$c->route('tag', array($tag))}">
  41. #{$tag}
  42. </a>
  43. </h2>
  44. </li>
  45. {else}
  46. <li class="condensed action">
  47. <div class="action">
  48. <a
  49. href="{$c->route('feed', array($server, $node))}"
  50. target="_blank"
  51. >
  52. <i class="zmdi zmdi-portable-wifi"></i> Atom
  53. </a>
  54. </div>
  55. <span class="icon gray">
  56. <i class="zmdi zmdi-pages"></i>
  57. </span>
  58. <h2>
  59. <a href="{$c->route('node', array($server, $node))}">
  60. {if="$item != null"}
  61. {if="$item->name"}
  62. {$item->name}
  63. {else}
  64. {$item->node}
  65. {/if}
  66. {/if}
  67. </a>
  68. </h2>
  69. {if="$item->description"}
  70. <h4 title="{$item->description|strip_tags}">
  71. {$item->description|strip_tags}
  72. </h4>
  73. {else}
  74. <h4>{$item->server}</h4>
  75. {/if}
  76. </li>
  77. {/if}
  78. </ul>
  79. {loop="$posts"}
  80. <article class="block">
  81. <header>
  82. <ul class="thick">
  83. <li class="condensed">
  84. {$url = $value->getContact()->getPhoto('s')}
  85. {if="$url"}
  86. <span class="icon bubble">
  87. <img src="{$url}">
  88. </span>
  89. {else}
  90. <span class="icon bubble color {$value->getContact()->jid|stringToColor}">
  91. <i class="zmdi zmdi-account"></i>
  92. </span>
  93. {/if}
  94. <h2>
  95. <a {if="$value->isMicroblog()"}
  96. href="{$c->route('blog', array($value->origin, $value->nodeid))}"
  97. {else}
  98. href="{$c->route('node', array($value->origin, $value->node, $value->nodeid))}"
  99. {/if}
  100. >
  101. {if="$value->title != null"}
  102. {$value->title}
  103. {else}
  104. {$c->__('post.default_title')}
  105. {/if}
  106. </a>
  107. </h2>
  108. <p>
  109. {if="$value->getContact()->getTrueName() != '' && $value->privacy"}
  110. <i class="zmdi zmdi-account"></i> {$value->getContact()->getTrueName()}
  111. {/if}
  112. {$value->published|strtotime|prepareDate}
  113. {if="$value->published != $value->updated"}
  114. - <i class="zmdi zmdi-edit"></i> {$value->updated|strtotime|prepareDate}
  115. {/if}
  116. </p>
  117. </li>
  118. </ul>
  119. </header>
  120. {if="!$value->isPublic()"}
  121. <ul class="thick">
  122. <li>
  123. <span class="icon color gray bubble">
  124. <i class="zmdi zmdi-lock"></i>
  125. </span>
  126. <p class="center"> {$c->__('blog.private')} - <a href="{$c->route('main')}">{$c->__('page.login')}</a></p>
  127. </li>
  128. </ul>
  129. <br />
  130. {else}
  131. {$attachements = $value->getAttachements()}
  132. <section>
  133. <content>
  134. {if="$value->isShort() && isset($attachements.pictures)"}
  135. {loop="$attachements.pictures"}
  136. <a href="{$value.href}" class="alternate" target="_blank">
  137. <img class="big_picture" type="{$value.type}" src="{$value.href|urldecode}"/>
  138. </a>
  139. {/loop}
  140. {/if}
  141. {$value->contentcleaned}
  142. </content>
  143. </section>
  144. <footer>
  145. {$tags = $value->getTags()}
  146. {if="isset($tags)"}
  147. <ul class="thin">
  148. <li>
  149. <span class="icon zmdi zmdi-tag gray"></span>
  150. <span>
  151. {loop="$tags"}
  152. <a href="{$c->route('tag', array($value))}">#{$value}</a>
  153. {/loop}
  154. </span>
  155. </li>
  156. </ul>
  157. {/if}
  158. <ul class="middle divided spaced">
  159. {if="isset($attachements.links)"}
  160. {loop="$attachements.links"}
  161. {if="substr($value.href, 0, 5) != 'xmpp:' && filter_var($value.href, FILTER_VALIDATE_URL)"}
  162. <li>
  163. <span class="icon">
  164. <img src="http://icons.duckduckgo.com/ip2/{$value.url.host}.ico"/>
  165. </span>
  166. <a href="{$value.href}" class="alternate" target="_blank">
  167. <span>{$value.href|urldecode}</span>
  168. </a>
  169. </li>
  170. {/if}
  171. {/loop}
  172. {/if}
  173. {if="isset($attachements.files)"}
  174. {loop="$attachements.files"}
  175. <li>
  176. <a
  177. href="{$value.href}"
  178. class="enclosure"
  179. type="{$value.type}"
  180. target="_blank">
  181. <span class="icon gray">
  182. <span class="zmdi zmdi-attachment-alt"></span>
  183. </span>
  184. <span>{$value.href|urldecode}</span>
  185. </a>
  186. </li>
  187. {/loop}
  188. {/if}
  189. </ul>
  190. {if="!$value->isShort() && isset($attachements.pictures)"}
  191. <ul class="flex middle">
  192. {loop="$attachements.pictures"}
  193. <li class="block pic">
  194. <span class="icon gray">
  195. <i class="zmdi zmdi-image"></i>
  196. </span>
  197. <a href="{$value.href}" class="alternate" target="_blank">
  198. <img type="{$value.type}" src="{$value.href|urldecode}"/>
  199. </a>
  200. </li>
  201. {/loop}
  202. </ul>
  203. {/if}
  204. </footer>
  205. {$comments = $c->getComments($value)}
  206. {if="$comments"}
  207. <ul class="spaced middle">
  208. <li class="subheader">
  209. {$c->__('post.comments')}
  210. <span class="info">{$comments|count}</span>
  211. </li>
  212. {loop="$comments"}
  213. <li class="condensed">
  214. {$url = $value->getContact()->getPhoto('s')}
  215. {if="$url"}
  216. <span class="icon bubble">
  217. <img src="{$url}">
  218. </span>
  219. {else}
  220. <span class="icon bubble color {$value->getContact()->jid|stringToColor}">
  221. <i class="zmdi zmdi-account"></i>
  222. </span>
  223. {/if}
  224. <span class="info">{$value->published|strtotime|prepareDate}</span>
  225. <span>
  226. {$value->getContact()->getTrueName()}
  227. </span>
  228. <p class="all">
  229. {$value->contentraw}
  230. </p>
  231. </li>
  232. {/loop}
  233. </ul>
  234. {/if}
  235. <br />
  236. {/if}
  237. </article>
  238. {/loop}
  239. {if="isset($more)"}
  240. <article>
  241. <ul class="active">
  242. {if="$mode == 'blog'"}
  243. <a href="{$c->route('blog', array($contact->jid, $more))}">
  244. {else}
  245. <a href="{$c->route('group', array($server, $node, $more))}">
  246. {/if}
  247. <li id="history" class="block large">
  248. <span class="icon"><i class="zmdi zmdi-time-restore"></i></span>
  249. <span>{$c->__('post.older')}</span>
  250. </li>
  251. </a>
  252. </ul>
  253. </article>
  254. {/if}
  255. {if="$posts == null"}
  256. <ul class="simple thick">
  257. <li>
  258. <span>{$c->__('blog.empty')}</span>
  259. </li>
  260. </ul>
  261. {/if}
  262. <ul>
  263. <li>
  264. <a target="_blank" href="https://movim.eu">
  265. <span class="icon">
  266. <i class="zmdi zmdi-cloud-outline"></i>
  267. </span>
  268. <span>Powered by Movim</span>
  269. </a>
  270. </li>
  271. </ul>
  272. </div>