base.html 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <!DOCTYPE html>
  2. <!--
  3. Monomotapa - A Micro CMS
  4. Copyright (C) 2014, Paul Munday.
  5. PO Box 28228, Portland, OR, USA 97228
  6. paul at paulmunday.net
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU Affero Public License as published by
  9. the Free Software Foundation, either version 3 of the License, or
  10. (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU Affero General Public License
  16. along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. There should also be a copy of the AGPL in src/license.md that should be
  18. accessible by going to <a href ="/license">/license<a> on this site.
  19. -->
  20. <html>
  21. <head>
  22. <title>{% if title -%}{{title}}{% endif %}</title>
  23. <meta name="viewport" content="width=device-width, initial-scale=1">
  24. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  25. <link rel="stylesheet" type="text/css" title="oscuro" href="/static/style_rmgss.css">
  26. <link rel="alternate stylesheet" type="text/css" title="claro" href="/static/style_rmgss_claro.css">
  27. <!-- {%- if css -%} -->
  28. <!-- {%- for file in css %} -->
  29. <!-- <link href="{{ url_for('static', filename=file) }}" rel="stylesheet" type="text/css" /> -->
  30. <!-- {%- endfor -%} -->
  31. <!-- {%- endif %} -->
  32. {% if internal_css %}
  33. <style type="text/css">
  34. {{internal_css}}
  35. </style>
  36. {% endif %}
  37. {%- if hlinks -%}
  38. {%- for item in hlinks -%}
  39. <link
  40. {%- if item.href %} href="{{item.href}}"{% endif -%}
  41. {%- if item.rel %} rel="{{item.rel}}"{% endif -%}
  42. {%- if item.type %} type="{{item.type}}"{% endif -%}
  43. {%- if item.media %} type="{{item.media}}"{% endif -%}
  44. {%- if item.hreflang %} type="{{item.hreflang}}"{% endif -%}
  45. {%- if item.charset %} type="{{item.charset}}"{% endif -%}
  46. >
  47. {% endfor %}
  48. {%- endif -%}
  49. <link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='imgs/favicon/apple-touch-icon.png')}}">
  50. <link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='imgs/favicon/favicon-32x32.png')}}">
  51. <link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='imgs/favicon/favicon-16x16.png')}}">
  52. <link rel="manifest" href="{{ url_for('static', filename='imgs/favicon/site.webmanifest')}}">
  53. <link rel="mask-icon" href="{{ url_for('static', filename='imgs/favicon/safari-pinned-tab.svg')}}" color="#5bbad5">
  54. <meta name="msapplication-TileColor" content="#da532c">
  55. <meta name="theme-color" content="#ffffff">
  56. {# <link rel="shortcut icon" type="image/png" href="/{{ url_for('static', filename='imgs/favicon.png') }}> #}
  57. </head>
  58. <body onload="set_style_from_cookie()">
  59. <div id="wrap">
  60. <div class="row">
  61. <div class="col fifth">
  62. <!-- Importante dejar este -->
  63. </div>
  64. <!-- Contenido -->
  65. <div class="col fill">
  66. <!-- <button type="button" -->
  67. <!-- onclick="document.getElementById('nav_right').style.color = 'red'"> -->
  68. <!-- Click Me!</button> -->
  69. <!-- Cabecera -->
  70. <div>
  71. <p>
  72. <a href="/">
  73. <img src="/static/imgs/cabecera1.png">
  74. </a>
  75. <br>
  76. <span style="font-size:11px;">
  77. <q><b>sitio personal</b> de Rodrigo Garcia.</q>
  78. </span>
  79. </p>
  80. </div>
  81. <div style="margin-bottom: 7px">
  82. <form>
  83. <input type="submit" onclick="switch_style('oscuro'); return false;" name="theme" value="☻" id="oscuro" style="background-color: #333933; color: #C3C4C2; border-radius:3px;">
  84. <input type="submit" onclick="switch_style('claro');return false;" name="theme" value="☺" id="claro" style="background-color: #D1E9D3; color: #131914; border-radius:3px;">
  85. </form>
  86. </div>
  87. <!-- Contenido -->
  88. {% block content %}{% endblock %}
  89. </div>
  90. <div class="col fifth">
  91. <div id="nav_right">
  92. <h3>Lugares</h3>
  93. <ul>
  94. <dd>
  95. <a href="/">
  96. <img src="/static/imgs/inicio.png" width="32" heigth="32">
  97. Inicio
  98. </a>
  99. </dd>
  100. <dd>
  101. <a href="/posts">
  102. <img src="/static/imgs/entradas.png" width="32" heigth="32">
  103. Posts/Noticias
  104. </a>
  105. <ul>
  106. <dd>
  107. <a href="/posts/categorias">
  108. <img src="/static/imgs/categorias.png" width="16" heigth="16">
  109. Categorías
  110. </a>
  111. </dd>
  112. <dd>
  113. <a href="/posts/recientes">
  114. <img src="/static/imgs/reloj1.png" width="16" heigth="16">
  115. Recientes
  116. </a>
  117. </dd>
  118. </ul>
  119. </dd>
  120. <dd>
  121. <img src="/static/imgs/misc.png" width="32" heigth="32">
  122. Misc.
  123. <ul>
  124. <dd>
  125. <a href="http://botadero.rmgss.net">
  126. <img src="/static/imgs/botadero.png" width="16" heigth="16">
  127. Botadero
  128. </a>
  129. </dd>
  130. <dd>
  131. <a href="/repositorios">
  132. <img src="/static/imgs/repos.png" width="16" heigth="16">
  133. Repositorios
  134. </a>
  135. </dd>
  136. <dd>
  137. <a href="/posts/categoria/fotos">
  138. <img src="/static/imgs/fotos.png" width="16" heigth="16">
  139. Fotos
  140. </a>
  141. </dd>
  142. <dd>
  143. <a href="/posts/categoria/software">
  144. <img src="/static/imgs/sf.png" width="16" heigth="16">
  145. Software
  146. </a>
  147. </dd>
  148. <dd>
  149. <a href="/posts/categoria/proyectos">
  150. <img src="/static/imgs/proyectos.png" width="16" heigth="16">
  151. Proyectos
  152. </a>
  153. </dd>
  154. <dd>
  155. <a href="/acerca_de_mi">
  156. <img src="/static/imgs/acercade.png" width="16" heigth="16">
  157. Acerca de mi
  158. </a>
  159. </dd>
  160. </ul>
  161. </dd>
  162. <dd>
  163. <a href="/contacto">
  164. <img src="/static/imgs/contacto.png" width="16" heigth="16">
  165. Contacto
  166. </a>
  167. </dd>
  168. </ul>
  169. <ul>
  170. <hr>
  171. {%- for item in navigation.navigation.values() -%}
  172. <li><a href="
  173. {%- if item.url -%}{{item.url}}
  174. {%- elif item.urlfor -%}
  175. {%- if item.urlfor == "source" -%}
  176. {{ url_for(item.urlfor, page=navigation.page) }}
  177. {%- else -%}
  178. {{ url_for(item.urlfor) }}
  179. {%- endif -%}
  180. {%- else -%}
  181. {{ url_for('staticpage', page=item.base) }}
  182. {%- endif -%}
  183. {%- if item.rel -%}
  184. " rel="{{item.rel}}
  185. {%- endif -%}
  186. ">{{item.link_text}}</a></li>
  187. {% endfor -%}
  188. </ul>
  189. <p>
  190. <a href="/rss" >
  191. <img src="/static/imgs/rss.png" width="24" heigth="24">
  192. RSS
  193. </a>
  194. </p>
  195. </div>
  196. <!-- Noticias Realcionadas si es un post -->
  197. {% if contexto is defined %}
  198. {% if contexto['relacionadas'] is defined %}
  199. <h3>Posts/Noticias relacionadas</h3>
  200. {% for post_relacionado in contexto['relacionadas'] %}
  201. <p>
  202. <a href="/posts/{{ post_relacionado }}">
  203. {{ post_relacionado|n_heading }}
  204. </a>
  205. </p>
  206. <hr>
  207. {% endfor %}
  208. {% endif %}
  209. {% endif %}
  210. <div id="consejo_del_dia">
  211. <b>Consejo del día</b>
  212. <hr>
  213. {% if contexto %}
  214. {{ contexto['consejo']|safe }}
  215. {% endif %}
  216. </div>
  217. </div>
  218. </div> <!-- row -->
  219. </div>
  220. <div id="footer">
  221. <p id="footer">
  222. Este sitio web es software libre aquí el <a href="https://notabug.org/strysg/monimatapa">código fuente</a>.<br>
  223. El contenido de este sitio esta bajo una licencia Creative Commons <a href="https://creativecommons.org/licenses/by/4.0/">Attribution 4.0 International (CC BY 4.0)</a> a menos que se indique lo contrario.
  224. <!-- footer goes here -->
  225. {% if footer %}
  226. {{footer}}
  227. {% endif %}
  228. </p>
  229. </div>
  230. <!-- javascript -->
  231. <script language="javascript">
  232. // *** TO BE CUSTOMISED ***
  233. var style_cookie_name = "style" ;
  234. var style_cookie_duration = 15 ;
  235. var style_domain = "rmgss.net" ;
  236. // *** END OF CUSTOMISABLE SECTION ***
  237. // You do not need to customise anything below this line
  238. function switch_style ( css_title )
  239. {
  240. // You may use this script on your site free of charge provided
  241. // you do not remove this notice or the URL below. Script from
  242. // https://www.thesitewizard.com/javascripts/change-style-sheets.shtml
  243. var i, link_tag ;
  244. for (i = 0, link_tag = document.getElementsByTagName("link") ;
  245. i < link_tag.length ;
  246. i++ ) {
  247. if ((link_tag[i].rel.indexOf( "stylesheet" ) != -1) &&
  248. link_tag[i].title) {
  249. link_tag[i].disabled = true ;
  250. if (link_tag[i].title == css_title) {
  251. link_tag[i].disabled = false ;
  252. }
  253. }
  254. set_cookie( style_cookie_name, css_title,
  255. style_cookie_duration, style_domain );
  256. }
  257. }
  258. function set_style_from_cookie()
  259. {
  260. var css_title = get_cookie( style_cookie_name );
  261. if (css_title.length) {
  262. switch_style( css_title );
  263. }
  264. }
  265. function set_cookie ( cookie_name, cookie_value,
  266. lifespan_in_days, valid_domain )
  267. {
  268. // https://www.thesitewizard.com/javascripts/cookies.shtml
  269. var domain_string = valid_domain ?
  270. ("; domain=" + valid_domain) : '' ;
  271. document.cookie = cookie_name +
  272. "=" + encodeURIComponent( cookie_value ) +
  273. "; max-age=" + 60 * 60 *
  274. 24 * lifespan_in_days +
  275. "; path=/" + domain_string ;
  276. }
  277. function get_cookie ( cookie_name )
  278. {
  279. // https://www.thesitewizard.com/javascripts/cookies.shtml
  280. var cookie_string = document.cookie ;
  281. if (cookie_string.length != 0) {
  282. var cookie_value = cookie_string.match (
  283. '(^|;)[\s]*' +
  284. cookie_name +
  285. '=([^;]*)' );
  286. return decodeURIComponent ( cookie_value[2] ) ;
  287. }
  288. return '' ;
  289. }
  290. </script>
  291. <!-- --->
  292. </body>
  293. </html>