Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve icons #1

Merged
merged 5 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 27 additions & 16 deletions documentation/Theme_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,40 @@
4. **Custom Checkboxes:** Besides the regular checkbox, there are 7 custom checkboxes you may use on your tasks/lists. Do note that these do not work on tables, since tables only accept the default html checkboxes (which you can input via markdown syntax, or even html syntax). These default html checkboxes are also styled to match the theme. Eg: `<input type="checkbox">`

```
- [i] Information
- [*] Star
- [a] Reminder
- [f] Favorite
- [S] Savings
- [-] Cancelled
- [>] Rescheduled
- [<] Scheduled
- [>] Rescheduled/Forwarded
- [?] Question
- [!] Important
- [l] Location
- [x] Task
- [ ] Task
- [X] Task
- [B] Bug
- [X] Failure
- [n] Annotation
- [p] Pros
- [c] Cons
- [w] Win
- [b] Bookmark
- [I] Idea
- [p] Thumbs up
- [c] Thumbs down
- [S] Piggy bank
- [!] Warning
- [?] Question
- [i] Info
- [/] In Progress
- [u] Trend Up
- [d] Trend Down
- [F] Feature
- [r] Law
- [m] Measurement
- [M] Medical
- [L] Language
- [t] Time
- [T] Call
- [P] Person
- [s] Money
- [a] Bell
- [b] Bookmark
- [n] Pin
- [B] Bug
- [W] Reward
```

<p align=center><img src="https://user-images.githubusercontent.com/91087143/139735135-9bb582f5-d657-4017-b162-d11e6ee674b8.png" alt="Custom Checkboxes" width=35%></p>
<p align=center><img src="https://github.com/antoKeinanen/obsidian-sanctum/blob/main/assets/icons.png" alt="Custom Checkboxes" width=35%></p>

5. **Custom Codeblock Language - `pure-text`:** for when you have a passage you'd like to constantly copy, for some reason. This makes the codeblock appear like normal text, except it has a copy button to the right.

Expand Down
23 changes: 18 additions & 5 deletions src/scss/features/custom-checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ li.is-checked:where(
li[data-task="L"],
li[data-task="t"],
li[data-task="T"],
li[data-task="P"]
li[data-task="P"],
li[data-task="s"]
)
input[type="checkbox"],
.markdown-source-view
Expand Down Expand Up @@ -67,7 +68,8 @@ li.is-checked:where(
[data-task="L"],
[data-task="t"],
[data-task="T"],
[data-task="P"]
[data-task="P"],
[data-task="s"]
):checked {
background-color: transparent;
border-width: 0;
Expand All @@ -87,7 +89,7 @@ li.is-checked:where(
}

.markdown-source-view.mod-cm6 input[type="checkbox"][data-task] {
// orrects LP alignment
// corrects LP alignment
top: -3px;
}

Expand Down Expand Up @@ -413,7 +415,7 @@ li[data-task="T"] input[type="checkbox"]:checked,
input[type="checkbox"][data-task="T"] {
&::after {
background-color: var(--green);
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M22 4H10a2.002 2.002 0 0 0-2 2v22a2.002 2.002 0 0 0 2 2h12a2.003 2.003 0 0 0 2-2V6a2.002 2.002 0 0 0-2-2Zm0 2v2H10V6ZM10 28V10h12v18Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='&lt;Transparent Rectangle&gt;'/%3E%3C/svg%3E");
mask-image: url("data:image/svg+xml,%3Csvg id='icon' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Ephone--filled%3C/title%3E%3Cpath d='M20.33,21.48l2.24-2.24a2.19,2.19,0,0,1,2.34-.48l2.73,1.09a2.18,2.18,0,0,1,1.36,2v5A2.17,2.17,0,0,1,26.72,29C7.59,27.81,3.73,11.61,3,5.41A2.17,2.17,0,0,1,5.17,3H10a2.16,2.16,0,0,1,2,1.36l1.09,2.73a2.16,2.16,0,0,1-.47,2.34l-2.24,2.24S11.67,20.4,20.33,21.48Z'/%3E%3Crect id='_Transparent_Rectangle_' data-name='&lt;Transparent Rectangle&gt;' class='cls-1' width='32' height='32'/%3E%3C/svg%3E");
}
}

Expand All @@ -424,6 +426,17 @@ li[data-task="P"] input[type="checkbox"]:checked,
input[type="checkbox"][data-task="P"] {
&::after {
background-color: var(--cyan);
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 4a5 5 0 1 1-5 5 5 5 0 0 1 5-5m0-2a7 7 0 1 0 7 7 7 7 0 0 0-7-7Zm10 28h-2v-5a5 5 0 0 0-5-5h-6a5 5 0 0 0-5 5v5H6v-5a7 7 0 0 1 7-7h6a7 7 0 0 1 7 7Z'/%3E%3Cpath fill='none' d='M0 0h32v32H0z' data-name='&lt;Transparent Rectangle&gt;'/%3E%3C/svg%3E");
mask-image: url("data:image/svg+xml,%3Csvg id='icon' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:none;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3Euser--filled%3C/title%3E%3Cpath d='M6,30H26V25a7.0082,7.0082,0,0,0-7-7H13a7.0082,7.0082,0,0,0-7,7Z' transform='translate(0 0)'/%3E%3Cpath d='M9,9a7,7,0,1,0,7-7A7,7,0,0,0,9,9Z' transform='translate(0 0)'/%3E%3Crect id='_Transparent_Rectangle_' data-name='&lt;Transparent Rectangle&gt;' class='cls-1' width='32' height='32'/%3E%3C/svg%3E");
}
}

/* Money
————————————————————————————————————————————————————————— */

li[data-task="s"] input[type="checkbox"]:checked,
input[type="checkbox"][data-task="s"] {
&::after {
background-color: var(--yellow);
mask-image: url("data:image/svg+xml,%3Csvg id='icon' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: none; %7D %3C/style%3E%3C/defs%3E%3Cpath d='M21,12V10H17V7H15v3H13a2.002,2.002,0,0,0-2,2v3a2.002,2.002,0,0,0,2,2h6v3H11v2h4v3h2V22h2a2.0023,2.0023,0,0,0,2-2V17a2.002,2.002,0,0,0-2-2H13V12Z'/%3E%3Cpath d='M16,4A12,12,0,1,1,4,16,12.0353,12.0353,0,0,1,16,4m0-2A14,14,0,1,0,30,16,14.0412,14.0412,0,0,0,16,2Z'/%3E%3Crect id='_Transparent_Rectangle_' data-name='&lt;Transparent Rectangle&gt;' class='cls-1' width='32' height='32'/%3E%3C/svg%3E");
}
}