archives.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {% extends "base.html" %}
  2. {% block extra_head %}
  3. <meta name="description" content="{{ _('Lista de artículos publicados en Freak Spot.') }}">
  4. <meta name="keywords" content="{{ _('archivo,artículos,historia,lista de artículos') }}">
  5. <style>
  6. .contenedor-arbol, .contenedor-arbol ul, .contenedor-arbol li {
  7. position: relative;
  8. margin: 0;
  9. padding-left: 2.5%;
  10. line-height: normal;
  11. }
  12. .contenedor-arbol ul {
  13. list-style: none;
  14. }
  15. .contenedor-arbol li::before, .contenedor-arbol li::after {
  16. content: "";
  17. position: absolute;
  18. left: -12px;
  19. }
  20. .contenedor-arbol li::before {
  21. border-top: 2px solid #600;
  22. top: 9px;
  23. width: 12px;
  24. height: 0;
  25. }
  26. .contenedor-arbol li::after {
  27. border-left: 2px solid #700;
  28. height: 100%;
  29. width: 0px;
  30. top: 2px;
  31. }
  32. .contenedor-arbol ul > li:last-child::after {
  33. height: 8px;
  34. }
  35. </style>
  36. {% endblock %}
  37. {% block title %}{% trans %}Lista de artículos de {{ SITENAME }}{% endtrans %}{% endblock %}
  38. {% block content %}
  39. <article class="page type-page status-publish hentry">
  40. <header class="entry-header">
  41. <h1 class="entry-title">{% trans %}Lista de artículos{% endtrans %}</h1>
  42. </header>
  43. <div class="entry-content">
  44. <div class="contenedor-arbol">
  45. <p><strong>{{ ngettext('%(num)d artículo', '%(num)d artículos', dates|length) }}</strong></p>
  46. <ul>
  47. {% for article in dates %}
  48. {% set current_year = article.date|strftime('%Y') %}
  49. {% set current_month = article.date|strftime('%m') %}
  50. {% if loop.previtem %}
  51. {% set previous_year = loop.previtem.date|strftime('%Y') %}
  52. {% set previous_month = loop.previtem.date|strftime('%m') %}
  53. {% endif %}
  54. {% if current_year != previous_year %}
  55. {% if loop.previtem %}
  56. </ul>
  57. </li> <!-- Cierra el mes -->
  58. </ul>
  59. </li> <!-- Cierra el año -->
  60. {% endif %}
  61. <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL}}{{ current_year }}/">{{ current_year }}</a>
  62. <ul>
  63. <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL}}{{ current_year }}/{{ current_month }}/">{{ article.date|strftime('%B') }}</a>
  64. <ul>
  65. {% elif current_month != previous_month %}
  66. {% if loop.previtem %}
  67. </ul>
  68. </li>
  69. {% endif %}
  70. <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL}}{{ current_year }}/{{ current_month }}/">{{ article.date|strftime('%B') }}</a>
  71. <ul>
  72. {% endif %}
  73. <li><a href="{{ SITEURL }}/{{ article.url }}" title="{{ article.locale_date}}">{{ article.title }}</a></li>
  74. {% if loop.last %}
  75. </ul>
  76. </li> <!-- Cierra el mes -->
  77. </ul>
  78. </li> <!-- Cierra el año -->
  79. {% endif %}
  80. {% endfor %}
  81. </ul>
  82. </div>
  83. </div>
  84. </article>
  85. {% endblock %}