熊猫别熬夜
(噗~)
1
突发奇想改了下Kanban的布局样式,默认是无差异的,依赖CssClasses的特性给不同看板定义不同的布局:
样式可提供的布局
CSS Snippets
【Plugin-Kanban】Kanban插件魔改.css
Reference
- [[24.06.12_Obsidian样式-Kanban插件的堆叠模式 by Huajin]]
3 个赞
熊猫别熬夜
(噗~)
4
续:
四象限模式2,cssclasses: kanban-four-quadrants2
/* !Kanban: 四象限任务板模式2 */
.kanban-four-quadrants2.kanban-plugin {
background-color: var(--background-primary);
.kanban-plugin__board>div {
display: grid;
width: 100%;
grid-template-columns: 1fr 2fr 2fr;
grid-template-rows: 1fr 1fr;
grid-template-areas:
"area0 area1 area2"
"area0 area3 area4";
gap: 20px;
}
.kanban-plugin__lane-wrapper:not(.collapse-horizontal) {
min-width: 100%;
min-height: 100%;
overflow: auto;
&:nth-child(1) {
grid-area: area0;
}
&:nth-child(2) {
grid-area: area1;
}
&:nth-child(3) {
grid-area: area2;
}
&:nth-child(4) {
grid-area: area3;
}
&:nth-child(5) {
grid-area: area4;
}
}
/* 隐藏按钮 */
.kanban-plugin__lane-collapse,
/* 隐藏占位符 */
.kanban-plugin__lane-placeholder.kanban-plugin__placeholder {
display: none;
}
}
康奈尔笔记模式2:cssclasses: kanban-cornell-note2
/* !Kanban: 四象限任务板模式2 */
.kanban-four-quadrants2.kanban-plugin {
background-color: var(--background-primary);
.kanban-plugin__board>div {
display: grid;
width: 100%;
grid-template-columns: 1fr 2fr 2fr;
grid-template-rows: 1fr 1fr;
grid-template-areas:
"area0 area1 area2"
"area0 area3 area4";
gap: 20px;
}
.kanban-plugin__lane-wrapper:not(.collapse-horizontal) {
min-width: 100%;
min-height: 100%;
overflow: auto;
&:nth-child(1) {
grid-area: area0;
}
&:nth-child(2) {
grid-area: area1;
}
&:nth-child(3) {
grid-area: area2;
}
&:nth-child(4) {
grid-area: area3;
}
&:nth-child(5) {
grid-area: area4;
}
}
/* 隐藏按钮 */
.kanban-plugin__lane-collapse,
/* 隐藏占位符 */
.kanban-plugin__lane-placeholder.kanban-plugin__placeholder {
display: none;
}
}
熊猫别熬夜
(噗~)
5
设置Kanban子项目折叠的style setting css
/* https://github.com/mgmeyers/obsidian-style-settings */
/* @settings
name: Kanban Styles
id: kanban-styles
settings:
- id: kanban-fold
title: 折叠Kanban子项目
type: class-toggle
addCommand: true
*/
/* !折叠模式 */
.kanban-fold .kanban-plugin__lane-wrapper .kanban-plugin__item-title-wrapper:not(:hover) {
.kanban-plugin__markdown-preview-view>:not(:first-child) {
display: none;
}
}
熊猫别熬夜
(噗~)
6
续:每周任务周报:cssclasses: kanban-weekly-report
配合tasks查询语法搭建的,参考的taskCalendar的界面:
每周任务周报的css样式:
/* !Kanban: 每周任务周报 */
.kanban-weekly-report.kanban-plugin {
background-color: var(--background-primary);
.kanban-plugin__board>div {
display: grid;
width: 100%;
max-width: 100%;
grid-template-columns: repeat(10, 1fr);
grid-template-rows: 2fr 1fr;
gap: 10px;
}
.kanban-plugin__lane-wrapper:not(.collapse-horizontal) {
min-width: 100%;
min-height: 100%;
grid-column: span 2;
&:nth-child(6) {
grid-column: span 5;
}
&:nth-child(7) {
grid-column: span 5;
}
}
/* 隐藏占位符 */
.kanban-plugin__lane-placeholder.kanban-plugin__placeholder {
display: none;
}
.kanban-plugin__item-prefix-button-wrapper {
visibility: hidden;
width: 0.8rem;
}
}
【Kanban】每周任务周报.md
---
kanban-plugin: board
cssclasses:
- kanban-weekly-report
---
## 星期一
- [ ] ```tasks
done on this Monday
```
## 星期二
- [ ] ```tasks
done on this tuesday
```
## 星期三
- [ ] ```tasks
done on Wednesday
```
## 星期四
- [ ] ```tasks
done on this Thursday
```
## 星期五
- [ ] ```tasks
done on this Friday
```
## 星期六
- [ ] ```tasks
done on this Saturday
```
## 星期天
- [ ] ```tasks
done on this Sunday
```
%% kanban:settings
```
{"kanban-plugin":"board","list-collapse":[false,false,false,false,false,false,false],"new-card-insertion-method":"prepend-compact"}
```
%%
1 个赞
熊猫别熬夜
(噗~)
7
续:用于卡片化展示子项目,比如任务的卡片化减少占位。
Kanban卡片子项目模式:cssclasses: kanban-card-items
Kanban:卡片子项目模式
/* ! Kanban:卡片子项目模式 */
.kanban-card-items .kanban-plugin,
.kanban-card-items.kanban-plugin {
background-color: var(--background-primary);
/* 只当标题有标签是才启用子项目卡片模式 */
/* .kanban-plugin__lane:has(.kanban-plugin__lane-title-text a.tag) */
.kanban-plugin__lane-items {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 10px;
height: calc(100% - 40px);
overflow-y: auto;
overflow-x: hidden;
align-content: flex-start;
justify-items: stretch;
align-items: stretch;
.kanban-plugin__item-wrapper {
/* border: 2px solid #ee0000; */
.kanban-plugin__item {
height: 100%;
display: grid;
.kanban-plugin__item-title-wrapper {
/* justify-self: stretch;
align-self: stretch; */
/* min-height: 150px; */
overflow: auto;
display: flex;
justify-content: center;
align-items: start;
}
}
}
}
}
/* !补丁 */
.kanban-plugin__lane {
padding-bottom: 10px;
}
Kanban子项目分栏模式:cssclasses: kanban-col-items
Kanban子项目分栏模式
/* ! Kanban:子项目分栏模式 */
.kanban-col-items.kanban-plugin {
background-color: var(--background-primary);
.kanban-plugin__lane-items {
display: block;
column-width: 280px;
column-gap: 0.5rem;
overflow-y: auto;
overflow-x: hidden;
.kanban-plugin__item-wrapper {
max-width: 100%;
.kanban-plugin__item {
display: grid;
.kanban-plugin__item-title-wrapper {
overflow: auto;
display: flex;
justify-content: center;
align-items: start;
}
}
}
}
}
/* !补丁 */
.kanban-plugin__lane {
padding-bottom: 10px;
}
这2种模式在四象限模式以及自带的List模式下有奇效。
四象限模式推荐用kanban-col-items
自带的List模式推荐用kanban-card-items
1 个赞
熊猫别熬夜
(噗~)
9
续:添加了一个默认堆叠模式,不用设置cssclasses,如果影响正常使用,请自行设置cssclasses
中图分类简表
原文:【Kanban】中国图书分类法简表.md · GitHub
参考: 中国图书馆分类法简表-清华大学图书馆 (tsinghua.edu.cn)
可以结合FolderNotes+它的查询语法管理自己的领域分类::
1 个赞