PageRenderTime 49ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/sites/all/themes/nuevo_sitio/templates/node--lobbies-con-mapa.tpl.php

https://gitlab.com/leoplanxxi/dr7-web-buap-2016
PHP | 305 lines | 178 code | 45 blank | 82 comment | 6 complexity | ebeadec720cec05bf378f1cc2ab8aab7 MD5 | raw file
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display a node.
  5. *
  6. * Available variables:
  7. * - $title: the (sanitized) title of the node.
  8. * - $content: An array of node items. Use render($content) to print them all,
  9. * or print a subset such as render($content['field_example']). Use
  10. * hide($content['field_example']) to temporarily suppress the printing of a
  11. * given element.
  12. * - $user_picture: The node author's picture from user-picture.tpl.php.
  13. * - $date: Formatted creation date. Preprocess functions can reformat it by
  14. * calling format_date() with the desired parameters on the $created variable.
  15. * - $name: Themed username of node author output from theme_username().
  16. * - $node_url: Direct URL of the current node.
  17. * - $display_submitted: Whether submission information should be displayed.
  18. * - $submitted: Submission information created from $name and $date during
  19. * template_preprocess_node().
  20. * - $classes: String of classes that can be used to style contextually through
  21. * CSS. It can be manipulated through the variable $classes_array from
  22. * preprocess functions. The default values can be one or more of the
  23. * following:
  24. * - node: The current template type; for example, "theming hook".
  25. * - node-[type]: The current node type. For example, if the node is a
  26. * "Blog entry" it would result in "node-blog". Note that the machine
  27. * name will often be in a short form of the human readable label.
  28. * - node-teaser: Nodes in teaser form.
  29. * - node-preview: Nodes in preview mode.
  30. * The following are controlled through the node publishing options.
  31. * - node-promoted: Nodes promoted to the front page.
  32. * - node-sticky: Nodes ordered above other non-sticky nodes in teaser
  33. * listings.
  34. * - node-unpublished: Unpublished nodes visible only to administrators.
  35. * - $title_prefix (array): An array containing additional output populated by
  36. * modules, intended to be displayed in front of the main title tag that
  37. * appears in the template.
  38. * - $title_suffix (array): An array containing additional output populated by
  39. * modules, intended to be displayed after the main title tag that appears in
  40. * the template.
  41. *
  42. * Other variables:
  43. * - $node: Full node object. Contains data that may not be safe.
  44. * - $type: Node type; for example, story, page, blog, etc.
  45. * - $comment_count: Number of comments attached to the node.
  46. * - $uid: User ID of the node author.
  47. * - $created: Time the node was published formatted in Unix timestamp.
  48. * - $classes_array: Array of html class attribute values. It is flattened
  49. * into a string within the variable $classes.
  50. * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
  51. * teaser listings.
  52. * - $id: Position of the node. Increments each time it's output.
  53. *
  54. * Node status variables:
  55. * - $view_mode: View mode; for example, "full", "teaser".
  56. * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
  57. * - $page: Flag for the full page state.
  58. * - $promote: Flag for front page promotion state.
  59. * - $sticky: Flags for sticky post setting.
  60. * - $status: Flag for published status.
  61. * - $comment: State of comment settings for the node.
  62. * - $readmore: Flags true if the teaser content of the node cannot hold the
  63. * main body content.
  64. * - $is_front: Flags true when presented in the front page.
  65. * - $logged_in: Flags true when the current user is a logged-in member.
  66. * - $is_admin: Flags true when the current user is an administrator.
  67. *
  68. * Field variables: for each field instance attached to the node a corresponding
  69. * variable is defined; for example, $node->body becomes $body. When needing to
  70. * access a field's raw values, developers/themers are strongly encouraged to
  71. * use these variables. Otherwise they will have to explicitly specify the
  72. * desired field language; for example, $node->body['en'], thus overriding any
  73. * language negotiation rule that was previously applied.
  74. *
  75. * @see template_preprocess()
  76. * @see template_preprocess_node()
  77. * @see template_process()
  78. *
  79. * @ingroup themeable
  80. */
  81. global $base_url;
  82. $field_foto_2_l2 = field_get_items('node', $node, 'field_foto_2_l2');
  83. $field_sitio_web_l2 = field_get_items('node', $node, 'field_sitio_web_l2');
  84. ?>
  85. <style>
  86. .col-a .enlace, .col-b .enlace {
  87. width: 85%;
  88. padding: 10px 0px;
  89. background-color: #00C7F5;
  90. box-shadow: 1px 1px #53a7ea, 2px 2px #53a7ea, 3px 3px #53a7ea;
  91. color: white;
  92. text-align: center;
  93. margin: 0 auto;
  94. }
  95. .col-a .enlace a, .col-b .enlace a {
  96. color: white;
  97. width: 100%;
  98. display: block;
  99. }
  100. @media only screen and (min-width: 930px) {
  101. .l-content {
  102. width: 930px !important;
  103. }
  104. #node-<?php print $node->nid; ?> {
  105. width: 930px;
  106. display: block;
  107. margin: 0 auto;
  108. }
  109. .col-a {
  110. width: 310px;
  111. float: left;
  112. margin-right: 10px;
  113. }
  114. .col-b {
  115. width:600px;
  116. float: right;
  117. margin-left: 10px;
  118. position: relative;
  119. }
  120. .col-a .foto-1 {
  121. padding-bottom: 20px;
  122. padding-top: 20px;
  123. }
  124. .col-a .foto-2, .col-a .datos {
  125. padding-bottom: 20px;
  126. }
  127. .col-a .datos p {
  128. margin-top: 0;
  129. text-align: right;
  130. }
  131. .col-a .enlace.escritorio {
  132. display: block;
  133. }
  134. .col-b .enlace.responsive {
  135. display: none;
  136. }
  137. .col-b .datos.responsive {
  138. display: none;
  139. }
  140. .col-a .datos.escritorio {
  141. display: block;
  142. }
  143. .col-b .mapa {
  144. width: 95%;
  145. height: 350px;
  146. border: 5px solid #BDBDBD;
  147. margin-bottom: 50px;
  148. display: block;
  149. margin: 0 auto;
  150. }
  151. .col-b .mapa .google_map_field_display {
  152. width: 100% !important;
  153. height: 350px !important;
  154. }
  155. }
  156. @media only screen and (max-width: 930px) {
  157. .l-content {
  158. padding-top: 70px !important;
  159. }
  160. .l-content .panel-pane.pane-page-content {
  161. padding-left: 35px !important;
  162. padding-right: 35px !important;
  163. }
  164. .col-a {
  165. width: 100%;
  166. float: right;
  167. }
  168. .col-a img {
  169. width: 100%;
  170. }
  171. .col-a .foto-1 {
  172. text-align: center;
  173. }
  174. .col-a .foto-1 .field--name-field-foto-1-l2 {
  175. display: inline-block;
  176. }
  177. .col-a .foto-2 {
  178. display: none;
  179. }
  180. .col-b {
  181. width: 100%;
  182. float: left;
  183. }
  184. .col-a .enlace.escritorio {
  185. display: none;
  186. }
  187. .col-a .datos.escritorio {
  188. display: none;
  189. }
  190. .col-b .enlace.responsive {
  191. display: block;
  192. margin-top: 20px;
  193. }
  194. .col-b .datos.responsive {
  195. display: block;
  196. margin-top: 20px;
  197. }
  198. .col-b .datos.responsive p {
  199. text-align: left !important;
  200. }
  201. }
  202. </style>
  203. <div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  204. <?php print $user_picture; ?>
  205. <?php print render($title_prefix); ?>
  206. <?php if (!$page): ?>
  207. <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>
  208. <?php endif; ?>
  209. <?php print render($title_suffix); ?>
  210. <?php if ($display_submitted): ?>
  211. <div class="submitted">
  212. <?php print $submitted; ?>
  213. </div>
  214. <?php endif; ?>
  215. <div class="content"<?php print $content_attributes; ?>>
  216. <?php
  217. // We hide the comments and links now so that we can render them later.
  218. hide($content['comments']);
  219. hide($content['links']);
  220. //print render($content); ?>
  221. <div class="col-a">
  222. <div class="foto-1">
  223. <?php print render($content["field_foto_1_l2"]); ?>
  224. </div>
  225. <?php if ($field_foto_2_l2) : ?>
  226. <div class="foto-2">
  227. <?php print render($content["field_foto_2_l2"]); ?>
  228. </div>
  229. <?php endif; ?>
  230. <div class="datos escritorio">
  231. <?php print render($content["field_datos_l2"]); ?>
  232. </div>
  233. <?php if ($field_sitio_web_l2) : ?>
  234. <div class="enlace escritorio">
  235. <?php print render($content["field_sitio_web_l2"]); ?>
  236. </div>
  237. <?php endif; ?>
  238. </div>
  239. <div class="col-b">
  240. <div class="cuerpo">
  241. <?php print render($content["body"]); ?>
  242. </div>
  243. <?php if ($field_mapa_l2) : ?>
  244. <div class="mapa">
  245. <?php print render($content["field_mapa_l2"]); ?>
  246. </div>
  247. <?php endif; ?>
  248. <div class="datos responsive">
  249. <?php print render($content["field_datos_l2"]); ?>
  250. </div>
  251. <?php if ($field_sitio_web_l2) : ?>
  252. <div class="enlace responsive">
  253. <?php print render($content["field_sitio_web_l2"]); ?>
  254. </div>
  255. <?php endif; ?>
  256. </div>
  257. </div>
  258. <?php print render($content['links']); ?>
  259. <?php print render($content['comments']); ?>
  260. </div>