From 62a8a2b334e8f15d45c252d339d3d26b3a6aa57e Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Sat, 3 Feb 2024 16:13:27 +0800 Subject: [PATCH] [opt] okr --- scripts/tags/lib/okr.js | 2 +- source/css/_layout/tag-plugins/okr.styl | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/tags/lib/okr.js b/scripts/tags/lib/okr.js index cbc4c91..93548e7 100644 --- a/scripts/tags/lib/okr.js +++ b/scripts/tags/lib/okr.js @@ -56,7 +56,7 @@ function generateKRList(ctx, contentArray) { function layoutItem(ctx, type, index, title, note, color, label, percent) { const percentStr = (percent * 100).toString().replace(/\.\d*/, '') return ` -
+
${index.toUpperCase()}
diff --git a/source/css/_layout/tag-plugins/okr.styl b/source/css/_layout/tag-plugins/okr.styl index 91d147e..ef1100f 100644 --- a/source/css/_layout/tag-plugins/okr.styl +++ b/source/css/_layout/tag-plugins/okr.styl @@ -62,6 +62,7 @@ justify-content: space-between align-items: flex-start position relative + flex-wrap: wrap .label background: var(--theme-block) color: var(--text-p1) @@ -102,4 +103,12 @@ background: var(--theme) - \ No newline at end of file +@media screen and (max-width: $device-mobile-max) + .tag-plugin.okr .okr-item + grid-template-columns: 2.8rem auto 50px + grid-column-gap: 0.5rem + padding: 0.5rem + .okr-left .title + padding: 0 0.25rem + .label + txt-ellipsis() \ No newline at end of file