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

Commit 7ca686b

Browse files
matfirelauthieb
authored andcommitted
Export to carbon-sh (#67)
* added export to carbon function and corresponding ui button * added styles on export-to-carbon button
1 parent a9091f5 commit 7ca686b

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

src/renderer/components/notes-list/note-card/NoteCard.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ <h4>{{value.name}}
3737
title="Copy to clipboard">
3838
<b-icon icon="clipboard"></b-icon>
3939
</a>
40+
<a id="export-carbon" @click="exportToCarbon(value.content)" title="Export to Carbon">
41+
<b-icon icon="image"></b-icon>
42+
</a>
4043
</span>
4144
</h4>
4245
<editor :code="value.content"

src/renderer/components/notes-list/note-card/NoteCard.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@
6464
#copy-file {
6565
color: $dark;
6666

67+
&:hover {
68+
color: lighten($black, 20%);
69+
}
70+
}
71+
#export-carbon {
72+
color: $dark;
73+
6774
&:hover {
6875
color: lighten($black, 20%);
6976
}

src/renderer/components/notes-list/note-card/NoteCard.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ export default {
6161
open(link) {
6262
this.$electron.shell.openExternal(link);
6363
},
64+
exportToCarbon(content) {
65+
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=`;
66+
this.$electron.shell.openExternal(`${url}${encodeURI(content)}`)
67+
}
6468
},
6569
};
6670
</script>

0 commit comments

Comments
 (0)