diff --git a/new-web/README.md b/new-web/README.md
index 5ce6766..82645e6 100644
--- a/new-web/README.md
+++ b/new-web/README.md
@@ -1,38 +1,5 @@
-# create-svelte
+# New Freedium Frontend
-Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
+## TODO:
-## Creating a project
-
-If you're seeing this, you've probably already done this step. Congrats!
-
-```bash
-# create a new project in the current directory
-npm create svelte@latest
-
-# create a new project in my-app
-npm create svelte@latest my-app
-```
-
-## Developing
-
-Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
-
-```bash
-npm run dev
-
-# or start the server and open the app in a new browser tab
-npm run dev -- --open
-```
-
-## Building
-
-To create a production version of your app:
-
-```bash
-npm run build
-```
-
-You can preview the production build with `npm run preview`.
-
-> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
+- Migrate to https://github.com/unplugin/unplugin-icons
diff --git a/new-web/bun.lockb b/new-web/bun.lockb
index cbfca21..bdd21ea 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 0d914a2..7ef445b 100644
--- a/new-web/package.json
+++ b/new-web/package.json
@@ -12,6 +12,7 @@
"format": "prettier --write ."
},
"devDependencies": {
+ "@iconify-json/heroicons-outline": "^1.2.0",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/kit": "^2.7.4",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
@@ -39,9 +40,11 @@
"@iconify/tailwind": "^1.1.3",
"bits-ui": "^0.21.16",
"copy-to-clipboard": "^3.3.3",
- "es-toolkit": "^1.26.1",
+ "es-toolkit": "^1.27.0",
+ "hast-util-to-html": "^9.0.3",
"mdsvex": "^0.12.3",
"medium-zoom": "^1.1.0",
+ "rehype-external-links": "^3.0.0",
"shiki": "^1.23.1",
"shiki-transformer-copy-button": "^0.0.3",
"svelte-bricks": "^0.2.1",
diff --git a/new-web/src/app.css b/new-web/src/app.css
index 726e780..d05520c 100644
--- a/new-web/src/app.css
+++ b/new-web/src/app.css
@@ -86,6 +86,10 @@ html {
z-index: 999;
}
+.medium-zoom-overlay {
+ @apply !bg-white dark:!bg-zinc-900;
+}
+
@layer base {
/**
* Shiki
@@ -140,44 +144,3 @@ html {
background-color: hsla(0 62.8% 30.6% / 0.7);
}
}
-
-pre:has(code) {
- position: relative;
-}
-
-pre button.copy {
- position: absolute;
- right: 16px;
- top: 16px;
- height: 20px;
- width: 20px;
- padding: 0;
- display: flex;
-
- & span {
- width: 100%;
- aspect-ratio: 1 / 1;
- background-repeat: no-repeat;
- background-position: center;
- background-size: cover;
- }
-
- & .ready {
- background-image: url("data:image/svg+xml;utf8,");
- }
-
- & .success {
- display: none;
- background-image: url("data:image/svg+xml;utf8,");
- }
-
- &.copied {
- & .success {
- display: block;
- }
-
- & .ready {
- display: none;
- }
- }
-}
diff --git a/new-web/src/lib/components/ui/sonner/sonner.svelte b/new-web/src/lib/components/ui/sonner/sonner.svelte
index dcff20b..2a5b95f 100644
--- a/new-web/src/lib/components/ui/sonner/sonner.svelte
+++ b/new-web/src/lib/components/ui/sonner/sonner.svelte
@@ -8,6 +8,7 @@
if (browser) {
window.addEventListener('toast', (event) => {
+ console.log(`toast: ${event.detail.message}`);
toast.success(event.detail.message);
});
}
diff --git a/new-web/src/lib/elements/ArticlePage.svelte b/new-web/src/lib/elements/ArticlePage.svelte
index d07b5b6..c427294 100644
--- a/new-web/src/lib/elements/ArticlePage.svelte
+++ b/new-web/src/lib/elements/ArticlePage.svelte
@@ -204,7 +204,7 @@
/* Blockquotes */
:global(.prose blockquote) {
- @apply border-l-4 border-gray-200 dark:border-gray-700 pl-4 italic my-6;
+ @apply border-l-4 border-gray-300 dark:border-gray-700 pl-4 italic my-6;
}
/* Code blocks */
@@ -212,8 +212,8 @@
@apply rounded-lg p-4 my-6 overflow-x-auto;
}
- :global(.prose code) {
- @apply px-1.5 py-0.5 rounded text-sm font-mono;
+ :global(.prose code:not(.shiki code)) {
+ @apply px-1.5 py-0.5 rounded text-sm font-mono bg-gray-200 dark:bg-zinc-700;
}
:global(.prose pre code) {
@@ -238,6 +238,11 @@
@apply text-primary hover:text-primary/90 underline decoration-primary/30 hover:decoration-primary/50;
}
+ :global(.prose a::after) {
+ content: "";
+ @apply icon-[heroicons-outline--external-link] inline-block ml-1 w-3.5 h-3.5 align-text-bottom;
+ }
+
/* Horizontal rule */
:global(.prose hr) {
@apply border-gray-200 dark:border-gray-700 my-8;
@@ -297,4 +302,23 @@
:global(.prose details[open] summary) {
@apply mb-3;
}
+
+ /* Aside blocks */
+ :global(.prose aside) {
+ @apply my-6 p-4 rounded-lg border-l-4 border-primary bg-primary/5;
+ }
+
+ :global(.prose aside p) {
+ @apply m-0;
+ }
+
+ /* Mark blocks */
+ :global(.prose mark) {
+ @apply bg-primary/20 text-primary px-1.5 py-0.5 rounded;
+ }
+
+ /* Keyboard blocks */
+ :global(.prose kbd) {
+ @apply px-2 py-1.5 text-xs font-semibold text-gray-800 bg-gray-100 border border-gray-200 rounded-lg dark:bg-gray-600 dark:text-gray-100 dark:border-gray-500;
+ }
diff --git a/new-web/src/lib/elements/Header.svelte b/new-web/src/lib/elements/Header.svelte
index b76e68a..1ad3e59 100644
--- a/new-web/src/lib/elements/Header.svelte
+++ b/new-web/src/lib/elements/Header.svelte
@@ -45,7 +45,7 @@
aria-label="Open search"
>
This content is centered using `HTML`
++ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ++ +
Custom styled content box
+