Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Export to carbon-sh #67

Merged
merged 2 commits into from
Mar 14, 2019
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
3 changes: 3 additions & 0 deletions src/renderer/components/notes-list/note-card/NoteCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ <h4>{{value.name}}
title="Copy to clipboard">
<b-icon icon="clipboard"></b-icon>
</a>
<a id="export-carbon" @click="exportToCarbon(value.content)" title="Export to Carbon">
<b-icon icon="image"></b-icon>
</a>
</span>
</h4>
<editor :code="value.content"
Expand Down
7 changes: 7 additions & 0 deletions src/renderer/components/notes-list/note-card/NoteCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@
#copy-file {
color: $dark;

&:hover {
color: lighten($black, 20%);
}
}
#export-carbon {
color: $dark;

&:hover {
color: lighten($black, 20%);
}
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/notes-list/note-card/NoteCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export default {
open(link) {
this.$electron.shell.openExternal(link);
},
exportToCarbon(content) {
let url = `https://carbon.now.sh/?bg=rgba(0,0,0,0)&t=dracula&l=auto&ds=true&wc=true&wa=true&pv=43px&ph=57px&ln=false&code=`;
this.$electron.shell.openExternal(`${url}${encodeURI(content)}`)
}
},
};
</script>
Expand Down