@heycys/gallery 0.1.2 → 0.2.0

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.
Files changed (292) hide show
  1. package/THIRD-PARTY-NOTICES.md +2 -2
  2. package/browser/editor/components/align.mjs +58 -0
  3. package/browser/editor/components/code/index.mjs +1 -1
  4. package/browser/editor/components/embed/page.mjs +1 -1
  5. package/browser/editor/components/file/page.mjs +4 -4
  6. package/browser/editor/components/heading/index.mjs +7 -6
  7. package/browser/editor/components/icons.mjs +3 -0
  8. package/browser/editor/components/image/index.mjs +2 -0
  9. package/browser/editor/components/image/page.mjs +172 -90
  10. package/browser/editor/components/installed/index.mjs +6 -2
  11. package/browser/editor/components/installed/page.mjs +80 -13
  12. package/browser/editor/components/media/icons.mjs +13 -8
  13. package/browser/editor/components/media/page.mjs +5 -3
  14. package/browser/editor/components/media/toolbar.mjs +12 -3
  15. package/browser/editor/components/paragraph/index.mjs +4 -3
  16. package/browser/editor/components/registry.mjs +17 -5
  17. package/browser/editor/components/table/index.mjs +4 -2
  18. package/browser/editor/page/after/index.mjs +288 -0
  19. package/browser/editor/page/align.mjs +91 -0
  20. package/browser/editor/page/beside.mjs +5 -6
  21. package/browser/editor/page/block-menu/index.mjs +6 -3
  22. package/browser/editor/page/blocks.mjs +3 -1
  23. package/browser/editor/page/board/hint.mjs +64 -27
  24. package/browser/editor/page/board/index.mjs +160 -71
  25. package/browser/editor/page/board/motion.mjs +177 -0
  26. package/browser/editor/page/board/settings.mjs +4 -3
  27. package/browser/editor/page/clipboard/index.mjs +10 -3
  28. package/browser/editor/page/clipboard/own/blocks.mjs +3 -4
  29. package/browser/editor/page/clipboard/own/describe.mjs +6 -2
  30. package/browser/editor/page/commit.mjs +2 -2
  31. package/browser/editor/page/core.mjs +3 -1
  32. package/browser/editor/page/custom-page.mjs +15 -11
  33. package/browser/editor/page/editor.mjs +31 -14
  34. package/browser/editor/page/history.mjs +19 -4
  35. package/browser/editor/page/insert/index.mjs +20 -22
  36. package/browser/editor/page/menu.mjs +15 -7
  37. package/browser/editor/page/page-objects.mjs +3 -7
  38. package/browser/editor/page/present-links.mjs +5 -4
  39. package/browser/editor/page/present-shell.mjs +63 -0
  40. package/browser/editor/page/selection/index.mjs +10 -2
  41. package/browser/editor/page/table/binding.mjs +87 -0
  42. package/browser/editor/page/table/icons.mjs +0 -2
  43. package/browser/editor/page/table/index.mjs +10 -14
  44. package/browser/editor/page/table/views.mjs +5 -52
  45. package/browser/editor/page/table/widths.mjs +82 -10
  46. package/browser/editor/page/typing/index.mjs +44 -12
  47. package/browser/editor/page/typing/leave.mjs +19 -5
  48. package/browser/shared/block-packs.mjs +23 -8
  49. package/browser/shared/component-catalog.mjs +15 -8
  50. package/browser/shared/component-source.mjs +3 -1
  51. package/browser/shared/components/heading.mjs +2 -1
  52. package/browser/shared/components/installed.mjs +1 -1
  53. package/browser/shared/components/page.mjs +2 -0
  54. package/browser/shared/components/paragraph.mjs +8 -1
  55. package/browser/shared/components/table.mjs +1 -0
  56. package/browser/shared/emoji/line-icons.mjs +37 -0
  57. package/browser/shared/http.mjs +9 -0
  58. package/browser/shared/i18n/en.mjs +40 -17
  59. package/browser/shared/outline.mjs +30 -2
  60. package/browser/shared/pack-manifest.mjs +12 -1
  61. package/browser/shared/pages.mjs +169 -57
  62. package/browser/shared/pinyin.mjs +92 -0
  63. package/browser/shared/present-step.mjs +17 -0
  64. package/browser/shared/sidebar-head.mjs +70 -0
  65. package/browser/shared/web-links.mjs +5 -0
  66. package/dist/chunk-2OHANJ6Q.mjs +2 -0
  67. package/dist/{chunk-QOUEFUCH.mjs → chunk-3MBRL2PM.mjs} +1 -1
  68. package/dist/{chunk-NWR2LT5B.mjs → chunk-4OKWZY5E.mjs} +1 -1
  69. package/dist/{chunk-RMECZA2K.mjs → chunk-5K44HLTZ.mjs} +1 -1
  70. package/dist/{chunk-NFMCP2HI.mjs → chunk-5XA2ZBAE.mjs} +2 -2
  71. package/dist/{chunk-OUUP3WKT.mjs → chunk-67N2QJYT.mjs} +1 -1
  72. package/dist/chunk-6KBYRA2C.mjs +2 -0
  73. package/dist/{chunk-SX4LJYT6.mjs → chunk-6N3PX4XX.mjs} +1 -1
  74. package/dist/{chunk-RFDZXFJF.mjs → chunk-7JDX4E65.mjs} +1 -1
  75. package/dist/chunk-7M2BQQGZ.mjs +2 -0
  76. package/dist/{chunk-ZUNVAXLH.mjs → chunk-7OG26PGF.mjs} +1 -1
  77. package/dist/{chunk-B4P2CM2J.mjs → chunk-AHN3NFKJ.mjs} +1 -1
  78. package/dist/chunk-ALZ6ZENZ.mjs +3 -0
  79. package/dist/{chunk-UGWYKHBL.mjs → chunk-AR5D57ZD.mjs} +2 -2
  80. package/dist/{chunk-W3BGBJQW.mjs → chunk-BFJGHSQN.mjs} +1 -1
  81. package/dist/{chunk-HLYV7RIH.mjs → chunk-CMA72MAG.mjs} +1 -1
  82. package/dist/{chunk-D4CKRD3V.mjs → chunk-DAZL73VK.mjs} +2 -2
  83. package/dist/{chunk-6VTU6KEO.mjs → chunk-DJISHPUL.mjs} +1 -1
  84. package/dist/{chunk-BPL64HGA.mjs → chunk-EAIFITAV.mjs} +1 -1
  85. package/dist/chunk-EP25HDAJ.mjs +2 -0
  86. package/dist/{chunk-6EZ7FNIK.mjs → chunk-F4ZA6JRZ.mjs} +1 -1
  87. package/dist/{chunk-3KJHLHUO.mjs → chunk-F6HVDZR4.mjs} +1 -1
  88. package/dist/{chunk-3NJACR4W.mjs → chunk-FDMAXMQA.mjs} +1 -1
  89. package/dist/chunk-FETSREUN.mjs +5 -0
  90. package/dist/{chunk-RKPWLGZ3.mjs → chunk-GHOYKMQ3.mjs} +1 -1
  91. package/dist/chunk-HDWTZ763.mjs +12 -0
  92. package/dist/{chunk-VTKNEYT3.mjs → chunk-HPOI4ZX7.mjs} +1 -1
  93. package/dist/{chunk-OW5NWPOJ.mjs → chunk-HXG7EOPJ.mjs} +1 -1
  94. package/dist/{chunk-V6RIYQZZ.mjs → chunk-ITOH5EGO.mjs} +1 -1
  95. package/dist/{chunk-ZWPMCK7P.mjs → chunk-IV64FFI4.mjs} +1 -1
  96. package/dist/chunk-J43Z6LSS.mjs +2 -0
  97. package/dist/chunk-J5PUIV3Y.mjs +4 -0
  98. package/dist/{chunk-KTKHRC6H.mjs → chunk-JA7G53PC.mjs} +1 -1
  99. package/dist/{chunk-NWFBE2YA.mjs → chunk-JLTZF4LA.mjs} +1 -1
  100. package/dist/{chunk-GY3FAUVM.mjs → chunk-JZT7I2OJ.mjs} +1 -1
  101. package/dist/{chunk-QKXMPUXC.mjs → chunk-K5XATEOO.mjs} +1 -1
  102. package/dist/chunk-L2SUIS5S.mjs +2 -0
  103. package/dist/{chunk-TEZAWDSQ.mjs → chunk-LM4XFQHZ.mjs} +1 -1
  104. package/dist/{chunk-5ZJA7CXT.mjs → chunk-MN7BZL4R.mjs} +1 -1
  105. package/dist/chunk-MTYYHM2G.mjs +15 -0
  106. package/dist/{chunk-HMYTM3GT.mjs → chunk-MXUBKDRO.mjs} +1 -1
  107. package/dist/{chunk-MHW7ZKOU.mjs → chunk-OEXWRJME.mjs} +1 -1
  108. package/dist/{chunk-CRJEG7MT.mjs → chunk-OFHXGWOX.mjs} +1 -1
  109. package/dist/chunk-ORID3AE7.mjs +166 -0
  110. package/dist/{chunk-32ZUEFZ7.mjs → chunk-PGDE24N5.mjs} +1 -1
  111. package/dist/{chunk-UNOYVIYR.mjs → chunk-POTA2FV4.mjs} +1 -1
  112. package/dist/{chunk-N7AZZLGT.mjs → chunk-QE5RG76S.mjs} +18 -17
  113. package/dist/{chunk-N76HWBA3.mjs → chunk-R2ZDLJYT.mjs} +1 -1
  114. package/dist/chunk-SWUTTZCN.mjs +2 -0
  115. package/dist/{chunk-POQSE4C2.mjs → chunk-TR7TWGHB.mjs} +1 -1
  116. package/dist/chunk-U5XL7D6A.mjs +3 -0
  117. package/dist/{chunk-PVER7LSC.mjs → chunk-U7NZI6N4.mjs} +2 -2
  118. package/dist/{chunk-Q47PLKIJ.mjs → chunk-UGWMMEJ5.mjs} +1 -1
  119. package/dist/chunk-UJQJKNGK.mjs +2 -0
  120. package/dist/chunk-UYVCQK3H.mjs +22 -0
  121. package/dist/{chunk-FJYN7RTH.mjs → chunk-VFX2KNHP.mjs} +1 -1
  122. package/dist/{chunk-UBBRTJ2R.mjs → chunk-VS7JIGJW.mjs} +1 -1
  123. package/dist/{chunk-NVRNLK25.mjs → chunk-W7665ZEC.mjs} +2 -2
  124. package/dist/{chunk-NG375ILQ.mjs → chunk-WQDQWCX5.mjs} +1 -1
  125. package/dist/chunk-YLPSMDIS.mjs +5 -0
  126. package/dist/{chunk-VXACTLO3.mjs → chunk-YNAWBAYN.mjs} +1 -1
  127. package/dist/{chunk-ZB4H7ZN4.mjs → chunk-YROX2O22.mjs} +1 -1
  128. package/dist/{chunk-YQGT4AB2.mjs → chunk-ZDLPUOAG.mjs} +1 -1
  129. package/dist/chunk-ZQS6H473.mjs +16 -0
  130. package/dist/{chunk-OJKMINIU.mjs → chunk-ZWWC4KLF.mjs} +15 -15
  131. package/dist/cli.mjs +1 -1
  132. package/dist/server.mjs +1 -1
  133. package/dist/worker.mjs +1 -1
  134. package/kit/board.css +5 -5
  135. package/kit/code.js +15 -15
  136. package/kit/report.css +120 -41
  137. package/kit/runtime.js +45 -7
  138. package/kit/tables.js +2 -0
  139. package/kit/ui.js +2 -0
  140. package/package.json +1 -1
  141. package/packs/gallery/chart-view/kit.js +3 -3
  142. package/packs/gallery/chart-view/writing.md +1 -1
  143. package/packs/gallery/countdown/component.json +1 -1
  144. package/packs/gallery/countdown/kit.js +89 -29
  145. package/packs/gallery/countdown/preview.svg +1 -1
  146. package/packs/gallery/countdown/style.css +88 -100
  147. package/packs/gallery/countdown/writing.md +2 -2
  148. package/packs/gallery/habit/component.json +3 -3
  149. package/packs/gallery/habit/kit.js +114 -75
  150. package/packs/gallery/habit/preview.svg +1 -1
  151. package/packs/gallery/habit/style.css +133 -205
  152. package/packs/gallery/habit/writing.md +2 -2
  153. package/packs/gallery/heatmap/component.json +2 -2
  154. package/packs/gallery/heatmap/kit.js +335 -173
  155. package/packs/gallery/heatmap/preview.svg +1 -1
  156. package/packs/gallery/heatmap/style.css +158 -170
  157. package/packs/gallery/heatmap/writing.md +2 -2
  158. package/packs/gallery/kanban/kit.js +3 -3
  159. package/packs/gallery/kanban/writing.md +1 -1
  160. package/packs/gallery/metric/kit.js +3 -3
  161. package/packs/gallery/metric/writing.md +1 -1
  162. package/packs/gallery/note/component.json +3 -3
  163. package/packs/gallery/note/kit.js +40 -13
  164. package/packs/gallery/note/preview.svg +1 -1
  165. package/packs/gallery/note/style.css +51 -30
  166. package/packs/gallery/note/writing.md +2 -2
  167. package/packs/gallery/recent/component.json +2 -2
  168. package/packs/gallery/recent/kit.js +141 -86
  169. package/packs/gallery/recent/preview.svg +1 -1
  170. package/packs/gallery/recent/style.css +53 -126
  171. package/packs/gallery/recent/writing.md +2 -2
  172. package/packs/gallery/static/component.json +2 -2
  173. package/packs/gallery/static/preview.svg +1 -1
  174. package/packs/gallery/static/style.css +99 -66
  175. package/packs/gallery/static/writing.md +2 -2
  176. package/packs/gallery/stats/component.json +3 -3
  177. package/packs/gallery/stats/kit.js +253 -72
  178. package/packs/gallery/stats/preview.svg +1 -1
  179. package/packs/gallery/stats/style.css +64 -142
  180. package/packs/gallery/stats/writing.md +2 -2
  181. package/packs/gallery/today/component.json +2 -2
  182. package/packs/gallery/today/kit.js +62 -27
  183. package/packs/gallery/today/preview.svg +1 -1
  184. package/packs/gallery/today/style.css +101 -72
  185. package/packs/gallery/today/writing.md +2 -2
  186. package/packs/gallery/todos/component.json +1 -1
  187. package/packs/gallery/todos/kit.js +218 -71
  188. package/packs/gallery/todos/preview.svg +1 -1
  189. package/packs/gallery/todos/style.css +170 -223
  190. package/packs/gallery/todos/writing.md +1 -1
  191. package/packs/gallery/weather/component.json +2 -2
  192. package/packs/gallery/weather/kit.js +165 -90
  193. package/packs/gallery/weather/preview.svg +1 -1
  194. package/packs/gallery/weather/style.css +100 -218
  195. package/packs/gallery/weather/writing.md +1 -1
  196. package/packs/gallery-soft/countdown/component.json +18 -0
  197. package/packs/gallery-soft/countdown/example.html +3 -0
  198. package/packs/gallery-soft/countdown/kit.js +206 -0
  199. package/packs/gallery-soft/countdown/preview.svg +1 -0
  200. package/packs/gallery-soft/countdown/style.css +211 -0
  201. package/packs/gallery-soft/countdown/template.html +3 -0
  202. package/packs/gallery-soft/countdown/writing.md +24 -0
  203. package/packs/gallery-soft/habit/component.json +14 -0
  204. package/packs/gallery-soft/habit/example.html +3 -0
  205. package/packs/gallery-soft/habit/kit.js +366 -0
  206. package/packs/gallery-soft/habit/preview.svg +1 -0
  207. package/packs/gallery-soft/habit/style.css +251 -0
  208. package/packs/gallery-soft/habit/template.html +3 -0
  209. package/packs/gallery-soft/habit/writing.md +23 -0
  210. package/packs/gallery-soft/heatmap/component.json +18 -0
  211. package/packs/gallery-soft/heatmap/example.html +3 -0
  212. package/packs/gallery-soft/heatmap/kit.js +498 -0
  213. package/packs/gallery-soft/heatmap/preview.svg +1 -0
  214. package/packs/gallery-soft/heatmap/style.css +181 -0
  215. package/packs/gallery-soft/heatmap/template.html +3 -0
  216. package/packs/gallery-soft/heatmap/writing.md +23 -0
  217. package/packs/gallery-soft/note/component.json +14 -0
  218. package/packs/gallery-soft/note/example.html +3 -0
  219. package/packs/gallery-soft/note/kit.js +162 -0
  220. package/packs/gallery-soft/note/preview.svg +1 -0
  221. package/packs/gallery-soft/note/style.css +148 -0
  222. package/packs/gallery-soft/note/template.html +3 -0
  223. package/packs/gallery-soft/note/writing.md +20 -0
  224. package/packs/gallery-soft/recent/component.json +13 -0
  225. package/packs/gallery-soft/recent/example.html +1 -0
  226. package/packs/gallery-soft/recent/kit.js +335 -0
  227. package/packs/gallery-soft/recent/preview.svg +1 -0
  228. package/packs/gallery-soft/recent/style.css +160 -0
  229. package/packs/gallery-soft/recent/template.html +1 -0
  230. package/packs/gallery-soft/recent/writing.md +17 -0
  231. package/packs/gallery-soft/static/component.json +13 -0
  232. package/packs/gallery-soft/static/example.html +12 -0
  233. package/packs/gallery-soft/static/preview.svg +1 -0
  234. package/packs/gallery-soft/static/style.css +186 -0
  235. package/packs/gallery-soft/static/template.html +1 -0
  236. package/packs/gallery-soft/static/writing.md +20 -0
  237. package/packs/gallery-soft/stats/component.json +13 -0
  238. package/packs/gallery-soft/stats/example.html +1 -0
  239. package/packs/gallery-soft/stats/kit.js +341 -0
  240. package/packs/gallery-soft/stats/preview.svg +1 -0
  241. package/packs/gallery-soft/stats/style.css +119 -0
  242. package/packs/gallery-soft/stats/template.html +1 -0
  243. package/packs/gallery-soft/stats/writing.md +13 -0
  244. package/packs/gallery-soft/today/component.json +12 -0
  245. package/packs/gallery-soft/today/example.html +1 -0
  246. package/packs/gallery-soft/today/kit.js +222 -0
  247. package/packs/gallery-soft/today/preview.svg +1 -0
  248. package/packs/gallery-soft/today/style.css +178 -0
  249. package/packs/gallery-soft/today/template.html +1 -0
  250. package/packs/gallery-soft/today/writing.md +16 -0
  251. package/packs/gallery-soft/todos/component.json +19 -0
  252. package/packs/gallery-soft/todos/example.html +3 -0
  253. package/packs/gallery-soft/todos/kit.js +527 -0
  254. package/packs/gallery-soft/todos/preview.svg +1 -0
  255. package/packs/gallery-soft/todos/style.css +212 -0
  256. package/packs/gallery-soft/todos/template.html +3 -0
  257. package/packs/gallery-soft/todos/writing.md +32 -0
  258. package/packs/gallery-soft/weather/component.json +19 -0
  259. package/packs/gallery-soft/weather/example.html +3 -0
  260. package/packs/gallery-soft/weather/kit.js +411 -0
  261. package/packs/gallery-soft/weather/preview.svg +1 -0
  262. package/packs/gallery-soft/weather/style.css +185 -0
  263. package/packs/gallery-soft/weather/template.html +3 -0
  264. package/packs/gallery-soft/weather/writing.md +28 -0
  265. package/release.json +9 -9
  266. package/skill/SKILL.md +12 -12
  267. package/skill/references/building-blocks.md +4 -4
  268. package/skill/references/pages-and-data.md +13 -9
  269. package/skill/references/writing-html.md +2 -0
  270. package/web/assets/index-BM_K-Auu.css +1 -0
  271. package/web/assets/index-DRslOBiv.js +15 -0
  272. package/web/index.html +2 -2
  273. package/dist/chunk-2NRBY6AJ.mjs +0 -2
  274. package/dist/chunk-35NQ4PLQ.mjs +0 -2
  275. package/dist/chunk-4AV456RQ.mjs +0 -2
  276. package/dist/chunk-5XYHDBJ5.mjs +0 -2
  277. package/dist/chunk-6A53MZYZ.mjs +0 -2
  278. package/dist/chunk-6EXH3ORZ.mjs +0 -166
  279. package/dist/chunk-BVEFGE4B.mjs +0 -2
  280. package/dist/chunk-D4EURAX4.mjs +0 -4
  281. package/dist/chunk-DQCE7TJY.mjs +0 -5
  282. package/dist/chunk-FWNRPMCJ.mjs +0 -12
  283. package/dist/chunk-FWW4CSAZ.mjs +0 -2
  284. package/dist/chunk-JVHHHGEA.mjs +0 -3
  285. package/dist/chunk-PZDLJJTJ.mjs +0 -3
  286. package/dist/chunk-SXHBYZST.mjs +0 -16
  287. package/dist/chunk-UFNYFFKO.mjs +0 -20
  288. package/dist/chunk-UKSHDZZ6.mjs +0 -2
  289. package/dist/chunk-VJPFVNNW.mjs +0 -15
  290. package/dist/chunk-VS3ZMVGX.mjs +0 -5
  291. package/web/assets/index-BK2e_07w.js +0 -13
  292. package/web/assets/index-CWFI83mF.css +0 -1
