drive 0.17.0 → 0.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8578690e477feee9d2e1d7f1bee314192de30a35adbbee71ab4c2701c8be8150
4
- data.tar.gz: 5b7bb3d5c598ccf0576170520243d5095e8c5dd70fa0a4dadadd972a3531aaba
3
+ metadata.gz: 28a503c4b91fd92ba7b1f6f583b04614cf86fc728d3a5fbd3a1732c449a4d2b1
4
+ data.tar.gz: a4311ea2ba46a32284b04e86ae17b49058cef0b9d8f625ba9375bef15d2fb1e7
5
5
  SHA512:
6
- metadata.gz: 42e6b99c7586b679f5a79a9bcc19e7cc6d6b34398db56ace0c93803510623ca3802f213ec7f7e22f897f6da52615d438d03d08e287557b69f8881020c710f354
7
- data.tar.gz: ef48882a4c7e1973341568cb65c19cc1709e984d346b10feab1830fa7bd8c68cb7cf8871fed60b21910fe4203fdd73f3f3d53985efd91761764b2c89755522b1
6
+ metadata.gz: ec5656a0f255c6786a68779f6aae8ee1d3cd46a429263434137cf8435aa3524c031f5061e87ab43ce4bab2da888ecbe4276137eb0707dec929cda11aebe95617
7
+ data.tar.gz: bdca46e2e38e09481808bba7ac2e35e2849a235dcbc456eda4024e0951e2e24ed835a0a8df30590eaf4edb48df01edd124df97178e9ad94af8d72a12329d728f
data/CHANGELOG.md CHANGED
@@ -6,6 +6,25 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 0.18.1 - 2026-11-07
10
+
11
+ * [ENHANCEMENT] Every page, its header and its footer are 76rem wide on a big screen, the one width of the easy apps
12
+ (68rem until now).
13
+
14
+ ## 0.18.0 - 2026-11-06
15
+
16
+ * [FEATURE] Aircraft avatars, until an aircraft has a picture: `easy_aircraft_avatar(name, size:)` draws one of 20
17
+ silhouettes (sprite `a-*`) in a circle, like a contact's, and `AircraftAvatar.for(type:, engine:, name:, engines:,
18
+ seats:, airliner:)` picks it from the registry's data, a single-engine airplane by its make and model
19
+ (`config/aircraft_avatars.yml`): high or low wing, nose or tail wheel, retractable, biplane, ag plane, floatplane;
20
+ then turboprop, twin, business jet, airliner, helicopter, heavy helicopter, multirotor and fixed-wing drones,
21
+ glider, balloon, trike and powered parachute.
22
+
23
+ ## 0.17.1 - 2026-11-06
24
+
25
+ * [ENHANCEMENT] `easy/modal` takes no `title:` for a dialog whose steps give their own (`#{id}-title`), and a click
26
+ on the dimmed page around it closes it too, as its × and Esc do.
27
+
9
28
  ## 0.17.0 - 2026-11-06
10
29
 
11
30
  * [FEATURE] `render layout: "easy/modal", locals: { id:, title:, close: }` (`open:`, `emoji:`, `classes:`) and
@@ -26,4 +26,25 @@
26
26
  <symbol id="s-rd" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M19.7 5.3a1.6 1.6 0 11-1.5 2l-3.3-.7-1 4.4c2.2.1 4.2.8 5.6 1.9a2.2 2.2 0 113 3 4.3 4.3 0 010 .6c0 3.4-4 6.1-8.5 6.1S5.5 19.9 5.5 16.5v-.6a2.2 2.2 0 113-3c1.4-1 3.3-1.7 5.4-1.8l1.2-5.3 4 .9a1.6 1.6 0 01.6-1.4zM9.3 14.2a1.4 1.4 0 100 2.8 1.4 1.4 0 000-2.8zm5.4 0a1.4 1.4 0 100 2.8 1.4 1.4 0 000-2.8zm-5.2 4.3a.5.5 0 00-.3.9c.9.7 2 1 2.8 1s1.9-.3 2.8-1a.5.5 0 10-.6-.8c-.6.5-1.4.8-2.2.8s-1.6-.3-2.2-.8a.5.5 0 00-.3-.1z"/></symbol>
27
27
  <symbol id="s-wa" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2a10 10 0 00-8.6 15.1L2 22l5-1.3A10 10 0 1012 2zm0 1.8a8.2 8.2 0 11-4.2 15.3l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 0112 3.8zM8.6 7.2c-.2 0-.5 0-.8.3-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.2.2 2.1 3.3 5.2 4.5 2.6 1 3.1.8 3.7.8.6-.1 1.8-.7 2-1.5.3-.7.3-1.3.2-1.5l-.6-.4-2-1c-.3-.1-.5-.1-.7.1l-.9 1.2c-.2.2-.3.2-.6.1-.3-.2-1.3-.5-2.4-1.5-.9-.8-1.5-1.8-1.7-2.1-.2-.3 0-.5.1-.6l.5-.6.3-.5v-.5l-.9-2.3c-.2-.6-.5-.5-.7-.5z"/></symbol>
