Repository with sources and generator of https://larlet.fr/david/ https://larlet.fr/david/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

article_2024.html 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {% extends "base_2024.html" %}
  2. {% block lang %}{{ page.lang }}{% endblock %}
  3. {% block title %}{{ page.title }}{% endblock %}
  4. {% block description %}{{ page.extract|striptags }}{% endblock %}
  5. {% block extra_head %}
  6. <style type="text/css">
  7. .tippy-content {
  8. min-width: 280px;
  9. padding: .5rem;
  10. font-size: calc(var(--fluid-0) * 0.8);
  11. font-family: var(--labor-font);
  12. letter-spacing: initial;
  13. text-align: left;
  14. }
  15. .tippy-content h3 {
  16. margin-top: 0;
  17. }
  18. .tippy-content h3 img {
  19. max-width: 2rem;
  20. max-height: 2rem;
  21. display: inline-block;
  22. }
  23. .tippy-content .tippy-links {
  24. display: flex;
  25. justify-content: space-around;
  26. }
  27. .tippy-content a {
  28. padding: .4rem;
  29. color: #F06048;
  30. }
  31. </style>
  32. {% endblock %}
  33. {% block content %}
  34. <header>
  35. <hgroup>
  36. <h1>{{ page.title }}</h1>
  37. <p>Le <time datetime="{{ page.date }}">{{ page.date|format_date }}</time></p>
  38. </hgroup>
  39. </header>
  40. <nav>
  41. <p>
  42. {% if prev and not prev.is_draft %}
  43. <a rel="prev"
  44. href="{{ prev.url }}"
  45. title="Publication précédente : {{ prev.title }}">← Précédent</a> •
  46. {% endif %}
  47. <a href="/david/" title="Aller à l’accueil" rel="up">Accueil</a>
  48. <a href="/david/recherche/"
  49. title="Aller à la page de recherche"
  50. rel="search" data-no-instant>Recherche</a>
  51. {% if next and not next.is_draft %}
  52. • <a rel="next"
  53. href="{{ next.url }}"
  54. title="Publication suivante : {{ next.title }}">Suivant →</a>
  55. {% endif %}
  56. </p>
  57. </nav>
  58. {{ page.content }}
  59. {% if page.tags %}
  60. <nav>
  61. <p>
  62. {% for tag in page.tags %}
  63. <a href="/david/2024/{{ slugify(tag) }}/"
  64. title="Liste de tous les articles 2024 associés à cette étiquette"
  65. rel="tag">#{{ tag }}</a>
  66. {% endfor %}
  67. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  68. </p>
  69. </nav>
  70. {% endif %}
  71. <nav>
  72. <p>
  73. {% if prev and not prev.is_draft %}
  74. <a rel="prev"
  75. href="{{ prev.url }}"
  76. title="Publication précédente : {{ prev.title }}">← Précédent</a> •
  77. {% endif %}
  78. <a href="/david/2024/" title="Liste des publications récentes">↑ En 2024</a>
  79. {% if next and not next.is_draft %}
  80. • <a rel="next"
  81. href="{{ next.url }}"
  82. title="Publication suivante : {{ next.title }}">Suivant →</a>
  83. {% endif %}
  84. </p>
  85. </nav>
  86. {% endblock content %}
  87. {% block extra_body %}
  88. <script src="/static/david/js/popper-2.11.8.min.js"></script>
  89. <script src="/static/david/js/tippy-bundle-6.3.7.umd.min.js"></script>
  90. <script>
  91. tippy('[data-tippy]', {
  92. content(reference) {
  93. reference.addEventListener('click', (e) => e.preventDefault())
  94. return `
  95. <h3 lang="fr">
  96. <img src="${reference.dataset.favicon}" loading="lazy">
  97. <a href="${reference.dataset.source}"
  98. >Article sur ${reference.dataset.domain}</a></h3>
  99. <p lang="${reference.hreflang}"><em>${reference.dataset.description}</em></p>
  100. <div class="tippy-links" lang="fr">
  101. <a href="${reference.href}">Archive au ${reference.dataset.date}</a>
  102. </div>
  103. `
  104. },
  105. allowHTML: true,
  106. interactive: true,
  107. delay: [150, 700],
  108. hideOnClick: false
  109. })
  110. </script>
  111. <script type="module">
  112. import { annotate } from '/static/david/js/rough-notation-0.5.1.esm.min.js'
  113. const markObserver = new IntersectionObserver((entries, observer) => {
  114. const computedStyle = getComputedStyle(document.documentElement)
  115. const markBackground = computedStyle.getPropertyValue('--mark-background')
  116. for (const entry of entries) {
  117. if (entry.intersectionRatio === 0) continue
  118. const markElement = entry.target
  119. markElement.style.backgroundColor = 'inherit'
  120. const annotation = annotate(
  121. markElement, {
  122. type: 'highlight',
  123. multiline: true,
  124. color: markBackground,
  125. // animate: !window.matchMedia('(prefers-reduced-motion: reduce)').matches
  126. animate: false
  127. }
  128. )
  129. annotation.show()
  130. observer.unobserve(markElement)
  131. }
  132. }, {threshold: 1.0})
  133. for (const markElement of document.querySelectorAll('mark')) {
  134. markObserver.observe(markElement)
  135. }
  136. </script>
  137. {% endblock %}