Skip to content

Commit

Permalink
Added icon feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianvasquez committed Apr 22, 2021
1 parent fe293e6 commit 2eb366c
Show file tree
Hide file tree
Showing 8 changed files with 208 additions and 86 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ This will build the main file; that Obsidian should detect. Activate the plugin

- [x] Add chat and command view.

## TODO
## Apr 22: Add icons

- [ ] Choose an different icon for the services.
- [X] Choose icons for the services.

# Contributing

Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "python-lab-plugin",
"name": "Python lab plugin",
"version": "0.2.3",
"name": "Python lab",
"version": "0.2.5",
"minAppVersion": "0.11.6",
"description": "An interface to experiment with python scripts and more.",
"author": "Cristian Vasquez",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-typescript": "^6.1.0",
"@types/core-js": "^2.5.4",
"@types/node": "^14.14.2",
"@typescript-eslint/eslint-plugin": "4.6.0",
"@typescript-eslint/parser": "4.6.0",
Expand All @@ -27,10 +28,9 @@
"obsidian": "https://github.com/obsidianmd/obsidian-api",
"rollup": "^2.32.1",
"tslib": "^2.0.3",
"typescript": "^4.0.3",
"@types/core-js": "^2.5.4"
"typescript": "^4.0.3"
},
"dependencies": {

"@mdi/js": "^5.9.55"
}
}
122 changes: 122 additions & 0 deletions src/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
const sweepIcon = `
<svg fill="currentColor" stroke="currentColor" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<path d="m495.72 1.582c-7.456-3.691-16.421-0.703-20.142 6.694l-136.92 274.08-26.818-13.433c-22.207-11.118-49.277-2.065-60.396 20.083l-6.713 13.405 160.96 80.616 6.713-13.411c11.087-22.143 2.227-49.18-20.083-60.381l-26.823-13.435 136.92-274.08c3.706-7.412 0.703-16.421-6.694-20.141z"/>
<circle cx="173" cy="497" r="15"/>
<circle cx="23" cy="407" r="15"/>
<circle cx="83" cy="437" r="15"/>
<path d="m113 482h-60c-8.276 0-15-6.724-15-15 0-8.291-6.709-15-15-15s-15 6.709-15 15c0 24.814 20.186 45 45 45h60c8.291 0 15-6.709 15-15s-6.709-15-15-15z"/>
<path d="m108.64 388.07c-6.563 0.82-11.807 5.845-12.92 12.349-1.113 6.519 2.153 12.993 8.057 15.952l71.675 35.889c12.935 6.475 27.231 9.053 41.177 7.573-1.641 6.65 1.479 13.784 7.852 16.992l67.061 33.589c5.636 2.78 12.169 1.8 16.685-2.197 2.347-2.091 53.436-48.056 83.3-98.718l-161.6-80.94c-36.208 48.109-120.36 59.39-121.28 59.511z"/>
</svg>`;

// From: https://github.com/mgmeyers/obsidian-icon-swapper
const icons: string[] = [
'lab',
'sweep',
'any-key',
'audio-file',
'blocks',
'bold-glyph',
'bracket-glyph',
'broken-link',
'bullet-list-glyph',
'bullet-list',
'calendar-with-checkmark',
'check-in-circle',
'check-small',
'checkbox-glyph',
'checkmark',
'clock',
'cloud',
'code-glyph',
'create-new',
'cross-in-box',
'cross',
'crossed-star',
'dice',
'document',
'documents',
'dot-network',
'double-down-arrow-glyph',
'double-up-arrow-glyph',
'down-arrow-with-tail',
'down-chevron-glyph',
'enter',
'exit-fullscreen',
'expand-vertically',
'filled-pin',
'folder',
'forward-arrow',
'fullscreen',
'gear',
'go-to-file',
'hashtag',
'heading-glyph',
'help',
'highlight-glyph',
'horizontal-split',
'image-file',
'image-glyph',
'indent-glyph',
'info',
'install',
'italic-glyph',
'keyboard-glyph',
'languages',
'left-arrow-with-tail',
'left-arrow',
'left-chevron-glyph',
'lines-of-text',
'link-glyph',
'link',
'logo-crystal',
'magnifying-glass',
'microphone-filled',
'microphone',
'minus-with-circle',
'note-glyph',
'number-list-glyph',
'open-vault',
'pane-layout',
'paper-plane',
'paused',
'pdf-file',
'pencil',
'percent-sign-glyph',
'pin',
'plus-with-circle',
'popup-open',
'presentation',
'price-tag-glyph',
'quote-glyph',
'redo-glyph',
'reset',
'right-arrow-with-tail',
'right-arrow',
'right-chevron-glyph',
'right-triangle',
'run-command',
'search',
'sheets-in-box',
'stacked-levels',
'star-list',
'star',
'strikethrough-glyph',
'switch',
'sync-small',
'sync',
'tag-glyph',
'three-horizontal-bars',
'trash',
'undo-glyph',
'unindent-glyph',
'up-and-down-arrows',
'up-arrow-with-tail',
'up-chevron-glyph',
'uppercase-lowercase-a',
'vault',
'vertical-split',
'vertical-three-dots',
'wrench-screwdriver-glyph',
];

export { icons, sweepIcon };
Loading

0 comments on commit 2eb366c

Please sign in to comment.