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.

index.html 28KB

8 miesięcy temu
8 miesięcy temu
7 miesięcy temu
8 miesięcy temu
8 miesięcy temu
7 miesięcy temu
7 miesięcy temu
7 miesięcy temu
7 miesięcy temu
8 miesięcy temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552
  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>
  13. Étiquette #poésie
  14. — David Larlet</title>
  15. <script>
  16. function toggleTheme(themeName) {
  17. document.documentElement.classList.toggle(
  18. 'forced-dark',
  19. themeName === 'dark'
  20. )
  21. document.documentElement.classList.toggle(
  22. 'forced-light',
  23. themeName === 'light'
  24. )
  25. }
  26. const selectedTheme = localStorage.getItem('theme')
  27. if (selectedTheme !== 'undefined') {
  28. toggleTheme(selectedTheme)
  29. }
  30. </script>
  31. <!-- Documented, feel free to shoot an email. -->
  32. <link rel="stylesheet" href="/static/david/css/style_2024-03-09.css">
  33. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  34. <link rel="preload"
  35. href="/static/david/css/fonts/century_supra_ot_a_regular.woff2"
  36. as="font"
  37. type="font/woff2"
  38. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  39. crossorigin>
  40. <link rel="preload"
  41. href="/static/david/css/fonts/century_supra_ot_a_bold.woff2"
  42. as="font"
  43. type="font/woff2"
  44. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  45. crossorigin>
  46. <link rel="preload"
  47. href="/static/david/css/fonts/century_supra_ot_a_italic.woff2"
  48. as="font"
  49. type="font/woff2"
  50. media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
  51. crossorigin>
  52. <link rel="preload"
  53. href="/static/david/css/fonts/century_supra_ot_b_regular.woff2"
  54. as="font"
  55. type="font/woff2"
  56. media="(prefers-color-scheme: dark)"
  57. crossorigin>
  58. <link rel="preload"
  59. href="/static/david/css/fonts/century_supra_ot_b_bold.woff2"
  60. as="font"
  61. type="font/woff2"
  62. media="(prefers-color-scheme: dark)"
  63. crossorigin>
  64. <link rel="preload"
  65. href="/static/david/css/fonts/century_supra_ot_b_italic.woff2"
  66. as="font"
  67. type="font/woff2"
  68. media="(prefers-color-scheme: dark)"
  69. crossorigin>
  70. <meta name="description" content="Publications relatives au tag #poésie">
  71. <!-- That good ol' feed, subscribe :). -->
  72. <link rel="alternate"
  73. type="application/atom+xml"
  74. title="Feed"
  75. href="/david/log/">
  76. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  77. <link rel="apple-touch-icon"
  78. sizes="180x180"
  79. href="/static/david/icons2/apple-touch-icon.png">
  80. <link rel="icon"
  81. type="image/png"
  82. sizes="32x32"
  83. href="/static/david/icons2/favicon-32x32.png">
  84. <link rel="icon"
  85. type="image/png"
  86. sizes="16x16"
  87. href="/static/david/icons2/favicon-16x16.png">
  88. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  89. <link rel="mask-icon"
  90. href="/static/david/icons2/safari-pinned-tab.svg"
  91. color="#07486c">
  92. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  93. <meta name="msapplication-TileColor" content="#f7f7f7">
  94. <meta name="msapplication-config"
  95. content="/static/david/icons2/browserconfig.xml">
  96. <meta name="theme-color"
  97. content="#f7f7f7"
  98. media="(prefers-color-scheme: light)">
  99. <meta name="theme-color"
  100. content="#272727"
  101. media="(prefers-color-scheme: dark)">
  102. <!-- Is that even respected? Retrospectively? What a shAItshow…
  103. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  104. <meta name="robots" content="noai, noimageai">
  105. <style type="text/css">
  106. details[open] summary {
  107. display: none;
  108. }
  109. </style>
  110. <body data-instant-intensity="viewport-all">
  111. <article>
  112. <header>
  113. <hgroup>
  114. <h1>#poésie</h1>
  115. <p>Publications relatives à cette étiquette</p>
  116. </hgroup>
  117. </header>
  118. <nav>
  119. <p>
  120. <a href="/david/" title="Aller à l’accueil">
  121. Accueil</a>
  122. <a rel="tags"
  123. href="/david/2024/#tags"
  124. title="Liste de toutes les étiquettes">
  125. Étiquettes</a>
  126. <a href="/david/recherche/" title="Aller à la page de recherche" rel="search" data-no-instant>Recherche</a>
  127. <a href="/david/log/" title="Accès au flux RSS">Suivre</a>
  128. </p>
  129. </nav>
  130. <h2>
  131. <a href="/david/2024/03/24/" title="Lien permanent vers cet article">Cage</a> <time datetime="2024-03-24">24 mars 2024</time>
  132. </h2>
  133. <blockquote>
  134. <p>«&nbsp;Serai-je toujours choisie&#8239;? dit-elle avec amertume. Serai-je toujours laissée derrière quand les cavaliers partiront, pour garder la maison pendant qu’ils se couvrent de gloire, et veiller à ce que le repas et le lit soient prêts à leur&nbsp;retour&#8239;?&nbsp;»</p>
  135. <p>«&nbsp;Un jour viendra bientôt, peut-être, où nul ne rentrera, dit-il. Alors, il y aura besoin de courage sans gloire, car nul ne se souviendra des exploits accomplis dans l’ultime défense de vos foyers. Mais ces exploits n’auront pas été moins vaillants pour être restés sans&nbsp;éloges.&nbsp;»</p>
  136. <p>Et elle répondit: «&nbsp;Tout cela revient à dire&nbsp;: vous êtes une femme, et votre place est à la maison. Mais quand les hommes seront morts au combat, dans l’honneur, vous pourrez brûler avec elle, car les hommes n’auront plus besoin d’un toit. Mais je suis de la Maison d’Eorl, et non une femme servante. Je puis monter à cheval, je sais manier l’épée&#8239;; et je ne crains ni la souffrance, ni la&nbsp;mort.&nbsp;»</p>
  137. <p>«&nbsp;Que craignez-vous donc, madame&#8239;?&nbsp;»&nbsp;demanda-t-il.</p>
  138. <p>«&nbsp;<mark>Une cage</mark>, dit-elle. Vivre derrière des barreaux, jusqu’à ce que l’habitude et la vieillesse s’en accommodent, et que l’espoir d’accomplir de hauts faits soit au-delà de tout souvenir et de toute&nbsp;envie.&nbsp;»</p>
  139. <p><cite><em>Le Seigneur des Anneaux</em>, J.R.R. Tolkien, traduction de Daniel&nbsp;Lauzon</cite></p>
  140. </blockquote>
  141. <p>Il s’agit de mon extrait favori de la trilogie. <em>Éowyn forever&nbsp;&lt;3.</em></p>
  142. <a href="#hr-132" title="Lien vers cette section de la page"><hr id="hr-132" /></a>
  143. <blockquote>
  144. <p>Bref, il s’agit de modéliser le mieux possible les <strong>besoins éditoriaux</strong> pour ensuite – <em>et seulement ensuite&#8239;!</em> – réunir les ingrédients techniques. (On voit souvent le contraire arriver en pratique&nbsp;: on plaque des solutions existantes sans nécessairement tenir compte des spécificités propres à un problème, un contexte, une communauté.) Il existe souvent plusieurs solutions possibles, plusieurs morceaux de code différents qui produisent, à première vue, un effet similaire&#8239;; <mark>sauf que les démarches ne se valent pas toutes,</mark> et c’est justement en tenant compte du contexte particulier qu’on peut trouver chaussure à son pied (ou à celui des&nbsp;autres).</p>
  145. <p><cite><em><a data-link-domain="lobrassard.net" href="https://www.lobrassard.net/carnet/2024-03-22-ecrire-coder-editorial.html" hreflang="fr"
  146. title="Consultation de l’article">Écrire ou coder l’éditorial</a>
  147. <a href="/david/cache/2024/bb9ae7eeac8484bf3e675d196b8dc8b9/" hreflang="fr"
  148. data-tippy data-description="Carnet de recherche de Louis-Olivier Brassard."
  149. data-source="https://www.lobrassard.net/carnet/2024-03-22-ecrire-coder-editorial.html"
  150. data-date="2024-03-25"
  151. data-favicon="data:;base64,iVBORw0KGgo="
  152. data-domain="lobrassard.net"
  153. ><svg xmlns="http://www.w3.org/2000/svg"
  154. width="24" height="24" viewBox="0 0 24 24" fill="none"
  155. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  156. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  157. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  158. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  159. </svg>
  160. <span class="sr-only">[archive]</span></a></em></cite></p>
  161. </blockquote>
  162. <p>CSS ⨯ Grec ancien ⨯&nbsp;poésie.</p>
  163. <a href="#hr-133" title="Lien vers cette section de la page"><hr id="hr-133" /></a>
  164. <blockquote lang="en">
  165. <p>In principle, these modern pages that burn a ton of CPU when loading could be doing pre-work that means that later interactions on the page are faster and cheaper than on the pages that do less up-front work (this is a common argument in favor of these kinds of pages), <mark>but that’s not the case for pages tested, which are slower</mark> to load initially, slower on subsequent loads, and slower after they’ve&nbsp;loaded.</p>
  166. <p><cite><em><a data-link-domain="danluu.com" href="https://danluu.com/slow-device/" hreflang="en"
  167. title="Consultation de l’article (anglais)">How web bloat impacts users with slow devices</a>
  168. <a href="/david/cache/2024/a988555163e09729b925dbf715ce256c/" hreflang="en"
  169. data-tippy data-description="More of the web is becoming inaccessible to people with low-end devices even if they have high-end connections."
  170. data-source="https://danluu.com/slow-device/"
  171. data-date="2024-03-25"
  172. data-favicon="data:;base64,="
  173. data-domain="danluu.com"
  174. ><svg xmlns="http://www.w3.org/2000/svg"
  175. width="24" height="24" viewBox="0 0 24 24" fill="none"
  176. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  177. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  178. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  179. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  180. </svg>
  181. <span class="sr-only">[archive]</span></a></em></cite></p>
  182. </blockquote>
  183. <p>L’article déprimant du jour que devraient lire tou·tes les dévelopeur·euses avec leurs processeurs MX et leurs&nbsp;iPhones.</p>
  184. <p><em>Je l’ai&nbsp;lu.</em></p>
  185. <nav>
  186. <p>
  187. <a href="/david/2024/courage/"
  188. title="Liste de tous les articles 2024 associés à cette étiquette"
  189. rel="tag">#courage</a>
  190. <a href="/david/2024/lecture/"
  191. title="Liste de tous les articles 2024 associés à cette étiquette"
  192. rel="tag">#lecture</a>
  193. <a href="/david/2024/poesie/"
  194. title="Liste de tous les articles 2024 associés à cette étiquette"
  195. rel="tag">#poésie</a>
  196. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  197. </p>
  198. </nav>
  199. <h2>
  200. <a href="/david/2024/03/09/" title="Lien permanent vers cet article">Marque</a> <time datetime="2024-03-09">9 mars 2024</time>
  201. </h2>
  202. <blockquote lang="en">
  203. <p><mark>Removing the brand from the person</mark> is all but straightforward. I now start my about page with a quick way to introduce myself by putting forward some of my values. […] Beside saying <em>people</em> instead of <em>users</em>, stop considering who’s reading my stuff as <em>audience</em>, and quit referring to what I do as <em>content</em>, I want to modify a few more&nbsp;behaviours:</p>
  204. <ul>
  205. <li>Quit mentioning well-known bloggers on a first-name basis. […]</li>
  206. <li>Keep writing about different things. […]</li>
  207. <li>Don’t quote so-called thought leaders&nbsp;[…]</li>
  208. <li>Stop sugar-coating concepts&nbsp;[…]</li>
  209. </ul>
  210. <p><cite><em><a data-link-domain="minutestomidnight.co.uk" href="https://minutestomidnight.co.uk/blog/kafkaesque-digital-relationship-with-ourselves/" hreflang="en"
  211. title="Consultation de l’article (anglais)">A Kafkaesque digital relationship with ourselves</a>
  212. <a href="/david/cache/2024/34590090e8c8ea82be14fcc3dd7b734c/" hreflang="en"
  213. data-tippy data-description="Words are crucial to build a sense of online community, however many of us have been using them straight out of a soulless corporate lingo in order to sell ourselves as a product."
  214. data-source="https://minutestomidnight.co.uk/blog/kafkaesque-digital-relationship-with-ourselves/"
  215. data-date="2024-03-09"
  216. data-favicon="https://minutestomidnight.co.uk/assets/images/favicons/favicon.svg"
  217. data-domain="minutestomidnight.co.uk"
  218. ><svg xmlns="http://www.w3.org/2000/svg"
  219. width="24" height="24" viewBox="0 0 24 24" fill="none"
  220. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  221. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  222. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  223. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  224. </svg>
  225. <span class="sr-only">[archive]</span></a></em></cite></p>
  226. </blockquote>
  227. <p>Réflexion du jour sur le vocabulaire qui évolue pour se présenter sur le Web. Je suis souvent intrigué par les biographies et textes de présentation sur mastodon qui sont à la fois singuliers tout en respectant des codes (micro-)culturels. Peut-être que l’on a besoin de se sentir dans un cadre de représentation connu pour se sentir exister dans une&nbsp;communauté.</p>
  228. <p>Le même auteur, en&nbsp;2002(!)&nbsp;:</p>
  229. <blockquote lang="en">
  230. <p>Five years ago there was all this buzz about <em>virtual communities</em>. How did that go? I have no idea, all I know is that everything revolves around who’s the hottest blogger right now. They talk about themselves, reference each other, all anxious about who has the most comments or the longest and most prestigious blogroll. Compared to that, <mark>my online journal is pure mental masturbation, but at least I have the occasional good photo and such nice&nbsp;typography.</mark></p>
  231. <p><cite><em><a data-link-domain="minutestomidnight.co.uk" href="https://minutestomidnight.co.uk/blog/years-just-pass-by/" hreflang="en"
  232. title="Consultation de l’article (anglais)">Years just pass by</a>
  233. <a href="/david/cache/2024/4f003de8f8531a4aaf121ecf6c21ae66/" hreflang="en"
  234. data-tippy data-description="The desire to be part of a community of bloggers hits the harsh reality of how humans want thought leaders who appear to be successful."
  235. data-source="https://minutestomidnight.co.uk/blog/years-just-pass-by/"
  236. data-date="2024-03-09"
  237. data-favicon="https://minutestomidnight.co.uk/assets/images/favicons/favicon.svg"
  238. data-domain="minutestomidnight.co.uk"
  239. ><svg xmlns="http://www.w3.org/2000/svg"
  240. width="24" height="24" viewBox="0 0 24 24" fill="none"
  241. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  242. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  243. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  244. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  245. </svg>
  246. <span class="sr-only">[archive]</span></a></em></cite></p>
  247. </blockquote>
  248. <a href="#hr-106" title="Lien vers cette section de la page"><hr id="hr-106" /></a>
  249. <pre><code>body:has(time[datetime]) li {
  250. list-style-type: &quot;❧ &quot;;
  251. }
  252. body:has(
  253. time[datetime^=&quot;2024-01&quot;],
  254. time[datetime^=&quot;2024-02&quot;],
  255. time[datetime^=&quot;2024-03&quot;]
  256. ) li {
  257. list-style-type: &quot;❆ &quot;;
  258. }
  259. body:has(
  260. time[datetime^=&quot;2024-04&quot;],
  261. time[datetime^=&quot;2024-05&quot;],
  262. time[datetime^=&quot;2024-06&quot;]
  263. ) li {
  264. list-style-type: &quot;❁ &quot;;
  265. }
  266. body:has(
  267. time[datetime^=&quot;2024-07&quot;],
  268. time[datetime^=&quot;2024-08&quot;],
  269. time[datetime^=&quot;2024-09&quot;]
  270. ) li {
  271. list-style-type: &quot;❂ &quot;;
  272. }
  273. </code></pre>
  274. <p>J’avais envie d’introduire une légère saisonnalité dans mes listes à puces. Surtout une <a href="/david/2024/03/07/#hr-102">autre excuse</a> pour jouer avec <code>:has()</code>. Je lis un peu trop de blogs qui manquent de fantaisie. Et puis il&nbsp;pleut…</p>
  275. <a href="#hr-107" title="Lien vers cette section de la page"><hr id="hr-107" /></a>
  276. <p>Chant du cardinal<br />
  277. Le matin s’éveille sans toi<br />
  278. Lovée dans mes&nbsp;bras</p>
  279. <nav>
  280. <p>
  281. <a href="/david/2024/evolution/"
  282. title="Liste de tous les articles 2024 associés à cette étiquette"
  283. rel="tag">#évolution</a>
  284. <a href="/david/2024/identite/"
  285. title="Liste de tous les articles 2024 associés à cette étiquette"
  286. rel="tag">#identité</a>
  287. <a href="/david/2024/poesie/"
  288. title="Liste de tous les articles 2024 associés à cette étiquette"
  289. rel="tag">#poésie</a>
  290. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  291. </p>
  292. </nav>
  293. <h2>
  294. <a href="/david/2024/02/26/" title="Lien permanent vers cet article">Galaxie</a> <time datetime="2024-02-26">26 février 2024</time>
  295. </h2>
  296. <p>Anecdote du jour qui met le sourire de bon&nbsp;matin.</p>
  297. <figure>
  298. <a href="/static/david/2024/2024-02-26-neige-galaxie.jpg"
  299. title="Cliquer pour une version haute résolution">
  300. <img
  301. src="/static/david/2024/2024-02-26-neige-galaxie.jpg"
  302. width="4032" height="3024"
  303. srcset="/static/david/2024/2024-02-26-neige-galaxie.jpg 4032w, /static/david/2024/2024-02-26-neige-galaxie_660x440.jpg 660w, /static/david/2024/2024-02-26-neige-galaxie_990x660.jpg 990w, /static/david/2024/2024-02-26-neige-galaxie_1320x880.jpg 1320w"
  304. sizes="min(100vw, calc(100vh * 4032 / 3024))"
  305. loading="lazy"
  306. decoding="async"
  307. alt="De la neige qui tombe à gros flocon.">
  308. </a>
  309. <figcaption>L’espace d’un instant, par la&nbsp;fenêtre.</figcaption>
  310. </figure>
  311. <blockquote>
  312. <p>— Oh la belle neige&#8239;!<br />
  313. —&nbsp;Il pleut des étoiles, la galaxie est en train de tomber.<br />
  314. —&nbsp;❤️</p>
  315. </blockquote>
  316. <a href="#hr-89" title="Lien vers cette section de la page"><hr id="hr-89" /></a>
  317. <blockquote lang="en">
  318. <p>CSS Variable Groups is a way to define multiple properties under the same namespace and pass the entire group around, addressing several pain points around design tokens, design systems, and integrating third-party&nbsp;components.</p>
  319. <p><cite><em><a data-link-domain="lea.verou.me" href="https://lea.verou.me/docs/var-groups/" hreflang="en"
  320. title="Consultation de l’article (anglais)">Proposal: CSS Variable Groups</a>
  321. <a href="/david/cache/2024/0cc2e9c6b29f8326b2ff628f64e22888/" hreflang="en"
  322. data-tippy data-description="CSS Variable Groups is a way to define multiple properties under the same namespace"
  323. data-source="https://lea.verou.me/docs/var-groups/"
  324. data-date="2024-02-27"
  325. data-favicon="https://lea.verou.me/mark.svg"
  326. data-domain="lea.verou.me"
  327. ><svg xmlns="http://www.w3.org/2000/svg"
  328. width="24" height="24" viewBox="0 0 24 24" fill="none"
  329. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  330. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  331. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  332. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  333. </svg>
  334. <span class="sr-only">[archive]</span></a></em></cite></p>
  335. </blockquote>
  336. <p>Heureusement que Lea Verou <a href="/david/2024/02/18/" title="In·directions">me lit</a> et traduit ça en proposition de <a data-link-domain="github.com" href="https://github.com/w3c/csswg-drafts/issues/9992">standardisation</a> en quelques jours au lieu de chialer&nbsp;😅🙇. Trop&nbsp;hâte&#8239;!</p>
  337. <a href="#hr-90" title="Lien vers cette section de la page"><hr id="hr-90" /></a>
  338. <blockquote lang="en">
  339. <p><mark>Maybe that’s ok.</mark> The amount of power you give plugin authors is a delicate balance. Giving them too much power could impact the stability of your project. But giving them too little power makes it hard for them to solve their problems — in that case you might as well not have&nbsp;plugins.</p>
  340. <p><cite><em><a data-link-domain="css-tricks.com" href="https://css-tricks.com/designing-a-javascript-plugin-system/" hreflang="en"
  341. title="Consultation de l’article (anglais)">Designing a JavaScript Plugin System</a>
  342. <a href="/david/cache/2024/d9c30865dde8c88394ba054836a18ae3/" hreflang="en"
  343. data-tippy data-description="WordPress has plugins. jQuery has plugins. Gatsby, Eleventy, and Vue do, too."
  344. data-source="https://css-tricks.com/designing-a-javascript-plugin-system/"
  345. data-date="2024-02-27"
  346. data-favicon="https://css-tricks.com/favicon.svg"
  347. data-domain="css-tricks.com"
  348. ><svg xmlns="http://www.w3.org/2000/svg"
  349. width="24" height="24" viewBox="0 0 24 24" fill="none"
  350. stroke="currentColor" stroke-width="2" stroke-linecap="square"
  351. stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle>
  352. <path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path>
  353. <line x1="12" y1="17" x2="12.01" y2="17"></line>
  354. </svg>
  355. <span class="sr-only">[archive]</span></a></em></cite></p>
  356. </blockquote>
  357. <p>Problématique du jour&nbsp;: comment concevoir un système de <em>plugins</em> qui soit le bon compromis entre flexibilité et stabilité&#8239;? Ce n’est pas si évident, encore plus dans un écosystème aussi évolutif que&nbsp;JavaScript.</p>
  358. <nav>
  359. <p>
  360. <a href="/david/2024/parentalite/"
  361. title="Liste de tous les articles 2024 associés à cette étiquette"
  362. rel="tag">#parentalité</a>
  363. <a href="/david/2024/poesie/"
  364. title="Liste de tous les articles 2024 associés à cette étiquette"
  365. rel="tag">#poésie</a>
  366. <a href="/david/2024/solastalgia/"
  367. title="Liste de tous les articles 2024 associés à cette étiquette"
  368. rel="tag">#solastalgia</a>
  369. <a href="/david/2024/#tags" title="Liste de toutes les étiquettes 2024">tous ?</a>
  370. </p>
  371. </nav>
  372. <form action="/david/recherche/" method="get">
  373. <fieldset>
  374. <legend>Recherche</legend>
  375. <label for="input-search">Termes de votre recherche :</label>
  376. <input id="input-search" type="search" name="s" aria-describedby="indexation-infos" required>
  377. <input type="submit" value="Chercher">
  378. <p id="indexation-infos">
  379. <small>
  380. Seuls les contenus de ces 8 dernières années sont indexés.
  381. </small>
  382. </p>
  383. </fieldset>
  384. </form>
  385. <aside>
  386. <theme-toggle></theme-toggle>
  387. </aside>
  388. </article>
  389. <hr>
  390. <footer>
  391. <p>
  392. <a href="/david/" title="Aller à l’accueil">Accueil</a>
  393. <a href="/david/log/" title="Accès au flux RSS">Suivre</a>
  394. <a href="http://larlet.com"
  395. title="Go to my English profile"
  396. data-instant>Pro</a>
  397. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel">Email</a>
  398. <abbr title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340">Légal</abbr>
  399. </p>
  400. <template id="theme-selector">
  401. <form>
  402. <style type="text/css">
  403. fieldset div {
  404. text-align: center;
  405. }
  406. </style>
  407. <fieldset>
  408. <legend>Thème</legend>
  409. <div>
  410. <label>
  411. <input type="radio" value="auto" name="chosen-color-scheme" checked>
  412. Auto
  413. </label>
  414. <label>
  415. <input type="radio" value="dark" name="chosen-color-scheme">
  416. Foncé
  417. </label>
  418. <label>
  419. <input type="radio" value="light" name="chosen-color-scheme">
  420. Clair
  421. </label>
  422. </div>
  423. </fieldset>
  424. </form>
  425. </template>
  426. </footer>
  427. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  428. <script>
  429. class ThemeToggle extends HTMLElement {
  430. constructor() {
  431. super()
  432. const themeSelectorTemplate = document.querySelector('#theme-selector')
  433. const form = themeSelectorTemplate.content.firstElementChild
  434. this.attachShadow({ mode: 'open' })
  435. this.shadowRoot.appendChild(form.cloneNode(true))
  436. }
  437. connectedCallback() {
  438. const form = this.shadowRoot.querySelector('form')
  439. form.addEventListener('change', (e) => {
  440. const chosenColorScheme = e.target.value
  441. localStorage.setItem('theme', chosenColorScheme)
  442. toggleTheme(chosenColorScheme)
  443. })
  444. const selectedTheme = localStorage.getItem('theme')
  445. if (selectedTheme && selectedTheme !== 'undefined') {
  446. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  447. }
  448. }
  449. }
  450. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  451. window.addEventListener('load', () => {
  452. let colorsLayer = undefined
  453. let hasDarkRules = false
  454. for (const styleSheet of Array.from(document.styleSheets)) {
  455. let mediaRules = []
  456. for (const layerRule of styleSheet.cssRules) {
  457. if (!(layerRule instanceof CSSLayerBlockRule)) {
  458. continue
  459. }
  460. if (layerRule.name === 'colors') {
  461. colorsLayer = layerRule
  462. }
  463. for (const cssRule of layerRule.cssRules) {
  464. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  465. continue
  466. }
  467. // WARNING: Safari does not have/supports `conditionText`.
  468. if (cssRule.conditionText) {
  469. if (cssRule.conditionText !== prefersColorSchemeDark) {
  470. continue
  471. }
  472. } else {
  473. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  474. continue
  475. }
  476. }
  477. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  478. }
  479. }
  480. // WARNING: do not try to insert a Rule to a styleSheet you are
  481. // currently iterating on, otherwise the browser will be stuck
  482. // in a infinite loop…
  483. for (const mediaRule of mediaRules) {
  484. // Safari requires the `0` second parameter (even if default).
  485. colorsLayer.insertRule(mediaRule.cssText, 0)
  486. hasDarkRules = true
  487. }
  488. }
  489. if (hasDarkRules) {
  490. if ('customElements' in window && !customElements.get('theme-toggle')) {
  491. customElements.define('theme-toggle', ThemeToggle)
  492. }
  493. }
  494. })
  495. </script>
  496. </body>
  497. </html>