Skip to content

Commit

Permalink
Merge pull request #132 from lukasschwab/lukasschwab/git-checkboxes
Browse files Browse the repository at this point in the history
Add checkboxes for draft, open, and merged PRs
  • Loading branch information
colineckert authored Jun 5, 2023
2 parents e563f07 + 7e005d2 commit 3d0865f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Things supports a wide number of alternate checkbox types. These allow you to ca
- [w] win
- [u] up
- [d] down
- [D] draft pull request
- [P] open pull request
- [M] merged pull request
```

## Installation
Expand Down
33 changes: 31 additions & 2 deletions theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@ input[data-task='l']:checked,
input[data-task='p']:checked,
input[data-task='u']:checked,
input[data-task='w']:checked,
input[data-task='P']:checked, /* Open PR */
input[data-task='M']:checked, /* Merged PR */
input[data-task='D']:checked, /* Draft PR */
li[data-task='!'] > input:checked,
li[data-task='!'] > p > input:checked,
li[data-task='*'] > input:checked,
Expand Down Expand Up @@ -714,7 +717,13 @@ li[data-task='p'] > p > input:checked,
li[data-task='u'] > input:checked,
li[data-task='u'] > p > input:checked,
li[data-task='w'] > input:checked,
li[data-task='w'] > p > input:checked {
li[data-task='w'] > p > input:checked,
li[data-task='P'] > input:checked,
li[data-task='P'] > p > input:checked,
li[data-task='M'] > input:checked,
li[data-task='M'] > p > input:checked,
li[data-task='D'] > input:checked,
li[data-task='D'] > p > input:checked {
--checkbox-marker-color: transparent;
border: none;
border-radius: 0;
Expand Down Expand Up @@ -914,6 +923,24 @@ li[data-task='b'] > p > input:checked {
color: var(--color-orange);
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' class='h-5 w-5' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath d='M5 4a2 2 0 012-2h6a2 2 0 012 2v14l-5-2.5L5 18V4z' /%3E%3C/svg%3E");
}
input[data-task='P']:checked,
li[data-task='P'] > input:checked,
li[data-task='P'] > p > input:checked {
color: var(--color-green);
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath d='M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z'%3E%3C/path%3E%3C/svg%3E");
}
input[data-task='M']:checked,
li[data-task='M'] > input:checked,
li[data-task='M'] > p > input:checked {
color: var(--color-purple);
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath d='M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z'%3E%3C/path%3E%3C/svg%3E");
}
input[data-task='D']:checked,
li[data-task='D'] > input:checked,
li[data-task='D'] > p > input:checked {
color: var(--color-base-50);
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16'%3E%3Cpath d='M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 7.5a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm0-4.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z'%3E%3C/path%3E%3C/svg%3E");
}

body:not(.tasks) li[data-task='>'].task-list-item.is-checked,
body:not(.tasks) li[data-task='<'].task-list-item.is-checked,
Expand All @@ -933,7 +960,9 @@ body:not(.tasks) li[data-task='f'].task-list-item.is-checked,
body:not(.tasks) li[data-task='k'].task-list-item.is-checked,
body:not(.tasks) li[data-task='w'].task-list-item.is-checked,
body:not(.tasks) li[data-task='u'].task-list-item.is-checked,
body:not(.tasks) li[data-task='d'].task-list-item.is-checked {
body:not(.tasks) li[data-task='d'].task-list-item.is-checked,
body:not(.tasks) li[data-task='P'].task-list-item.is-checked,
body:not(.tasks) li[data-task='M'].task-list-item.is-checked {
color: var(--text-normal);
}

Expand Down

0 comments on commit 3d0865f

Please sign in to comment.