Repository with sources and generator of https://larlet.fr/david/ https://larlet.fr/david/
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Accueil — David Larlet</title>
  13. <meta name="description" content="Voici l’espace personnel de David Larlet sur le Web.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Documented, feel free to shoot an email. -->
  28. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  29. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  30. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  31. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  32. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  35. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  36. <script>
  37. function toggleTheme(themeName) {
  38. document.documentElement.classList.toggle(
  39. 'forced-dark',
  40. themeName === 'dark'
  41. )
  42. document.documentElement.classList.toggle(
  43. 'forced-light',
  44. themeName === 'light'
  45. )
  46. }
  47. const selectedTheme = localStorage.getItem('theme')
  48. if (selectedTheme !== 'undefined') {
  49. toggleTheme(selectedTheme)
  50. }
  51. </script>
  52. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  53. <article>
  54. <header>
  55. <h1>Bienvenue</h1>
  56. </header>
  57. <p>
  58. Voici l’espace personnel de David Larlet sur le Web.
  59. Il se veut modeste, accueillant et pérenne.
  60. Il fixe mes pensées et parfois engage des échanges.
  61. J’essaye de tenir et lier des propos bienveillants.
  62. Je vous souhaite une jolie promenade.
  63. </p>
  64. <p lang="en">
  65. For an English profile, check out
  66. <a href="http://larlet.com" data-instant>this page 🇨🇦</a>.
  67. </p>
  68. <h2>Publications 2023</h2>
  69. <p>Liste des publications récentes en ordre anté-chronologique :</p>
  70. <nav>
  71. <p>
  72. <a href="/david/2023/03/04/">Jour&nbsp;3</a>,
  73. <a href="/david/2023/03/03/">Jour&nbsp;2</a>,
  74. <a href="/david/2023/03/02/">Jour&nbsp;1</a>,
  75. <a href="/david/2023/02/28/">AlgoRSSithme</a>,
  76. <a href="/david/2023/02/25/">Transmission</a>,
  77. <a href="/david/2023/02/18/">Quiz</a>,
  78. <a href="/david/2023/02/13/">Livre</a>,
  79. <a href="/david/2023/02/12/">Jour&nbsp;3</a>,
  80. <a href="/david/2023/02/11/">Jour&nbsp;2</a>,
  81. <a href="/david/2023/02/10/">Jour&nbsp;1</a>,
  82. <a href="/david/2023/02/09/">Allumage</a>,
  83. <a href="/david/2023/02/08/">TextcAIst</a>,
  84. <a href="/david/2023/02/07/">Madeleine</a>,
  85. <a href="/david/2023/02/05/">Attente</a>,
  86. <a href="/david/2023/02/03/">Chargement</a>,
  87. <a href="/david/2023/02/02/">Moment</a>,
  88. <a href="/david/2023/02/01/">Ombres</a>,
  89. <a href="/david/2023/01/31/">Ennui</a>,
  90. <a href="/david/2023/01/30/">Lecture</a>,
  91. <a href="/david/2023/01/26/">Décentralisation</a>,
  92. <a href="/david/2023/01/24/">Capot</a>,
  93. <a href="/david/2023/01/23/">Déception</a>,
  94. <a href="/david/2023/01/22/">Jour&nbsp;2</a>,
  95. <a href="/david/2023/01/21/">Jour&nbsp;1</a>,
  96. <a href="/david/2023/01/20/">Lettres</a>,
  97. <a href="/david/2023/01/18/">Femmes</a>,
  98. <a href="/david/2023/01/17/">Populaire</a>,
  99. <a href="/david/2023/01/16/">Chasse</a>,
  100. <a href="/david/2023/01/15/">Snow&nbsp;Fall</a>,
  101. <a href="/david/2023/01/14/">Dépendances</a>,
  102. <a href="/david/2023/01/13/">Eaux&nbsp;grises</a>,
  103. <a href="/david/2023/01/12/">Masque</a>,
  104. <a href="/david/2023/01/11/">Suspendu</a>,
  105. <a href="/david/2023/01/10/">Qualité</a>,
  106. <a href="/david/2023/01/09/">Indépendant·e</a>,
  107. <a href="/david/2023/01/08/">Partage</a>,
  108. <a href="/david/2023/01/07/">Dette</a>,
  109. <a href="/david/2023/01/06/">Toile</a>,
  110. <a href="/david/2023/01/05/">Instanseul</a>,
  111. <a href="/david/2023/01/04/">Rétrospectives</a>,
  112. <a href="/david/2023/01/03/">Préparation</a>,
  113. <a href="/david/2023/01/02/">Lucidité</a>,
  114. <a href="/david/2023/01/01/">Alleeez</a>.
  115. </p>
  116. </nav>
  117. <p id="tags-2023">Ou par étiquettes :</p>
  118. <nav>
  119. <p>
  120. <a href="/david/2023/accompagnement/">#accompagnement (6)</a>,
  121. <a href="/david/2023/amadou/">#amadou (1)</a>,
  122. <a href="/david/2023/attention/">#attention (2)</a>,
  123. <a href="/david/2023/aventure/">#aventure (11)</a>,
  124. <a href="/david/2023/complexite/">#complexité (4)</a>,
  125. <a href="/david/2023/confiance/">#confiance (5)</a>,
  126. <a href="/david/2023/confidentialite/">#confidentialité (3)</a>,
  127. <a href="/david/2023/courage/">#courage (7)</a>,
  128. <a href="/david/2023/decentralisation/">#décentralisation (3)</a>,
  129. <a href="/david/2023/don/">#don (2)</a>,
  130. <a href="/david/2023/eau/">#eau (3)</a>,
  131. <a href="/david/2023/ecriture/">#écriture (2)</a>,
  132. <a href="/david/2023/foret/">#forêt (8)</a>,
  133. <a href="/david/2023/gafam/">#gafam (1)</a>,
  134. <a href="/david/2023/gratitude/">#gratitude (5)</a>,
  135. <a href="/david/2023/incompetence/">#incompétence (1)</a>,
  136. <a href="/david/2023/intimite/">#intimité (1)</a>,
  137. <a href="/david/2023/livre/">#livre (3)</a>,
  138. <a href="/david/2023/masque/">#masque (1)</a>,
  139. <a href="/david/2023/mastodon/">#mastodon (1)</a>,
  140. <a href="/david/2023/nostalgie/">#nostalgie (1)</a>,
  141. <a href="/david/2023/parentalite/">#parentalité (1)</a>,
  142. <a href="/david/2023/partage/">#partage (1)</a>,
  143. <a href="/david/2023/patriarcat/">#patriarcat (1)</a>,
  144. <a href="/david/2023/photographie/">#photographie (3)</a>,
  145. <a href="/david/2023/propriete/">#propriété (1)</a>,
  146. <a href="/david/2023/psychologie/">#psychologie (1)</a>,
  147. <a href="/david/2023/qualite/">#qualité (2)</a>,
  148. <a href="/david/2023/recherche/">#recherche (10)</a>,
  149. <a href="/david/2023/recyclage/">#recyclage (2)</a>,
  150. <a href="/david/2023/reponse/">#réponse (2)</a>,
  151. <a href="/david/2023/simplicite/">#simplicité (2)</a>,
  152. <a href="/david/2023/sociologie/">#sociologie (4)</a>,
  153. <a href="/david/2023/solastalgia/">#solastalgia (1)</a>,
  154. <a href="/david/2023/sport/">#sport (3)</a>,
  155. <a href="/david/2023/technique/">#technique (7)</a>,
  156. <a href="/david/2023/traces/">#traces (4)</a>,
  157. <a href="/david/2023/tristesse/">#tristesse (2)</a>,
  158. <a href="/david/2023/viande/">#viande (1)</a>,
  159. <a href="/david/2023/web/">#web (7)</a>.
  160. </p>
  161. </nav>
  162. <h2>Publications sporadiques 2022</h2>
  163. <p>Liste des publications en ordre chronologique :</p>
  164. <nav>
  165. <p>
  166. <a href="/david/2022/01/19/">Négatif</a>,
  167. <a href="/david/2022/02/17/">Envie</a>,
  168. <a href="/david/2022/03/04/">Régime</a>,
  169. <a href="/david/2022/03/18/">Temps</a>,
  170. <a href="/david/2022/03/23/">Open-source</a>,
  171. <a href="/david/2022/04/02/">Recherche</a>,
  172. <a href="/david/2022/04/14/">Ressenti</a>,
  173. <a href="/david/2022/04/23/">Quarantaine</a>,
  174. <a href="/david/2022/04/26/">R&amp;Day</a>,
  175. <a href="/david/2022/05/13/">Aurore</a>,
  176. <a href="/david/2022/05/15/">Rédemption</a>,
  177. <a href="/david/2022/05/17/">Outils</a>,
  178. <a href="/david/2022/05/30/">Méditation</a>,
  179. <a href="/david/2022/06/06/">Hommes</a>,
  180. <a href="/david/2022/06/24/">Bouddhisme</a>,
  181. <a href="/david/2022/06/30/">Valeur(s)</a>,
  182. <a href="/david/2022/07/06/">Regard</a>,
  183. <a href="/david/2022/07/08/">LudoviCovid</a>,
  184. <a href="/david/2022/07/14/">Vingt</a>,
  185. <a href="/david/2022/07/23/">Origines</a>,
  186. <a href="/david/2022/08/24/">Silence</a>,
  187. <a href="/david/2022/09/03/">Bifurquer</a>,
  188. <a href="/david/2022/10/18/">Esclavage</a>,
  189. <a href="/david/2022/11/12/">Mastodon</a>,
  190. <a href="/david/2022/11/27/">Neuf</a>,
  191. <a href="/david/2022/12/19/">Traces</a>,
  192. <a href="/david/2022/12/22/">Marcher</a>.
  193. </p>
  194. </nav>
  195. <p>
  196. J’ai aussi ouvert trois nouveaux espaces en 2022 :
  197. </p>
  198. <ul>
  199. <li><a href="https://media.larlet.fr/">Des photos/media plus ou moins récents</a></li>
  200. <li><a href="https://code.larlet.fr/">Des morceaux de code et d’apprentissages</a></li>
  201. <li><a href="https://nature.larlet.fr/">Des bribes/expériences de nature</a></li>
  202. </ul>
  203. <p>
  204. En plus de publier des bêtises
  205. <a href="https://fedi.larlet.fr/@david" rel="me">sur Mastodon</a>.
  206. </p>
  207. <h2 id="tags">
  208. Publications <a href="/david/2021/" title="Voir la liste de toutes les publications 2021">2021</a> par tags <svg class="icon icon-tags">
  209. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-tags"></use>
  210. </svg>
  211. </h2>
  212. <nav>
  213. <p>
  214. <a href="/david/2021/accessibilite/">#accessibilité (17)</a>
  215. <a href="/david/2021/accompagnement/">#accompagnement (21)</a>
  216. <a href="/david/2021/allie/">#allié (12)</a>
  217. <a href="/david/2021/alterego/">#alterego (7)</a>
  218. <a href="/david/2021/anarchisme/">#anarchisme (5)</a>
  219. <a href="/david/2021/anxiete/">#anxiété (35)</a>
  220. <a href="/david/2021/capitalocene/">#capitalocène (21)</a>
  221. <a href="/david/2021/climat/">#climat (13)</a>
  222. <a href="/david/2021/contemplation/">#contemplation (7)</a>
  223. <a href="/david/2021/cooperative/">#coopérative (7)</a>
  224. <a href="/david/2021/design/">#design (11)</a>
  225. <a href="/david/2021/echecs/">#échecs (5)</a>
  226. <a href="/david/2021/ecole/">#école (8)</a>
  227. <a href="/david/2021/ecriture/">#écriture (15)</a>
  228. <a href="/david/2021/etiquette/">#étiquette (5)</a>
  229. <a href="/david/2021/exploration/">#exploration (5)</a>
  230. <a href="/david/2021/feminisme/">#féminisme (4)</a>
  231. <a href="/david/2021/foret/">#forêt (40)</a>
  232. <a href="/david/2021/frugalite/">#frugalité (6)</a>
  233. <a href="/david/2021/gafam/">#gafam (15)</a>
  234. <a href="/david/2021/gratitude/">#gratitude (18)</a>
  235. <a href="/david/2021/inclassable/">#inclassable (4)</a>
  236. <a href="/david/2021/incompetence/">#incompétence (35)</a>
  237. <a href="/david/2021/lecture/">#lecture (11)</a>
  238. <a href="/david/2021/materiel/">#matériel (4)</a>
  239. <a href="/david/2021/misanthropie/">#misanthropie (23)</a>
  240. <a href="/david/2021/neige/">#neige (7)</a>
  241. <a href="/david/2021/open-source/">#open-source (12)</a>
  242. <a href="/david/2021/pandemie/">#pandémie (44)</a>
  243. <a href="/david/2021/parentalite/">#parentalité (11)</a>
  244. <a href="/david/2021/partage/">#partage (23)</a>
  245. <a href="/david/2021/pharmakon/">#pharmakon (11)</a>
  246. <a href="/david/2021/poesie/">#poésie (5)</a>
  247. <a href="/david/2021/premieres-nations/">#premières-nations (4)</a>
  248. <a href="/david/2021/produit/">#produit (17)</a>
  249. <a href="/david/2021/protopie/">#protopie (5)</a>
  250. <a href="/david/2021/publication/">#publication (16)</a>
  251. <a href="/david/2021/recherche/">#recherche (29)</a>
  252. <a href="/david/2021/rythme/">#rythme (20)</a>
  253. <a href="/david/2021/scopyleft/">#scopyleft (5)</a>
  254. <a href="/david/2021/sociologie/">#sociologie (26)</a>
  255. <a href="/david/2021/technique/">#technique (47)</a>
  256. <a href="/david/2021/traces/">#traces (15)</a>
  257. <a href="/david/2021/transformation/">#transformation (49)</a>
  258. <a href="/david/2021/travail/">#travail (14)</a>
  259. <a href="/david/2021/utilisateur-ice/">#utilisateur·ice (5)</a>
  260. <a href="/david/2021/video/">#vidéo (21)</a>
  261. <a href="/david/2021/web/">#web (24)</a>
  262. </p>
  263. </nav>
  264. <h2>Publications hebdomadaires <a href="/david/2020/" title="Voir la liste de toutes les publications 2020">2020</a></h2>
  265. <p>Liste des publications en ordre chronologique :</p>
  266. <nav>
  267. <p>
  268. <a href="/david/2020/01/03/">Briques</a>,
  269. <a href="/david/2020/01/06/">Écriture</a>,
  270. <a href="/david/2020/01/10/">Travail</a>,
  271. <a href="/david/2020/01/15/">Futurs</a>,
  272. <a href="/david/2020/01/17/">Datagouv</a>,
  273. <a href="/david/2020/01/22/">Réponses</a>,
  274. <a href="/david/2020/01/29/">Sortie ski</a>,
  275. <a href="/david/2020/01/31/">Intentions</a>,
  276. <a href="/david/2020/02/07/">GAFAM+</a>,
  277. <a href="/david/2020/02/14/">Espoirs</a>,
  278. <a href="/david/2020/02/21/">Service</a>,
  279. <a href="/david/2020/03/13/">Technique</a>,
  280. <a href="/david/2020/03/20/">Rédemption</a>,
  281. <a href="/david/2020/03/27/">Exutoire</a>,
  282. <a href="/david/2020/04/03/">Patience</a>,
  283. <a href="/david/2020/04/10/">Résistance</a>,
  284. <a href="/david/2020/04/18/">Zam</a>,
  285. <a href="/david/2020/05/18/">Relance</a>,
  286. <a href="/david/2020/05/20/">Bikepacking</a>,
  287. <a href="/david/2020/05/26/">Covidoudou</a>,
  288. <a href="/david/2020/06/12/">Vrac</a>,
  289. <a href="/david/2020/06/18/">Mouvements</a>,
  290. <a href="/david/2020/06/25/">Ouvertance</a>,
  291. <a href="/david/2020/07/03/">Confetti</a>,
  292. <a href="/david/2020/07/13/">Bilan</a>,
  293. <a href="/david/2020/08/24/">Personnes</a>,
  294. <a href="/david/2020/09/01/">Rentrée</a>,
  295. <a href="/david/2020/09/07/">Rappels</a>,
  296. <a href="/david/2020/09/16/">Coupable</a>,
  297. <a href="/david/2020/10/08/">Parvenir</a>,
  298. <a href="/david/2020/10/22/">Grand-écart</a>,
  299. <a href="/david/2020/10/28/">Chaos</a>,
  300. <a href="/david/2020/11/27/">Perles</a>,
  301. <a href="/david/2020/12/01/">Compréhension</a>,
  302. <a href="/david/2020/12/13/">Publications</a>,
  303. <a href="/david/2020/12/15/">Vidéos</a>,
  304. <a href="/david/2020/12/18/">Arrakice</a>,
  305. <a href="/david/2020/12/21/">Livres</a>.
  306. </p>
  307. </nav>
  308. <h2>Recherche</h2>
  309. <p>Les contenus de ces dernières années sont indexés.</p>
  310. <form action="/david/recherche/" method="get">
  311. <label for="input-search">Termes de votre recherche :</label>
  312. <input type="search" name="s" required>
  313. <button>Chercher</button>
  314. </form>
  315. <h2>Publications archéologiques</h2>
  316. <p>
  317. Vous pouvez consulter les différents
  318. <a href="/david/blog/">billets de blog</a> qui ont été rédigés de 2004 à 2019
  319. ou les <a href="/david/stream/">entrées de journaux</a> relativement
  320. régulières entre 2009 et 2019.
  321. </p>
  322. <p>
  323. <em>
  324. Notez qu’avec un tel historique, certaines informations sont obsolètes et/ou
  325. plus cautionnées.
  326. </em>
  327. </p>
  328. <h2>Me contacter</h2>
  329. <p>
  330. Je réponds à <em>presque</em> tous les courriels reçus, exception faite de ceux que j’assimile à de la publicité ou du <code>spam</code>. Vous pouvez <a href="mailto:david%40larlet.fr" title="Envoyer un courriel">m’écrire</a> sans trop de civilités et me tutoyer, je répondrai probablement de même. Si vous souhaitez correspondre de manière chiffrée, voici <a href="/static/david/david-larlet-pgp-public-key-1359EA98.asc" title="Clé publique de chiffrement">ma clé publique</a>.
  331. </p>
  332. </article>
  333. <hr>
  334. <footer>
  335. <p>
  336. <nobr>
  337. <a href="/david/" title="Aller à l’accueil"
  338. ><svg class="icon icon-home">
  339. <use
  340. xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-home"
  341. ></use>
  342. </svg>
  343. Accueil</a
  344. >
  345. </nobr>
  346. <nobr>
  347. <a href="/david/log/" title="Accès au flux RSS"
  348. ><svg class="icon icon-rss2">
  349. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-rss2"></use>
  350. </svg>
  351. Suivre</a
  352. >
  353. </nobr>
  354. <nobr>
  355. <a href="http://larlet.com" title="Go to my English profile" data-instant
  356. ><svg class="icon icon-user-tie">
  357. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-user-tie"></use>
  358. </svg>
  359. Pro</a
  360. >
  361. </nobr>
  362. <nobr>
  363. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"
  364. ><svg class="icon icon-mail">
  365. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-mail"></use>
  366. </svg>
  367. Email</a
  368. >
  369. </nobr>
  370. <nobr>
  371. <abbr
  372. class="nowrap"
  373. title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"
  374. ><svg class="icon icon-hammer2">
  375. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-hammer2"></use>
  376. </svg>
  377. Légal</abbr
  378. >
  379. </nobr>
  380. </p>
  381. <template id="theme-selector">
  382. <form>
  383. <fieldset>
  384. <legend><svg class="icon icon-brightness-contrast">
  385. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-brightness-contrast"></use>
  386. </svg> Thème</legend>
  387. <label>
  388. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  389. </label>
  390. <label>
  391. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  392. </label>
  393. <label>
  394. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  395. </label>
  396. </fieldset>
  397. </form>
  398. </template>
  399. </footer>
  400. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  401. <script>
  402. function loadThemeForm(templateName) {
  403. const themeSelectorTemplate = document.querySelector(templateName)
  404. const form = themeSelectorTemplate.content.firstElementChild
  405. themeSelectorTemplate.replaceWith(form)
  406. form.addEventListener('change', (e) => {
  407. const chosenColorScheme = e.target.value
  408. localStorage.setItem('theme', chosenColorScheme)
  409. toggleTheme(chosenColorScheme)
  410. })
  411. const selectedTheme = localStorage.getItem('theme')
  412. if (selectedTheme && selectedTheme !== 'undefined') {
  413. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  414. }
  415. }
  416. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  417. window.addEventListener('load', () => {
  418. let hasDarkRules = false
  419. for (const styleSheet of Array.from(document.styleSheets)) {
  420. let mediaRules = []
  421. for (const cssRule of styleSheet.cssRules) {
  422. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  423. continue
  424. }
  425. // WARNING: Safari does not have/supports `conditionText`.
  426. if (cssRule.conditionText) {
  427. if (cssRule.conditionText !== prefersColorSchemeDark) {
  428. continue
  429. }
  430. } else {
  431. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  432. continue
  433. }
  434. }
  435. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  436. }
  437. // WARNING: do not try to insert a Rule to a styleSheet you are
  438. // currently iterating on, otherwise the browser will be stuck
  439. // in a infinite loop…
  440. for (const mediaRule of mediaRules) {
  441. styleSheet.insertRule(mediaRule.cssText)
  442. hasDarkRules = true
  443. }
  444. }
  445. if (hasDarkRules) {
  446. loadThemeForm('#theme-selector')
  447. }
  448. })
  449. </script>
  450. </body>
  451. </html>