activities.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!DOCTYPE html>
  2. <html lang='<?=$page->lang?>'>
  3. <head>
  4. <meta content='text/html; charset=utf-8' http-equiv='content-type'/>
  5. <meta charset='utf-8'/>
  6. <meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1'/>
  7. <title><?=$page->title?></title>
  8. <link rel='shortcut icon' href='<?=$page->favicon?>'/>
  9. <!-- CSS files -->
  10. <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>ui.css'/>
  11. <link rel='stylesheet' type='text/css' href='<?=$static["css"]?>activity.css'/>
  12. <!-- Script files -->
  13. <script type='text/javascript' src='<?=$static["script"]?>ui.js'></script>
  14. <script type='text/javascript' src='<?=$static["script"]?>activity.js'></script>
  15. <!-- Meta tags -->
  16. <link rel='canonical' href='<?=$page->canonical?>'/>
  17. <link rel='author' href='<?=$page->author?>'/>
  18. <link rel='publisher' href='<?=$page->author?>'/>
  19. <meta name='description' content='<?=$page->description?>'/>
  20. <meta property='og:title' content='<?=$page->title?>'/>
  21. <meta property='og:url' content='<?=$page->canonical?>'/>
  22. <meta property='og:description' content='<?=$page->description?>'/>
  23. <meta property='og:image' content='<?=$page->icon?>'/>
  24. <meta property='og:site_name' content='<?=$page->name?>'/>
  25. <meta property='og:type' content='website'/>
  26. <meta property='og:locale' content='<?=$page->lang?>'/>
  27. <meta name='twitter:card' content='summary'/>
  28. <meta name='twitter:title' content='<?=$page->title?>'/>
  29. <meta name='twitter:description' content='<?=$page->description?>'/>
  30. <meta name='twitter:image' content='<?=$page->icon?>'/>
  31. <meta name='twitter:url' content='<?=$page->canonical?>'/>
  32. <meta name='robots' content='index follow'/>
  33. </head>
  34. <body>
  35. <?php
  36. include $path["include"] . "header.php";
  37. ?>
  38. <main>
  39. <?php
  40. if (sizeof($page->future) > 0){
  41. ?>
  42. <section id='future_list'>
  43. <h3>
  44. <?=$page->string["activities_upcoming"]?>
  45. </h3>
  46. <?php
  47. foreach($page->future as $activity) {
  48. ?>
  49. <article>
  50. <h4>
  51. <a href='<?=$base_url?>/actividades/<?=$activity->permalink?>'><?=$activity->title?></a>
  52. </h4>
  53. <?php
  54. if (sizeof($activity->image) > 0){
  55. ?>
  56. <a href='<?=$base_url?>/actividades/<?=$activity->permalink?>'>
  57. <img alt='<?=$activity->title?>' title='<?=$activity->title?>' src='<?=$static["content"]?>activity/<?=$activity->image[0]->image?>' srcset='<?=srcset("activity/" . $activity->image[0]->image)?>'/>
  58. </a>
  59. <?php
  60. } // if (sizeof($activity->image) > 0)
  61. ?>
  62. <div class='activity_details'>
  63. <span class='date'>
  64. <?=format_date($activity->date, $page->lang, false)?>
  65. </span>
  66. <span class='city'>
  67. <?=$activity->city?>
  68. </span>
  69. <span class='price'>
  70. <?php
  71. if ($activity->price == 0){
  72. ?>
  73. <?=$page->string["price_free"]?>
  74. <?php
  75. }
  76. else{
  77. ?>
  78. <?=$activity->price?>€
  79. <?php
  80. }
  81. ?>
  82. </span>
  83. </div>
  84. <p>
  85. <?=cut_text($activity->text, 800, $page->string['keep_reading'], $base_url . "/actividades/" . $actividades->permalink)?>
  86. </p>
  87. <div class='activity_footer'>
  88. <div class='activity_footer_tags'>
  89. <?php
  90. $tags = "";
  91. foreach($activity->tag as $tag) {
  92. $tags = $tags . $tag . ", ";
  93. }
  94. substr($tags, 0, strlen($tags) - 2);
  95. ?>
  96. <?=$tags?>
  97. </div>
  98. <div class='activity_footer_comments'>
  99. <?php
  100. $comment = "";
  101. if (sizeof($post->comment) == 1){
  102. $comments = $page->string["comment_1"];
  103. }
  104. else if (sizeof($post->comment) == 0){
  105. $comments = $page->string["comment_0"];
  106. }
  107. else{
  108. $comments = str_replace("#", sizeof($activity->comment), $page->string["comment_n"]);
  109. }
  110. ?>
  111. <?=$comments?>
  112. </div>
  113. </div>
  114. </article>
  115. <?php
  116. } // foreach($page->future as $activity)
  117. ?>
  118. </section>
  119. <?php
  120. } // if (sizeof($page->future) > 0)
  121. ?>
  122. <section id='past_list'>
  123. <h3>
  124. <?=$page->string["activities_past"]?>
  125. </h3>
  126. <?php
  127. foreach($page->past as $activity) {
  128. ?>
  129. <article>
  130. <h4>
  131. <a href='<?=$base_url?>/actividades/<?=$activity->permalink?>'><?=$activity->title?></a>
  132. </h4>
  133. <?php
  134. if (strlen($activity->image) > 0){
  135. ?>
  136. <a href='<?=$base_url?>/actividades/<?=$activity->permalink?>'>
  137. <img alt='<?=$activity->title?>' title='<?=$activity->title?>' src='<?=$static["content"]?>activity/<?=$activity->image[0]->image?>' srcset='<?=srcset("activity/" . $activity->image[0]->image)?>'/>
  138. </a>
  139. <?php
  140. } // if (strlen($activity->image) > 0)
  141. ?>
  142. <div class='activity_details'>
  143. <span class='date'>
  144. <?=format_date($activity->date, $page->lang, false)?>
  145. </span>
  146. <span class='city'>
  147. <?=$activity->city?>
  148. </span>
  149. </div>
  150. <div class='activity_footer'>
  151. <div class='activity_footer_tags'>
  152. <?php
  153. $tags = "";
  154. foreach($activity->tag as $tag) {
  155. $tags = $tags . $tag . ", ";
  156. }
  157. substr($tags, 0, strlen($tags) - 2);
  158. ?>
  159. <?=$tags?>
  160. </div>
  161. <div class='activity_footer_comments'>
  162. <?php
  163. $comment = "";
  164. if (strlen($activity->comment) == 1){
  165. $comments = $page->string["comments_1"];
  166. }
  167. else if (strlen($activity->comment) == 0){
  168. $comments = $page->string["comments_0"];
  169. }
  170. else{
  171. $comments = str_replace("#", sizeof($activity->comment), $page->string["comments_n"]);
  172. }
  173. ?>
  174. <?=$comments?>
  175. </div>
  176. </div>
  177. </article>
  178. <?php
  179. } // foreach($page->past as $activity)
  180. ?>
  181. </section>
  182. </main>
  183. <?php
  184. include $path["include"] . "footer.php";
  185. ?>
  186. </body>
  187. </html>