diff --git a/new-web/bun.lockb b/new-web/bun.lockb index 94657ec..57046fa 100755 Binary files a/new-web/bun.lockb and b/new-web/bun.lockb differ diff --git a/new-web/package.json b/new-web/package.json index d513cff..496c0df 100644 --- a/new-web/package.json +++ b/new-web/package.json @@ -12,35 +12,37 @@ "format": "prettier --write ." }, "devDependencies": { - "@sveltejs/adapter-auto": "^3.0.0", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@sveltejs/adapter-auto": "^3.3.1", + "@sveltejs/kit": "^2.7.4", + "@sveltejs/vite-plugin-svelte": "^3.1.2", "autoprefixer": "^10.4.20", "clsx": "^2.1.1", "cmdk-sv": "^0.0.18", "lucide-svelte": "^0.453.0", "mode-watcher": "^0.4.1", "postcss": "^8.4.47", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "svelte": "^4.2.7", - "svelte-check": "^4.0.0", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.7", + "svelte": "^4.2.19", + "svelte-check": "^4.0.5", "svelte-sonner": "^0.3.28", "tailwind-merge": "^2.5.4", "tailwind-variants": "^0.2.1", - "tailwindcss": "^3.4.13", - "typescript": "^5.0.0", - "vite": "^5.0.3" + "tailwindcss": "^3.4.14", + "typescript": "^5.6.3", + "vaul-svelte": "^0.3.2", + "vite": "^5.4.10" }, "type": "module", "dependencies": { "@iconify/svelte": "^4.0.2", "bits-ui": "^0.21.16", "copy-to-clipboard": "^3.3.3", - "es-toolkit": "^1.25.2", + "es-toolkit": "^1.26.1", "medium-zoom": "^1.1.0", "svelte-bricks": "^0.2.1", - "svelte-lazy": "^1.2.9", + "svelte-lazy": "1.2.9", + "svelte-legos": "^0.2.5", "svelte-markdown": "^0.4.1" } } diff --git a/new-web/src/app.css b/new-web/src/app.css index 5150d81..08ce509 100644 --- a/new-web/src/app.css +++ b/new-web/src/app.css @@ -2,6 +2,10 @@ @tailwind components; @tailwind utilities; +html { + scroll-behavior: smooth; +} + @layer base { :root { --background: 0, 0%, 97%; diff --git a/new-web/src/lib/components/ui/drawer/drawer-content.svelte b/new-web/src/lib/components/ui/drawer/drawer-content.svelte new file mode 100644 index 0000000..4f05317 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-content.svelte @@ -0,0 +1,24 @@ + + + + + +
+ +
+
diff --git a/new-web/src/lib/components/ui/drawer/drawer-description.svelte b/new-web/src/lib/components/ui/drawer/drawer-description.svelte new file mode 100644 index 0000000..ef761a7 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-description.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/new-web/src/lib/components/ui/drawer/drawer-footer.svelte b/new-web/src/lib/components/ui/drawer/drawer-footer.svelte new file mode 100644 index 0000000..c6c07ad --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-footer.svelte @@ -0,0 +1,16 @@ + + +
+ +
diff --git a/new-web/src/lib/components/ui/drawer/drawer-header.svelte b/new-web/src/lib/components/ui/drawer/drawer-header.svelte new file mode 100644 index 0000000..f857176 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-header.svelte @@ -0,0 +1,19 @@ + + +
+ +
diff --git a/new-web/src/lib/components/ui/drawer/drawer-nested.svelte b/new-web/src/lib/components/ui/drawer/drawer-nested.svelte new file mode 100644 index 0000000..79b68e3 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-nested.svelte @@ -0,0 +1,12 @@ + + + + + diff --git a/new-web/src/lib/components/ui/drawer/drawer-overlay.svelte b/new-web/src/lib/components/ui/drawer/drawer-overlay.svelte new file mode 100644 index 0000000..ccc7322 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-overlay.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/new-web/src/lib/components/ui/drawer/drawer-title.svelte b/new-web/src/lib/components/ui/drawer/drawer-title.svelte new file mode 100644 index 0000000..cfbe596 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer-title.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/new-web/src/lib/components/ui/drawer/drawer.svelte b/new-web/src/lib/components/ui/drawer/drawer.svelte new file mode 100644 index 0000000..40eae5e --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/drawer.svelte @@ -0,0 +1,12 @@ + + + + + diff --git a/new-web/src/lib/components/ui/drawer/index.ts b/new-web/src/lib/components/ui/drawer/index.ts new file mode 100644 index 0000000..76932e3 --- /dev/null +++ b/new-web/src/lib/components/ui/drawer/index.ts @@ -0,0 +1,41 @@ +import { Drawer as DrawerPrimitive } from "vaul-svelte"; + +import Root from "./drawer.svelte"; +import Content from "./drawer-content.svelte"; +import Description from "./drawer-description.svelte"; +import Overlay from "./drawer-overlay.svelte"; +import Footer from "./drawer-footer.svelte"; +import Header from "./drawer-header.svelte"; +import Title from "./drawer-title.svelte"; +import NestedRoot from "./drawer-nested.svelte"; + +const Trigger = DrawerPrimitive.Trigger; +const Portal = DrawerPrimitive.Portal; +const Close = DrawerPrimitive.Close; + +export { + Root, + NestedRoot, + Content, + Description, + Overlay, + Footer, + Header, + Title, + Trigger, + Portal, + Close, + + // + Root as Drawer, + NestedRoot as DrawerNestedRoot, + Content as DrawerContent, + Description as DrawerDescription, + Overlay as DrawerOverlay, + Footer as DrawerFooter, + Header as DrawerHeader, + Title as DrawerTitle, + Trigger as DrawerTrigger, + Portal as DrawerPortal, + Close as DrawerClose, +}; diff --git a/new-web/src/lib/elements/BookmarkButton.svelte b/new-web/src/lib/elements/BookmarkButton.svelte index 46343cb..bd36d01 100644 --- a/new-web/src/lib/elements/BookmarkButton.svelte +++ b/new-web/src/lib/elements/BookmarkButton.svelte @@ -3,91 +3,175 @@ import { Button, buttonVariants } from '$lib/components/ui/button/index.js'; import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js'; import * as Dialog from '$lib/components/ui/dialog'; + import * as Drawer from '$lib/components/ui/drawer'; + import { mediaQuery } from 'svelte-legos'; import CodeBlock from './CodeBlock.svelte'; import copy from 'copy-to-clipboard'; import { toast } from 'svelte-sonner'; + let open = false; + const isDesktop = mediaQuery('(min-width: 768px)'); + function handleCopy(text: string) { copy(text); toast.success('Copied to clipboard'); } - - - $event.preventDefault()}> - - Bookmark - - - - - Add Bookmark for Medium Bypass - -
- -

- Credit: blazeknifecatcher on Reddit -

- -
-
-

Option 1: Redirect in Current Tab

- -
-

Create a new bookmark with the following code as the URL:

+

- -
+
+
+

Option 1: Redirect in Current Tab

+ +
+

Create a new bookmark with the following code as the URL:

-
-
-

Option 2: Open in New Tab

- +
-

For opening in a new tab, use this code instead:

- -
+
+
+

Option 2: Open in New Tab

+ +
-

Click the bookmark on any Medium page to bypass the paywall using Freedium.

- -
- - Close - - - +

For opening in a new tab, use this code instead:

+ +
+ +

Click the bookmark on any Medium page to bypass the paywall using Freedium.

+
+
+ + Close + +
+
+{:else} + + + $event.preventDefault()}> + + Bookmark + + + + + + Add Bookmark for Medium Bypass + + +
+
+

+ Credit: blazeknifecatcher on Reddit +

+ +
+
+

Option 1: Redirect in Current Tab

+ +
+

Create a new bookmark with the following code as the URL:

+ + +
+ +
+
+

Option 2: Open in New Tab

+ +
+ +

For opening in a new tab, use this code instead:

+ +
+ +

Click the bookmark on any Medium page to bypass the paywall using Freedium.

+
+
+ + Close + +
+
+{/if} diff --git a/new-web/src/lib/elements/ProgressLine.svelte b/new-web/src/lib/elements/ProgressLine.svelte index 10f3237..af3ec3a 100644 --- a/new-web/src/lib/elements/ProgressLine.svelte +++ b/new-web/src/lib/elements/ProgressLine.svelte @@ -29,5 +29,11 @@ bind:this={progress} id="progress" class="top-0 z-20 h-1" - style="background:linear-gradient(to right, hsl(var(--primary)) var(--scroll), transparent 0)" + style="background:linear-gradient(to right, hsl(var(--primary)) var(--scroll), transparent 0); width: var(--scroll, 0%);" /> + + diff --git a/new-web/src/lib/elements/ReportProblem.svelte b/new-web/src/lib/elements/ReportProblem.svelte index 60cda51..cad1cc9 100644 --- a/new-web/src/lib/elements/ReportProblem.svelte +++ b/new-web/src/lib/elements/ReportProblem.svelte @@ -1,12 +1,16 @@ - - -
- - Report a problem -
-
-
- - - Report a Problem - -
- -

+{#if $isDesktop} + + +

+ + Report a problem +
+ + + + + Report a Problem + +
+ +

+ Please describe the problem you're experiencing. We'll look into it as soon as + possible. +

+
+
+
+ Problem Type + +
+ + UI problem +
+
+ + Article is not full +
+
+ + Suggestion +
+
+ + Vulnerability (XSS, etc.) +
+
+ + Other +
+
+
+
+ Problem Description + -

- The current opened page will be automatically attached to your report. -

-
-
- -
- - Cancel - - -
- - - + +
+ Cancel + +
+
+ + + +{/if}