A place to cache linked articles (think custom and personal wayback machine)
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 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  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>Wolf packs don’t actually have alpha males and alpha females, the idea is based on a misunderstanding (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  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. <meta name="robots" content="noindex, nofollow">
  53. <meta content="origin-when-cross-origin" name="referrer">
  54. <!-- Canonical URL for SEO purposes -->
  55. <link rel="canonical" href="https://phys.org/news/2021-04-wolf-dont-alpha-males-females.html">
  56. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  57. <article>
  58. <header>
  59. <h1>Wolf packs don’t actually have alpha males and alpha females, the idea is based on a misunderstanding</h1>
  60. </header>
  61. <nav>
  62. <p class="center">
  63. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  64. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  65. </svg> Accueil</a> •
  66. <a href="https://phys.org/news/2021-04-wolf-dont-alpha-males-females.html" title="Lien vers le contenu original">Source originale</a>
  67. </p>
  68. </nav>
  69. <hr>
  70. <div data-thumb="https://scx1.b-cdn.net/csz/news/tmb/2021/wolf-packs-dont-actual.jpg" data-src="https://scx2.b-cdn.net/gfx/news/2021/wolf-packs-dont-actual.jpg" data-sub-html="The alpha designation used to describe wolf hierarchy is based on research on captive wolves. Credit: Bjarne Henning Kvaale / Shutterstock / NTB">
  71. <figure class="article-img">
  72. <img src="https://scx1.b-cdn.net/csz/news/800a/2021/wolf-packs-dont-actual.jpg" alt="Wolf packs don’t actually have alpha males and alpha females, the idea is based on a misunderstanding" title="The alpha designation used to describe wolf hierarchy is based on research on captive wolves. Credit: Bjarne Henning Kvaale / Shutterstock / NTB">
  73. <figcaption class="text-darken text-low-up text-truncate-js text-truncate mt-3">
  74. The alpha designation used to describe wolf hierarchy is based on research on captive wolves. Credit: Bjarne Henning Kvaale / Shutterstock / NTB
  75. </figcaption> </figure>
  76. </div>
  77. <p>You may have heard that a wolf pack is led by an alpha pair.</p>
  78. <p>Given this designation, it's easy to imagine that a pack consists of <a href="https://phys.org/tags/young+adults/" rel="tag" class="textTag">young adults</a> and older animals in a strict ranking system. You can imagine that relatives, newcomers and challengers are all part of the system. Maybe some of these wolves might challenge the alpha male to take over leadership of the pack?</p>
  79. <p>On the Howstuffworks website, for example, you can read that wolves follow "an incredibly sophisticated group hierarchy," and that wolves naturally organize themselves in packs for stability and to help each other with hunting.</p>
  80. <p>The pack structure is said to include a "beta wolf" who is the deputy and the "omega wolf" who is at the bottom of the rank, and often the victim of bullying.</p>
  81. <p>In reality, wolf packs are usually much less complicated.</p>
  82. <p><b>Doesn't work for wolves in the wild</b></p>
  83. <p>Calling wolves alpha and beta animals comes from research on wolves in captivity, says Barbara Zimmermann.</p>
  84. <p>Zimmermann is a professor at Inland Norway University of Applied Sciences who studies wolves.</p>
  85. <p>"The leader is called the alpha male. Then there may be several rank levels, beta, gamma and so on. But this is not a concept that works for wolves in the wild," she says.</p>
  86. <p>Most wolf packs simply consist of two parents and their puppies. The group may also include one- to three-year-old offspring that have not yet headed out on their own.</p>
  87. <p>"The adults are simply in charge because they are the parents of the rest of the pack members. We don't talk about the alpha male, the alpha female and the beta child in a human family," Zimmermann said.</p>
  88. <p><b>Battle for leadership in captivity</b></p>
  89. <p>So how did the idea for the alpha wolf come about?</p>
  90. <p>Rudolf Schenkel wrote about social structure and body language among wolves in 1947.</p>
  91. <p>Schenkel studied wolves at the Basel Zoo in Switzerland, where up to ten wolves were kept together in an area of 10 by 20 meters.</p>
  92. <p>He saw that the highest ranked female and male formed a pair, and that the hierarchy could change.</p>
  93. <p>"By continuously controlling and suppressing all types of competition within the same sex, both 'alpha animals' defend their social position," Schenkel wrote.</p>
  94. <p>According to another well-known wolf researcher, David Mech, it was Schenkel's work that gave rise to the idea of the alpha wolf, according to The International Wolf Center website.</p>
  95. <p>As early as 1947, Schenkel mentioned that it was possible that wild wolf packs consisted of a monogamous pair, their puppies and one- to two-year-old pups. But this information was overlooked.</p>
  96. <p>Rudolf Schenkel's work had great influence, said Ane Møller Gabrielsen, a senior research librarian at NTNU, the Norwegian University of Science and Technology.</p>
  97. <p>In 2015, she completed her doctorate on "Power and meaning in the conflict zones over keeping dogs." Her dissertation describes research on pack structure in wolves, and how it in turn affected views on dog training.</p>
  98. <p><b>Pecking order</b></p>
  99. <p>Another Norwegian, Thorleif Schjelderup-Ebbe, also contributed with important insights.</p>
  100. <p>Schjelderup-Ebbe established the term "pecking order " in the 1920s to describe relationships among chickens. This describes how chickens can be aggressive towards birds below them in the social hierarchy, but not towards those above them.</p>
  101. <p>"The concept of the pecking order became very popular. It had great influence on the whole view of science at that time, at least in research that had to do with living organisms. It was seen as an underlying dominance principle that structures society and behavior," Møller Gabrielsen said.</p>
  102. <div class="article-gallery lightGallery">
  103. <div data-thumb="https://scx1.b-cdn.net/csz/news/tmb/2021/wolf-packs-dont-actual-1.jpg" data-src="https://scx2.b-cdn.net/gfx/news/2021/wolf-packs-dont-actual-1.jpg" data-sub-html="A moose meal in the snow. Credit: Andrew Astbury / Shutterstock / NTB">
  104. <figure class="article-img text-center">
  105. <img src="https://scx1.b-cdn.net/csz/news/800a/2021/wolf-packs-dont-actual-1.jpg" alt="Wolf packs don’t actually have alpha males and alpha females, the idea is based on a misunderstanding" title="A moose meal in the snow. Credit: Andrew Astbury / Shutterstock / NTB">
  106. <figcaption class="text-left text-darken text-truncate text-low-up mt-3">
  107. A moose meal in the snow. Credit: Andrew Astbury / Shutterstock / NTB
  108. </figcaption> </figure>
  109. </div>
  110. </div>
  111. <p><b>Popularized the alpha wolf concept</b></p>
  112. <p>A great deal of research was done on the wolf's pack structure in the 1960s and 1970s, but this was mainly on wolves in captivity, Zimmermann said. For example, Erik Zimen, a Swede, worked with social organization among wolves in captivity.</p>
  113. <p>These wolves were not necessarily related and were kept in an unnaturally small area.</p>
  114. <p>In 1970, the book <i>The Wolf: Ecology and Behavior of an Endangered Species</i> was published, written by David Mech. It was a success. The book helped to popularize the alpha concept, because many people referred to Mech's work.</p>
  115. <p>Mech has written on his website that he repeatedly asked the publisher to stop printing the book because much of the information is outdated—including the concept behind the alpha wolf. Nevertheless, the book is still being sold.</p>
  116. <p>"David Mech, the world's most profiled wolf researcher, used the terminology alpha animals in his early research. But by the time he realized that this was a mistake, the term had already taken root in the literature. He is now struggling to get this changed," Zimmermann said.</p>
  117. <p><b>Affected dog training</b></p>
  118. <p>The alpha wolf theory was of great importance in dog training, says NTNU's Ane Møller Gabrielsen.</p>
  119. <p>"This was true especially after 1970, when David Mech published his study. In addition, you have a number of other well-known names who published research based on animals in zoos. This gave us a pretty clear picture of the wolf as a very authoritarian animal with an almost a military ranking," she said.</p>
  120. <p>Dog training comes from the military, Møller Gabrielsen said. The military used punishment as a training tool.</p>
  121. <p>"Once the concept of the wolf and its strict hierarchy was established, trainers were more likely to use punishment. It wasn't just that the dog was punished when it did something wrong, you had to show the dog that you were the alpha wolf all the time," she said.</p>
  122. <p>Some of the methods involved physical punishment, such as taking the puppy by the scruff of the neck and shaking it. These ideas became less widespread in the dog training literature throughout the 2000s.</p>
  123. <p>"Most of what has been published in books since 2000 is so-called positive training, which is reward-based dog training that uses the least possible punishment and no physical punishment. So there has been a very big change," Møller Gabrielsen said.</p>
  124. <p><b>Close contact with wolves</b></p>
  125. <p>In 1999 and 2000, David Mech published two articles in which he tried to correct the popular misunderstanding about how a wolf pack is organized.</p>
  126. <p>By that time, Mech had studied wild wolf packs on Ellesmere Island in Canada for 13 summers. He was able to acclimatize one of the wolf packs to his presence. That allowed him to study the pack up close—up to one meter, over several years.</p>
  127. <p>He wrote that what was commonly called the alpha pair was simply the parents of the rest of the pack. As parents, they consequently led the pack's activities.</p>
  128. <p>"Dominance fights with other wolves are rare, if they exist at all. During my 13 summers where I observed the pack, I saw none," Mech wrote in an article entitled "Alpha Status, Dominance, and Division of Labor in Wolf Packs."</p>
  129. <p><b>The parents decide</b></p>
  130. <p>The younger wolves were submissive to the parents. The parents controlled the distribution of food. The couple prioritized the youngest puppies to ensure they would get enough food if it needed to be shared. Older siblings may do the same thing, Mech wrote.</p>
  131. <p>All the animals eat at the same time from a large carcass. But if the carcass is small, the parents eat first and determine when the pups are allowed to eat, he wrote.</p>
  132. <p>However, there are also wolf packs that have a slightly different and exciting structure that we'll come back to later.</p>
  133. <p><b>How Norwegian packs are structured</b></p>
  134. <p>Barbara Zimmermann at the Inland Norway University of Applied Sciences and her colleagues have studied pack cohesion in Norwegian wolves using GPS data. This has given them insights into how these wolves live together.</p>
  135. <div class="article-gallery lightGallery">
  136. <div data-thumb="https://scx1.b-cdn.net/csz/news/tmb/2021/wolf-packs-dont-actual-2.jpg" data-src="https://scx2.b-cdn.net/gfx/news/2021/wolf-packs-dont-actual-2.jpg" data-sub-html="David Mech spent a lot of time studying daily life in the wolf pack. Credit: U.S. Geological Survey by L. David Mech">
  137. <figure class="article-img text-center">
  138. <img src="https://scx1.b-cdn.net/csz/news/800a/2021/wolf-packs-dont-actual-2.jpg" alt="Wolf packs don’t actually have alpha males and alpha females, the idea is based on a misunderstanding" title="David Mech spent a lot of time studying daily life in the wolf pack. Credit: U.S. Geological Survey by L. David Mech">
  139. <figcaption class="text-left text-darken text-truncate text-low-up mt-3">
  140. David Mech spent a lot of time studying daily life in the wolf pack. Credit: U.S. Geological Survey by L. David Mech
  141. </figcaption> </figure>
  142. </div>
  143. </div>
  144. <p>"A typical wolf pack in Scandinavia consists of six animals on average, most often the parents and four yearling puppies," says Zimmermann.</p>
  145. <p>A typical year for a Scandinavian wolf pack first involves a male and a female pair establishing a territory. They mark a large area in the forest with scent, which they patrol and defend against other wolves.</p>
  146. <p>The wolves mate in February-March and the young are born in May, in a den.</p>
  147. <p>While the female nurses the young, the male must hunt for the first few weeks.</p>
  148. <p>"At this time, moose calves are small. The male wolf eats as much food as possible and comes back and vomits it up for the female to eat," she said.</p>
  149. <p>After a couple of weeks, the female also begins to take hunting trips while the male remains in the den.</p>
  150. <p><b>Strong attachment</b></p>
  151. <p>"What is exciting about wolf pairs is that they are unbelievably faithful. They stay together all the time," Zimmermann said.</p>
  152. <p>Wolves are monogamous, and usually do not change partners until one dies.</p>
  153. <p>The denning period is mostly the only time when they hunt apart, Zimmermann said.</p>
  154. <p>"More than 70 percent of GPS positions from wolf pairs show they remain within 100 meters of each other. So they are incredibly dependent on each other," she said.</p>
  155. <p>After the denning period, the puppies are carried to a new location, which is usually by a carcass. Then the parents move in star shape around the area. After a few weeks, they are moved to a new location.</p>
  156. <p>In September—October, the young are big enough to start following the adults. But even then they have a common location. The adults go out and hunt together in the evening. Then they go get the pups when they have killed their prey.</p>
  157. <p><b>Quick to become independent</b></p>
  158. <p>By November, the pups are so big that they start to wander a little farther away from their parents. But they stay within the territory.</p>
  159. <p>"There may be individual pups that hang around on their own before they come back to the rest of the pack after two or three weeks," Zimmermann said.</p>
  160. <p>"There is a lot of dynamism from November onwards, where you see that the pups gradually become more and more independent," she said.</p>
  161. <p>Most puppies leave the pack when they are one year old. At this point they have grown to the point where they look like adults. They usually reach puberty their second winter, but this can be delayed if they have remained with their parents.</p>
  162. <p>The first "wave" leaves the pack when the parents mate again, and the second group leaven when the parents have new pups.</p>
  163. <p>At this point, the young wolves go out in search of a partner and a suitable area to establish their own territory.</p>
  164. <p>Some young animals remain in their parents' territory for one to two more years.</p>
  165. <p>Zimmermann describes an example from her GPS studies. This wolf did not leave the pack as a one-year-old, like its siblings did.</p>
  166. <p>"We saw from the GPS data that it was constantly trying to get close to the adults that had new pups. Then it disappeared again, possibly it was chased away," she said. "But in the autumn it returned to the pack and was with the adults and its new siblings all winter, until February-March," she said.</p>
  167. <p>It ended up that this particular wolf established a territory right next to its parents, where there was available space.</p>
  168. <div class="article-gallery lightGallery">
  169. <div data-thumb="https://scx1.b-cdn.net/csz/news/tmb/2021/wolf-packs-dont-actual-3.jpg" data-src="https://scx2.b-cdn.net/gfx/news/2021/wolf-packs-dont-actual-3.jpg" data-sub-html="Two Canadian wolf pups with their mother. Credit: Pat Lauzon / Shutterstock / NTB">
  170. <figure class="article-img text-center">
  171. <img src="https://scx1.b-cdn.net/csz/news/800a/2021/wolf-packs-dont-actual-3.jpg" alt="Wolf packs don't actually have alpha males and alpha females, the idea is based on a misunderstanding" title="Two Canadian wolf pups with their mother. Credit: Pat Lauzon / Shutterstock / NTB">
  172. <figcaption class="text-left text-darken text-truncate text-low-up mt-3">
  173. Two Canadian wolf pups with their mother. Credit: Pat Lauzon / Shutterstock / NTB
  174. </figcaption> </figure>
  175. </div>
  176. </div>
  177. <p><b>Hunting in packs?</b></p>
  178. <p>The findings described above come from the report Ulvevalpers flokksamhold og områdebruk i Skandinavia (Wolf pups' pack cohesion and areal use in Scandinavia).</p>
  179. <p>The researchers wrote that the fact that the young gradually become more independent early on "stands in stark contrast to the perception that a pack of wolves is a close-knit unit that hunts in teams and moves together at all times."</p>
  180. <p>Zimmermann notes that it's usually only the parents that hunt.</p>
  181. <p>"The pups are usually not involved. The pups are not good at hunting themselves either, so they are pampered by the adults," she said.</p>
  182. <p>As a result, the one-year-old pups aren't necessarily that good at hunting before they head off on their own, she said.</p>
  183. <p>"They probably learn a bit from watching their parents, and they may sometimes be on some hunts. But it seems like they are very bad at hunting when they leave the pack," she said.</p>
  184. <p>"We have some data on lone wolves and what they kill. It's not much. It's almost a surprise that they survive. But they are canines, they manage to survive on little food," she said.</p>
  185. <p>But in some places in America, things are a little different. Here you can see large packs of <a href="https://phys.org/tags/wolves/" rel="tag" class="textTag">wolves</a> hunting in teams.</p>
  186. <p><b>Packs with many members</b></p>
  187. <p>There are video recordings, particularly from Yellowstone National Park, of large packs hunting together, Zimmermann said. In this situation, the pack contains several one- to three-year-olds. Wolves were reintroduced to Yellowstone in 1995.</p>
  188. <p>"There are much higher prey densities and completely different conditions," Zimmermann said. "The thing is that when the wolf density increases and there start to be a lot of packs in very small territories, you see that the packs get bigger."</p>
  189. <p>There it is more common for the pups to wait longer to go out on their own. The packs can thus consist of the parents and offspring from the last four years.</p>
  190. <p>There have also been reports of cases from America where a wolf pair "adopts" a young male wolf that is unrelated, at least for a period. L. David Mech and Luigi Boitani wrote about this in their book "Wolves: Behavior, Ecology, and Conservation." As a rule, these intruders are normally chased away or killed.</p>
  191. <p>"We have no documented cases of this in Scandinavia. This is something that has been published from Yellowstone," says Zimmermann.</p>
  192. <p>Other variations that can be seen in <a href="https://phys.org/tags/wolf+packs/" rel="tag" class="textTag">wolf packs</a> is when one of the parents dies and a new partner comes from outside, perhaps with cubs in tow. It has also been observed that a daughter can become a partner with her stepfather and take over for an aging mother who remains in the pack.</p>
  193. <p>In large packs, it can even happen that two bitches give birth to puppies, both mother and daughter.</p>
  194. <p>The daughter is then still subordinate to the mother, but controls her own pups. In such relatively rare cases, it's possible that you can more rightly call the original pair alphas, Mech wrote in his 1999 study.</p>
  195. <p>"The point here is not so much the terminology, but what the terminology falsely implies: a strictly strength-based dominance hierarchy," he wrote.</p>
  196. <p>Packs with two mothers can later be split in two, if the daughter, for example, has mated with an adoptive male.</p>
  197. <p><b>Takes time to change</b></p>
  198. <p>The term alpha wolf is not widely used by wolf researchers today. But it is still well established in our consciousness, Zimmermann said. In the middle of a sentence, she corrects herself.</p>
  199. <p>"Alpha animals ... I mean the leader animals or the adults," she said. "As you can see, it's still in there. But that's completely wrong."</p>
  200. <p>In an article from 2008, David Mech wrote that it is said that it takes 20 years before new research fully sinks in. Perhaps this is also true for the concept of the alpha <a href="https://phys.org/tags/wolf/" rel="tag" class="textTag">wolf</a>.</p>
  201. </article>
  202. <hr>
  203. <footer>
  204. <p>
  205. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  206. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  207. </svg> Accueil</a> •
  208. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  209. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  210. </svg> Suivre</a> •
  211. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  212. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  213. </svg> Pro</a> •
  214. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  215. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  216. </svg> Email</a> •
  217. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  218. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  219. </svg> Légal</abbr>
  220. </p>
  221. <template id="theme-selector">
  222. <form>
  223. <fieldset>
  224. <legend><svg class="icon icon-brightness-contrast">
  225. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  226. </svg> Thème</legend>
  227. <label>
  228. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  229. </label>
  230. <label>
  231. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  232. </label>
  233. <label>
  234. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  235. </label>
  236. </fieldset>
  237. </form>
  238. </template>
  239. </footer>
  240. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  241. <script>
  242. function loadThemeForm(templateName) {
  243. const themeSelectorTemplate = document.querySelector(templateName)
  244. const form = themeSelectorTemplate.content.firstElementChild
  245. themeSelectorTemplate.replaceWith(form)
  246. form.addEventListener('change', (e) => {
  247. const chosenColorScheme = e.target.value
  248. localStorage.setItem('theme', chosenColorScheme)
  249. toggleTheme(chosenColorScheme)
  250. })
  251. const selectedTheme = localStorage.getItem('theme')
  252. if (selectedTheme && selectedTheme !== 'undefined') {
  253. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  254. }
  255. }
  256. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  257. window.addEventListener('load', () => {
  258. let hasDarkRules = false
  259. for (const styleSheet of Array.from(document.styleSheets)) {
  260. let mediaRules = []
  261. for (const cssRule of styleSheet.cssRules) {
  262. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  263. continue
  264. }
  265. // WARNING: Safari does not have/supports `conditionText`.
  266. if (cssRule.conditionText) {
  267. if (cssRule.conditionText !== prefersColorSchemeDark) {
  268. continue
  269. }
  270. } else {
  271. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  272. continue
  273. }
  274. }
  275. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  276. }
  277. // WARNING: do not try to insert a Rule to a styleSheet you are
  278. // currently iterating on, otherwise the browser will be stuck
  279. // in a infinite loop…
  280. for (const mediaRule of mediaRules) {
  281. styleSheet.insertRule(mediaRule.cssText)
  282. hasDarkRules = true
  283. }
  284. }
  285. if (hasDarkRules) {
  286. loadThemeForm('#theme-selector')
  287. }
  288. })
  289. </script>
  290. </body>
  291. </html>