@heycys/gallery 0.1.2 → 0.2.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.
- 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/icon/page.mjs +6 -4
- package/browser/editor/components/icons.mjs +5 -2
- 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/import/read.mjs +20 -2
- 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/document-copy.mjs +43 -0
- package/browser/shared/drafts.mjs +10 -3
- package/browser/shared/emoji/icon-value.mjs +2 -2
- package/browser/shared/emoji/line-icons.mjs +37 -0
- package/browser/shared/extensions.mjs +83 -7
- package/browser/shared/http.mjs +9 -0
- package/browser/shared/i18n/en.mjs +50 -17
- package/browser/shared/outline-shape.mjs +6 -0
- package/browser/shared/outline.mjs +165 -12
- 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/browser/shared/workspace-columns.mjs +11 -7
- package/dist/{chunk-N7AZZLGT.mjs → chunk-2GKGEVMR.mjs} +29 -24
- package/dist/chunk-2OHANJ6Q.mjs +2 -0
- package/dist/{chunk-HYMEEXKN.mjs → chunk-2RKIHJI2.mjs} +1 -1
- package/dist/{chunk-742D2WWJ.mjs → chunk-36FIRJIF.mjs} +2 -2
- package/dist/{chunk-BPL64HGA.mjs → chunk-3A5I2GJK.mjs} +1 -1
- package/dist/{chunk-RFDZXFJF.mjs → chunk-3OFXMN6N.mjs} +1 -1
- package/dist/chunk-46ACXOU5.mjs +2 -0
- package/dist/{chunk-PUOQ65NC.mjs → chunk-4AMTKWDO.mjs} +1 -1
- package/dist/{chunk-VTKNEYT3.mjs → chunk-4DNHHJSL.mjs} +1 -1
- package/dist/chunk-5DPABPBI.mjs +2 -0
- package/dist/chunk-5IIH335D.mjs +3 -0
- package/dist/chunk-5L26JUYA.mjs +2 -0
- package/dist/{chunk-3NJACR4W.mjs → chunk-5MEXZ2UF.mjs} +1 -1
- package/dist/{chunk-ZHEHPMBK.mjs → chunk-6MPKCH3P.mjs} +1 -1
- package/dist/{chunk-C564NU2H.mjs → chunk-74RPP2M2.mjs} +1 -1
- package/dist/chunk-7M2BQQGZ.mjs +2 -0
- package/dist/{chunk-VXACTLO3.mjs → chunk-7M7UPWU6.mjs} +1 -1
- package/dist/{chunk-ZB4H7ZN4.mjs → chunk-7N2LPG33.mjs} +1 -1
- package/dist/{chunk-UBBRTJ2R.mjs → chunk-7XDYK3UC.mjs} +1 -1
- package/dist/chunk-AEMVZYZQ.mjs +166 -0
- package/dist/{chunk-POQSE4C2.mjs → chunk-AFGUR7SY.mjs} +1 -1
- package/dist/{chunk-QKXMPUXC.mjs → chunk-AMDGVDNV.mjs} +1 -1
- package/dist/{chunk-KTKHRC6H.mjs → chunk-ASAXY2DJ.mjs} +1 -1
- package/dist/{chunk-NVRNLK25.mjs → chunk-BYSF5UMM.mjs} +2 -2
- package/dist/{chunk-U3SSPL4K.mjs → chunk-CCSGFCLZ.mjs} +1 -1
- package/dist/{chunk-NWFBE2YA.mjs → chunk-CG3UHDKH.mjs} +1 -1
- package/dist/chunk-CPS4SRPF.mjs +5 -0
- package/dist/{chunk-B4P2CM2J.mjs → chunk-CZ5KJSGK.mjs} +1 -1
- package/dist/chunk-DAMVDXR3.mjs +2 -0
- package/dist/{chunk-NG375ILQ.mjs → chunk-DH6GMDNN.mjs} +1 -1
- package/dist/chunk-DHB7UZ7F.mjs +3 -0
- package/dist/{chunk-MHW7ZKOU.mjs → chunk-DKR7LFIY.mjs} +1 -1
- package/dist/chunk-DLFZJJEE.mjs +2 -0
- package/dist/{chunk-6EZ7FNIK.mjs → chunk-F4ZA6JRZ.mjs} +1 -1
- package/dist/{chunk-6VTU6KEO.mjs → chunk-FCK6NXON.mjs} +1 -1
- package/dist/{chunk-ZWPMCK7P.mjs → chunk-FX42XU6J.mjs} +1 -1
- package/dist/chunk-FXQBADMN.mjs +5 -0
- package/dist/{chunk-W3BGBJQW.mjs → chunk-G4YP7GVC.mjs} +1 -1
- package/dist/{chunk-V6XZ4VIR.mjs → chunk-GWOYMENX.mjs} +1 -1
- package/dist/chunk-HATA2W7X.mjs +2 -0
- package/dist/{chunk-YI43RG4P.mjs → chunk-HBAUKKQH.mjs} +1 -1
- package/dist/{chunk-MAFIGVXY.mjs → chunk-HM4E43VM.mjs} +1 -1
- package/dist/{chunk-CRJEG7MT.mjs → chunk-JI6T3A4Y.mjs} +1 -1
- package/dist/{chunk-NFMCP2HI.mjs → chunk-JJNRIFND.mjs} +2 -2
- package/dist/chunk-JL6R4FG4.mjs +4 -0
- package/dist/{chunk-UMHUSOPJ.mjs → chunk-JXLSHVJ2.mjs} +1 -1
- package/dist/{chunk-FJYN7RTH.mjs → chunk-KFZBYDIS.mjs} +1 -1
- package/dist/{chunk-ZTHICSSF.mjs → chunk-KH24LWAT.mjs} +1 -1
- package/dist/{chunk-RKPWLGZ3.mjs → chunk-KUILYI7H.mjs} +1 -1
- package/dist/{chunk-RMECZA2K.mjs → chunk-L7W624FD.mjs} +1 -1
- package/dist/chunk-LE44MD3O.mjs +4 -0
- package/dist/{chunk-4K5KC6V2.mjs → chunk-LV24RY2E.mjs} +1 -1
- package/dist/{chunk-43B75J5T.mjs → chunk-MKTX5PGV.mjs} +1 -1
- package/dist/{chunk-LKX55H76.mjs → chunk-NAGMRVW4.mjs} +1 -1
- package/dist/{chunk-D4CKRD3V.mjs → chunk-NFABH3QW.mjs} +2 -2
- package/dist/{chunk-PVER7LSC.mjs → chunk-NIW7F7LU.mjs} +2 -2
- package/dist/{chunk-PAREWQGB.mjs → chunk-NWRZXELO.mjs} +1 -1
- package/dist/{chunk-OJKMINIU.mjs → chunk-OU3S466R.mjs} +15 -15
- package/dist/{chunk-5ZJA7CXT.mjs → chunk-PAFSFVYB.mjs} +1 -1
- package/dist/chunk-QCEATQC4.mjs +2 -0
- package/dist/{chunk-Y34NR5JL.mjs → chunk-QJ3TFJLQ.mjs} +1 -1
- package/dist/{chunk-IA4PSIMD.mjs → chunk-QK3VISCA.mjs} +1 -1
- package/dist/{chunk-ZUNVAXLH.mjs → chunk-QXVNUASA.mjs} +1 -1
- package/dist/{chunk-GRAXKKG4.mjs → chunk-QZ35UAB4.mjs} +1 -1
- package/dist/{chunk-UGWYKHBL.mjs → chunk-S2Y7VI4H.mjs} +2 -2
- package/dist/{chunk-OW5NWPOJ.mjs → chunk-SAHS56QM.mjs} +1 -1
- package/dist/{chunk-QOUEFUCH.mjs → chunk-SOD23RGL.mjs} +1 -1
- package/dist/chunk-TDWJKOLN.mjs +2 -0
- package/dist/{chunk-V6RIYQZZ.mjs → chunk-TOE6DPLH.mjs} +1 -1
- package/dist/chunk-UGO5N3EI.mjs +15 -0
- package/dist/{chunk-Q47PLKIJ.mjs → chunk-UGWMMEJ5.mjs} +1 -1
- package/dist/{chunk-NWR2LT5B.mjs → chunk-V5JRSGZF.mjs} +1 -1
- package/dist/{chunk-BZ5RAF7L.mjs → chunk-VA3KAQZD.mjs} +1 -1
- package/dist/chunk-VG5JEIUQ.mjs +12 -0
- package/dist/{chunk-UNOYVIYR.mjs → chunk-VGTMLQWZ.mjs} +1 -1
- package/dist/chunk-VKSRM7EY.mjs +22 -0
- package/dist/{chunk-YQGT4AB2.mjs → chunk-VNUWREXU.mjs} +1 -1
- package/dist/{chunk-AGDILNWB.mjs → chunk-VPVOAJ7X.mjs} +1 -1
- package/dist/{chunk-HLYV7RIH.mjs → chunk-WCWYNFDF.mjs} +1 -1
- package/dist/chunk-WTEGUPFG.mjs +16 -0
- package/dist/{chunk-N76HWBA3.mjs → chunk-XKOHV4H6.mjs} +1 -1
- package/dist/{chunk-HMYTM3GT.mjs → chunk-XMKHCUI6.mjs} +1 -1
- package/dist/{chunk-OUUP3WKT.mjs → chunk-XQRUG4G3.mjs} +1 -1
- package/dist/{chunk-32ZUEFZ7.mjs → chunk-YBB5LWZK.mjs} +1 -1
- package/dist/{chunk-SX4LJYT6.mjs → chunk-YFJU3O7G.mjs} +1 -1
- package/dist/chunk-YPPJVDQI.mjs +2 -0
- package/dist/chunk-ZANMKAWS.mjs +2 -0
- package/dist/{chunk-6QBHU4DF.mjs → chunk-ZCP7BTOZ.mjs} +1 -1
- package/dist/{chunk-ERLAIBOA.mjs → chunk-ZEY2RLBT.mjs} +2 -2
- package/dist/{chunk-SQ6Y2ZMA.mjs → chunk-ZO7SFB2E.mjs} +2 -2
- 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/math.js +1 -1
- package/kit/report.css +123 -44
- 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 +10 -10
- package/skill/SKILL.md +15 -14
- package/skill/references/building-blocks.md +4 -4
- package/skill/references/extensions.md +11 -7
- package/skill/references/pages-and-data.md +13 -9
- package/skill/references/writing-html.md +2 -0
- package/web/assets/index-BHC5ZOMh.js +15 -0
- package/web/assets/index-xP0uw3a0.css +1 -0
- package/web/index.html +2 -2
- package/dist/chunk-2NRBY6AJ.mjs +0 -2
- package/dist/chunk-35NQ4PLQ.mjs +0 -2
- package/dist/chunk-3KJHLHUO.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-GY3FAUVM.mjs +0 -2
- package/dist/chunk-JVHHHGEA.mjs +0 -3
- package/dist/chunk-L7UP52JO.mjs +0 -2
- package/dist/chunk-NAMN3RAF.mjs +0 -2
- package/dist/chunk-PZDLJJTJ.mjs +0 -3
- package/dist/chunk-SXHBYZST.mjs +0 -16
- package/dist/chunk-TEZAWDSQ.mjs +0 -2
- 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
- /package/dist/{chunk-YEY3RSFQ.mjs → chunk-5MMN3N5J.mjs} +0 -0
- /package/dist/{chunk-UH4SIXTR.mjs → chunk-74UW7QSL.mjs} +0 -0
- /package/dist/{chunk-W7XHE4CT.mjs → chunk-EKGYYOSP.mjs} +0 -0
- /package/dist/{chunk-QAIHRH3I.mjs → chunk-KNZJT4ET.mjs} +0 -0
- /package/dist/{chunk-A55HN5OK.mjs → chunk-N3DSBH5S.mjs} +0 -0
- /package/dist/{chunk-QR6A54KJ.mjs → chunk-ZW2A6GBW.mjs} +0 -0
|
@@ -1,151 +1,73 @@
|
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
ending short of the next one's line, and on a card too low for two rows with their air (under 160px: a
|
|
11
|
-
4 x 2 one from a window 1440px wide and narrower) in a row too, smaller; a line under them where the
|
|
12
|
-
workspace cannot be read. Light and dark. */
|
|
2
|
+
reaches the rest of the page. The pack's design B, in the kit's card tokens: no head, four cells, each
|
|
3
|
+
its label after a small picture of what it counts (12px, muted; the picture faint), its number (28px,
|
|
4
|
+
32px on a wide card) with its unit or its whole after it, its picture at the bottom (the documents'
|
|
5
|
+
squares, the words' line and the area fading under it, the to-dos' bar, the week's bars: the accent and
|
|
6
|
+
its middle shade, on the track) and a faint line under it, its key words 600. In a row (8 × 2, 12 × 2)
|
|
7
|
+
the cells stand a hairline apart, the face out over the card's padding at its sides so that each cell has
|
|
8
|
+
the card's own 16px; two by two (4 × 4) the face fills the card, each cell padded 16px, lined between
|
|
9
|
+
them. Unread (no workspace) a faint dash each and a line at the bottom left. Light and dark. */
|
|
13
10
|
[data-doc-component="gallery/stats"] {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
> .gallery-stats-face > .gallery-stats-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
padding-inline-end: var(--gallery-grip-room, 0px);
|
|
32
|
-
}
|
|
33
|
-
> .gallery-stats-face > .gallery-stats-head > .gallery-stats-chip {
|
|
34
|
-
flex: none;
|
|
35
|
-
display: inline-flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
width: var(--gallery-chip-size);
|
|
39
|
-
height: var(--gallery-chip-size);
|
|
40
|
-
border-radius: var(--gallery-chip-radius);
|
|
41
|
-
background: var(--gallery-accent-soft);
|
|
42
|
-
color: var(--gallery-accent);
|
|
43
|
-
}
|
|
44
|
-
> .gallery-stats-face > .gallery-stats-head > .gallery-stats-chip > svg { width: var(--gallery-chip-icon); height: var(--gallery-chip-icon); }
|
|
45
|
-
> .gallery-stats-face > .gallery-stats-head > .gallery-stats-title {
|
|
46
|
-
min-width: 0;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
text-overflow: ellipsis;
|
|
50
|
-
font-size: var(--gallery-title-size);
|
|
51
|
-
line-height: var(--gallery-title-line);
|
|
52
|
-
font-weight: 600;
|
|
53
|
-
color: var(--gallery-text-strong);
|
|
54
|
-
}
|
|
55
|
-
> .gallery-stats-face > .gallery-stats-grid {
|
|
56
|
-
display: grid;
|
|
57
|
-
flex: 1 1 auto;
|
|
58
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
59
|
-
align-content: space-evenly;
|
|
60
|
-
gap: var(--gallery-face-gap) 16px;
|
|
61
|
-
min-height: 0;
|
|
62
|
-
margin: 0;
|
|
63
|
-
}
|
|
64
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell { min-width: 0; }
|
|
65
|
-
/* Each label after a small picture of what it counts, in its muted color. */
|
|
66
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
gap: 5px;
|
|
70
|
-
font-size: var(--gallery-meta-size);
|
|
71
|
-
line-height: 16px;
|
|
72
|
-
color: var(--doc-muted);
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
white-space: nowrap;
|
|
75
|
-
text-overflow: ellipsis;
|
|
76
|
-
}
|
|
77
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label::before {
|
|
78
|
-
content: "";
|
|
79
|
-
flex: none;
|
|
80
|
-
width: 13px;
|
|
81
|
-
height: 13px;
|
|
82
|
-
background: currentColor;
|
|
83
|
-
opacity: .85;
|
|
84
|
-
-webkit-mask: var(--gallery-stats-icon) center / contain no-repeat;
|
|
85
|
-
mask: var(--gallery-stats-icon) center / contain no-repeat;
|
|
86
|
-
}
|
|
87
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="documents"] { --gallery-stats-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2z'/%3E%3C/svg%3E"); }
|
|
88
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="todos"] { --gallery-stats-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
|
|
89
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="words"] { --gallery-stats-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7V5h14v2'/%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M9 19h6'/%3E%3C/svg%3E"); }
|
|
90
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell[data-stat="week"] { --gallery-stats-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L18.5 9.5a2.83 2.83 0 1 0-4-4L4 16v4'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E"); }
|
|
91
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value {
|
|
92
|
-
display: flex;
|
|
93
|
-
flex-wrap: wrap;
|
|
94
|
-
align-items: baseline;
|
|
95
|
-
margin: 3px 0 0;
|
|
96
|
-
font-size: var(--gallery-figure-size);
|
|
97
|
-
line-height: 1.1;
|
|
11
|
+
font-family: var(--gallery-font);
|
|
12
|
+
font-size: 13px;
|
|
13
|
+
line-height: 1.5;
|
|
14
|
+
color: var(--gallery-text);
|
|
15
|
+
> .gallery-stats-face { position: relative; display: flex; flex-direction: column; box-sizing: border-box; min-height: 0; }
|
|
16
|
+
> .gallery-stats-face > .gallery-stats-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 0; margin: 0; }
|
|
17
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell { display: flex; flex-direction: column; min-width: 0; padding: 0 16px; }
|
|
18
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left: 1px solid var(--gallery-hair); }
|
|
19
|
+
> .gallery-stats-face[data-unread] > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left-color: transparent; }
|
|
20
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > dd { margin: 0; }
|
|
21
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label { display: flex; align-items: center; gap: 6px; padding-inline-end: 0; font-size: 12px; line-height: 16px; color: var(--gallery-muted); white-space: nowrap; }
|
|
22
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label > svg { flex: none; width: 13px; height: 13px; color: var(--gallery-faint); }
|
|
23
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label > .gallery-stats-label-words { overflow: hidden; text-overflow: ellipsis; }
|
|
24
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { display: flex; align-items: baseline; margin-top: 7px; white-space: nowrap; }
|
|
25
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number {
|
|
26
|
+
font-size: 28px;
|
|
27
|
+
line-height: 1;
|
|
98
28
|
font-weight: var(--gallery-numeral-weight);
|
|
99
29
|
letter-spacing: var(--gallery-numeral-tracking);
|
|
30
|
+
font-variant-numeric: lining-nums;
|
|
100
31
|
color: var(--gallery-text-strong);
|
|
101
|
-
font-variant-numeric: tabular-nums;
|
|
102
|
-
white-space: nowrap;
|
|
103
|
-
}
|
|
104
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit {
|
|
105
|
-
margin-inline-start: var(--gallery-unit-gap);
|
|
106
|
-
font-size: max(12px, var(--gallery-unit-size));
|
|
107
|
-
font-weight: 500;
|
|
108
|
-
letter-spacing: 0;
|
|
109
|
-
color: var(--doc-muted);
|
|
110
|
-
}
|
|
111
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit:empty { display: none; }
|
|
112
|
-
/* The share of the to-dos done: a bar of the accent on the track under the count, as wide as the cell. */
|
|
113
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-bar {
|
|
114
|
-
flex: 0 0 100%;
|
|
115
|
-
height: 4px;
|
|
116
|
-
margin-top: 6px;
|
|
117
|
-
border-radius: 2px;
|
|
118
|
-
background: var(--gallery-track);
|
|
119
|
-
overflow: hidden;
|
|
120
32
|
}
|
|
121
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-
|
|
129
|
-
|
|
33
|
+
> .gallery-stats-face[data-unread] > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number { font-weight: 300; color: var(--gallery-faintest); }
|
|
34
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-unit { margin-left: 3px; font-size: var(--gallery-unit); font-weight: 500; color: var(--gallery-muted); }
|
|
35
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-of { margin-left: 3px; font-size: 15px; font-weight: 600; color: var(--gallery-faint); }
|
|
36
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-picture { margin-top: auto; }
|
|
37
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-picture > svg { display: block; overflow: visible; }
|
|
38
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; line-height: 16px; color: var(--gallery-faint); white-space: nowrap; overflow: hidden; }
|
|
39
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption > .gallery-stats-mark { flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--gallery-accent); }
|
|
40
|
+
> .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-caption > .gallery-stats-strong { font-weight: 600; color: var(--gallery-muted); }
|
|
41
|
+
/* The pictures' colors. */
|
|
42
|
+
> .gallery-stats-face .gallery-stats-on { fill: var(--gallery-accent); }
|
|
43
|
+
> .gallery-stats-face :is(.gallery-stats-off, .gallery-stats-stub) { fill: var(--gallery-track); }
|
|
44
|
+
> .gallery-stats-face .gallery-stats-empty { fill: var(--gallery-fill); }
|
|
45
|
+
> .gallery-stats-face .gallery-stats-flat { stroke: var(--gallery-track); }
|
|
46
|
+
> .gallery-stats-face .gallery-stats-line { stroke: var(--gallery-accent); }
|
|
47
|
+
> .gallery-stats-face .gallery-stats-stop { stop-color: var(--gallery-accent); }
|
|
48
|
+
> .gallery-stats-face .gallery-stats-end { fill: var(--gallery-accent); stroke: var(--gallery-card-fill); }
|
|
49
|
+
> .gallery-stats-face .gallery-stats-today { fill: var(--gallery-accent); }
|
|
50
|
+
> .gallery-stats-face .gallery-stats-day { fill: var(--gallery-accent-mid); }
|
|
51
|
+
> .gallery-stats-face .gallery-stats-bar { position: relative; display: block; height: 6px; border-radius: 3px; overflow: hidden; background: var(--gallery-track); }
|
|
52
|
+
> .gallery-stats-face .gallery-stats-bar > .gallery-stats-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--gallery-accent); }
|
|
53
|
+
/* Unread: a line at the bottom left. */
|
|
54
|
+
> .gallery-stats-face > .gallery-stats-line { position: absolute; left: 16px; bottom: 0; margin: 0; font-size: 11.5px; line-height: 16px; color: var(--gallery-faint); }
|
|
130
55
|
> .gallery-stats-face > .gallery-stats-line[hidden] { display: none; }
|
|
56
|
+
/* A wide card: the numbers larger. */
|
|
57
|
+
> .gallery-stats-face[data-layout="wide"] > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value > .gallery-stats-number { font-size: 32px; }
|
|
58
|
+
/* A square card: two by two. */
|
|
59
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
|
|
60
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell { padding: 16px; }
|
|
61
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { border-left: 0; }
|
|
62
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell:nth-child(2n) { border-left: 1px solid var(--gallery-hair); }
|
|
63
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-grid > .gallery-stats-cell:nth-child(n + 3) { border-top: 1px solid var(--gallery-hair); }
|
|
64
|
+
> .gallery-stats-face[data-layout="square"][data-unread] > .gallery-stats-grid > .gallery-stats-cell { border-color: transparent; }
|
|
65
|
+
> .gallery-stats-face[data-layout="square"] .gallery-stats-bar { height: 8px; border-radius: 4px; }
|
|
66
|
+
> .gallery-stats-face[data-layout="square"] .gallery-stats-bar > .gallery-stats-fill { border-radius: 4px; }
|
|
67
|
+
> .gallery-stats-face[data-layout="square"] > .gallery-stats-line { bottom: 16px; }
|
|
131
68
|
}
|
|
132
|
-
/*
|
|
133
|
-
|
|
134
|
-
@container (min-width: 560px) {
|
|
135
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
|
|
136
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell + .gallery-stats-cell { padding-inline-start: 20px; border-inline-start: 1px solid var(--doc-grid); }
|
|
137
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell:not(:last-child) { padding-inline-end: 16px; }
|
|
138
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { font-size: var(--gallery-hero-size); }
|
|
139
|
-
}
|
|
140
|
-
/* Low (under 160px: a 4 x 2 card from a window 1440px wide and narrower, where two rows under the head would
|
|
141
|
-
leave the second at the card's bottom edge): the four in one row, their numbers smaller, their labels with
|
|
142
|
-
no picture. */
|
|
143
|
-
@container (max-height: 160px) and (max-width: 559px) {
|
|
144
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; align-content: center; }
|
|
145
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-label::before { display: none; }
|
|
146
|
-
[data-doc-component="gallery/stats"] > .gallery-stats-face > .gallery-stats-grid > .gallery-stats-cell > .gallery-stats-value { font-size: clamp(16px, 6.4cqi, 22px); }
|
|
147
|
-
}
|
|
148
|
-
/* On a custom page the face is the card's: as high as what the card holds inside its padding. Where no card
|
|
149
|
-
is around it (a document, as gallery block check shows it) it is as high as a 4 x 2 card's face, for the
|
|
150
|
-
instance is a container of its height too and would otherwise have none. */
|
|
69
|
+
/* On a custom page the face is the card's: out over its padding at its sides (all round when square), so
|
|
70
|
+
that each cell has the card's own room. */
|
|
151
71
|
.gallery-card > [data-doc-component="gallery/stats"] { height: 100%; }
|
|
72
|
+
.gallery-card > [data-doc-component="gallery/stats"] > .gallery-stats-face { height: 100%; margin: 0 calc(-1 * var(--gallery-card-pad)); }
|
|
73
|
+
.gallery-card > [data-doc-component="gallery/stats"] > .gallery-stats-face[data-layout="square"] { height: calc(100% + 2 * var(--gallery-card-pad)); margin: calc(-1 * var(--gallery-card-pad)); }
|
|
@@ -4,8 +4,8 @@ A card for a custom page (its places are `page`, its needs `workspace`): four nu
|
|
|
4
4
|
|
|
5
5
|
## How to write it
|
|
6
6
|
|
|
7
|
-
Put it on a custom page as a card of its board, `<section class="gallery-card" data-card-id="…" data-x data-y data-w data-h>`, holding one instance, after `gallery block add stats`: the instance is empty, `<div data-doc-component="gallery/stats"></div>`, everything on it drawn by its script. It has no settings and holds no data: there is nothing to fill in and nothing it writes. Sizes:
|
|
7
|
+
Put it on a custom page as a card of its board, `<section class="gallery-card" data-card-id="…" data-x data-y data-w data-h>`, holding one instance, after `gallery block add stats`: the instance is empty, `<div data-doc-component="gallery/stats"></div>`, everything on it drawn by its script. It has no settings and holds no data: there is nothing to fill in and nothing it writes. Sizes: 8 × 2 (the default: the four in a row), 12 × 2 (the same, larger) and 4 × 4 (two by two).
|
|
8
8
|
|
|
9
9
|
## How it looks
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
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. It has no head: the four labels are its titles, each after a small picture of what it counts, four cells a hairline apart (two by two on a 4 × 4 card), each a number (28px) and a small chart of its own: the documents a square each, those edited this week in the accent; the words a line of their total over the last 30 days and what those days added (近 30 天 +6万); the to-dos done a bar (70% · 还剩 8 项); the edits this week a bar a day, today's in the accent, against the same days of the week before (比上周同期 +14%). An empty workspace says 0 and what each waits for; where the workspace cannot be read, a dash each.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "gallery/today",
|
|
3
3
|
"apiVersion": 1,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"name": { "zh": "问候与日期", "en": "Greeting and date" },
|
|
6
6
|
"description": { "zh": "按时间问候,显示今天的日期和星期,到点自己更新", "en": "A greeting by the time of day, today's date and weekday, kept up to date by the clock" },
|
|
7
7
|
"words": "wenhouyuriqi wenhou riqi xingqi jintian today greeting date 问候 日期 星期 今天 时间",
|
|
8
8
|
"parts": {},
|
|
9
9
|
"runtime": { "generated": [":scope > .gallery-today-face"] },
|
|
10
10
|
"places": ["page"],
|
|
11
|
-
"card": { "sizes": [[4, 2], [2, 2]], "resize": true }
|
|
11
|
+
"card": { "sizes": [[4, 2], [2, 2], [4, 1]], "resize": true }
|
|
12
12
|
}
|
|
@@ -5,14 +5,20 @@
|
|
|
5
5
|
// else Chinese, the kit's own rule. Drawn again by the kit's clock (`clock`): at each whole minute, which
|
|
6
6
|
// moves the greeting on as the hour turns, and as a day begins, which moves the date; one timer for
|
|
7
7
|
// every block on the page, none of its own. It holds no part and writes nothing: all it shows is drawn
|
|
8
|
-
// (the manifest's `runtime`), and a file holds the bare instance.
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
8
|
+
// (the manifest's `runtime`), and a file holds the bare instance.
|
|
9
|
+
//
|
|
10
|
+
// Its face (the pack's design B, notes/plans/block-packs-plan-2026-11-09.md) is laid out by its card's
|
|
11
|
+
// cells (`context.size`, read again on `layout`: the face's `data-layout`, style.css): a card 3 or more
|
|
12
|
+
// wide and 2 or more high ("full", the 4 × 2 default) has a head of the chip (the sun from 5 to 17 in its
|
|
13
|
+
// warm color, the moon after it in the accent's), the date and the number of the week (ISO 8601's,
|
|
14
|
+
// `weekNumberOf`: 第 46 周) as its quiet meta, the greeting large under it, and the week it is in at the
|
|
15
|
+
// bottom, Monday to Sunday, each day's initial over its date, the days gone fainter, today's 今 (Today)
|
|
16
|
+
// over its date on the accent (`weekOf`, for the eye alone: the date says it); a narrow card ("narrow",
|
|
17
|
+
// 2 wide) is a page of a desk calendar, the greeting in its head, today's day of the month large at the
|
|
18
|
+
// bottom and its weekday and month under it; a card one cell high ("line", 4 × 1) a line, the chip, the
|
|
19
|
+
// greeting and the date. A soft glow from the card's top left, the sun's warm color by day, the accent's
|
|
20
|
+
// in the evening (the face's `data-sky`), the one mood of a home page. The date line's weekday is
|
|
21
|
+
// marked (gallery-today-weekday), a piece a line breaks before and never inside.
|
|
16
22
|
|
|
17
23
|
const WORDS = {
|
|
18
24
|
zh: {
|
|
@@ -27,6 +33,8 @@ const WORDS = {
|
|
|
27
33
|
line: (month, day, weekday) => [`${month}月${day}日`, weekday],
|
|
28
34
|
/** Which of the line's pieces is the weekday. */
|
|
29
35
|
weekdayAt: 1,
|
|
36
|
+
/** A desk calendar's foot: the weekday, then the month. @param {number} month @param {string} weekday */
|
|
37
|
+
foot: (month, weekday) => [weekday, `${month}月`],
|
|
30
38
|
},
|
|
31
39
|
en: {
|
|
32
40
|
morning: "Good morning",
|
|
@@ -37,10 +45,13 @@ const WORDS = {
|
|
|
37
45
|
today: "Today",
|
|
38
46
|
week: (/** @type {number} */ number) => `Week ${number}`,
|
|
39
47
|
/** The weekday first: Saturday, November 7. @param {number} month @param {number} day @param {string} weekday */
|
|
40
|
-
line: (month, day, weekday) => [`${weekday},`, `${[
|
|
48
|
+
line: (month, day, weekday) => [`${weekday},`, `${MONTHS[month - 1]} ${day}`],
|
|
41
49
|
weekdayAt: 0,
|
|
50
|
+
/** @param {number} month @param {string} weekday */
|
|
51
|
+
foot: (month, weekday) => [weekday, MONTHS[month - 1].slice(0, 3)],
|
|
42
52
|
},
|
|
43
53
|
};
|
|
54
|
+
const MONTHS = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
44
55
|
|
|
45
56
|
/** The language the page speaks: the UI's where Gallery says it (data-ge-language), else its lang's. */
|
|
46
57
|
function languageOf(/** @type {HTMLElement} */ root) {
|
|
@@ -77,10 +88,22 @@ function faceOf(now, language) {
|
|
|
77
88
|
};
|
|
78
89
|
}
|
|
79
90
|
|
|
91
|
+
/**
|
|
92
|
+
* How a card of `size` (context.size: its cells, or null where no card holds it, a document) lays its face
|
|
93
|
+
* out: "line" one cell high, "narrow" two wide or less, else "full".
|
|
94
|
+
* @param {{ w: number, h: number } | null | undefined} size
|
|
95
|
+
* @returns {"full" | "narrow" | "line"}
|
|
96
|
+
*/
|
|
97
|
+
function layoutOf(size) {
|
|
98
|
+
if (!size) return "full";
|
|
99
|
+
if (size.h <= 1) return "line";
|
|
100
|
+
return size.w <= 2 ? "narrow" : "full";
|
|
101
|
+
}
|
|
102
|
+
|
|
80
103
|
// The chip's two pictures, 24 x 24 lines in the chip's ink: the sun by day, the moon in the evening.
|
|
81
104
|
const PICTURES = {
|
|
82
|
-
sun: '<circle cx="12" cy="12" r="4"
|
|
83
|
-
moon: '<path d="
|
|
105
|
+
sun: '<circle cx="12" cy="12" r="4"/><path d="M12 2.8v1.9M12 19.3v1.9M2.8 12h1.9M19.3 12h1.9M5.5 5.5l1.3 1.3M17.2 17.2l1.3 1.3M5.5 18.5l1.3-1.3M17.2 6.8l1.3-1.3"/>',
|
|
106
|
+
moon: '<path d="M19.5 14.3A7.8 7.8 0 0 1 9.7 4.5a7.8 7.8 0 1 0 9.8 9.8z"/>',
|
|
84
107
|
};
|
|
85
108
|
|
|
86
109
|
/**
|
|
@@ -124,20 +147,24 @@ function made(tag, kind) {
|
|
|
124
147
|
|
|
125
148
|
DocKit.component({
|
|
126
149
|
id: "gallery/today",
|
|
127
|
-
on: ["clock"],
|
|
128
|
-
mount(host) {
|
|
150
|
+
on: ["clock", "layout"],
|
|
151
|
+
mount(host, context) {
|
|
129
152
|
const face = made("div", "face");
|
|
130
153
|
const chip = made("span", "chip");
|
|
131
154
|
chip.setAttribute("aria-hidden", "true");
|
|
132
155
|
const greeting = made("p", "greeting");
|
|
133
156
|
const date = made("time", "date");
|
|
134
|
-
|
|
135
|
-
week.setAttribute("aria-hidden", "true");
|
|
136
|
-
face.append(chip, greeting, date, week);
|
|
137
|
-
// The head's quiet meta, at its end: the number of the week.
|
|
157
|
+
// The head's quiet meta, after the date: the number of the week.
|
|
138
158
|
const number = made("span", "meta");
|
|
139
159
|
number.setAttribute("aria-hidden", "true");
|
|
140
|
-
|
|
160
|
+
const week = made("ol", "week");
|
|
161
|
+
week.setAttribute("aria-hidden", "true");
|
|
162
|
+
// A narrow card's desk calendar: the day of the month, large, and its weekday and month under it.
|
|
163
|
+
const big = made("span", "big");
|
|
164
|
+
big.setAttribute("aria-hidden", "true");
|
|
165
|
+
const foot = made("span", "foot");
|
|
166
|
+
foot.setAttribute("aria-hidden", "true");
|
|
167
|
+
face.append(chip, greeting, date, number, week, big, foot);
|
|
141
168
|
host.append(face);
|
|
142
169
|
// Each word set only when it is another, so that a minute that changes nothing writes nothing.
|
|
143
170
|
const put = (/** @type {HTMLElement} */ node, /** @type {string} */ words) => {
|
|
@@ -146,7 +173,10 @@ DocKit.component({
|
|
|
146
173
|
const draw = () => {
|
|
147
174
|
const at = new Date();
|
|
148
175
|
const language = languageOf(document.documentElement);
|
|
176
|
+
const words = WORDS[language];
|
|
149
177
|
const now = faceOf(at, language);
|
|
178
|
+
const layout = layoutOf(context?.size);
|
|
179
|
+
if (face.dataset.layout !== layout) face.dataset.layout = layout;
|
|
150
180
|
const sky = partOfDay(at.getHours()) === "evening" ? "moon" : "sun";
|
|
151
181
|
if (chip.dataset.sky !== sky) {
|
|
152
182
|
chip.dataset.sky = sky;
|
|
@@ -156,25 +186,30 @@ DocKit.component({
|
|
|
156
186
|
put(greeting, now.greeting);
|
|
157
187
|
// The date line's pieces, a space between them, made again only when its words are others.
|
|
158
188
|
if (date.textContent !== now.line.join(" ")) {
|
|
159
|
-
date.replaceChildren(...now.line.flatMap((
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return index === 0 ? [
|
|
189
|
+
date.replaceChildren(...now.line.flatMap((piece, index) => {
|
|
190
|
+
const node = made("span", "piece");
|
|
191
|
+
node.classList.toggle("gallery-today-weekday", index === words.weekdayAt);
|
|
192
|
+
node.textContent = piece;
|
|
193
|
+
return index === 0 ? [node] : [" ", node];
|
|
164
194
|
}));
|
|
165
195
|
}
|
|
166
196
|
if (date.dateTime !== now.datetime) {
|
|
167
197
|
date.dateTime = now.datetime;
|
|
168
|
-
number.textContent =
|
|
198
|
+
number.textContent = words.week(weekNumberOf(at));
|
|
199
|
+
big.textContent = String(at.getDate());
|
|
200
|
+
const [weekday, month] = words.foot(at.getMonth() + 1, words.weekdays[at.getDay()]);
|
|
201
|
+
const dot = made("span", "dot");
|
|
202
|
+
dot.textContent = "·";
|
|
203
|
+
foot.replaceChildren(weekday, dot, month);
|
|
169
204
|
week.replaceChildren(...weekOf(at, language).map((day) => {
|
|
170
205
|
const item = made("li", "day");
|
|
171
206
|
item.classList.toggle("gallery-today-now", day.today);
|
|
172
207
|
item.classList.toggle("gallery-today-past", day.past);
|
|
173
208
|
const initial = made("span", "initial");
|
|
174
209
|
initial.textContent = day.initial;
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
item.append(initial,
|
|
210
|
+
const value = made("span", "number");
|
|
211
|
+
value.textContent = String(day.date);
|
|
212
|
+
item.append(initial, value);
|
|
178
213
|
return item;
|
|
179
214
|
}));
|
|
180
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120"><rect width="240" height="120" rx="8" fill="#f3f3f1"/><rect x="16.5" y="12.5" width="207" height="95" rx="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 120"><rect width="240" height="120" rx="8" fill="#f3f3f1"/><defs><radialGradient id="g" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(16 12) scale(140 96)"><stop offset="0" stop-color="#ffb74d" stop-opacity=".22"/><stop offset=".62" stop-color="#ffb74d" stop-opacity="0"/></radialGradient></defs><rect x="16.5" y="12.5" width="207" height="95" rx="8" fill="#ffffff" stroke="#e6e6e3"/><rect x="17" y="13" width="206" height="94" rx="7.5" fill="url(#g)"/><rect x="28" y="22" width="10" height="10" rx="3" fill="#fdf1dd"/><rect x="42" y="24.5" width="46" height="5" rx="2.5" fill="#37352f"/><rect x="92" y="24.5" width="20" height="5" rx="2.5" fill="#d4d3cf"/><rect x="28" y="42" width="60" height="15" rx="3" fill="#1d1d1b"/><rect x="35" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="33" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="62" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="60" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="89" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="87" y="84" width="10" height="6" rx="3" fill="#a6a5a1"/><rect x="108" y="71" width="22" height="26" rx="6" fill="#4084cf"/><rect x="116" y="76" width="6" height="3" rx="1.5" fill="#ffffff"/><rect x="114" y="84" width="10" height="6" rx="3" fill="#ffffff"/><rect x="143" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="141" y="84" width="10" height="6" rx="3" fill="#37352f"/><rect x="170" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="168" y="84" width="10" height="6" rx="3" fill="#37352f"/><rect x="197" y="76" width="6" height="3" rx="1.5" fill="#d4d3cf"/><rect x="195" y="84" width="10" height="6" rx="3" fill="#37352f"/></svg>
|