28
28
  <symbol id="s-em" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" d="M3 5.5h18v13H3zM3.5 6l8.5 7 8.5-7"/></symbol>
29
+ <!-- Aircraft avatars (a-): side views, nose right, drones from above; holes take --avatar-bg. -->
30
+ <symbol id="a-high-wing" viewBox="1 1 46 46" fill="currentColor"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L35 18.6H24.5L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M34.2 19.3L37.6 21H33.8V19.3ZM25.2 19.3H32.8V21H25.2Z" style="fill:var(--avatar-bg,#fff)"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="21.5" y="16.6" width="13.0" height="2.0" rx="0.8"/><line x1="31" y1="18.4" x2="27" y2="26.4" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="38.5" y1="27" x2="38.5" y2="32.2" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="38.5" cy="33.6" r="2"/><line x1="28" y1="27" x2="29" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="29" cy="33.6" r="2.3"/></symbol>
31
+ <symbol id="a-high-wing-tailwheel" viewBox="1 1 46 46" fill="currentColor"><g transform="rotate(-8 24 28)"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L35 18.6H24.5L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M34.2 19.3L37.6 21H33.8V19.3ZM25.2 19.3H32.8V21H25.2Z" style="fill:var(--avatar-bg,#fff)"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="21.5" y="16.6" width="13.0" height="2.0" rx="0.8"/><line x1="31" y1="18.4" x2="27" y2="26.4" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="32.5" y1="27" x2="34" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="34" cy="33.6" r="2.3"/><line x1="7.5" y1="23.8" x2="7" y2="25.6" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><circle cx="7" cy="26.2" r="1.1"/></g></symbol>
32
+ <symbol id="a-low-wing" viewBox="1 1 46 46" fill="currentColor"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L35 18.6H24.5L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M34.2 19.3L37.6 21H33.8V19.3ZM25.2 19.3H32.8V21H25.2Z" style="fill:var(--avatar-bg,#fff)"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="20" y="26.4" width="14.5" height="2.0" rx="0.8"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="38.5" y1="27" x2="38.5" y2="32.2" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="38.5" cy="33.6" r="2"/><line x1="28" y1="27" x2="29" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="29" cy="33.6" r="2.3"/></symbol>
33
+ <symbol id="a-low-wing-retractable" viewBox="1 1 46 46" fill="currentColor"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L35 18.6H24.5L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M34.2 19.3L37.6 21H33.8V19.3ZM25.2 19.3H32.8V21H25.2Z" style="fill:var(--avatar-bg,#fff)"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="20" y="26.4" width="14.5" height="2.0" rx="0.8"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/></symbol>
34
+ <symbol id="a-low-wing-tailwheel" viewBox="1 1 46 46" fill="currentColor"><g transform="rotate(-8 24 28)"><path d="M43.5 24.2C43.5 22 41.5 21 39 21H31L28 18.4C26.5 17.6 23.5 17.6 22 18.6L19.5 21H9L5 21.4V24L24 27H38.5C41.5 27 43.5 26.4 43.5 24.2Z"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="20" y="26.4" width="14.5" height="2.0" rx="0.8"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="32.5" y1="27" x2="34" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="34" cy="33.6" r="2.3"/><line x1="7.5" y1="23.8" x2="7" y2="25.6" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><circle cx="7" cy="26.2" r="1.1"/></g></symbol>
35
+ <symbol id="a-biplane" viewBox="1 1 46 46" fill="currentColor"><g transform="rotate(-8 24 28)"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L31 20.4C30 18.4 26.5 18.4 25.5 20.4L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="20" y="13.6" width="14" height="2.0" rx="0.8"/><line x1="25" y1="15.4" x2="26.5" y2="19.5" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><line x1="29.5" y1="15.4" x2="30" y2="19" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="21" y="26.4" width="13" height="1.8" rx="0.8"/><line x1="22" y1="15.4" x2="22" y2="26.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><line x1="32.5" y1="15.4" x2="32.5" y2="26.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="32.5" y1="27" x2="34" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="34" cy="33.6" r="2.3"/><line x1="7.5" y1="23.8" x2="7" y2="25.6" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><circle cx="7" cy="26.2" r="1.1"/></g></symbol>
36
+ <symbol id="a-ag-plane" viewBox="1 1 46 46" fill="currentColor"><g transform="rotate(-8 24 28)"><path d="M43.5 24.4C43.5 22.2 42 21.4 40 21.2L37 18.8H31.5L28.5 15.6C27.5 14.8 24.5 14.8 23.5 15.8L21.5 19.6L9 21.4H5V24.2L24 27.6H38.5C41.5 27.6 43.5 26.6 43.5 24.4Z"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="20" y="26.4" width="14.5" height="2.0" rx="0.8"/><rect x="19.5" y="29.4" width="15.5" height="0.8" rx="0.4"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><line x1="32.5" y1="27" x2="34" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="34" cy="33.6" r="2.3"/><line x1="7.5" y1="23.8" x2="7" y2="25.6" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><circle cx="7" cy="26.2" r="1.1"/></g></symbol>
37
+ <symbol id="a-floatplane" viewBox="1 1 46 46" fill="currentColor"><path d="M43.5 24.2C43.5 22 41.5 20.8 39 20.6L35 18.6H24.5L9 21.4H5V24.2L24 27.2H38.5C41.5 27.2 43.5 26.4 43.5 24.2Z"/><path d="M34.2 19.3L37.6 21H33.8V19.3ZM25.2 19.3H32.8V21H25.2Z" style="fill:var(--avatar-bg,#fff)"/><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="21.5" y="16.6" width="13.0" height="2.0" rx="0.8"/><line x1="31" y1="18.4" x2="27" y2="26.4" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="44.4" y="15.5" width="1.2" height="17.4" rx="0.6"/><circle cx="44.2" cy="24.2" r="1.4"/><path d="M13 32.4H38C41 32.4 42.6 31.4 43.4 29.8L44 30.6C43.4 33 41.4 34.8 38 34.8H15L13 33.8Z"/><line x1="22" y1="27" x2="21" y2="32.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><line x1="33.5" y1="27" x2="34.5" y2="32.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/></symbol>
38
+ <symbol id="a-single-turboprop" viewBox="1 1 46 46" fill="currentColor"><path d="M45 24.4C45 22.6 43.6 21.6 41.6 21.4L33 20.8L30 18.4H21L7 21.2H3.6V24L22 27.4H41.6C43.8 27.4 45 26.4 45 24.4Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M29.2 19.1L31 20.6H28.4V19.1Z"/><rect x="21.6" y="19.1" width="5.8" height="1.5" rx="0.3"/></g><rect x="35.5" y="19.6" width="2.5" height="2.0" rx="0.5"/><path d="M3.6 21.4L2.6 11.6H6.6L13 21Z"/><rect x="1.2" y="21" width="10.4" height="1.4" rx="0.7"/><rect x="18" y="16.4" width="14" height="2.0" rx="0.8"/><line x1="28" y1="18.2" x2="24.6" y2="26.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><path d="M17 27.4H34C35.4 27.4 36 28 36 28.8C36 29.6 35.4 30.2 34 30.2H19Z"/><rect x="45.6" y="15.4" width="1.2" height="18.0" rx="0.6"/><line x1="40" y1="27.4" x2="40" y2="31.6" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="40" cy="33.2" r="1.8"/><line x1="26" y1="30" x2="27" y2="32" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="27" cy="33.4" r="2.1"/></symbol>
39
+ <symbol id="a-twin" viewBox="1 1 46 46" fill="currentColor"><path d="M45 24.6C45 22.8 43 21.6 40 21.2L35.4 18.6H24.5L9 21.4H5V24.2L24 27.2H40C43 27.2 45 26.4 45 24.6Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M34.6 19.3L37.8 21H34.2V19.3Z"/><rect x="25.2" y="19.3" width="7.8" height="1.7" rx="0.3"/></g><path d="M5 21.6L4 12.6H7.6L14 21Z"/><rect x="2.5" y="21.2" width="10.0" height="1.4" rx="0.7"/><rect x="19" y="26.4" width="14" height="2.0" rx="0.8"/><path d="M20 24.2H34.6C37.2 24.2 38.4 25.8 38.4 27.6C38.4 29.4 37.2 31 34.6 31H20Z"/><ellipse cx="38.4" cy="27.6" rx="0.8" ry="7"/></symbol>
40
+ <symbol id="a-business-jet" viewBox="1 1 46 46" fill="currentColor"><path d="M46.6 24.8C45 22.6 42.6 21.2 39 20.8L36 19.2H20L7 21.2H4V24.4L20 27H38C42.6 27 45.6 26.2 46.6 24.8Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M37.8 20.2L39.8 21.2H37.2Z"/><circle cx="32" cy="21.2" r="0.8"/><circle cx="29" cy="21.2" r="0.8"/><circle cx="26" cy="21.2" r="0.8"/><circle cx="23" cy="21.4" r="0.8"/></g><path d="M4.4 21.4L5.4 10.6H8.4L13.6 21Z"/><rect x="2.6" y="9.8" width="8.8" height="1.4" rx="0.7"/><path d="M9 17.4H17C19 17.4 20 18.4 20 19.4C20 20.4 19 21.4 17 21.4H9Z"/><path d="M18 26.4L30 26.2L34 27.8L22 28.4Z"/></symbol>
41
+ <symbol id="a-airliner" viewBox="1 1 46 46" fill="currentColor"><path d="M47 24.6C46 22.4 44 21.2 41 21.2H8L3.4 18.6H1V24.4L6 27.4H41C44 27.4 46.4 26.2 47 24.6Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M42 22.2L44.4 23.2H41.6Z"/><circle cx="10" cy="23" r="0.55"/><circle cx="13" cy="23" r="0.55"/><circle cx="16" cy="23" r="0.55"/><circle cx="19" cy="23" r="0.55"/><circle cx="22" cy="23" r="0.55"/><circle cx="25" cy="23" r="0.55"/><circle cx="28" cy="23" r="0.55"/><circle cx="31" cy="23" r="0.55"/><circle cx="34" cy="23" r="0.55"/><circle cx="37" cy="23" r="0.55"/></g><path d="M1.4 19L1 8.8H4.4L11.2 21.2Z"/><rect x="0" y="20.4" width="8.6" height="1.4" rx="0.7"/><path d="M18 26.6L30 26.4L34 28.4L22 29Z"/><path d="M24 28.2H31C32.6 28.2 33.4 29 33.4 30C33.4 31 32.6 31.8 31 31.8H24Z"/></symbol>
42
+ <symbol id="a-helicopter" viewBox="1 1 46 46" fill="currentColor"><path d="M39 26.4C39 21.4 36 18.4 31 18.4H27L24.6 16.4H18.6L16 19L4.6 21.6V23.4L19 25.4C19.6 28.4 21.6 30 24.6 30H35.4C37.6 30 39 28.6 39 26.4Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M31.4 19.8C35 19.8 37.4 22.4 37.6 25.8H32Z"/><rect x="25.4" y="20.6" width="4.0" height="4.4" rx="0.6"/></g><rect x="22.6" y="12.6" width="1.8" height="4" rx="0.5"/><rect x="4" y="11.4" width="40" height="1.4" rx="0.7"/><path d="M4.8 22L3 13.6H5.6L8.8 21.6Z"/><rect x="9" y="21.4" width="6" height="1.2" rx="0.5"/><circle cx="4.4" cy="17.4" r="2.6" fill="none" stroke="currentColor" stroke-width="0.8"/><line x1="25" y1="30" x2="24.4" y2="33" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><line x1="35" y1="30" x2="35.6" y2="33" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><rect x="20" y="32.8" width="20" height="1.2" rx="0.6"/></symbol>
43
+ <symbol id="a-heavy-helicopter" viewBox="1 1 46 46" fill="currentColor"><path d="M43 26C43 22 40.4 19.6 36.4 19.4L33 17.4H17.4L15 19.6L3.6 20.4V22.8L15 24.4V28.4C15 29.4 15.8 30 17 30H39.4C41.6 30 43 28.6 43 26Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M37 20.8C39.6 21 41.2 22.6 41.6 25H37.4Z"/><rect x="30" y="21.4" width="4.4" height="3.0" rx="0.5"/><rect x="23.4" y="21.4" width="4.4" height="3.0" rx="0.5"/><rect x="17.6" y="21.4" width="4.0" height="3.0" rx="0.5"/></g><path d="M14.6 17.4H34.6L33 15.6H17Z"/><rect x="24.4" y="11.4" width="2.0" height="4.4" rx="0.5"/><rect x="2.4" y="10.4" width="44.6" height="1.4" rx="0.7"/><path d="M4 21L2.4 12.6H5.4L9 20.6Z"/><rect x="5" y="19.4" width="7" height="1.2" rx="0.5"/><line x1="37" y1="30" x2="37" y2="32.6" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="37" cy="34" r="1.8"/><line x1="21" y1="30" x2="21" y2="32.6" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><circle cx="21" cy="34" r="1.9"/><circle cx="4.6" cy="23.6" r="1"/></symbol>
44
+ <symbol id="a-multirotor-drone" viewBox="1 1 46 46" fill="currentColor"><g transform="translate(24 24) scale(.84) translate(-24 -24)"><line x1="11" y1="11" x2="37" y2="37" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/><line x1="37" y1="11" x2="11" y2="37" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"/><circle cx="11" cy="11" r="7.4" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="37" cy="11" r="7.4" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="11" cy="37" r="7.4" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="37" cy="37" r="7.4" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="11" cy="11" r="1.6"/><circle cx="37" cy="11" r="1.6"/><circle cx="11" cy="37" r="1.6"/><circle cx="37" cy="37" r="1.6"/><rect x="18.4" y="17" width="11.2" height="14" rx="3"/><g style="fill:var(--avatar-bg,#fff)"><rect x="20.6" y="19.6" width="6.8" height="4.4" rx="1.4"/></g><rect x="9" y="40.6" width="30" height="1.4" rx="0.7"/></g></symbol>
45
+ <symbol id="a-fixed-wing-drone" viewBox="1 1 46 46" fill="currentColor"><g transform="translate(24 24) scale(.84) translate(-24 -24)"><path d="M24 6C25.6 6 26.6 7.6 26.6 10V36H21.4V10C21.4 7.6 22.4 6 24 6Z"/><rect x="2" y="17" width="44" height="4.4" rx="1.4"/><rect x="11" y="9" width="2" height="26" rx="1"/><rect x="35" y="9" width="2" height="26" rx="1"/><circle cx="12" cy="9" r="4.4" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="12" cy="35" r="4.4" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="36" cy="9" r="4.4" fill="none" stroke="currentColor" stroke-width="1.1"/><circle cx="36" cy="35" r="4.4" fill="none" stroke="currentColor" stroke-width="1.1"/><rect x="17" y="36" width="14" height="2" rx="0.8"/><ellipse cx="24" cy="40" rx="5.4" ry="1"/></g></symbol>
46
+ <symbol id="a-glider" viewBox="1 1 46 46" fill="currentColor"><path d="M46 24.4C46 23 44 22.2 41 21.8L36 20.2C34.4 19.4 31 19.4 29.6 20.4L28 21.4L8 22.6H4.4V24.6L8 25.2L28 27H40C44 27 46 25.8 46 24.4Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M35.8 21.4C34.6 20.4 31.6 20.4 30.4 21.4Z"/></g><path d="M4.6 22.8L5.6 12H8.4L12 22.6Z"/><rect x="3.4" y="11.2" width="8.2" height="1.2" rx="0.6"/><rect x="22" y="22.2" width="11" height="1.4" rx="0.6"/><circle cx="30.4" cy="28" r="1.6"/></symbol>
47
+ <symbol id="a-balloon" viewBox="1 1 46 46" fill="currentColor"><path d="M24 2.6C32.6 2.6 38.6 8.4 38.6 16.4C38.6 23.6 31.6 29 27.2 32.6H20.8C16.4 29 9.4 23.6 9.4 16.4C9.4 8.4 15.4 2.6 24 2.6Z"/><g style="fill:var(--avatar-bg,#fff)"><path d="M19.6 4.4C17.4 9 17 20 21.4 31.6H22.6C19.4 20 19.8 9 21.6 3.8Z"/><path d="M28.4 4.4C30.6 9 31 20 26.6 31.6H25.4C28.6 20 28.2 9 26.4 3.8Z"/></g><line x1="21" y1="32.6" x2="21.6" y2="38.6" stroke="currentColor" stroke-width="0.7" stroke-linecap="round"/><line x1="27" y1="32.6" x2="26.4" y2="38.6" stroke="currentColor" stroke-width="0.7" stroke-linecap="round"/><rect x="20.4" y="38.2" width="7.2" height="6.0" rx="0.8"/></symbol>
48
+ <symbol id="a-trike" viewBox="1 1 46 46" fill="currentColor"><path d="M2 17.6L42 8.4C43.6 8.2 44.6 9 44.2 10.2L43.6 11.4L4 19.8Z"/><line x1="26" y1="13.6" x2="24" y2="25" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/><line x1="26" y1="13.6" x2="34.6" y2="22.6" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><line x1="26" y1="13.6" x2="30.6" y2="23.4" stroke="currentColor" stroke-width="0.9" stroke-linecap="round"/><line x1="30.6" y1="23.4" x2="34.6" y2="22.6" stroke="currentColor" stroke-width="1.1" stroke-linecap="round"/><path d="M38 27.4C38 25.4 36 24 33 24H24L20 25V29.4H34C36.6 29.4 38 28.8 38 27.4Z"/><ellipse cx="18.4" cy="27.2" rx="1" ry="6.2"/><line x1="34" y1="29.4" x2="35" y2="32.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><circle cx="35" cy="34.2" r="1.8"/><line x1="23" y1="29.4" x2="22" y2="32.6" stroke="currentColor" stroke-width="1" stroke-linecap="round"/><circle cx="22" cy="34.2" r="1.9"/></symbol>
49
+ <symbol id="a-powered-parachute" viewBox="1 1 46 46" fill="currentColor"><path d="M4 13C10 4 38 4 44 13L41.6 14.6C35.6 8 12.4 8 6.4 14.6Z"/><line x1="7" y1="14" x2="22" y2="30" stroke="currentColor" stroke-width="0.6" stroke-linecap="round"/><line x1="17" y1="8.4" x2="23" y2="30" stroke="currentColor" stroke-width="0.6" stroke-linecap="round"/><line x1="31" y1="8.4" x2="25" y2="30" stroke="currentColor" stroke-width="0.6" stroke-linecap="round"/><line x1="41" y1="14" x2="26" y2="30" stroke="currentColor" stroke-width="0.6" stroke-linecap="round"/><path d="M34 32C34 30.2 32 29 29 29H20L16 30V34H30C32.6 34 34 33.4 34 32Z"/><circle cx="14.4" cy="31" r="5.2" fill="none" stroke="currentColor" stroke-width="1"/><circle cx="29" cy="36.4" r="1.7"/><circle cx="20" cy="36.4" r="1.8"/></symbol>
29
50
  </svg>
@@ -1,4 +1,4 @@
1
- // Every dialog of render "easy/modal" lets its reader out: its × or Esc closes it where it is, without loading a page,
1
+ // Every dialog of render "easy/modal" lets its reader out: its ×, Esc or a click around it closes it where it is, without loading a page,
2
2
  // and the address becomes the × link's (the page without what opened it), or loses the #id that opened it. A link to
3
3
  // that #id opens it again. Without the script, the × is a plain link.
4
4
  // ES5 alone: every easy app has to work on old iPhones, Androids and Windows browsers.
@@ -7,7 +7,7 @@
7
7
 
8
8
  function close(modal) {
9
9
  var link = modal.querySelector('.modal-x'), href = link && link.getAttribute('href');
10
- modal.className = modal.className.replace(/\s*\bis-open\b/g, '') + ' is-closed';
10
+ modal.className = modal.className.replace(/\s*\bis-(open|closed)\b/g, '') + ' is-closed';
11
11
  if (!window.history || !history.replaceState) { return; }
12
12
  if (href && href.charAt(0) !== '#') { history.replaceState(null, '', href + location.hash); }
13
13
  else if (location.hash === '#' + modal.id) { history.replaceState(null, '', location.pathname + location.search); }
@@ -28,8 +28,10 @@
28
28
  return node && node.nodeType === 1 ? node : null;
29
29
  }
30
30
 
31
+ // The ×, or the dimmed page around the box (the dialog itself, not what it holds).
31
32
  document.addEventListener('click', function (event) {
32
- var x = up(event.target, 'modal-x'), modal = x && up(x, 'modal');
33
+ var x = up(event.target, 'modal-x');
34
+ var modal = x ? up(x, 'modal') : /(^|\s)modal(\s|$)/.test(event.target.className) && event.target;
33
35
  if (!modal) { return; }
34
36
  event.preventDefault();
35
37
  close(modal);
@@ -369,3 +369,8 @@ a.tooltip-trigger:hover,a.tooltip-trigger:focus{box-shadow:0 0 0 2px currentColo
369
369
  .sky .trail{-webkit-transition:opacity 1.2s;transition:opacity 1.2s}
370
370
  .sky.is-gone .trail{opacity:0}
371
371
  .sky.is-gone .flyer{visibility:hidden}
372
+
373
+ /* aircraft-avatar (easy_aircraft_avatar): an aircraft's silhouette in a circle until it has a picture, in the soft
374
+ primary of the theme; the silhouette's windows show the circle through (--avatar-bg). */
375
+ .aircraft-avatar{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:40px;border-radius:50%;background:var(--color-primary-soft);color:var(--color-on-primary-soft);--avatar-bg:var(--color-primary-soft);vertical-align:middle;overflow:hidden}
376
+ .aircraft-avatar svg{width:88%;height:88%}
@@ -6,7 +6,7 @@
6
6
  :root[data-theme="dark"] .i-sun{display:none}
7
7
  :root[data-theme="dark"] .i-moon{display:inline-block}
8
8
  @media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .i-sun{display:none}:root:not([data-theme="light"]) .i-moon{display:inline-block}}
9
- .page-width{max-width:68rem;margin:0 auto;padding:0 16px}
9
+ .page-width{max-width:76rem;margin:0 auto;padding:0 16px}
10
10
  .site-header{border-bottom:1px solid var(--color-line);background:var(--color-bg)}
11
11
  .site-header .page-width{display:flex;align-items:center;justify-content:space-between;min-height:60px}
12
12
  .site-header .page-width>div{white-space:nowrap}
@@ -30,11 +30,11 @@
30
30
 
31
31
  /* The page: its width, or the whole window (wide) for content that lays out its own (.page-width). */
32
32
  /* It grows to fill the window's height, so the footer under it is at the window's bottom (easy/base.css, body). */
33
- .page{max-width:68rem;margin:0 auto;padding:0 16px;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;-ms-flex-item-align:stretch;align-self:stretch;width:100%}
33
+ .page{max-width:76rem;margin:0 auto;padding:0 16px;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;-ms-flex-item-align:stretch;align-self:stretch;width:100%}
34
34
  .page.wide{max-width:none;padding:0}
35
35
 
36
36
  .site-footer{-ms-flex-negative:0;flex-shrink:0;background:var(--color-surface-1);border-top:1px solid var(--color-line);font-size:15px;color:var(--color-text-2)}
37
- .site-footer-inner{max-width:68rem;margin:0 auto;padding:0 16px}
37
+ .site-footer-inner{max-width:76rem;margin:0 auto;padding:0 16px}
38
38
  .site-footer a{color:var(--color-text-2)}
39
39
  .site-footer a:hover{color:var(--color-primary)}
40
40
  .site-footer-note{text-align:center;margin:0 auto;padding:12px 0;line-height:1.7}
@@ -16,5 +16,13 @@ module Drive
16
16
  # Both hrefs: the old Safaris every page is meant for read only xlink:href.
17
17
  tag.svg(tag.use('xlink:href': href, href:), class:, aria: { hidden: true }, focusable: false)
18
18
  end
19
+
20
+ # An aircraft's avatar until it has a picture: its silhouette in a circle, like a contact's.
21
+ # @param name [String] AircraftAvatar.for's answer, "high-wing-tailwheel".
22
+ # @param size [Integer] the circle's width and height in pixels.
23
+ def easy_aircraft_avatar(name, size: 40)
24
+ icon = easy_icon(easy_icon_href(name, 'a'), class: nil)
25
+ tag.span(icon, class: 'aircraft-avatar', style: "width:#{size}px;height:#{size}px")
26
+ end
19
27
  end
20
28
  end
@@ -0,0 +1,59 @@
1
+ # Which of drive's 20 aircraft avatars (sprite a-*, easy_aircraft_avatar) draws an aircraft before
2
+ # anyone has a picture of it: from what the registry says it is, and for a single-engine airplane
3
+ # from its make and model too (config/aircraft_avatars.yml), so a Cub, a 172 and a Bonanza differ.
4
+ module AircraftAvatar
5
+ # The single-engine airplane families by make and model, in the order they are tried.
6
+ FAMILIES = YAML.load_file(File.expand_path('../../config/aircraft_avatars.yml', __dir__))
7
+ .transform_values { Regexp.new(it.join('|'), Regexp::IGNORECASE) }.freeze
8
+
9
+ # The engine types that turn no propeller and no rotor of their own.
10
+ JETS = %w[turbo_jet turbo_fan].freeze
11
+
12
+ # The families a single turboprop keeps (an Air Tractor), rather than being drawn as one.
13
+ TURBOPROP_FAMILIES = %w[ag-plane fixed-wing-drone].freeze
14
+
15
+ # @param type [String] the registry's type of aircraft: "fixed_wing_single_engine", "rotorcraft"…
16
+ # @param engine [String, nil] the registry's type of engine: "reciprocating", "electric"…
17
+ # @param name [String, nil] its make and model, "Piper PA-18-150".
18
+ # @param engines [Integer, nil] how many engines its model has.
19
+ # @param seats [Integer, nil] how many seats its model has.
20
+ # @param airliner [Boolean] whether its model is an airliner (30 seats or more, or its freighter).
21
+ # @return [String] the avatar's name in the sprite, without its a-: "high-wing-tailwheel".
22
+ def self.for(type:, engine: nil, name: nil, engines: nil, seats: nil, airliner: false)
23
+ case type.to_s
24
+ when 'balloon', 'blimp' then 'balloon'
25
+ when 'glider' then 'glider'
26
+ when 'weight_shift_control' then 'trike'
27
+ when 'powered_parachute' then 'powered-parachute'
28
+ when 'hybrid_lift' then 'fixed-wing-drone'
29
+ when 'rotorcraft', 'gyroplane' then rotorcraft(engine, engines.to_i, seats.to_i)
30
+ when 'fixed_wing_multi_engine' then multi_engine(engine, airliner)
31
+ else single_engine(engine, name.to_s)
32
+ end
33
+ end
34
+
35
+ class << self
36
+ private
37
+
38
+ def rotorcraft(engine, engines, seats)
39
+ return 'multirotor-drone' if engine == 'electric'
40
+
41
+ engines > 1 || seats > 8 ? 'heavy-helicopter' : 'helicopter'
42
+ end
43
+
44
+ def multi_engine(engine, airliner)
45
+ return 'twin' unless JETS.include?(engine)
46
+
47
+ airliner ? 'airliner' : 'business-jet'
48
+ end
49
+
50
+ def single_engine(engine, name)
51
+ return 'business-jet' if JETS.include?(engine)
52
+
53
+ family = FAMILIES.find { |_, pattern| pattern.match?(name) }&.first
54
+ return family if family && (engine != 'turbo_prop' || TURBOPROP_FAMILIES.include?(family))
55
+
56
+ engine == 'turbo_prop' ? 'single-turboprop' : family || 'high-wing'
57
+ end
58
+ end
59
+ end
@@ -1,13 +1,14 @@
1
- <%# locals: (id:, title:, close:, open: false, emoji: nil, classes: nil) -%>
1
+ <%# locals: (id:, close:, title: nil, open: false, emoji: nil, classes: nil) -%>
2
2
  <%# A dialog over the page, rendered as a layout around what it holds (render layout: "easy/modal" do … end), which
3
- always lets its reader out: its ×, Esc (easy/modal.js, which the page includes once), or without the script the
3
+ always lets its reader out: its ×, Esc or a click around it (easy/modal.js, which the page includes once), or without the script the
4
4
  × as a link. Shown when its address's #id names it, or open: true (drawn already open, say once a form asked).
5
5
  close: where the × leads, "#" for a dialog opened by its #id, the page without what opened it otherwise.
6
+ title: its heading; without one, what it holds gives its own, with the id "#{id}-title" (one per step, say).
6
7
  classes: the app's own, beside modal, to style what it holds. -%>
7
8
  <%= tag.div id:, class: [ "modal", ("is-open" if open), classes ], role: "dialog", aria: { modal: true, labelledby: "#{id}-title" } do %>
8
9
  <div class="modal-box">
9
10
  <%= link_to "×", close, class: "modal-x", aria: { label: "Close" } %>
10
- <h2 id="<%= id %>-title"><% if emoji %><span aria-hidden="true"><%= emoji %></span> <% end %><%= title %></h2>
11
+ <% if title %><h2 id="<%= id %>-title"><% if emoji %><span aria-hidden="true"><%= emoji %></span> <% end %><%= title %></h2><% end %>
11
12
  <%= yield %>
12
13
  </div>
13
14
  <% end %>
@@ -0,0 +1,26 @@
1
+ # The single-engine airplane families easyFAA tells apart by make and model ("Cessna 172N",
2
+ # "Piper PA-18-150", "Van's RV-8"), tried in this order, the first pattern found in the name
3
+ # winning. A name no pattern finds is drawn high-wing, as the commonest. Case is ignored.
4
+ fixed-wing-drone:
5
+ - v-?bat|zipline|\buav\b|\buas\b|unmanned|drone
6
+ biplane:
7
+ - stearman|\bpt-?1[37]\b|\bn2s\b|pitts|\bs-?[12][abcs]?\b|waco|great lakes|starduster|skybolt|acro ?sport
8
+ - hatz|miniplane|christen|eagle ii|\bultimate\b|tiger moth|\bjungmann
9
+ ag-plane:
10
+ - air tractor|\bat-?[3-8]\d\d|thrush|\bs-?2r|ag-?cat|g-?164|\bpa-?25|pawnee|\bpa-?36|ag ?(wagon|truck|husky)|\b188\b
11
+ floatplane:
12
+ - \blake\b|\bla-?(4|250)|searey|sea rey|icon a5|seawind|\bg-?(21|44|73)\b|goose|widgeon|seabee|rc-?3\b|skimmer|catalina
13
+ low-wing-tailwheel:
14
+ - \brv-?[3468]\b(?!a)|\bat-?6\b|\bt-?6\b|\bsnj\b|harvard|\bp-?51\b|mustang|\bpt-?(19|22|26)\b|\bextra\b|\bea-?300
15
+ - edge 540|\bgiles\b|\blaser\b|\bcap ?(10|21|23)|\bsu-?(26|29|31)\b|\bt-?28\b
16
+ high-wing-tailwheel:
17
+ - \bj-?[2345]\b|\bpa-?(11|12|14|16|17|18|20)\b|cub|aeronca|champ|citabria|decathlon|scout|\b7[acegk]c|\b8kcab
18
+ - taylorcraft|\bbc-?12|cessna (a)?1(20|40|70|80|85|95)|\b(a)?185|maule|husky|\baviat\b|stinson|luscombe|kitfox|savage
19
+ - \bm-?[4-7]\b|helio|courier|\bdhc-?2\b|beaver|\bl-?(2|3|4|16|19)\b|bird ?dog|super ?cub|carbon ?cub|backcountry
20
+ low-wing-retractable:
21
+ - mooney|\bm20|(beech|raytheon|textron|hawker).*\b[a-v]?(33|35|36)[a-z]?\b|bonanza|debonair|\bpa-?(24|28r|30|32r|39|46)\b|comanche|arrow|saratoga
22
+ - lance|\bt-?34\b|meridian|malibu|mirage|navion|\bm-?18|\bb-?24r|sierra|swift|\bgc-?1|viking|\b17-?3\d|bellanca 14
23
+ low-wing:
24
+ - \bpa-?(28|32|38)\b|cherokee|warrior|archer|cadet|tomahawk|cirrus|\bsr-?2[02]|\bda-?(20|40)|diamond|katana
25
+ - \baa-?(1|5)|grumman|tiger|cheetah|traveler|musketeer|sundowner|\bbe-?23|\bc-?23\b|\brv-?\d+|ercoupe|aircoupe|\balon\b
26
+ - lancair|glasair|sonex|zenith|\bch-?[67]\d\d|tecnam|evektor|sportstar|\bsr-?20
data/lib/drive/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Drive
2
2
  # Version of the gem, read by the gemspec.
3
- VERSION = '0.17.0'.freeze
3
+ VERSION = '0.18.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
@@ -49,6 +49,7 @@ files:
49
49
  - app/controllers/concerns/rate_limited.rb
50
50
  - app/controllers/drive/errors_controller.rb
51
51
  - app/helpers/drive/easy_helper.rb
52
+ - app/models/aircraft_avatar.rb
52
53
  - app/models/crawler.rb
53
54
  - app/models/designation.rb
54
55
  - app/models/n_number.rb
@@ -61,6 +62,7 @@ files:
61
62
  - app/views/easy/mailer/_code.text.erb
62
63
  - app/views/layouts/drive/errors.html.erb
63
64
  - app/views/layouts/easy/site.html.erb
65
+ - config/aircraft_avatars.yml
64
66
  - lib/drive.rb
65
67
  - lib/drive/cloudflare.rb
66
68
  - lib/drive/engine.rb