Skip to content

Commit

Permalink
改进待办清单格式,添加任务创建日期
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersonHJB committed Sep 3, 2024
1 parent 6a52bc4 commit 193ae10
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db.json

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions source/_data/todolist.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# seat控制清单在左栏还是右栏显示,completed控制是否已完成
- class_name: 想做的项目
seat: left
date: 2024/08/04 13:14:30
todo_list:
- content: hexo 博客
completed: false
Expand All @@ -9,11 +10,13 @@

- class_name: 想看的书
seat: left
date: 2024/09/03 22:04:30
todo_list:
- content: 《夜幕之下》
completed: false

- class_name: 想买的东西
date: 2024/10/06 12:04:30
seat: left
todo_list:
- content: iPhone
Expand All @@ -22,6 +25,7 @@
completed: true

- class_name: 想学的技术
date: 2024/01/01 19:04:25
seat: right
todo_list:
- content: 骑自行车
Expand All @@ -30,6 +34,7 @@
completed: false

- class_name: 想去的地方
date: 2024/02/08 16:36:22
seat: right
todo_list:
- content: 桂林
Expand Down
9 changes: 9 additions & 0 deletions source/static/css/todolist.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ li.todolist-li-done {
margin-left: 5px;
}

.todolist-date {
font-size: 14px; /* 设置日期字体大小 */
color: #666; /* 设置日期文本颜色 */
margin: 0 0 10px; /* 设置日期与任务列表之间的间距 */
display: block; /* 显示为块元素,独占一行 */
text-align: left; /* 日期右对齐 */
}


@media screen and (max-width: 700px) {

#todolist-left,
Expand Down
4 changes: 4 additions & 0 deletions themes/anzhiyu/layout/includes/page/todolist.pug
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
if i.seat == 'left'
.todolist-item
h3.todolist-title=i.class_name
if i.date
p.todolist-date 创建日期:#{i.date}
ul.todolist-ul
each item in i.todo_list
- var listItemClass = item.completed ? 'todolist-li-done' : 'todolist-li'
Expand All @@ -30,6 +32,8 @@
if i.seat == 'right'
.todolist-item
h3.todolist-title=i.class_name
if i.date
p.todolist-date 创建日期:#{i.date}
ul.todolist-ul
each item in i.todo_list
- var listItemClass = item.completed ? 'todolist-li-done' : 'todolist-li'
Expand Down

0 comments on commit 193ae10

Please sign in to comment.