archives.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {% extends "base.html" %}
  2. {% block head %}
  3. {% block title %}
  4. <title>{{ _('Archivos de %(sitename)s', sitename=SITENAME) }}</title>
  5. {% endblock %}
  6. {{ super() }}
  7. {% block seo %}
  8. <!-- Meta Archives -->
  9. <meta name="description" content="{{ _('Lista de artículos publicados en %(sitename)s', sitename=SITENAME) }}">
  10. <meta name="keywords" content="{{ _('archivos,artículos,historia,lista de artículos') }}">
  11. <style>
  12. .content ul, .content ul ul, .content ul ul ul {
  13. list-style:none !important;
  14. }
  15. .content ul {
  16. margin-left: 0px !important;
  17. }
  18. .contenedor-arbol, .contenedor-arbol ul, .contenedor-arbol li {
  19. position: relative;
  20. margin: 0;
  21. padding-left: 2%;
  22. line-height: normal;
  23. }
  24. .contenedor-arbol ul {
  25. list-style: none;
  26. }
  27. .contenedor-arbol li::before, .contenedor-arbol li::after {
  28. content: "";
  29. position: absolute;
  30. left: -12px;
  31. }
  32. .contenedor-arbol li::before {
  33. border-top: 2px solid #111;
  34. top: 9px;
  35. width: 12px;
  36. height: 0;
  37. }
  38. .contenedor-arbol li::after {
  39. border-left: 2px solid black;
  40. height: 100%;
  41. width: 0px;
  42. top: 2px;
  43. }
  44. .contenedor-arbol ul > li:last-child::after {
  45. height: 8px;
  46. }
  47. </style>
  48. {% endblock %}
  49. {% endblock %}
  50. {% block content %}
  51. <div class="container">
  52. <!-- start of posts -->
  53. <div class="columns is-multiline is-centered">
  54. <!-- start of post -->
  55. <div class="column is-7">
  56. <div class="card">
  57. <!-- post header -->
  58. <div class="card-content-header">
  59. <h4 class="title is-4 has-text-centered">{{ _('Archivos de %(sitename)s', sitename=SITENAME) }}</h4>
  60. </div>
  61. <!-- end of post header -->
  62. <!-- post content -->
  63. <div class="card-content">
  64. <div class="content">
  65. <div class="card-inner-wrapper">
  66. <div class="contenedor-arbol">
  67. <p>{{ ngettext('%(num)d artículo', '%(num)d artículos', dates|length) }}</p>
  68. <ul>
  69. {% for article in dates %}
  70. {% set current_year = article.date|strftime('%Y') %}
  71. {% set current_month = article.date|strftime('%m') %}
  72. {% if loop.previtem %}
  73. {% set previous_year = loop.previtem.date|strftime('%Y') %}
  74. {% set previous_month = loop.previtem.date|strftime('%m') %}
  75. {% endif %}
  76. {% if current_year != previous_year %}
  77. {% if loop.previtem %}
  78. </ul>
  79. </li> <!-- Cierra el mes -->
  80. </ul>
  81. </li> <!-- Cierra el año -->
  82. {% endif %}
  83. <li><a href="{{ SITEURL }}/archives/{{ current_year }}/">{{ current_year }}</a>
  84. <ul>
  85. <li><a href="{{ SITEURL }}/archives/{{ current_year }}/{{ current_month }}/">{{ article.date|strftime('%B') }}</a>
  86. <ul>
  87. {% elif current_month != previous_month %}
  88. {% if loop.previtem %}
  89. </ul>
  90. </li>
  91. {% endif %}
  92. <li><a href="{{ SITEURL }}/archives/{{ current_year }}/{{ current_month }}/">{{ article.date|strftime('%B') }}</a>
  93. <ul>
  94. {% endif %}
  95. <li><a href="{{ SITEURL }}/{{ article.url }}" title="{{ article.locale_date}}">{{ article.title }}</a></li>
  96. {% if loop.last %}
  97. </ul>
  98. </li> <!-- Cierra el mes -->
  99. </ul>
  100. </li> <!-- Cierra el año -->
  101. {% endif %}
  102. {% endfor %}
  103. </ul>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- end of post content -->
  110. </div>
  111. <!-- end of post -->
  112. </div>
  113. <!-- end of post column -->
  114. </div>
  115. {% endblock %}