@@ -1,246 +1,174 @@
1
1
  /* Every selector starts at the instance and goes down a step at a time (>), so that nothing here
2
- reaches the rest of the page. The face fills its card on a custom page (the board draws the frame), in
3
- the kit's card tokens, laid out as a grid: its head (the chip, the name, the days in all as its quiet
4
- meta at the right, its end clear of the card's grip); the streak, its label small and muted over its
5
- count, large, its unit after it, with the button at its right; the last seven days at the bottom, each
6
- a dot over its weekday (today's 今), a day done filled with the accent and ticked, an open one the
7
- track's gray, today ringed in the accent. Where the card has the room (past 300px wide and 130px high:
8
- a 4 x 2 card from a window 1440px wide) the last 30 days as a ring at the left of the streak and the week, the
9
- days done of them in its middle. The button is a primary one, pale blue with no line ("打卡"); once
10
- today is done a pale green "✓ 已打卡" that a press takes back; where nothing is written, a plain muted
11
- line. Low (under 124px), the streak's label goes; a narrow card (2 x 2) leaves the week out and puts
12
- the button under the streak, as wide as its words. Never checked in (data-fresh): no streak and no
13
- ring, a muted line where the streak stands. Light and dark. */
2
+ reaches the rest of the page. The pack's design B, in the kit's card tokens, laid out by the card's cells
3
+ (the face's data-layout): "wide" (4 × 2) the head (a flame's warm chip, the name, a field with no line
4
+ until it is typed in, the days in all after it, faint), the streak (36px) and 天连续 with the button at
5
+ its right, and this week's seven circles at the bottom; "narrow" (2 × 2) the name alone (13px, 600, two lines at most), a
6
+ flame and the streak (40px), and the button as wide as the card; "tall" (4 × 4) the head, the streak and
7
+ the button, 最近五周 and its count, and five weeks of circles of 26px. A day done the accent, ticked; one
8
+ done before the streak (a month's) the accent's pale tint; today ringed in the accent; the days to come
9
+ an outline. The button has no line: a pale blue 打卡, a pale green ✓ 已打卡, a line of words where nothing
10
+ writes. Never checked in: 还没打过卡 where the streak stands, the chip gray. Light and dark. */
14
11
  [data-doc-component="gallery/habit"] {
15
- container-type: size;
16
- height: 10em;
17
- > .gallery-habit-face {
18
- display: grid;
19
- grid-template-columns: minmax(0, 1fr) auto;
20
- grid-template-rows: auto 1fr auto;
21
- grid-template-areas: "head head" "streak press" "week week";
22
- align-items: center;
23
- gap: 8px 12px;
24
- box-sizing: border-box;
25
- height: 100%;
26
- min-height: 0;
27
- color: var(--gallery-text);
28
- font-size: 14px;
29
- line-height: 1.4;
30
- }
12
+ font-family: var(--gallery-font);
13
+ font-size: 13px;
14
+ line-height: 1.5;
15
+ color: var(--gallery-text);
16
+ > .gallery-habit-face { display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; }
31
17
  > .gallery-habit-face > .gallery-habit-head {
32
- grid-area: head;
33
18
  display: flex;
34
19
  align-items: center;
35
20
  gap: 8px;
21
+ flex: none;
22
+ height: 20px;
36
23
  min-width: 0;
37
24
  padding-inline-end: var(--gallery-grip-room, 0px);
38
25
  }
39
26
  > .gallery-habit-face > .gallery-habit-head > .gallery-habit-chip {
40
27
  flex: none;
41
- display: inline-flex;
42
- align-items: center;
43
- justify-content: center;
28
+ display: grid;
29
+ place-items: center;
44
30
  width: var(--gallery-chip-size);
45
31
  height: var(--gallery-chip-size);
46
32
  border-radius: var(--gallery-chip-radius);
47
- background: var(--gallery-accent-soft);
48
- color: var(--gallery-accent);
33
+ background: var(--gallery-warm-soft);
34
+ color: var(--gallery-warm);
49
35
  }
50
- > .gallery-habit-face > .gallery-habit-head > .gallery-habit-chip > svg { width: var(--gallery-chip-icon); height: var(--gallery-chip-icon); }
36
+ > .gallery-habit-face[data-fresh] > .gallery-habit-head > .gallery-habit-chip { background: var(--gallery-fill); color: var(--gallery-muted); }
37
+ > .gallery-habit-face > .gallery-habit-head > .gallery-habit-chip > svg { display: block; width: var(--gallery-chip-icon); height: var(--gallery-chip-icon); }
38
+ /* The name: a field drawn as the head's title, as wide as its words (field-sizing), a soft fill while typed in. */
51
39
  > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name {
52
- flex: 1 1 auto;
53
- min-width: 0;
40
+ field-sizing: content;
41
+ min-width: 2em;
42
+ max-width: 100%;
43
+ flex: 0 1 auto;
54
44
  box-sizing: border-box;
55
- width: 0;
56
- margin: 0 0 0 -6px;
57
- padding: 3px 6px;
45
+ height: 20px;
46
+ margin: 0 -4px;
47
+ padding: 0 4px;
58
48
  border: 0;
59
- border-radius: 6px;
49
+ border-radius: 4px;
60
50
  outline: 0;
61
51
  background: transparent;
62
52
  font: inherit;
63
53
  font-size: var(--gallery-title-size);
64
54
  line-height: var(--gallery-title-line);
65
55
  font-weight: 600;
66
- color: var(--gallery-text-strong);
56
+ color: var(--gallery-text);
67
57
  text-overflow: ellipsis;
68
58
  }
69
- > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name::placeholder { color: var(--doc-muted); font-weight: 500; opacity: .8; }
70
- > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name:not(:read-only):hover,
71
- > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name:not(:read-only):focus { background: var(--doc-hover); }
59
+ > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name::placeholder { color: var(--gallery-faint); font-weight: 500; }
60
+ > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name:not(:read-only):is(:hover, :focus) { background: var(--gallery-hover); }
72
61
  > .gallery-habit-face > .gallery-habit-head > .gallery-habit-name:read-only { cursor: default; }
73
- > .gallery-habit-face > .gallery-habit-head > .gallery-habit-total {
74
- flex: none;
75
- margin-inline-end: calc(-1 * var(--gallery-grip-room, 0px)); opacity: calc(1 - var(--gallery-grip-shown, 0)); transition: opacity .12s ease-out;
76
- font-size: var(--gallery-meta-size);
77
- line-height: var(--gallery-title-line);
78
- color: var(--doc-muted);
79
- white-space: nowrap;
80
- font-variant-numeric: tabular-nums;
62
+ > .gallery-habit-face > .gallery-habit-head > .gallery-habit-label { display: none; }
63
+ > .gallery-habit-face > .gallery-habit-head > .gallery-habit-total { flex: none; font-size: var(--gallery-meta-size); color: var(--gallery-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
64
+ > .gallery-habit-face > .gallery-habit-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; flex: none; }
65
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-streak { display: flex; align-items: baseline; margin: 0; min-width: 0; }
66
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-flame { display: none; align-self: center; margin-right: 4px; color: var(--gallery-warm); }
67
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-flame > svg { display: block; width: 18px; height: 18px; }
68
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-count {
69
+ font-size: 36px;
70
+ line-height: 1;
71
+ font-weight: var(--gallery-numeral-weight);
72
+ letter-spacing: var(--gallery-numeral-tracking);
73
+ font-variant-numeric: lining-nums;
74
+ color: var(--gallery-text-strong);
81
75
  }
82
- > .gallery-habit-face > .gallery-habit-check {
83
- grid-area: press;
84
- justify-self: end;
85
- align-self: center;
86
- padding: 5px 14px;
76
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-unit { margin-left: 3px; font-size: var(--gallery-unit); font-weight: 500; color: var(--gallery-muted); white-space: nowrap; }
77
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-fresh { display: none; margin: 0; font-size: 12.5px; line-height: 18px; color: var(--gallery-faint); }
78
+ > .gallery-habit-face[data-fresh] > .gallery-habit-row > .gallery-habit-streak { display: none; }
79
+ > .gallery-habit-face[data-fresh] > .gallery-habit-row > .gallery-habit-fresh { display: block; }
80
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ justify-content: center;
84
+ gap: 5px;
85
+ flex: none;
86
+ height: 30px;
87
+ padding: 0 14px;
87
88
  border: 0;
88
89
  border-radius: 8px;
89
90
  background: var(--gallery-accent-soft);
91
+ color: var(--gallery-accent-ink);
90
92
  font: inherit;
91
93
  font-size: 13px;
92
- line-height: 18px;
93
- font-weight: 500;
94
- color: var(--gallery-accent);
94
+ font-weight: 600;
95
95
  white-space: nowrap;
96
96
  cursor: pointer;
97
- }
98
- > .gallery-habit-face > .gallery-habit-check:hover { background: color-mix(in srgb, var(--gallery-accent) 15%, transparent); }
99
- > .gallery-habit-face > .gallery-habit-check:active { background: color-mix(in srgb, var(--gallery-accent) 21%, transparent); }
100
- > .gallery-habit-face > .gallery-habit-check.gallery-habit-done { background: var(--gallery-good-soft); color: var(--gallery-good); }
101
- > .gallery-habit-face > .gallery-habit-check.gallery-habit-done:hover { background: color-mix(in srgb, var(--gallery-good) 16%, transparent); }
102
- /* Nothing to press (an export, a page that takes no edits): a line saying how today stands. */
103
- > .gallery-habit-face > .gallery-habit-check:disabled,
104
- > .gallery-habit-face > .gallery-habit-check.gallery-habit-done:disabled {
105
- padding-inline: 0;
106
- background: transparent;
107
- font-weight: 400;
108
- color: var(--doc-muted);
109
- cursor: default;
110
- }
111
- /* The streak: its label over its count, the count large, its unit small and muted after it. */
112
- > .gallery-habit-face > .gallery-habit-streak {
113
- grid-area: streak;
114
- align-self: center;
115
- display: flex;
116
- flex-wrap: wrap;
117
- align-items: baseline;
118
- min-width: 0;
119
- margin: 0;
120
- }
121
- > .gallery-habit-face > .gallery-habit-streak > .gallery-habit-label {
122
- flex: 0 0 100%;
123
- margin-bottom: 2px;
124
- font-size: var(--gallery-meta-size);
125
- line-height: 16px;
126
- color: var(--doc-muted);
127
- }
128
- > .gallery-habit-face > .gallery-habit-streak > .gallery-habit-count {
129
- font-size: clamp(28px, 100cqh - 100px, var(--gallery-hero-size)); /* the hero, a little less on a card too low for it beside the week */
130
- line-height: 1;
131
- font-weight: var(--gallery-numeral-weight);
132
- letter-spacing: var(--gallery-numeral-tracking);
133
- color: var(--gallery-text-strong);
134
- font-variant-numeric: tabular-nums;
135
- }
136
- > .gallery-habit-face > .gallery-habit-streak > .gallery-habit-unit {
137
- margin-inline-start: var(--gallery-unit-gap);
138
- font-size: max(12px, calc(var(--gallery-hero-size) * .4)); /* the hero's unit (--gallery-unit-size of it) */
139
- font-weight: 500;
140
- color: var(--doc-muted);
141
- }
142
- /* Never checked in: a muted line where the streak stands. */
143
- > .gallery-habit-face > .gallery-habit-fresh { display: none; }
144
- > .gallery-habit-face[data-fresh] > .gallery-habit-streak { display: none; }
145
- > .gallery-habit-face[data-fresh] > .gallery-habit-fresh {
146
- grid-area: streak;
147
- align-self: center;
148
- display: block;
149
- min-width: 0;
150
- margin: 0;
151
- font-size: 13px;
152
- line-height: 1.45;
153
- color: var(--doc-muted);
154
- }
155
- /* The last 30 days: a ring of the accent on the track, the days done in its middle over its label. */
156
- > .gallery-habit-face > .gallery-habit-ring {
157
- grid-area: ring;
158
- display: none;
159
- position: relative;
160
- width: clamp(76px, calc(100cqh - 52px), 128px);
161
- aspect-ratio: 1;
162
- align-self: center;
163
- }
164
- > .gallery-habit-face > .gallery-habit-ring > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
165
- > .gallery-habit-face > .gallery-habit-ring > svg > circle { fill: none; stroke-width: 9; }
166
- > .gallery-habit-face > .gallery-habit-ring > svg > .gallery-habit-track { stroke: var(--gallery-track); }
167
- > .gallery-habit-face > .gallery-habit-ring > svg > .gallery-habit-arc {
168
- stroke: var(--gallery-accent);
169
- stroke-linecap: round;
170
- stroke-dasharray: calc(var(--gallery-habit-share, 0) * 100) 100;
171
- }
172
- > .gallery-habit-face > .gallery-habit-ring[data-none] > svg > .gallery-habit-arc { display: none; }
173
- > .gallery-habit-face > .gallery-habit-ring > .gallery-habit-rate {
174
- position: relative;
175
- font-size: clamp(20px, 7cqi, 28px);
176
- line-height: 1;
177
- font-weight: var(--gallery-numeral-weight);
178
- letter-spacing: var(--gallery-numeral-tracking);
179
- font-variant-numeric: tabular-nums;
180
- text-align: center;
181
- }
182
- > .gallery-habit-face > .gallery-habit-ring > .gallery-habit-rate-label {
183
- position: relative;
184
- margin-top: 4px;
185
- font-size: 11px;
186
- line-height: 14px;
187
- color: var(--doc-muted);
188
- text-align: center;
189
- }
190
- > .gallery-habit-face > .gallery-habit-week {
191
- grid-area: week;
192
- display: grid;
193
- grid-template-columns: repeat(7, minmax(0, 1fr));
194
- gap: 4px;
195
- margin: 0;
196
- padding: 0;
197
- list-style: none;
198
- }
97
+ transition: background-color .12s ease-out;
98
+ }
99
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check:hover { background: color-mix(in srgb, var(--gallery-accent) 18%, var(--gallery-accent-soft)); }
100
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check:focus-visible { outline: 2px solid var(--gallery-accent-wash); outline-offset: 1px; }
101
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check.gallery-habit-done { background: var(--gallery-good-soft); color: var(--gallery-good-ink); }
102
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check.gallery-habit-done:hover { background: color-mix(in srgb, var(--gallery-good) 18%, var(--gallery-good-soft)); }
103
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check > svg { display: block; width: 13px; height: 13px; }
104
+ > .gallery-habit-face > .gallery-habit-row > .gallery-habit-check:disabled { padding: 0; background: transparent; color: var(--gallery-faint); font-weight: 500; cursor: default; }
105
+ > .gallery-habit-face > .gallery-habit-caption { display: none; }
106
+ /* This week: seven circles at the bottom, 4px in from either side, so that today's second ring, done,
107
+ stays inside the content on a Monday and a Sunday too. */
108
+ > .gallery-habit-face > .gallery-habit-week { display: flex; justify-content: space-between; margin: auto 0 0; padding: 0 4px; list-style: none; }
199
109
  > .gallery-habit-face > .gallery-habit-week > .gallery-habit-day {
200
- display: flex;
201
- flex-direction: column;
202
- align-items: center;
203
- gap: 5px;
110
+ display: grid;
111
+ place-items: center;
112
+ flex: none;
113
+ width: 28px;
114
+ height: 28px;
115
+ border-radius: 50%;
116
+ background: var(--gallery-fill);
204
117
  font-size: 11px;
205
118
  line-height: 1;
206
- color: var(--doc-muted);
207
- }
208
- > .gallery-habit-face > .gallery-habit-week > .gallery-habit-day > .gallery-habit-dot {
209
- box-sizing: border-box;
210
- width: clamp(18px, 6.4cqi, 26px);
211
- aspect-ratio: 1;
212
- border-radius: 50%;
213
- background: var(--gallery-track);
214
- }
215
- > .gallery-habit-face > .gallery-habit-week > .gallery-habit-kept > .gallery-habit-dot {
216
- background: var(--gallery-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.2 2.2 4.8-4.9' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
217
- }
218
- > .gallery-habit-face > .gallery-habit-week > .gallery-habit-today { color: var(--gallery-accent); font-weight: 600; }
219
- > .gallery-habit-face > .gallery-habit-week > .gallery-habit-today:not(.gallery-habit-kept) > .gallery-habit-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gallery-accent); }
220
- }
221
- /* Room for the ring: at the left of the streak and the week, the dots no wider than they need. */
222
- @container (min-width: 300px) and (min-height: 130px) {
223
- [data-doc-component="gallery/habit"] > .gallery-habit-face {
224
- grid-template-columns: auto minmax(0, 1fr) auto;
225
- grid-template-areas: "head head head" "ring streak press" "ring week week";
226
- column-gap: 20px;
119
+ color: var(--gallery-faint);
120
+ font-variant-numeric: tabular-nums;
227
121
  }
228
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-ring { display: flex; flex-direction: column; align-items: center; justify-content: center; }
229
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-week { align-self: end; }
230
- /* Never checked in: no ring, the line and the week from the card's left. */
231
- [data-doc-component="gallery/habit"] > .gallery-habit-face[data-fresh] { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head head" "streak press" "week week"; }
232
- [data-doc-component="gallery/habit"] > .gallery-habit-face[data-fresh] > .gallery-habit-ring { display: none; }
233
- }
234
- /* Low: the count alone, no label over it. */
235
- @container (max-height: 124px) {
236
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-streak > .gallery-habit-label { display: none; }
237
- }
238
- /* A narrow card: the head, the streak, the button under it at its start, as wide as its words, the two in the middle of the room under the head; no week, no days in all. */
239
- @container (max-width: 220px) {
240
- [data-doc-component="gallery/habit"] > .gallery-habit-face { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto 1fr; grid-template-areas: "head" "." "streak" "press" "."; }
241
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-check { justify-self: start; }
242
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-week,
243
- [data-doc-component="gallery/habit"] > .gallery-habit-face > .gallery-habit-head > .gallery-habit-total { display: none; }
122
+ > .gallery-habit-face > .gallery-habit-week > .gallery-habit-day > svg { display: block; width: 13px; height: 13px; }
123
+ > .gallery-habit-face > .gallery-habit-week > .gallery-habit-kept { background: var(--gallery-accent); color: #fff; }
124
+ > .gallery-habit-face > .gallery-habit-week > .gallery-habit-today { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gallery-accent); color: var(--gallery-accent-ink); font-weight: 600; }
125
+ > .gallery-habit-face > .gallery-habit-week > .gallery-habit-today.gallery-habit-kept { background: var(--gallery-accent); color: #fff; box-shadow: 0 0 0 2px var(--gallery-card-fill), 0 0 0 3.5px var(--gallery-accent); }
126
+ > .gallery-habit-face > .gallery-habit-week > .gallery-habit-future { background: transparent; box-shadow: inset 0 0 0 1px var(--gallery-hair); color: var(--gallery-faintest); }
127
+
128
+ /* A narrow card: the name, the streak with its flame, the button as wide as the card. */
129
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > :is(.gallery-habit-chip, .gallery-habit-total) { display: none; }
130
+ /* Its name: the words, 13px and 600 on 18px lines, two lines at most and then cut (…), 12px clear of the
131
+ card's edge (the grip's dots end 9px into the content); the field lies over them unseen, the one a
132
+ press or Tab reaches, and stands in their place, one line, while it has the focus. */
133
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head { position: relative; display: block; height: auto; padding-inline-end: 0; }
134
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-label {
135
+ display: -webkit-box;
136
+ -webkit-box-orient: vertical;
137
+ -webkit-line-clamp: 2;
138
+ overflow: hidden;
139
+ margin: 0 -4px;
140
+ padding: 0 16px 0 4px;
141
+ border-radius: 4px;
142
+ font-size: 13px;
143
+ line-height: 18px;
144
+ font-weight: 600;
145
+ color: var(--gallery-text);
146
+ overflow-wrap: anywhere;
147
+ }
148
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-label[data-empty] { font-weight: 500; color: var(--gallery-faint); }
149
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-name { position: absolute; inset: 0 auto auto 0; width: calc(100% + 8px); max-width: none; height: 100%; opacity: 0; line-height: 18px; }
150
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-name:read-only { pointer-events: none; }
151
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-name:not(:read-only):hover + .gallery-habit-label { background: var(--gallery-hover); }
152
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-name:not(:read-only):focus { width: calc(100% + 8px - var(--gallery-grip-room, 0px) * var(--gallery-grip-shown, 0)); height: 18px; opacity: 1; }
153
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-head > .gallery-habit-name:not(:read-only):focus + .gallery-habit-label { visibility: hidden; }
154
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-row { display: contents; }
155
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-row > :is(.gallery-habit-streak, .gallery-habit-fresh) { margin: auto 0 10px; }
156
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-flame { display: block; }
157
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-row > .gallery-habit-streak > .gallery-habit-count { font-size: 40px; }
158
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-row > .gallery-habit-check { width: 100%; margin-top: auto; }
159
+ > .gallery-habit-face[data-layout="narrow"] > .gallery-habit-week { display: none; }
160
+ /* A tall card: five weeks of circles under 最近五周. */
161
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-caption { display: flex; justify-content: space-between; margin: auto 0 8px; font-size: 11.5px; line-height: 16px; color: var(--gallery-faint); white-space: nowrap; }
162
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-caption b { font-weight: 600; color: var(--gallery-muted); }
163
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 5px; justify-items: center; margin: 0; padding: 0; }
164
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-initial { height: 14px; font-size: 10.5px; line-height: 14px; color: var(--gallery-faint); }
165
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-day { width: 26px; height: 26px; font-size: 10.5px; background: transparent; color: var(--gallery-faint); }
166
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-kept { background: var(--gallery-accent-soft); color: var(--gallery-accent-ink); }
167
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-kept.gallery-habit-streak-day { background: var(--gallery-accent); color: #fff; }
168
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-today { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gallery-accent); color: var(--gallery-accent-ink); }
169
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-today.gallery-habit-kept { background: var(--gallery-accent); color: #fff; box-shadow: 0 0 0 2px var(--gallery-card-fill), 0 0 0 3.5px var(--gallery-accent); }
170
+ > .gallery-habit-face[data-layout="tall"] > .gallery-habit-week > .gallery-habit-future { background: transparent; box-shadow: inset 0 0 0 1px var(--gallery-hair); color: var(--gallery-faintest); }
244
171
  }
245
- /* On a custom page the face is the card's: as high as what the card holds inside its padding. */
172
+ /* On a custom page the face fills the card the board frames. */
246
173
  .gallery-card > [data-doc-component="gallery/habit"] { height: 100%; }
174
+ .gallery-card > [data-doc-component="gallery/habit"] > .gallery-habit-face { height: 100%; }
@@ -9,7 +9,7 @@ Put it on a custom page as a card of its board, `<section class="gallery-card" d
9
9
  - `name`: the habit, a few words (每天读书半小时); `""` shows 给习惯起个名字, and the user names it on the card.
10
10
  - `days`: the days it was done, each `YYYY-MM-DD` by the user's clock, in order, each once. Leave the days of a card that is there alone: they are the user's record.
11
11
 
12
- Sizes: 4 × 2 (the default: the name, the streak and the button, the week, and where the window is wide enough the last 30 days as a ring) and 2 × 2 (the name, the streak, the button under it).
12
+ Sizes: 4 × 2 (the default: the name, the streak and the button, this week's seven days), 2 × 2 (the name, the streak, the button as wide as the card) and 4 × 4 (the last five weeks as a month).
13
13
 
14
14
  ## What the user does
15
15
 
@@ -18,4 +18,4 @@ Sizes: 4 × 2 (the default: the name, the streak and the button, the week, and w
18
18
 
19
19
  ## How it looks
20
20
 
21
- The name beside a flame's chip on the top line, the days in all at its end; the streak under it, 连续打卡 over its count, large, with the button at its right (打卡, pale blue; once done a pale green ✓ 已打卡 that a press takes back), the week at the bottom, a day done a dot filled with the accent and ticked, today ringed and named 今; on a card with the room for it, the last 30 days as a ring at the left, the days done of them in its middle; in the kit's card tokens (as every Gallery card: a head of a tinted chip and a title, its end clear of the card's grip), light and dark. It moves to the next day by itself at midnight (it hears the kit's clock). A habit never checked in shows neither the streak nor the ring but a muted line, 还没打过卡,今天开始第 1 天, until its first check-in. Where nothing can be written (an export) the button is a line saying whether today is done. The script runs with the rights of the page's own scripts, as any block's does.
21
+ In Gallery 风格's look (the kit's card tokens, light and dark): a head of a small gray chip and a title, its end clear of the card's grip; one hero; the rest small and gray; the accent on the data and on today alone. Its head is a flame's warm chip, the habit's name (a field: click to rename) and the days in all (共 41 天); the streak is the hero (36px, 天连续 after it), the button at its right a pale blue 打卡, a pale green ✓ 已打卡 once pressed (a press takes it back). A 4 × 2 card's foot is this week, seven circles Monday to Sunday: a day done the accent with a tick, one missed a soft gray, today ringed in the accent (今), the days to come an outline. A 4 × 4 card shows the last five weeks as a month instead, the days of the streak in the accent, those done before it its pale tint, with how many were done. Never checked in, it says 还没打过卡 where the streak stands. It changes by itself at midnight.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "gallery/heatmap",
3
3
  "apiVersion": 1,
4
- "version": "1.3.0",
4
+ "version": "2.0.0",
5
5
  "name": { "zh": "编辑热力图", "en": "Editing heatmap" },
6
6
  "description": { "zh": "过去一年每天编辑了几次或写了多少字,像 GitHub 的贡献图", "en": "How often, or how many words, the workspace was edited each day of the past year, like GitHub's contribution graph" },
7
7
  "words": "bianjireilitu reilitu heatmap activity contributions calendar 热力图 编辑 贡献 日历 字数 每天",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "runtime": { "generated": [":scope > .gallery-heatmap-face"] },
12
12
  "places": ["page"],
13
- "card": { "sizes": [[8, 3], [12, 3], [4, 3]], "resize": true },
13
+ "card": { "sizes": [[8, 4], [12, 4], [4, 4], [12, 3], [8, 3], [8, 2]], "resize": true },
14
14
  "settings": [
15
15
  { "key": "words", "label": { "zh": "按字数显示", "en": "Show words, not edits" }, "type": "switch", "default": false }
16
16
  ],