[opt] okr

This commit is contained in:
xaoxuu 2024-02-03 16:13:27 +08:00
parent a60b1cbfb7
commit 62a8a2b334
2 changed files with 11 additions and 2 deletions

View File

@ -56,7 +56,7 @@ function generateKRList(ctx, contentArray) {
function layoutItem(ctx, type, index, title, note, color, label, percent) { function layoutItem(ctx, type, index, title, note, color, label, percent) {
const percentStr = (percent * 100).toString().replace(/\.\d*/, '') const percentStr = (percent * 100).toString().replace(/\.\d*/, '')
return ` return `
<div class="okr-item ${type}"> <div class="okr-item ${type}" id="okr-${index.toLowerCase()}">
<div class="okr-left"> <div class="okr-left">
<span class="title">${index.toUpperCase()}</span> <span class="title">${index.toUpperCase()}</span>
</div> </div>

View File

@ -62,6 +62,7 @@
justify-content: space-between justify-content: space-between
align-items: flex-start align-items: flex-start
position relative position relative
flex-wrap: wrap
.label .label
background: var(--theme-block) background: var(--theme-block)
color: var(--text-p1) color: var(--text-p1)
@ -102,4 +103,12 @@
background: var(--theme) background: var(--theme)
@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()