/sites/all/themes/jollyany/templates/page--blog.tpl.php

https://gitlab.com/manuvelasco/agostoliquida · PHP · 444 lines · 392 code · 48 blank · 4 comment · 153 complexity · cdcb26c31fe464303ff2ba9a599ea35a MD5 · raw file

  1. <?php
  2. /**
  3. * @file
  4. * Jollyany's theme implementation to display a single Drupal page.
  5. */
  6. ?>
  7. <?php
  8. global $theme_root;
  9. $projects_fulllayout = theme_get_setting('projects_fulllayout');
  10. $projects_fulllayout = str_replace(" ","",$projects_fulllayout);
  11. $array1 = explode(',', $projects_fulllayout);
  12. $page_only_content = theme_get_setting('page_only_content');
  13. $page_only_content = str_replace(" ","",$page_only_content);
  14. $array2 = explode(',', $page_only_content);
  15. $curr_uri = request_uri();
  16. $array_curr_uri = explode('/', $curr_uri);
  17. $getPage = array_intersect($array1, $array_curr_uri);
  18. $getPage2 = array_intersect($array2, $array_curr_uri);
  19. $arrayTypeSettings = array(
  20. 'page_style1', 'page_style2', 'page_onepage',
  21. 'header_1', 'header_2', 'header_3',
  22. 'footer_1', 'footer_2', 'footer_3');
  23. $count=1;
  24. foreach($arrayTypeSettings as $type) {
  25. $var1 = 'page_style'.$count;
  26. $var2 = 'arrayPageStyle'.$count;
  27. $var3 = 'getPageStyle'.$count;
  28. $$var1 = theme_get_setting($type);
  29. $$var1 = str_replace(" ","", $$var1);
  30. $$var2 = explode(',', $$var1);
  31. $count++;
  32. $$var3 = array_intersect($$var2, $array_curr_uri);
  33. }
  34. if(!isset($_GET['header'])) {$_GET['header'] = NULL;}
  35. if(!isset($_GET['footer'])) {$_GET['footer'] = NULL;}
  36. if(!isset($_GET['layout'])) {$_GET['layout'] = NULL;}
  37. ?>
  38. <?php if(count($getPageStyle2) > 0 || $_GET['layout'] == 'boxed' || theme_get_setting('layout_option') == 'boxed') : ?>
  39. <div id="wrapper" class="container">
  40. <?php endif; ?>
  41. <?php if((count($getPageStyle3) == 0 && count($getPageStyle4) == 0 && $_GET['header'] != 'header1')) : ?>
  42. <?php if(empty($_GET['header']) && theme_get_setting('header_option') == 'header1' && count($getPageStyle5) == 0 && count($getPageStyle6) == 0) :?>
  43. <?php else :?>
  44. <?php if ($page['top_bar']) :?>
  45. <div id="topbar" class="clearfix <?php if(count($getPageStyle5) > 0 || $_GET['header'] == 'header2' || (theme_get_setting('header_option') == 'header2' && empty($_GET['header'])) || count($getPageStyle6) > 0 || $_GET['header'] == 'header3' || (theme_get_setting('header_option') == 'header3' && empty($_GET['header']))) { echo 'dark_header'; } ?>">
  46. <div class="container">
  47. <?php print render($page['top_bar']); ?>
  48. </div>
  49. </div>
  50. <?php endif; ?>
  51. <?php endif; ?>
  52. <?php endif; ?>
  53. <?php if(count($getPageStyle1) > 0) : ?>
  54. <div id="wrapper" class="container">
  55. <?php endif; ?>
  56. <?php if(count($getPageStyle3) == 0) : ?>
  57. <header id="header-style-1" <?php if(count($getPageStyle4) > 0 || $_GET['header'] == 'header1' || (empty($_GET['header']) && theme_get_setting('header_option') == 'header1' && count($getPageStyle5) == 0 && count($getPageStyle6) == 0)) { echo 'class="dark_header"'; } elseif(count($getPageStyle6) > 0 || $_GET['header'] == 'header3' || (theme_get_setting('header_option') == 'header3' && empty($_GET['header']))) { echo 'class="header_center"'; } ?>>
  58. <?php if(count($getPageStyle6) > 0 || $_GET['header'] == 'header3'|| (theme_get_setting('header_option') == 'header3' && empty($_GET['header']))) :?>
  59. <div class="container">
  60. <div class="text-center clearfix logo_center">
  61. <!-- Logo -->
  62. <?php if ($logo): ?>
  63. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="logo">
  64. <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
  65. </a>
  66. <?php elseif ($site_name || $site_slogan): ?>
  67. <?php if ($site_name): ?>
  68. <a href="<?php print $front_page; ?>" class="navbar-brand" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
  69. <?php endif; ?>
  70. <?php if ($site_slogan): ?>
  71. <span id="site-slogan"<?php if ($disable_site_slogan) { print ' class="hidden"'; } ?>>
  72. <?php print $site_slogan; ?>
  73. </span>
  74. <?php endif; ?>
  75. <?php endif; ?>
  76. </div>
  77. <div class="navbar yamm navbar-default">
  78. <div class="navbar-header">
  79. <button type="button" data-toggle="collapse" data-target="#navbar-collapse-1" class="navbar-toggle">
  80. <span class="icon-bar"></span>
  81. <span class="icon-bar"></span>
  82. <span class="icon-bar"></span>
  83. </button>
  84. </div>
  85. <div id="navbar-collapse-1" class="navbar-collapse collapse">
  86. <?php print render($page['menu']); ?>
  87. </div>
  88. </div>
  89. </div>
  90. <?php else :?>
  91. <div class="container">
  92. <div class="navbar yamm navbar-default">
  93. <div class="navbar-header">
  94. <button type="button" data-toggle="collapse" data-target="#navbar-collapse-1" class="navbar-toggle">
  95. <span class="icon-bar"></span>
  96. <span class="icon-bar"></span>
  97. <span class="icon-bar"></span>
  98. </button>
  99. <!-- Logo -->
  100. <?php if ($logo): ?>
  101. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="logo">
  102. <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
  103. </a>
  104. <?php elseif ($site_name || $site_slogan): ?>
  105. <?php if ($site_name): ?>
  106. <a href="<?php print $front_page; ?>" class="navbar-brand" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
  107. <?php endif; ?>
  108. <?php if ($site_slogan): ?>
  109. <span id="site-slogan"<?php if ($disable_site_slogan) { print ' class="hidden"'; } ?>>
  110. <?php print $site_slogan; ?>
  111. </span>
  112. <?php endif; ?>
  113. <?php endif; ?>
  114. </div>
  115. <div id="navbar-collapse-1" class="navbar-collapse collapse navbar-right">
  116. <?php print render($page['menu']); ?>
  117. </div>
  118. </div>
  119. </div>
  120. <?php endif; ?>
  121. </header>
  122. <?php endif; ?>
  123. <?php if ($title) : ?>
  124. <section class="post-wrapper-top jt-shadow clearfix">
  125. <div class="container">
  126. <div class="breadcrumbs">
  127. <h2><?php print $title; ?></h2>
  128. <?php if (theme_get_setting('breadcrumbs') == '1' ): ?>
  129. <?php if ($breadcrumb): ?>
  130. <?php print $breadcrumb; ?>
  131. <?php endif; ?>
  132. <?php endif; ?>
  133. </div>
  134. </div>
  135. </section>
  136. <?php endif; ?>
  137. <?php if (isset($node)) : ?>
  138. <section class="blog-wrapper">
  139. <div class="container">
  140. <?php if ($messages) :?>
  141. <div class="doc">
  142. <?php print $messages; ?>
  143. </div>
  144. <?php endif; ?>
  145. <?php if ($tabs = render($tabs)): ?>
  146. <div class="doc">
  147. <div class="tabs">
  148. <?php print render($tabs); ?>
  149. </div>
  150. </div>
  151. <?php endif; ?>
  152. <?php if ($action_links): ?>
  153. <div class="tabs">
  154. <ul class="nav nav-tabs">
  155. <?php print render($action_links); ?>
  156. </ul>
  157. </div>
  158. <?php endif; ?>
  159. <?php if ($page['content']) :?>
  160. <?php print render($page['content']); ?>
  161. <?php endif; ?>
  162. </div>
  163. </section>
  164. <?php else :?>
  165. <?php if ($page['sidebar_right'] && $page['sidebar_left']) :?>
  166. <section class="blog-wrapper">
  167. <div class="container">
  168. <div id="two-sidebar" class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
  169. <?php print render($page['sidebar_left']); ?>
  170. </div>
  171. <div id="content" class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
  172. <div class="row">
  173. <?php if ($messages) :?>
  174. <div class="doc">
  175. <?php print $messages; ?>
  176. </div>
  177. <?php endif; ?>
  178. <?php if ($tabs = render($tabs)): ?>
  179. <div class="doc">
  180. <div class="tabs">
  181. <?php print render($tabs); ?>
  182. </div>
  183. </div>
  184. <?php endif; ?>
  185. <?php if ($action_links): ?>
  186. <div class="tabs">
  187. <ul class="nav nav-tabs">
  188. <?php print render($action_links); ?>
  189. </ul>
  190. </div>
  191. <?php endif; ?>
  192. <?php if ($page['content']) :?>
  193. <?php print render($page['content']); ?>
  194. <?php endif; ?>
  195. </div>
  196. </div>
  197. <div id="sidebar" class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
  198. <?php print render($page['sidebar_right']); ?>
  199. </div>
  200. </div>
  201. </section>
  202. <?php elseif ($page['sidebar_right'] && !$page['sidebar_left']) :?>
  203. <section class="blog-wrapper">
  204. <div class="container">
  205. <div id="content" class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
  206. <div class="row">
  207. <?php if ($messages) :?>
  208. <div class="doc">
  209. <?php print $messages; ?>
  210. </div>
  211. <?php endif; ?>
  212. <?php if ($tabs = render($tabs)): ?>
  213. <div class="doc">
  214. <div class="tabs">
  215. <?php print render($tabs); ?>
  216. </div>
  217. </div>
  218. <?php endif; ?>
  219. <?php if ($action_links): ?>
  220. <div class="tabs">
  221. <ul class="nav nav-tabs">
  222. <?php print render($action_links); ?>
  223. </ul>
  224. </div>
  225. <?php endif; ?>
  226. <?php if ($page['content']) :?>
  227. <?php print render($page['content']); ?>
  228. <?php endif; ?>
  229. </div>
  230. </div>
  231. <div id="sidebar" class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
  232. <?php print render($page['sidebar_right']); ?>
  233. </div>
  234. </div>
  235. </section>
  236. <?php else :?>
  237. <section class="white-wrapper">
  238. <div class="container">
  239. <?php if ($messages) :?>
  240. <div class="doc">
  241. <?php print $messages; ?>
  242. </div>
  243. <?php endif; ?>
  244. <?php if ($tabs = render($tabs)): ?>
  245. <div class="doc">
  246. <div class="tabs">
  247. <?php print render($tabs); ?>
  248. </div>
  249. </div>
  250. <?php endif; ?>
  251. <?php if ($action_links): ?>
  252. <div class="tabs">
  253. <ul class="nav nav-tabs">
  254. <?php print render($action_links); ?>
  255. </ul>
  256. </div>
  257. <?php endif; ?>
  258. <?php if ($page['content']) :?>
  259. <?php print render($page['content']); ?>
  260. <?php endif; ?>
  261. </div>
  262. </section>
  263. <?php endif; ?>
  264. <?php endif; ?>
  265. <?php if(count($getPageStyle3) > 0) : ?>
  266. <header id="header-style-1">
  267. <div class="container">
  268. <div class="navbar yamm navbar-default">
  269. <div class="navbar-header">
  270. <button type="button" data-toggle="collapse" data-target="#navbar-collapse-1" class="navbar-toggle">
  271. <span class="icon-bar"></span>
  272. <span class="icon-bar"></span>
  273. <span class="icon-bar"></span>
  274. </button>
  275. <!-- Logo -->
  276. <?php if ($logo): ?>
  277. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="logo">
  278. <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
  279. </a>
  280. <?php elseif ($site_name || $site_slogan): ?>
  281. <?php if ($site_name): ?>
  282. <a href="<?php print $front_page; ?>" class="navbar-brand" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
  283. <?php endif; ?>
  284. <?php if ($site_slogan): ?>
  285. <span id="site-slogan"<?php if ($disable_site_slogan) { print ' class="hidden"'; } ?>>
  286. <?php print $site_slogan; ?>
  287. </span>
  288. <?php endif; ?>
  289. <?php endif; ?>
  290. </div>
  291. <div id="navbar-collapse-1" class="navbar-collapse collapse navbar-right">
  292. <?php print render($page['menu']); ?>
  293. </div>
  294. </div>
  295. </div>
  296. </header>
  297. <?php endif; ?>
  298. <?php if(count($getPageStyle1) > 0 || count($getPageStyle2) > 0 || $_GET['layout'] == 'boxed' || theme_get_setting('layout_option') == 'boxed') : ?>
  299. </div>
  300. <?php endif; ?>
  301. <?php if ($page['after_content_no_wrap']) :?>
  302. <section class="grey-wrapper jt-shadow">
  303. <?php print render($page['after_content_no_wrap']); ?>
  304. </section>
  305. <?php endif; ?>
  306. <footer id="footer-style-1">
  307. <div class="container">
  308. <?php if(count($getPageStyle7) > 0 || $_GET['footer'] == 'footer1' || (theme_get_setting('footer_option') == 'footer1' && empty($_GET['footer']) && count($getPageStyle8) == 0 && count($getPageStyle9) == 0)) : ?>
  309. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  310. <?php if ($page['footer_1']) : ?>
  311. <?php print render($page['footer_1']); ?>
  312. <?php endif; ?>
  313. </div>
  314. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  315. <?php if ($page['footer_4']) : ?>
  316. <?php print render($page['footer_4']); ?>
  317. <?php endif; ?>
  318. </div>
  319. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  320. <?php if ($page['footer_3']) : ?>
  321. <?php print render($page['footer_3']); ?>
  322. <?php endif; ?>
  323. </div>
  324. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  325. <?php if ($page['footer_2']) : ?>
  326. <?php print render($page['footer_2']); ?>
  327. <?php endif; ?>
  328. </div>
  329. <?php elseif(count($getPageStyle8) > 0 || $_GET['footer'] == 'footer2' || (theme_get_setting('footer_option') == 'footer2' && empty($_GET['footer']) && count($getPageStyle7) == 0 && count($getPageStyle9) == 0)) : ?>
  330. <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
  331. <?php if ($page['footer_1']) : ?>
  332. <?php print render($page['footer_1']); ?>
  333. <?php endif; ?>
  334. </div>
  335. <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
  336. <?php if ($page['footer_2']) : ?>
  337. <?php print render($page['footer_2']); ?>
  338. <?php endif; ?>
  339. </div>
  340. <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
  341. <?php if ($page['footer_4']) : ?>
  342. <?php print render($page['footer_4']); ?>
  343. <?php endif; ?>
  344. </div>
  345. <?php elseif(count($getPageStyle9) > 0 || $_GET['footer'] == 'footer3' || (theme_get_setting('footer_option') == 'footer3' && empty($_GET['footer']) && count($getPageStyle7) == 0 && count($getPageStyle8) == 0)) : ?>
  346. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  347. <?php if ($page['footer_4']) : ?>
  348. <?php print render($page['footer_4']); ?>
  349. <?php endif; ?>
  350. </div>
  351. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  352. <?php if ($page['footer_2']) : ?>
  353. <?php print render($page['footer_2']); ?>
  354. <?php endif; ?>
  355. </div>
  356. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  357. <?php if ($page['footer_3']) : ?>
  358. <?php print render($page['footer_3']); ?>
  359. <?php endif; ?>
  360. </div>
  361. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  362. <?php if ($page['footer_1']) : ?>
  363. <?php print render($page['footer_1']); ?>
  364. <?php endif; ?>
  365. </div>
  366. <?php else :?>
  367. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  368. <?php if ($page['footer_1']) : ?>
  369. <?php print render($page['footer_1']); ?>
  370. <?php endif; ?>
  371. </div>
  372. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  373. <?php if ($page['footer_2']) : ?>
  374. <?php print render($page['footer_2']); ?>
  375. <?php endif; ?>
  376. </div>
  377. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  378. <?php if ($page['footer_3']) : ?>
  379. <?php print render($page['footer_3']); ?>
  380. <?php endif; ?>
  381. </div>
  382. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  383. <?php if ($page['footer_4']) : ?>
  384. <?php print render($page['footer_4']); ?>
  385. <?php endif; ?>
  386. </div>
  387. <?php endif; ?>
  388. </div>
  389. </footer>
  390. <div id="copyrights">
  391. <div class="container">
  392. <?php if ($page['footer_bottom']) : ?>
  393. <?php print render($page['footer_bottom']); ?>
  394. <?php endif; ?>
  395. </div>
  396. </div>