@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.
- package/THIRD-PARTY-NOTICES.md +2 -2
- package/browser/editor/components/align.mjs +58 -0
- package/browser/editor/components/code/index.mjs +1 -1
- package/browser/editor/components/embed/page.mjs +1 -1
- package/browser/editor/components/file/page.mjs +4 -4
- package/browser/editor/components/heading/index.mjs +7 -6
- package/browser/editor/components/icons.mjs +3 -0
- package/browser/editor/components/image/index.mjs +2 -0
- package/browser/editor/components/image/page.mjs +172 -90
- package/browser/editor/components/installed/index.mjs +6 -2
- package/browser/editor/components/installed/page.mjs +80 -13
- package/browser/editor/components/media/icons.mjs +13 -8
- package/browser/editor/components/media/page.mjs +5 -3
- package/browser/editor/components/media/toolbar.mjs +12 -3
- package/browser/editor/components/paragraph/index.mjs +4 -3
- package/browser/editor/components/registry.mjs +17 -5
- package/browser/editor/components/table/index.mjs +4 -2
- package/browser/editor/page/after/index.mjs +288 -0
- package/browser/editor/page/align.mjs +91 -0
- package/browser/editor/page/beside.mjs +5 -6
- package/browser/editor/page/block-menu/index.mjs +6 -3
- package/browser/editor/page/blocks.mjs +3 -1
- package/browser/editor/page/board/hint.mjs +64 -27
- package/browser/editor/page/board/index.mjs +160 -71
- package/browser/editor/page/board/motion.mjs +177 -0
- package/browser/editor/page/board/settings.mjs +4 -3
- package/browser/editor/page/clipboard/index.mjs +10 -3
- package/browser/editor/page/clipboard/own/blocks.mjs +3 -4
- package/browser/editor/page/clipboard/own/describe.mjs +6 -2
- package/browser/editor/page/commit.mjs +2 -2
- package/browser/editor/page/core.mjs +3 -1
- package/browser/editor/page/custom-page.mjs +15 -11
- package/browser/editor/page/editor.mjs +31 -14
- package/browser/editor/page/history.mjs +19 -4
- package/browser/editor/page/insert/index.mjs +20 -22
- package/browser/editor/page/menu.mjs +15 -7
- package/browser/editor/page/page-objects.mjs +3 -7
- package/browser/editor/page/present-links.mjs +5 -4
- package/browser/editor/page/present-shell.mjs +63 -0
- package/browser/editor/page/selection/index.mjs +10 -2
- package/browser/editor/page/table/binding.mjs +87 -0
- package/browser/editor/page/table/icons.mjs +0 -2
- package/browser/editor/page/table/index.mjs +10 -14
- package/browser/editor/page/table/views.mjs +5 -52
- package/browser/editor/page/table/widths.mjs +82 -10
- package/browser/editor/page/typing/index.mjs +44 -12
- package/browser/editor/page/typing/leave.mjs +19 -5
- package/browser/shared/block-packs.mjs +23 -8
- package/browser/shared/component-catalog.mjs +15 -8
- package/browser/shared/component-source.mjs +3 -1
- package/browser/shared/components/heading.mjs +2 -1
- package/browser/shared/components/installed.mjs +1 -1
- package/browser/shared/components/page.mjs +2 -0
- package/browser/shared/components/paragraph.mjs +8 -1
- package/browser/shared/components/table.mjs +1 -0
- package/browser/shared/emoji/line-icons.mjs +37 -0
- package/browser/shared/http.mjs +9 -0
- package/browser/shared/i18n/en.mjs +40 -17
- package/browser/shared/outline.mjs +30 -2
- package/browser/shared/pack-manifest.mjs +12 -1
- package/browser/shared/pages.mjs +169 -57
- package/browser/shared/pinyin.mjs +92 -0
- package/browser/shared/present-step.mjs +17 -0
- package/browser/shared/sidebar-head.mjs +70 -0
- package/browser/shared/web-links.mjs +5 -0
- package/dist/chunk-2OHANJ6Q.mjs +2 -0
- package/dist/{chunk-QOUEFUCH.mjs → chunk-3MBRL2PM.mjs} +1 -1
- package/dist/{chunk-NWR2LT5B.mjs → chunk-4OKWZY5E.mjs} +1 -1
- package/dist/{chunk-RMECZA2K.mjs → chunk-5K44HLTZ.mjs} +1 -1
- package/dist/{chunk-NFMCP2HI.mjs → chunk-5XA2ZBAE.mjs} +2 -2
- package/dist/{chunk-OUUP3WKT.mjs → chunk-67N2QJYT.mjs} +1 -1
- package/dist/chunk-6KBYRA2C.mjs +2 -0
- package/dist/{chunk-SX4LJYT6.mjs → chunk-6N3PX4XX.mjs} +1 -1
- package/dist/{chunk-RFDZXFJF.mjs → chunk-7JDX4E65.mjs} +1 -1
- package/dist/chunk-7M2BQQGZ.mjs +2 -0
- package/dist/{chunk-ZUNVAXLH.mjs → chunk-7OG26PGF.mjs} +1 -1
- package/dist/{chunk-B4P2CM2J.mjs → chunk-AHN3NFKJ.mjs} +1 -1
- package/dist/chunk-ALZ6ZENZ.mjs +3 -0
- package/dist/{chunk-UGWYKHBL.mjs → chunk-AR5D57ZD.mjs} +2 -2
- package/dist/{chunk-W3BGBJQW.mjs → chunk-BFJGHSQN.mjs} +1 -1
- package/dist/{chunk-HLYV7RIH.mjs → chunk-CMA72MAG.mjs} +1 -1
- package/dist/{chunk-D4CKRD3V.mjs → chunk-DAZL73VK.mjs} +2 -2
- package/dist/{chunk-6VTU6KEO.mjs → chunk-DJISHPUL.mjs} +1 -1
- package/dist/{chunk-BPL64HGA.mjs → chunk-EAIFITAV.mjs} +1 -1
- package/dist/chunk-EP25HDAJ.mjs +2 -0
- package/dist/{chunk-6EZ7FNIK.mjs → chunk-F4ZA6JRZ.mjs} +1 -1
- package/dist/{chunk-3KJHLHUO.mjs → chunk-F6HVDZR4.mjs} +1 -1
- package/dist/{chunk-3NJACR4W.mjs → chunk-FDMAXMQA.mjs} +1 -1
- package/dist/chunk-FETSREUN.mjs +5 -0
- package/dist/{chunk-RKPWLGZ3.mjs → chunk-GHOYKMQ3.mjs} +1 -1
- package/dist/chunk-HDWTZ763.mjs +12 -0
- package/dist/{chunk-VTKNEYT3.mjs → chunk-HPOI4ZX7.mjs} +1 -1
- package/dist/{chunk-OW5NWPOJ.mjs → chunk-HXG7EOPJ.mjs} +1 -1
- package/dist/{chunk-V6RIYQZZ.mjs → chunk-ITOH5EGO.mjs} +1 -1
- package/dist/{chunk-ZWPMCK7P.mjs → chunk-IV64FFI4.mjs} +1 -1
- package/dist/chunk-J43Z6LSS.mjs +2 -0
- package/dist/chunk-J5PUIV3Y.mjs +4 -0
- package/dist/{chunk-KTKHRC6H.mjs → chunk-JA7G53PC.mjs} +1 -1
- package/dist/{chunk-NWFBE2YA.mjs → chunk-JLTZF4LA.mjs} +1 -1
- package/dist/{chunk-GY3FAUVM.mjs → chunk-JZT7I2OJ.mjs} +1 -1
- package/dist/{chunk-QKXMPUXC.mjs → chunk-K5XATEOO.mjs} +1 -1
- package/dist/chunk-L2SUIS5S.mjs +2 -0
- package/dist/{chunk-TEZAWDSQ.mjs → chunk-LM4XFQHZ.mjs} +1 -1
- package/dist/{chunk-5ZJA7CXT.mjs → chunk-MN7BZL4R.mjs} +1 -1
- package/dist/chunk-MTYYHM2G.mjs +15 -0
- package/dist/{chunk-HMYTM3GT.mjs → chunk-MXUBKDRO.mjs} +1 -1
- package/dist/{chunk-MHW7ZKOU.mjs → chunk-OEXWRJME.mjs} +1 -1
- package/dist/{chunk-CRJEG7MT.mjs → chunk-OFHXGWOX.mjs} +1 -1
- package/dist/chunk-ORID3AE7.mjs +166 -0
- package/dist/{chunk-32ZUEFZ7.mjs → chunk-PGDE24N5.mjs} +1 -1
- package/dist/{chunk-UNOYVIYR.mjs → chunk-POTA2FV4.mjs} +1 -1
- package/dist/{chunk-N7AZZLGT.mjs → chunk-QE5RG76S.mjs} +18 -17
- package/dist/{chunk-N76HWBA3.mjs → chunk-R2ZDLJYT.mjs} +1 -1
- package/dist/chunk-SWUTTZCN.mjs +2 -0
- package/dist/{chunk-POQSE4C2.mjs → chunk-TR7TWGHB.mjs} +1 -1
- package/dist/chunk-U5XL7D6A.mjs +3 -0
- package/dist/{chunk-PVER7LSC.mjs → chunk-U7NZI6N4.mjs} +2 -2
- package/dist/{chunk-Q47PLKIJ.mjs → chunk-UGWMMEJ5.mjs} +1 -1
- package/dist/chunk-UJQJKNGK.mjs +2 -0
- package/dist/chunk-UYVCQK3H.mjs +22 -0
- package/dist/{chunk-FJYN7RTH.mjs → chunk-VFX2KNHP.mjs} +1 -1
- package/dist/{chunk-UBBRTJ2R.mjs → chunk-VS7JIGJW.mjs} +1 -1
- package/dist/{chunk-NVRNLK25.mjs → chunk-W7665ZEC.mjs} +2 -2
- package/dist/{chunk-NG375ILQ.mjs → chunk-WQDQWCX5.mjs} +1 -1
- package/dist/chunk-YLPSMDIS.mjs +5 -0
- package/dist/{chunk-VXACTLO3.mjs → chunk-YNAWBAYN.mjs} +1 -1
- package/dist/{chunk-ZB4H7ZN4.mjs → chunk-YROX2O22.mjs} +1 -1
- package/dist/{chunk-YQGT4AB2.mjs → chunk-ZDLPUOAG.mjs} +1 -1
- package/dist/chunk-ZQS6H473.mjs +16 -0
- package/dist/{chunk-OJKMINIU.mjs → chunk-ZWWC4KLF.mjs} +15 -15
- package/dist/cli.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/dist/worker.mjs +1 -1
- package/kit/board.css +5 -5
- package/kit/code.js +15 -15
- package/kit/report.css +120 -41
- package/kit/runtime.js +45 -7
- package/kit/tables.js +2 -0
- package/kit/ui.js +2 -0
- package/package.json +1 -1
- package/packs/gallery/chart-view/kit.js +3 -3
- package/packs/gallery/chart-view/writing.md +1 -1
- package/packs/gallery/countdown/component.json +1 -1
- package/packs/gallery/countdown/kit.js +89 -29
- package/packs/gallery/countdown/preview.svg +1 -1
- package/packs/gallery/countdown/style.css +88 -100
- package/packs/gallery/countdown/writing.md +2 -2
- package/packs/gallery/habit/component.json +3 -3
- package/packs/gallery/habit/kit.js +114 -75
- package/packs/gallery/habit/preview.svg +1 -1
- package/packs/gallery/habit/style.css +133 -205
- package/packs/gallery/habit/writing.md +2 -2
- package/packs/gallery/heatmap/component.json +2 -2
- package/packs/gallery/heatmap/kit.js +335 -173
- package/packs/gallery/heatmap/preview.svg +1 -1
- package/packs/gallery/heatmap/style.css +158 -170
- package/packs/gallery/heatmap/writing.md +2 -2
- package/packs/gallery/kanban/kit.js +3 -3
- package/packs/gallery/kanban/writing.md +1 -1
- package/packs/gallery/metric/kit.js +3 -3
- package/packs/gallery/metric/writing.md +1 -1
- package/packs/gallery/note/component.json +3 -3
- package/packs/gallery/note/kit.js +40 -13
- package/packs/gallery/note/preview.svg +1 -1
- package/packs/gallery/note/style.css +51 -30
- package/packs/gallery/note/writing.md +2 -2
- package/packs/gallery/recent/component.json +2 -2
- package/packs/gallery/recent/kit.js +141 -86
- package/packs/gallery/recent/preview.svg +1 -1
- package/packs/gallery/recent/style.css +53 -126
- package/packs/gallery/recent/writing.md +2 -2
- package/packs/gallery/static/component.json +2 -2
- package/packs/gallery/static/preview.svg +1 -1
- package/packs/gallery/static/style.css +99 -66
- package/packs/gallery/static/writing.md +2 -2
- package/packs/gallery/stats/component.json +3 -3
- package/packs/gallery/stats/kit.js +253 -72
- package/packs/gallery/stats/preview.svg +1 -1
- package/packs/gallery/stats/style.css +64 -142
- package/packs/gallery/stats/writing.md +2 -2
- package/packs/gallery/today/component.json +2 -2
- package/packs/gallery/today/kit.js +62 -27
- package/packs/gallery/today/preview.svg +1 -1
- package/packs/gallery/today/style.css +101 -72
- package/packs/gallery/today/writing.md +2 -2
- package/packs/gallery/todos/component.json +1 -1
- package/packs/gallery/todos/kit.js +218 -71
- package/packs/gallery/todos/preview.svg +1 -1
- package/packs/gallery/todos/style.css +170 -223
- package/packs/gallery/todos/writing.md +1 -1
- package/packs/gallery/weather/component.json +2 -2
- package/packs/gallery/weather/kit.js +165 -90
- package/packs/gallery/weather/preview.svg +1 -1
- package/packs/gallery/weather/style.css +100 -218
- package/packs/gallery/weather/writing.md +1 -1
- package/packs/gallery-soft/countdown/component.json +18 -0
- package/packs/gallery-soft/countdown/example.html +3 -0
- package/packs/gallery-soft/countdown/kit.js +206 -0
- package/packs/gallery-soft/countdown/preview.svg +1 -0
- package/packs/gallery-soft/countdown/style.css +211 -0
- package/packs/gallery-soft/countdown/template.html +3 -0
- package/packs/gallery-soft/countdown/writing.md +24 -0
- package/packs/gallery-soft/habit/component.json +14 -0
- package/packs/gallery-soft/habit/example.html +3 -0
- package/packs/gallery-soft/habit/kit.js +366 -0
- package/packs/gallery-soft/habit/preview.svg +1 -0
- package/packs/gallery-soft/habit/style.css +251 -0
- package/packs/gallery-soft/habit/template.html +3 -0
- package/packs/gallery-soft/habit/writing.md +23 -0
- package/packs/gallery-soft/heatmap/component.json +18 -0
- package/packs/gallery-soft/heatmap/example.html +3 -0
- package/packs/gallery-soft/heatmap/kit.js +498 -0
- package/packs/gallery-soft/heatmap/preview.svg +1 -0
- package/packs/gallery-soft/heatmap/style.css +181 -0
- package/packs/gallery-soft/heatmap/template.html +3 -0
- package/packs/gallery-soft/heatmap/writing.md +23 -0
- package/packs/gallery-soft/note/component.json +14 -0
- package/packs/gallery-soft/note/example.html +3 -0
- package/packs/gallery-soft/note/kit.js +162 -0
- package/packs/gallery-soft/note/preview.svg +1 -0
- package/packs/gallery-soft/note/style.css +148 -0
- package/packs/gallery-soft/note/template.html +3 -0
- package/packs/gallery-soft/note/writing.md +20 -0
- package/packs/gallery-soft/recent/component.json +13 -0
- package/packs/gallery-soft/recent/example.html +1 -0
- package/packs/gallery-soft/recent/kit.js +335 -0
- package/packs/gallery-soft/recent/preview.svg +1 -0
- package/packs/gallery-soft/recent/style.css +160 -0
- package/packs/gallery-soft/recent/template.html +1 -0
- package/packs/gallery-soft/recent/writing.md +17 -0
- package/packs/gallery-soft/static/component.json +13 -0
- package/packs/gallery-soft/static/example.html +12 -0
- package/packs/gallery-soft/static/preview.svg +1 -0
- package/packs/gallery-soft/static/style.css +186 -0
- package/packs/gallery-soft/static/template.html +1 -0
- package/packs/gallery-soft/static/writing.md +20 -0
- package/packs/gallery-soft/stats/component.json +13 -0
- package/packs/gallery-soft/stats/example.html +1 -0
- package/packs/gallery-soft/stats/kit.js +341 -0
- package/packs/gallery-soft/stats/preview.svg +1 -0
- package/packs/gallery-soft/stats/style.css +119 -0
- package/packs/gallery-soft/stats/template.html +1 -0
- package/packs/gallery-soft/stats/writing.md +13 -0
- package/packs/gallery-soft/today/component.json +12 -0
- package/packs/gallery-soft/today/example.html +1 -0
- package/packs/gallery-soft/today/kit.js +222 -0
- package/packs/gallery-soft/today/preview.svg +1 -0
- package/packs/gallery-soft/today/style.css +178 -0
- package/packs/gallery-soft/today/template.html +1 -0
- package/packs/gallery-soft/today/writing.md +16 -0
- package/packs/gallery-soft/todos/component.json +19 -0
- package/packs/gallery-soft/todos/example.html +3 -0
- package/packs/gallery-soft/todos/kit.js +527 -0
- package/packs/gallery-soft/todos/preview.svg +1 -0
- package/packs/gallery-soft/todos/style.css +212 -0
- package/packs/gallery-soft/todos/template.html +3 -0
- package/packs/gallery-soft/todos/writing.md +32 -0
- package/packs/gallery-soft/weather/component.json +19 -0
- package/packs/gallery-soft/weather/example.html +3 -0
- package/packs/gallery-soft/weather/kit.js +411 -0
- package/packs/gallery-soft/weather/preview.svg +1 -0
- package/packs/gallery-soft/weather/style.css +185 -0
- package/packs/gallery-soft/weather/template.html +3 -0
- package/packs/gallery-soft/weather/writing.md +28 -0
- package/release.json +9 -9
- package/skill/SKILL.md +12 -12
- package/skill/references/building-blocks.md +4 -4
- package/skill/references/pages-and-data.md +13 -9
- package/skill/references/writing-html.md +2 -0
- package/web/assets/index-BM_K-Auu.css +1 -0
- package/web/assets/index-DRslOBiv.js +15 -0
- package/web/index.html +2 -2
- package/dist/chunk-2NRBY6AJ.mjs +0 -2
- package/dist/chunk-35NQ4PLQ.mjs +0 -2
- package/dist/chunk-4AV456RQ.mjs +0 -2
- package/dist/chunk-5XYHDBJ5.mjs +0 -2
- package/dist/chunk-6A53MZYZ.mjs +0 -2
- package/dist/chunk-6EXH3ORZ.mjs +0 -166
- package/dist/chunk-BVEFGE4B.mjs +0 -2
- package/dist/chunk-D4EURAX4.mjs +0 -4
- package/dist/chunk-DQCE7TJY.mjs +0 -5
- package/dist/chunk-FWNRPMCJ.mjs +0 -12
- package/dist/chunk-FWW4CSAZ.mjs +0 -2
- package/dist/chunk-JVHHHGEA.mjs +0 -3
- package/dist/chunk-PZDLJJTJ.mjs +0 -3
- package/dist/chunk-SXHBYZST.mjs +0 -16
- package/dist/chunk-UFNYFFKO.mjs +0 -20
- package/dist/chunk-UKSHDZZ6.mjs +0 -2
- package/dist/chunk-VJPFVNNW.mjs +0 -15
- package/dist/chunk-VS3ZMVGX.mjs +0 -5
- package/web/assets/index-BK2e_07w.js +0 -13
- 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
|
|
3
|
-
the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
42
|
-
|
|
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-
|
|
48
|
-
color: var(--gallery-
|
|
33
|
+
background: var(--gallery-warm-soft);
|
|
34
|
+
color: var(--gallery-warm);
|
|
49
35
|
}
|
|
50
|
-
> .gallery-habit-face > .gallery-habit-head > .gallery-habit-chip
|
|
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
|
-
|
|
53
|
-
min-width:
|
|
40
|
+
field-sizing: content;
|
|
41
|
+
min-width: 2em;
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
flex: 0 1 auto;
|
|
54
44
|
box-sizing: border-box;
|
|
55
|
-
|
|
56
|
-
margin: 0
|
|
57
|
-
padding:
|
|
45
|
+
height: 20px;
|
|
46
|
+
margin: 0 -4px;
|
|
47
|
+
padding: 0 4px;
|
|
58
48
|
border: 0;
|
|
59
|
-
border-radius:
|
|
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
|
|
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(--
|
|
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-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
font-
|
|
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-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
93
|
-
font-weight: 500;
|
|
94
|
-
color: var(--gallery-accent);
|
|
94
|
+
font-weight: 600;
|
|
95
95
|
white-space: nowrap;
|
|
96
96
|
cursor: pointer;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
> .gallery-habit-face > .gallery-habit-check:
|
|
100
|
-
> .gallery-habit-face > .gallery-habit-
|
|
101
|
-
> .gallery-habit-face > .gallery-habit-check.gallery-habit-done
|
|
102
|
-
|
|
103
|
-
> .gallery-habit-face > .gallery-habit-check:
|
|
104
|
-
> .gallery-habit-face > .gallery-habit-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
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(--
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
/*
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
[data-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
|
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,
|
|
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
|
-
|
|
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": "
|
|
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,
|
|
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
|
],
|