Repository with sources and generator of https://larlet.fr/david/ https://larlet.fr/david/
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.html 20KB

1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
1年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  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/02/07/">Madeleine</a>,
  73. <a href="/david/2023/02/05/">Attente</a>,
  74. <a href="/david/2023/02/03/">Chargement</a>,
  75. <a href="/david/2023/02/02/">Moment</a>,
  76. <a href="/david/2023/02/01/">Ombres</a>,
  77. <a href="/david/2023/01/31/">Ennui</a>,
  78. <a href="/david/2023/01/30/">Lecture</a>,
  79. <a href="/david/2023/01/26/">Décentralisation</a>,
  80. <a href="/david/2023/01/24/">Capot</a>,
  81. <a href="/david/2023/01/23/">Déception</a>,
  82. <a href="/david/2023/01/22/">Jour&nbsp;2</a>,
  83. <a href="/david/2023/01/21/">Jour&nbsp;1</a>,
  84. <a href="/david/2023/01/20/">Lettres</a>,
  85. <a href="/david/2023/01/18/">Femmes</a>,
  86. <a href="/david/2023/01/17/">Populaire</a>,
  87. <a href="/david/2023/01/16/">Chasse</a>,
  88. <a href="/david/2023/01/15/">Snow&nbsp;Fall</a>,
  89. <a href="/david/2023/01/14/">Dépendances</a>,
  90. <a href="/david/2023/01/13/">Eaux&nbsp;grises</a>,
  91. <a href="/david/2023/01/12/">Masque</a>,
  92. <a href="/david/2023/01/11/">Suspendu</a>,
  93. <a href="/david/2023/01/10/">Qualité</a>,
  94. <a href="/david/2023/01/09/">Indépendant·e</a>,
  95. <a href="/david/2023/01/08/">Partage</a>,
  96. <a href="/david/2023/01/07/">Dette</a>,
  97. <a href="/david/2023/01/06/">Toile</a>,
  98. <a href="/david/2023/01/05/">Instanseul</a>,
  99. <a href="/david/2023/01/04/">Rétrospectives</a>,
  100. <a href="/david/2023/01/03/">Préparation</a>,
  101. <a href="/david/2023/01/02/">Lucidité</a>,
  102. <a href="/david/2023/01/01/">Alleeez</a>.
  103. </p>
  104. </nav>
  105. <p id="tags-2023">Ou par étiquettes :</p>
  106. <nav>
  107. <p>
  108. <a href="/david/2023/accompagnement/">#accompagnement (4)</a>,
  109. <a href="/david/2023/amadou/">#amadou (1)</a>,
  110. <a href="/david/2023/aventure/">#aventure (6)</a>,
  111. <a href="/david/2023/complexite/">#complexité (3)</a>,
  112. <a href="/david/2023/confiance/">#confiance (2)</a>,
  113. <a href="/david/2023/confidentialite/">#confidentialité (2)</a>,
  114. <a href="/david/2023/courage/">#courage (7)</a>,
  115. <a href="/david/2023/decentralisation/">#décentralisation (2)</a>,
  116. <a href="/david/2023/don/">#don (2)</a>,
  117. <a href="/david/2023/eau/">#eau (2)</a>,
  118. <a href="/david/2023/ecriture/">#écriture (2)</a>,
  119. <a href="/david/2023/foret/">#forêt (2)</a>,
  120. <a href="/david/2023/gafam/">#gafam (1)</a>,
  121. <a href="/david/2023/gratitude/">#gratitude (5)</a>,
  122. <a href="/david/2023/incompetence/">#incompétence (1)</a>,
  123. <a href="/david/2023/intimite/">#intimité (1)</a>,
  124. <a href="/david/2023/livre/">#livre (2)</a>,
  125. <a href="/david/2023/masque/">#masque (1)</a>,
  126. <a href="/david/2023/mastodon/">#mastodon (1)</a>,
  127. <a href="/david/2023/nostalgie/">#nostalgie (1)</a>,
  128. <a href="/david/2023/parentalite/">#parentalité (1)</a>,
  129. <a href="/david/2023/partage/">#partage (1)</a>,
  130. <a href="/david/2023/patriarcat/">#patriarcat (1)</a>,
  131. <a href="/david/2023/photographie/">#photographie (2)</a>,
  132. <a href="/david/2023/propriete/">#propriété (1)</a>,
  133. <a href="/david/2023/psychologie/">#psychologie (1)</a>,
  134. <a href="/david/2023/qualite/">#qualité (2)</a>,
  135. <a href="/david/2023/recherche/">#recherche (9)</a>,
  136. <a href="/david/2023/recyclage/">#recyclage (2)</a>,
  137. <a href="/david/2023/reponse/">#réponse (2)</a>,
  138. <a href="/david/2023/simplicite/">#simplicité (1)</a>,
  139. <a href="/david/2023/sociologie/">#sociologie (1)</a>,
  140. <a href="/david/2023/sport/">#sport (3)</a>,
  141. <a href="/david/2023/technique/">#technique (5)</a>,
  142. <a href="/david/2023/traces/">#traces (3)</a>,
  143. <a href="/david/2023/tristesse/">#tristesse (2)</a>,
  144. <a href="/david/2023/viande/">#viande (1)</a>,
  145. <a href="/david/2023/web/">#web (4)</a>.
  146. </p>
  147. </nav>
  148. <h2>Publications sporadiques 2022</h2>
  149. <p>Liste des publications en ordre chronologique :</p>
  150. <nav>
  151. <p>
  152. <a href="/david/2022/01/19/">Négatif</a>,
  153. <a href="/david/2022/02/17/">Envie</a>,
  154. <a href="/david/2022/03/04/">Régime</a>,
  155. <a href="/david/2022/03/18/">Temps</a>,
  156. <a href="/david/2022/03/23/">Open-source</a>,
  157. <a href="/david/2022/04/02/">Recherche</a>,
  158. <a href="/david/2022/04/14/">Ressenti</a>,
  159. <a href="/david/2022/04/23/">Quarantaine</a>,
  160. <a href="/david/2022/04/26/">R&amp;Day</a>,
  161. <a href="/david/2022/05/13/">Aurore</a>,
  162. <a href="/david/2022/05/15/">Rédemption</a>,
  163. <a href="/david/2022/05/17/">Outils</a>,
  164. <a href="/david/2022/05/30/">Méditation</a>,
  165. <a href="/david/2022/06/06/">Hommes</a>,
  166. <a href="/david/2022/06/24/">Bouddhisme</a>,
  167. <a href="/david/2022/06/30/">Valeur(s)</a>,
  168. <a href="/david/2022/07/06/">Regard</a>,
  169. <a href="/david/2022/07/08/">LudoviCovid</a>,
  170. <a href="/david/2022/07/14/">Vingt</a>,
  171. <a href="/david/2022/07/23/">Origines</a>,
  172. <a href="/david/2022/08/24/">Silence</a>,
  173. <a href="/david/2022/09/03/">Bifurquer</a>,
  174. <a href="/david/2022/10/18/">Esclavage</a>,
  175. <a href="/david/2022/11/12/">Mastodon</a>,
  176. <a href="/david/2022/11/27/">Neuf</a>,
  177. <a href="/david/2022/12/19/">Traces</a>,
  178. <a href="/david/2022/12/22/">Marcher</a>.
  179. </p>
  180. </nav>
  181. <p>
  182. J’ai aussi ouvert trois nouveaux espaces en 2022 :
  183. </p>
  184. <ul>
  185. <li><a href="https://media.larlet.fr/">Des photos/media plus ou moins récents</a></li>
  186. <li><a href="https://code.larlet.fr/">Des morceaux de code et d’apprentissages</a></li>
  187. <li><a href="https://nature.larlet.fr/">Des bribes/expériences de nature</a></li>
  188. </ul>
  189. <p>
  190. En plus de publier des bêtises
  191. <a href="https://fedi.larlet.fr/@david" rel="me">sur Mastodon</a>.
  192. </p>
  193. <h2 id="tags">
  194. Publications <a href="/david/2021/" title="Voir la liste de toutes les publications 2021">2021</a> par tags <svg class="icon icon-tags">
  195. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-tags"></use>
  196. </svg>
  197. </h2>
  198. <nav>
  199. <p>
  200. <a href="/david/2021/accessibilite/">#accessibilité (17)</a>
  201. <a href="/david/2021/accompagnement/">#accompagnement (21)</a>
  202. <a href="/david/2021/allie/">#allié (12)</a>
  203. <a href="/david/2021/alterego/">#alterego (7)</a>
  204. <a href="/david/2021/anarchisme/">#anarchisme (5)</a>
  205. <a href="/david/2021/anxiete/">#anxiété (35)</a>
  206. <a href="/david/2021/capitalocene/">#capitalocène (21)</a>
  207. <a href="/david/2021/climat/">#climat (13)</a>
  208. <a href="/david/2021/contemplation/">#contemplation (7)</a>
  209. <a href="/david/2021/cooperative/">#coopérative (7)</a>
  210. <a href="/david/2021/design/">#design (11)</a>
  211. <a href="/david/2021/echecs/">#échecs (5)</a>
  212. <a href="/david/2021/ecole/">#école (8)</a>
  213. <a href="/david/2021/ecriture/">#écriture (15)</a>
  214. <a href="/david/2021/etiquette/">#étiquette (5)</a>
  215. <a href="/david/2021/exploration/">#exploration (5)</a>
  216. <a href="/david/2021/feminisme/">#féminisme (4)</a>
  217. <a href="/david/2021/foret/">#forêt (40)</a>
  218. <a href="/david/2021/frugalite/">#frugalité (6)</a>
  219. <a href="/david/2021/gafam/">#gafam (15)</a>
  220. <a href="/david/2021/gratitude/">#gratitude (18)</a>
  221. <a href="/david/2021/inclassable/">#inclassable (4)</a>
  222. <a href="/david/2021/incompetence/">#incompétence (35)</a>
  223. <a href="/david/2021/lecture/">#lecture (11)</a>
  224. <a href="/david/2021/materiel/">#matériel (4)</a>
  225. <a href="/david/2021/misanthropie/">#misanthropie (23)</a>
  226. <a href="/david/2021/neige/">#neige (7)</a>
  227. <a href="/david/2021/open-source/">#open-source (12)</a>
  228. <a href="/david/2021/pandemie/">#pandémie (44)</a>
  229. <a href="/david/2021/parentalite/">#parentalité (11)</a>
  230. <a href="/david/2021/partage/">#partage (23)</a>
  231. <a href="/david/2021/pharmakon/">#pharmakon (11)</a>
  232. <a href="/david/2021/poesie/">#poésie (5)</a>
  233. <a href="/david/2021/premieres-nations/">#premières-nations (4)</a>
  234. <a href="/david/2021/produit/">#produit (17)</a>
  235. <a href="/david/2021/protopie/">#protopie (5)</a>
  236. <a href="/david/2021/publication/">#publication (16)</a>
  237. <a href="/david/2021/recherche/">#recherche (29)</a>
  238. <a href="/david/2021/rythme/">#rythme (20)</a>
  239. <a href="/david/2021/scopyleft/">#scopyleft (5)</a>
  240. <a href="/david/2021/sociologie/">#sociologie (26)</a>
  241. <a href="/david/2021/technique/">#technique (47)</a>
  242. <a href="/david/2021/traces/">#traces (15)</a>
  243. <a href="/david/2021/transformation/">#transformation (49)</a>
  244. <a href="/david/2021/travail/">#travail (14)</a>
  245. <a href="/david/2021/utilisateur-ice/">#utilisateur·ice (5)</a>
  246. <a href="/david/2021/video/">#vidéo (21)</a>
  247. <a href="/david/2021/web/">#web (24)</a>
  248. </p>
  249. </nav>
  250. <h2>Publications hebdomadaires <a href="/david/2020/" title="Voir la liste de toutes les publications 2020">2020</a></h2>
  251. <p>Liste des publications en ordre chronologique :</p>
  252. <nav>
  253. <p>
  254. <a href="/david/2020/01/03/">Briques</a>,
  255. <a href="/david/2020/01/06/">Écriture</a>,
  256. <a href="/david/2020/01/10/">Travail</a>,
  257. <a href="/david/2020/01/15/">Futurs</a>,
  258. <a href="/david/2020/01/17/">Datagouv</a>,
  259. <a href="/david/2020/01/22/">Réponses</a>,
  260. <a href="/david/2020/01/29/">Sortie ski</a>,
  261. <a href="/david/2020/01/31/">Intentions</a>,
  262. <a href="/david/2020/02/07/">GAFAM+</a>,
  263. <a href="/david/2020/02/14/">Espoirs</a>,
  264. <a href="/david/2020/02/21/">Service</a>,
  265. <a href="/david/2020/03/13/">Technique</a>,
  266. <a href="/david/2020/03/20/">Rédemption</a>,
  267. <a href="/david/2020/03/27/">Exutoire</a>,
  268. <a href="/david/2020/04/03/">Patience</a>,
  269. <a href="/david/2020/04/10/">Résistance</a>,
  270. <a href="/david/2020/04/18/">Zam</a>,
  271. <a href="/david/2020/05/18/">Relance</a>,
  272. <a href="/david/2020/05/20/">Bikepacking</a>,
  273. <a href="/david/2020/05/26/">Covidoudou</a>,
  274. <a href="/david/2020/06/12/">Vrac</a>,
  275. <a href="/david/2020/06/18/">Mouvements</a>,
  276. <a href="/david/2020/06/25/">Ouvertance</a>,
  277. <a href="/david/2020/07/03/">Confetti</a>,
  278. <a href="/david/2020/07/13/">Bilan</a>,
  279. <a href="/david/2020/08/24/">Personnes</a>,
  280. <a href="/david/2020/09/01/">Rentrée</a>,
  281. <a href="/david/2020/09/07/">Rappels</a>,
  282. <a href="/david/2020/09/16/">Coupable</a>,
  283. <a href="/david/2020/10/08/">Parvenir</a>,
  284. <a href="/david/2020/10/22/">Grand-écart</a>,
  285. <a href="/david/2020/10/28/">Chaos</a>,
  286. <a href="/david/2020/11/27/">Perles</a>,
  287. <a href="/david/2020/12/01/">Compréhension</a>,
  288. <a href="/david/2020/12/13/">Publications</a>,
  289. <a href="/david/2020/12/15/">Vidéos</a>,
  290. <a href="/david/2020/12/18/">Arrakice</a>,
  291. <a href="/david/2020/12/21/">Livres</a>.
  292. </p>
  293. </nav>
  294. <h2>Recherche</h2>
  295. <p>Les contenus de ces dernières années sont indexés.</p>
  296. <form action="/david/recherche/" method="get">
  297. <label for="input-search">Termes de votre recherche :</label>
  298. <input type="search" name="s" required>
  299. <button>Chercher</button>
  300. </form>
  301. <h2>Publications archéologiques</h2>
  302. <p>
  303. Vous pouvez consulter les différents
  304. <a href="/david/blog/">billets de blog</a> qui ont été rédigés de 2004 à 2019
  305. ou les <a href="/david/stream/">entrées de journaux</a> relativement
  306. régulières entre 2009 et 2019.
  307. </p>
  308. <p>
  309. <em>
  310. Notez qu’avec un tel historique, certaines informations sont obsolètes et/ou
  311. plus cautionnées.
  312. </em>
  313. </p>
  314. <h2>Me contacter</h2>
  315. <p>
  316. 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>.
  317. </p>
  318. </article>
  319. <hr>
  320. <footer>
  321. <p>
  322. <nobr>
  323. <a href="/david/" title="Aller à l’accueil"
  324. ><svg class="icon icon-home">
  325. <use
  326. xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-home"
  327. ></use>
  328. </svg>
  329. Accueil</a
  330. >
  331. </nobr>
  332. <nobr>
  333. <a href="/david/log/" title="Accès au flux RSS"
  334. ><svg class="icon icon-rss2">
  335. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-rss2"></use>
  336. </svg>
  337. Suivre</a
  338. >
  339. </nobr>
  340. <nobr>
  341. <a href="http://larlet.com" title="Go to my English profile" data-instant
  342. ><svg class="icon icon-user-tie">
  343. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-user-tie"></use>
  344. </svg>
  345. Pro</a
  346. >
  347. </nobr>
  348. <nobr>
  349. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"
  350. ><svg class="icon icon-mail">
  351. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-mail"></use>
  352. </svg>
  353. Email</a
  354. >
  355. </nobr>
  356. <nobr>
  357. <abbr
  358. class="nowrap"
  359. title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"
  360. ><svg class="icon icon-hammer2">
  361. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-hammer2"></use>
  362. </svg>
  363. Légal</abbr
  364. >
  365. </nobr>
  366. </p>
  367. <template id="theme-selector">
  368. <form>
  369. <fieldset>
  370. <legend><svg class="icon icon-brightness-contrast">
  371. <use xlink:href="/static/david/icons2/symbol-defs-2022-03.svg#icon-brightness-contrast"></use>
  372. </svg> Thème</legend>
  373. <label>
  374. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  375. </label>
  376. <label>
  377. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  378. </label>
  379. <label>
  380. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  381. </label>
  382. </fieldset>
  383. </form>
  384. </template>
  385. </footer>
  386. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  387. <script>
  388. function loadThemeForm(templateName) {
  389. const themeSelectorTemplate = document.querySelector(templateName)
  390. const form = themeSelectorTemplate.content.firstElementChild
  391. themeSelectorTemplate.replaceWith(form)
  392. form.addEventListener('change', (e) => {
  393. const chosenColorScheme = e.target.value
  394. localStorage.setItem('theme', chosenColorScheme)
  395. toggleTheme(chosenColorScheme)
  396. })
  397. const selectedTheme = localStorage.getItem('theme')
  398. if (selectedTheme && selectedTheme !== 'undefined') {
  399. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  400. }
  401. }
  402. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  403. window.addEventListener('load', () => {
  404. let hasDarkRules = false
  405. for (const styleSheet of Array.from(document.styleSheets)) {
  406. let mediaRules = []
  407. for (const cssRule of styleSheet.cssRules) {
  408. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  409. continue
  410. }
  411. // WARNING: Safari does not have/supports `conditionText`.
  412. if (cssRule.conditionText) {
  413. if (cssRule.conditionText !== prefersColorSchemeDark) {
  414. continue
  415. }
  416. } else {
  417. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  418. continue
  419. }
  420. }
  421. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  422. }
  423. // WARNING: do not try to insert a Rule to a styleSheet you are
  424. // currently iterating on, otherwise the browser will be stuck
  425. // in a infinite loop…
  426. for (const mediaRule of mediaRules) {
  427. styleSheet.insertRule(mediaRule.cssText)
  428. hasDarkRules = true
  429. }
  430. }
  431. if (hasDarkRules) {
  432. loadThemeForm('#theme-selector')
  433. }
  434. })
  435. </script>
  436. </body>
  437. </html>