Skip to content

Commit

Permalink
Merge pull request #139 from andrejilderda/fix/phosphor-icons-not-sho…
Browse files Browse the repository at this point in the history
…wing

Fix: phosphor icons not showing
  • Loading branch information
andrejilderda authored May 12, 2024
2 parents 8b29239 + f13ed69 commit 4b3bed3
Show file tree
Hide file tree
Showing 11 changed files with 99 additions and 68 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-knives-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"joplin-plugin-macos-theme": patch
---

fix: Phosphor icons not showing
5 changes: 5 additions & 0 deletions .changeset/orange-walls-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"joplin-plugin-macos-theme": patch
---

fix: show correct icon for tags in sidebar
5 changes: 5 additions & 0 deletions .changeset/twelve-planes-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"joplin-plugin-macos-theme": patch
---

feat: add missing icons for certain sort options
2 changes: 1 addition & 1 deletion src/generateUserCSS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const generateUserCSS = async (settings: ThemeSettings) => {
src: url("${installDir.replace(
/\\/g,
"/"
)}/webfont/Phosphor.ttf") format("truetype"),
)}/webfont/Phosphor.woff2") format("woff2"),
url("${installDir.replace(/\\/g, "/")}/webfont/Phosphor.woff") format("woff");
font-weight: normal;
font-style: normal;
Expand Down
113 changes: 58 additions & 55 deletions src/phosphorIcons.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,63 @@
const phosphorIcons = {
alarm: "",
"arrow-triangle-2-circlepath": "",
"arrow-down-circle-fill": "",
"arrow-up-circle-fill": "",
"arrow-up-forward-app": "",
"arrow-up-right-square-fill": "",
bold: "",
calendar: "",
character: "",
"checkmark-circle": "",
checkmark: "",
"chevron-backward": "",
"chevron-down": "",
"chevron-forward": "",
"chevron-left-slash-chevron-right": "",
"chevron-right": "",
"chevron-up-chevron-down": "",
"chevron-up": "",
clock: "",
curlybraces: "",
"doc-on-clipboard": "",
"doc-richtext": "",
ellipsis: "",
folder: "",
highlighter: "",
"info-circle": "",
italic: "",
link: "",
"link-circle": "",
"list-bullet-indent": "",
"list-bullet-rectangle": "",
"list-bullet": "",
"list-number": "",
magnifyingglass: "",
minus: "",
paperclip: "",
person: "",
"person-2": "",
"plus-circle": "",
"sidebar-left": "",
"square-and-arrow-down": "",
"square-and-pencil": "",
"square-split-2x1": "",
strikethrough: "",
"tablecells-badge-ellipsis": "",
tag: "",
alarm: "",
"arrow-triangle-2-circlepath": "",
"arrow-down-circle-fill": "",
"arrow-up-arrow-down": "",
"arrow-up-circle-fill": "",
"arrow-up-forward-app": "",
"arrow-up-right-square-fill": "",
bold: "",
calendar: "",
character: "",
checkmark: "",
"checkmark-circle": "",
// same as checkmark-circle
"checkmark-diamond": "",
"checkmark-square": "",
"chevron-backward": "",
"chevron-down": "",
"chevron-forward": "",
"chevron-left-slash-chevron-right": "",
"chevron-right": "",
"chevron-up-chevron-down": "",
"chevron-up": "",
clock: "",
curlybraces: "",
"doc-on-clipboard": "",
"doc-richtext": "",
ellipsis: "",
folder: "",
highlighter: "",
"info-circle": "",
italic: "",
link: "",
"link-circle": "",
"list-bullet-indent": "",
"list-bullet-rectangle": "",
"list-bullet": "",
"list-number": "",
magnifyingglass: "",
minus: "",
paperclip: "",
"person-2": "",
"plus-circle": "",
"sidebar-left": "",
"square-and-arrow-down": "",
"square-and-pencil": "",
"square-split-2x1": "",
strikethrough: "",
"tablecells-badge-ellipsis": "",
tag: "",
trash: "",
"text-badge-checkmark": "",
"text-below-photo": "",
"text-quote": "",
"textformat-abc-dottedunderline": "",
"textformat-subscript": "",
"textformat-superscript": "",
underline: "",
"xmark-circle-fill": "",
xmark: "",
"text-badge-checkmark": "",
"text-below-photo": "",
"text-quote": "",
"textformat-abc-dottedunderline": "",
"textformat-subscript": "",
"textformat-superscript": "",
underline: "",
"xmark-circle-fill": "",
xmark: "",
};

export default phosphorIcons;
12 changes: 11 additions & 1 deletion src/scss/components/_components.notelist.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,19 @@
@include icon(character);
}

// todo due
.fa-calendar-check::before {
@include icon(checkmark-square);
}

// todo completed
.fa-check::before {
@include icon(checkmark-square);
}

// custom
.fa-wrench::before {
@include icon(person);
@include icon(arrow-up-arrow-down);
}

&:focus-visible,
Expand Down
19 changes: 10 additions & 9 deletions src/scss/components/_components.sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,18 @@
-webkit-font-smoothing: antialiased;
}

// .folder-and-tag-list .list-item:not(:has(.fa-trash))::before {
.folder-and-tag-list .list-item::before {
@include icon(folder);
}
.folder-and-tag-list .list-item {
&::before {
@include icon(folder);
}

.folder-and-tag-list .list-item:has(.fa-trash)::before {
@include icon(trash);
}
&:has(.fa-trash)::before {
@include icon(trash);
}

.tags .list-item::before {
@include icon(tag);
&:has(.tag-label)::before {
@include icon(tag);
}
}

// when one of the folders has an emoji the DOM structure changes and an
Expand Down
6 changes: 4 additions & 2 deletions src/scss/user-settings/_user-settings-fallback.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,17 @@
@include createSfSymbol("alarm", "􀐭");
@include createSfSymbol("arrow-down-circle-fill", "􀁹");
@include createSfSymbol("arrow-triangle-2-circlepath", "􀊯");
@include createSfSymbol("arrow-up-arrow-down", "􀄬");
@include createSfSymbol("arrow-up-circle-fill", "􀁷");
@include createSfSymbol("arrow-up-forward-app", "􀮵");
@include createSfSymbol("arrow-up-right-square-fill", "􀄕");
@include createSfSymbol("bold", "􀅓");
@include createSfSymbol("calendar", "􀉉");
@include createSfSymbol("character", "􀀄");
@include createSfSymbol("checkmark-circle", "􀁢");
@include createSfSymbol("checkmark", "􀆅");
@include createSfSymbol("checkmark-circle", "􀁢");
@include createSfSymbol("checkmark-diamond", "􁁚");
@include createSfSymbol("checkmark-square", "􀃲");
@include createSfSymbol("chevron-backward", "􀯶");
@include createSfSymbol("chevron-down", "􀆈");
@include createSfSymbol("chevron-forward", "􀯻");
Expand All @@ -126,7 +129,6 @@
@include createSfSymbol("minus", "􀅽");
@include createSfSymbol("paperclip", "􀉢");
@include createSfSymbol("person-2", "􀉫");
@include createSfSymbol("person", "􀉩");
@include createSfSymbol("plus-circle", "􀁌");
@include createSfSymbol("sidebar-left", "􀏚");
@include createSfSymbol("square-and-arrow-down", "􀈄");
Expand Down
Binary file modified src/webfont/Phosphor.woff
Binary file not shown.
Binary file added src/webfont/Phosphor.woff2
Binary file not shown.
Binary file removed src/webfont/phosphor.ttf
Binary file not shown.

0 comments on commit 4b3bed3

Please sign in to comment.