index.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {% extends "base.html" %}
  2. {% block meta %}
  3. <meta name="author" content="{{ AUTHOR }}" />
  4. <meta name="description" content="{{ SITEDESCRIPTION }}" />
  5. {% include "include/og.html" %}
  6. {% endblock %}
  7. {% block header %}
  8. <div class="container">
  9. <h1 id="{{ SITENAME }}">{{ SITENAME }}</h1>
  10. <p style="font-size: larger; color: orange;">{{ SITEDESCRIPTION }}</p>
  11. </div>
  12. {% endblock header %}
  13. {% block content %}
  14. <!-- List of article -->
  15. {% for article in articles_page.object_list %}
  16. <div class="card mb-2 shadow-sm">
  17. <div class="card-body">
  18. <h5 class="card-title" style="margin-bottom: 0;">
  19. <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a>
  20. </h5>
  21. <span class="small">by <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>, post on <span class="text-success">{{ article.locale_date }}</span></span>
  22. <p>{{ article.summary }}</p>
  23. <div class="flex-row mx-auto mt-3 small">
  24. <div class="float-left">
  25. {% if article.stats %}
  26. <span class="card-link text-secondary" title="~{{ article.stats['wc'] }} words">Read in {{ article.stats['read_mins'] }} mins</span>
  27. {% elif article.readtime %}
  28. <span class="card-link text-secondary" title="Read time">Read in {{ article.readtime }}</span>
  29. {% endif %}
  30. {% if DISQUS_SITENAME %}
  31. <span class="card-link"><a href="{{ SITEURL }}/{{ article.url }}#disqus_thread"></a></span>
  32. {% endif %}
  33. </div>
  34. <div class=" float-right">
  35. <a class="badge badge-success" href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category|lower }}</a>
  36. {% for tag in article.tags %}
  37. <a class="badge badge-info" href="{{ SITEURL }}/{{ tag.url }}">{{ tag|lower }}</a>
  38. {% endfor %}
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. {% endfor %}
  44. <!-- Pagination -->
  45. {% if DEFAULT_PAGINATION %}
  46. {% include "include/pagination.html" %}
  47. {% endif %}
  48. <!-- Google Adsense -->
  49. {% if GOOGLE_ADSENSE and GOOGLE_ADSENSE.ads.home %}
  50. <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  51. <!-- ad-home -->
  52. <ins class="adsbygoogle"
  53. style="display:block"
  54. data-ad-client="{{ GOOGLE_ADSENSE.id }}"
  55. data-ad-slot="{{ GOOGLE_ADSENSE.ads.home }}"
  56. data-ad-format="auto"
  57. data-full-width-responsive="true"></ins>
  58. <script>
  59. (adsbygoogle = window.adsbygoogle || []).push({});
  60. </script>
  61. {% endif %}
  62. {% endblock content %}
  63. {% block disqus_count %}
  64. {% if DISQUS_SITENAME %}
  65. {% include "include/disqus_count.html" %}
  66. {% endif %}
  67. {% endblock disqus_count %}