Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat: created page for Obsidian plugin

Elijah Potterce4179c0dc4b
diff --git a/packages/web/src/lib/GitHubLogo.svelte b/packages/web/src/lib/GitHubLogo.svelte
new file mode 100644
index 000000000..b270cbde7
--- /dev/null
+++ b/packages/web/src/lib/GitHubLogo.svelte
@@ -0,0 +1,10 @@
+<script lang="ts">
+ export let width = '100%';
+ export let height = '100%';
+</script>
+
+<svg {width} {height} viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
+ <path
+ d="M16 0.396c-8.839 0-16 7.167-16 16 0 7.073 4.584 13.068 10.937 15.183 0.803 0.151 1.093-0.344 1.093-0.772 0-0.38-0.009-1.385-0.015-2.719-4.453 0.964-5.391-2.151-5.391-2.151-0.729-1.844-1.781-2.339-1.781-2.339-1.448-0.989 0.115-0.968 0.115-0.968 1.604 0.109 2.448 1.645 2.448 1.645 1.427 2.448 3.744 1.74 4.661 1.328 0.14-1.031 0.557-1.74 1.011-2.135-3.552-0.401-7.287-1.776-7.287-7.907 0-1.751 0.62-3.177 1.645-4.297-0.177-0.401-0.719-2.031 0.141-4.235 0 0 1.339-0.427 4.4 1.641 1.281-0.355 2.641-0.532 4-0.541 1.36 0.009 2.719 0.187 4 0.541 3.043-2.068 4.381-1.641 4.381-1.641 0.859 2.204 0.317 3.833 0.161 4.235 1.015 1.12 1.635 2.547 1.635 4.297 0 6.145-3.74 7.5-7.296 7.891 0.556 0.479 1.077 1.464 1.077 2.959 0 2.14-0.020 3.864-0.020 4.385 0 0.416 0.28 0.916 1.104 0.755 6.4-2.093 10.979-8.093 10.979-15.156 0-8.833-7.161-16-16-16z"
+ />
+</svg>
diff --git a/packages/web/src/lib/ObsidianLogo.svelte b/packages/web/src/lib/ObsidianLogo.svelte
new file mode 100644
index 000000000..5e7c8472e
--- /dev/null
+++ b/packages/web/src/lib/ObsidianLogo.svelte
@@ -0,0 +1,172 @@
+<script lang="ts">
+ export let width = '100%';
+ export let height = '100%';
+</script>
+
+<svg
+ id="custom-logo"
+ {width}
+ {height}
+ viewBox="0 0 512 512"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ style="height:100%;width:100%;"
+>
+ <defs>
+ <radialGradient
+ id="b"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-48 -185 123 -32 179 429.7)"
+ >
+ <stop stop-color="#fff" stop-opacity=".4" />
+ <stop offset="1" stop-opacity=".1" />
+ </radialGradient>
+ <radialGradient
+ id="c"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(41 -310 229 30 341.6 351.3)"
+ >
+ <stop stop-color="#fff" stop-opacity=".6" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".1" />
+ </radialGradient>
+ <radialGradient
+ id="d"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(57 -261 178 39 190.5 296.3)"
+ >
+ <stop stop-color="#fff" stop-opacity=".8" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".4" />
+ </radialGradient>
+ <radialGradient
+ id="e"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-79 -133 153 -90 321.4 464.2)"
+ >
+ <stop stop-color="#fff" stop-opacity=".3" />
+ <stop offset="1" stop-opacity=".3" />
+ </radialGradient>
+ <radialGradient
+ id="f"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-29 136 -92 -20 300.7 149.9)"
+ >
+ <stop stop-color="#fff" stop-opacity="0" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".2" />
+ </radialGradient>
+ <radialGradient
+ id="g"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(72 73 -155 153 137.8 225.2)"
+ >
+ <stop stop-color="#fff" stop-opacity=".2" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".4" />
+ </radialGradient>
+ <radialGradient
+ id="h"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(20 118 -251 43 215.1 273.7)"
+ >
+ <stop stop-color="#fff" stop-opacity=".1" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".3" />
+ </radialGradient>
+ <radialGradient
+ id="i"
+ cx="0"
+ cy="0"
+ r="1"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-162 -85 268 -510 374.4 371.7)"
+ >
+ <stop stop-color="#fff" stop-opacity=".2" />
+ <stop offset=".5" stop-color="#fff" stop-opacity=".2" />
+ <stop offset="1" stop-color="#fff" stop-opacity=".3" />
+ </radialGradient>
+ <filter
+ id="a"
+ x="80.1"
+ y="37"
+ width="351.1"
+ height="443.2"
+ filterUnits="userSpaceOnUse"
+ color-interpolation-filters="sRGB"
+ >
+ <feFlood flood-opacity="0" result="BackgroundImageFix" />
+ <feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
+ <feGaussianBlur stdDeviation="6.5" result="effect1_foregroundBlur_744_9191" />
+ </filter>
+ </defs>
+ <rect id="logo-bg" fill="#262626" width="512" height="512" rx="100" />
+ <g filter="url(#a)">
+ <path
+ d="M359.2 437.5c-2.6 19-21.3 33.9-40 28.7-26.5-7.2-57.2-18.6-84.8-20.7l-42.4-3.2a28 28 0 0 1-18-8.3l-73-74.8a27.7 27.7 0 0 1-5.4-30.7s45-98.6 46.8-103.7c1.6-5.1 7.8-49.9 11.4-73.9a28 28 0 0 1 9-16.5L249 57.2a28 28 0 0 1 40.6 3.4l72.6 91.6a29.5 29.5 0 0 1 6.2 18.3c0 17.3 1.5 53 11.2 76a301.3 301.3 0 0 0 35.6 58.2 14 14 0 0 1 1 15.6c-6.3 10.7-18.9 31.3-36.6 57.6a142.2 142.2 0 0 0-20.5 59.6Z"
+ fill="#000"
+ fill-opacity=".3"
+ />
+ </g>
+ <path
+ id="arrow"
+ d="M359.9 434.3c-2.6 19.1-21.3 34-40 28.9-26.4-7.3-57-18.7-84.7-20.8l-42.3-3.2a27.9 27.9 0 0 1-18-8.4l-73-75a27.9 27.9 0 0 1-5.4-31s45.1-99 46.8-104.2c1.7-5.1 7.8-50 11.4-74.2a28 28 0 0 1 9-16.6l86.2-77.5a28 28 0 0 1 40.6 3.5l72.5 92a29.7 29.7 0 0 1 6.2 18.3c0 17.4 1.5 53.2 11.1 76.3a303 303 0 0 0 35.6 58.5 14 14 0 0 1 1.1 15.7c-6.4 10.8-18.9 31.4-36.7 57.9a143.3 143.3 0 0 0-20.4 59.8Z"
+ fill="#6C31E3"
+ />
+ <path
+ d="M182.7 436.4c33.9-68.7 33-118 18.5-153-13.2-32.4-37.9-52.8-57.3-65.5-.4 1.9-1 3.7-1.8 5.4L96.5 324.8a27.9 27.9 0 0 0 5.5 31l72.9 75c2.3 2.3 5 4.2 7.8 5.6Z"
+ fill="url(#b)"
+ />
+ <path
+ d="M274.9 297c9.1.9 18 2.9 26.8 6.1 27.8 10.4 53.1 33.8 74 78.9 1.5-2.6 3-5.1 4.6-7.5a1222 1222 0 0 0 36.7-57.9 14 14 0 0 0-1-15.7 303 303 0 0 1-35.7-58.5c-9.6-23-11-58.9-11.1-76.3 0-6.6-2.1-13.1-6.2-18.3l-72.5-92-1.2-1.5c5.3 17.5 5 31.5 1.7 44.2-3 11.8-8.6 22.5-14.5 33.8-2 3.8-4 7.7-5.9 11.7a140 140 0 0 0-15.8 58c-1 24.2 3.9 54.5 20 95Z"
+ fill="url(#c)"
+ />
+ <path
+ d="M274.8 297c-16.1-40.5-21-70.8-20-95 1-24 8-42 15.8-58l6-11.7c5.8-11.3 11.3-22 14.4-33.8a78.5 78.5 0 0 0-1.7-44.2 28 28 0 0 0-39.4-2l-86.2 77.5a28 28 0 0 0-9 16.6L144.2 216c0 .7-.2 1.3-.3 2 19.4 12.6 44 33 57.3 65.3 2.6 6.4 4.8 13.1 6.4 20.4a200 200 0 0 1 67.2-6.8Z"
+ fill="url(#d)"
+ />
+ <path
+ d="M320 463.2c18.6 5.1 37.3-9.8 39.9-29a153 153 0 0 1 15.9-52.2c-21-45.1-46.3-68.5-74-78.9-29.5-11-61.6-7.3-94.2.6 7.3 33.1 3 76.4-24.8 132.7 3.1 1.6 6.6 2.5 10.1 2.8l43.9 3.3c23.8 1.7 59.3 14 83.2 20.7Z"
+ fill="url(#e)"
+ />
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M255 200.5c-1.1 24 1.9 51.4 18 91.8l-5-.5c-14.5-42.1-17.7-63.7-16.6-88 1-24.3 8.9-43 16.7-59 2-4 6.6-11.5 8.6-15.3 5.8-11.3 9.7-17.2 13-27.5 4.8-14.4 3.8-21.2 3.2-28 3.7 24.5-10.4 45.8-21 67.5a145 145 0 0 0-17 59Z"
+ fill="url(#f)"
+ />
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M206 285.1c2 4.4 3.7 8 4.9 13.5l-4.3 1c-1.7-6.4-3-11-5.5-16.5-14.6-34.3-38-52-57-65 23 12.4 46.7 31.9 61.9 67Z"
+ fill="url(#g)"
+ />
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M211.1 303c8 37.5-1 85.2-27.5 131.6 22.2-46 33-90.1 24-131l3.5-.7Z"
+ fill="url(#h)"
+ />
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M302.7 299.5c43.5 16.3 60.3 52 72.8 81.9-15.5-31.2-37-65.7-74.4-78.5-28.4-9.8-52.4-8.6-93.5.7l-.9-4c43.6-10 66.4-11.2 96 0Z"
+ fill="url(#i)"
+ />
+</svg>
diff --git a/packages/web/src/routes/+page.svelte b/packages/web/src/routes/+page.svelte
index 4a9cdc707..68dea87f8 100644
--- a/packages/web/src/routes/+page.svelte
+++ b/packages/web/src/routes/+page.svelte
@@ -4,6 +4,7 @@
import Section from '$lib/Section.svelte';
import GutterCenter from '$lib/GutterCenter.svelte';
import Logo from '$lib/Logo.svelte';
+ import GitHubLogo from '$lib/GitHubLogo.svelte';
import { DarkMode } from 'flowbite-svelte';
let width = window.innerWidth;
@@ -29,13 +30,7 @@
<a
href="https://github.com/elijah-potter/harper"
class="flex flex-row items-center [&>*]:m-2 dark:text-white"
- ><img
- width="40"
- height="40"
- class="hover:scale-105 transition-all bg-white rounded-full"
- src="/icons/github.svg"
- alt="Project Repository"
- />GitHub</a
+ ><GitHubLogo width="40px" height="40px" />GitHub</a
>
<a href="https://elijahpotter.dev" class="flex flex-row items-center [&>*]:m-2 dark:text-white"
><img
@@ -82,7 +77,8 @@
class="underline"
href="https://github.com/elijah-potter/harper/tree/master/harper-ls">language server</a
>, and through WebAssembly, so you can get fantastic grammar checking anywhere you work.
- <br /><br /> That said, we take extra care to make sure the Neovim integration is amazing.</span
+ <br /><br /> That said, we take extra care to make sure the Neovim and
+ <a class="underline" href="/obsidian">Obsidian</a> integration is amazing.</span
>
<img
diff --git a/packages/web/src/routes/obsidian/+page.svelte b/packages/web/src/routes/obsidian/+page.svelte
new file mode 100644
index 000000000..fe92b6bde
--- /dev/null
+++ b/packages/web/src/routes/obsidian/+page.svelte
@@ -0,0 +1,54 @@
+<script>
+ import GutterCenter from '$lib/GutterCenter.svelte';
+ import Section from '$lib/Section.svelte';
+ import Logo from '$lib/Logo.svelte';
+ import ObsidianLogo from '$lib/ObsidianLogo.svelte';
+ import { Card } from 'flowbite-svelte';
+ import GitHubLogo from '$lib/GitHubLogo.svelte';
+</script>
+
+<GutterCenter>
+ <div class="flex flex-row justify-center w-full p-8">
+ <div
+ class="flex flex-row items-center md:border-4 justify-evenly p-8 rounded-2xl hover:scale-105 transition-all"
+ >
+ <div class="w-1/3 md:w-64"><Logo /></div>
+ <div class="text-5xl md:m-8">+</div>
+ <div class="w-1/3 md:w-64"><ObsidianLogo /></div>
+ </div>
+ </div>
+
+ <h1 class="text-5xl font-bold text-center dark:text-white">Harper in Obsidian</h1>
+ <h2 class="text-3xl text-center dark:text-white">
+ A Grammar Checker, Now for <b>Everyone</b>
+ </h2>
+
+ <div class="flex flex-row justify-evenly mt-5">
+ <a
+ href="https://github.com/elijah-potter/harper-obsidian-plugin"
+ class="flex flex-row items-center [&>*]:m-2 dark:text-white"
+ ><GitHubLogo width="40px" height="40px" />GitHub</a
+ >
+ </div>
+
+ <Section swapped>
+ <span slot="title">How does it work?</span>
+ <span slot="subtitle">
+ Unlike LanguageTool, Harper compiles to WebAssembly so your information never leaves Obsidian. <br
+ /><b>Your vault should be exactly that: secure.</b>
+ </span>
+ <img src="/images/obsidian_screenshot.webp" class="rounded-2xl" />
+ </Section>
+
+ <Section>
+ <span slot="title">Where can I get it?</span>
+
+ <span slot="subtitle"
+ >Easy. Go to Obsidian's settings, click "Community Plugins", and enable them.
+ <br /><br />Next, click "Browse" and search for "Harper".
+ <br /><br /> Finally, go back and enable the plugin.
+ </span>
+
+ <img src="/images/obsidian_install_screenshot.webp" class="rounded-2xl" />
+ </Section>
+</GutterCenter>
diff --git a/packages/web/static/icons/github.svg b/packages/web/static/icons/github.svg
deleted file mode 100644
index ba75c5af2..000000000
--- a/packages/web/static/icons/github.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="32px" height="32px" viewBox="1 1 30 30" xmlns="http://www.w3.org/2000/svg">
- <path d="M16 0.396c-8.839 0-16 7.167-16 16 0 7.073 4.584 13.068 10.937 15.183 0.803 0.151 1.093-0.344 1.093-0.772 0-0.38-0.009-1.385-0.015-2.719-4.453 0.964-5.391-2.151-5.391-2.151-0.729-1.844-1.781-2.339-1.781-2.339-1.448-0.989 0.115-0.968 0.115-0.968 1.604 0.109 2.448 1.645 2.448 1.645 1.427 2.448 3.744 1.74 4.661 1.328 0.14-1.031 0.557-1.74 1.011-2.135-3.552-0.401-7.287-1.776-7.287-7.907 0-1.751 0.62-3.177 1.645-4.297-0.177-0.401-0.719-2.031 0.141-4.235 0 0 1.339-0.427 4.4 1.641 1.281-0.355 2.641-0.532 4-0.541 1.36 0.009 2.719 0.187 4 0.541 3.043-2.068 4.381-1.641 4.381-1.641 0.859 2.204 0.317 3.833 0.161 4.235 1.015 1.12 1.635 2.547 1.635 4.297 0 6.145-3.74 7.5-7.296 7.891 0.556 0.479 1.077 1.464 1.077 2.959 0 2.14-0.020 3.864-0.020 4.385 0 0.416 0.28 0.916 1.104 0.755 6.4-2.093 10.979-8.093 10.979-15.156 0-8.833-7.161-16-16-16z"/>
-</svg>
diff --git a/packages/web/static/images/obsidian_install_screenshot.webp b/packages/web/static/images/obsidian_install_screenshot.webp
new file mode 100644
index 000000000..8f447b420
Binary files /dev/null and b/packages/web/static/images/obsidian_install_screenshot.webp differ
diff --git a/packages/web/static/images/obsidian_screenshot.webp b/packages/web/static/images/obsidian_screenshot.webp
new file mode 100644
index 000000000..b37e1cd23
Binary files /dev/null and b/packages/web/static/images/obsidian_screenshot.webp differ