some better branding

This commit is contained in:
Ell 2023-08-17 13:03:12 +02:00
parent 49b871c1df
commit 1d83851102
5 changed files with 22 additions and 21 deletions

View file

@ -1,2 +1,7 @@
# ObsidianJustSharePlease # Just Share Please for Obsidian
A simple Obsidian plugin that allows sharing a note using a random link. For more information, see the official site at [jsp.ellpeck.de](https://jsp.ellpeck.de).
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link.
For more information, see the official site at [jsp.ellpeck.de](https://jsp.ellpeck.de).
![A preview showing off a shared note in Just Share Please](preview.png)

BIN
preview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

View file

@ -1,7 +1,10 @@
# Just Share Please # Just Share Please
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link.
Just Share Please is an [Obsidian](https://obsidian.md) plugin that allows quickly and easily sharing individual notes online using an anonymized link. It's pretty cool! ![A preview showing off a shared note in Just Share Please](https://raw.githubusercontent.com/Ellpeck/ObsidianJustSharePlease/main/preview.png)
## About this Site ## About this Site
WIP
## Self-Hosting ## Self-Hosting
WIP

View file

@ -1,9 +1,9 @@
{ {
"url": "http://localhost:8080", "url": "https://jsp.ellpeck.de",
"shared": [ "shared": [
{ {
"id": "de56fe78", "id": "3d0c1531",
"password": "2d276f4d3c0715be08ad1812faa97deb", "password": "aecfb2647cc647b0e047673a670e68be",
"path": "Cool Test Note.md" "path": "Cool Test Note.md"
} }
], ],

View file

@ -1,8 +1,6 @@
--- ---
test: yes test: yes
--- ---
yo
# Cool Test Note # Cool Test Note
This is a cool test note, my friends! This is a cool test note, my friends!
@ -12,23 +10,18 @@ This is a cool test note, my friends!
```js ```js
$.ajax({ $.ajax({
method: "get", method: "get",
url: `share.php?id=${hash}`, url: id ? `share.php?id=${id}` : "index.md",
success: t => { success: t => {
marked.use(markedKatex()); main.html(DOMPurify.sanitize(md.render(t)));
marked.use(markedHighlight.markedHighlight({
langPrefix: "hljs language-", // scroll to anchor
highlight: (c, l) => { let element = $(window.location.hash);
const language = hljs.getLanguage(l) ? l : "plaintext"; if (element.length)
return hljs.highlight(c, {language}).value; $(window).scrollTop(element.offset().top);
}
}));
main.html(DOMPurify.sanitize(marked.parse(t)));
}, },
// TODO display this error more nicely error: (r, s, e) => main.html(`<div class="error"><p>Error loading shared note with id <code>${id}</code>: ${e}</p><p><a href="#">Home</a></p></div>`)
error: (r, s, e) => main.html(e)
}); });
``` ```
http://localhost:8080#ff3ebb34
cool!! cool!!