diff --git a/docs/0.4.0-alpha/getting_started/usage.md b/docs/0.4.0-alpha/getting_started/usage.md index 7cca1bd..ac9d822 100644 --- a/docs/0.4.0-alpha/getting_started/usage.md +++ b/docs/0.4.0-alpha/getting_started/usage.md @@ -142,6 +142,7 @@ source <(amber comp) | Icon | Name | Location | |---|:----:|:-----:| -| ![image](/images/logo-vsc.png) | **VS Code** | [VSC Marketplace](https://marketplace.visualstudio.com/items?itemName=Ph0enixKM.amber-language) or [Our extension repository](https://github.com/amber-lang/vsc-amber-extension) | -| ![image](/images/logo-zed.png) | **Zed** | Zed extensions or [Our extension repository](https://github.com/amber-lang/zed-amber-extension) | -| ![image](/images/logo-vim.png) | **Vim** | [Our extension repository](https://github.com/amber-lang/amber-vim) | +| LOGO:vsc | **VS Code** | [VSC Marketplace](https://marketplace.visualstudio.com/items?itemName=Ph0enixKM.amber-language) or [Our extension repository](https://github.com/amber-lang/vsc-amber-extension) | +| LOGO:zed | **Zed** | Zed extensions or [Our extension repository](https://github.com/amber-lang/zed-amber-extension) | +| LOGO:vim | **Vim** | [Our extension repository](https://github.com/amber-lang/amber-vim) | +| LOGO:hx | **Helix Editor** | [Native Support](https://docs.helix-editor.com/lang-support.html) | diff --git a/docs/0.4.1-alpha/getting_started/usage.md b/docs/0.4.1-alpha/getting_started/usage.md index 6e581d2..8a915fc 100644 --- a/docs/0.4.1-alpha/getting_started/usage.md +++ b/docs/0.4.1-alpha/getting_started/usage.md @@ -144,6 +144,7 @@ source <(amber comp) | Icon | Name | Location | |---|:----:|:-----:| -| ![image](/images/logo-vsc.png) | **VS Code** | [VSC Marketplace](https://marketplace.visualstudio.com/items?itemName=Ph0enixKM.amber-language) or [Our extension repository](https://github.com/amber-lang/vsc-amber-extension) | -| ![image](/images/logo-zed.png) | **Zed** | Zed extensions or [Our extension repository](https://github.com/amber-lang/zed-amber-extension) | -| ![image](/images/logo-vim.png) | **Vim** | [Our extension repository](https://github.com/amber-lang/amber-vim) | +| LOGO:vsc | **VS Code** | [VSC Marketplace](https://marketplace.visualstudio.com/items?itemName=Ph0enixKM.amber-language) or [Our extension repository](https://github.com/amber-lang/vsc-amber-extension) | +| LOGO:zed | **Zed** | Zed extensions or [Our extension repository](https://github.com/amber-lang/zed-amber-extension) | +| LOGO:vim | **Vim** | [Our extension repository](https://github.com/amber-lang/amber-vim) | +| LOGO:hx | **Helix Editor** | [Native Support](https://docs.helix-editor.com/lang-support.html) | diff --git a/public/logos/hx.png b/public/logos/hx.png new file mode 100644 index 0000000..a9b699a Binary files /dev/null and b/public/logos/hx.png differ diff --git a/public/images/logo-vim.png b/public/logos/vim.png similarity index 100% rename from public/images/logo-vim.png rename to public/logos/vim.png diff --git a/public/images/logo-vsc.png b/public/logos/vsc.png similarity index 100% rename from public/images/logo-vsc.png rename to public/logos/vsc.png diff --git a/public/images/logo-zed.png b/public/logos/zed.png similarity index 100% rename from public/images/logo-zed.png rename to public/logos/zed.png diff --git a/src/components/Markdown/Markdown.module.css b/src/components/Markdown/Markdown.module.css index 4ef9e87..69fe7e7 100644 --- a/src/components/Markdown/Markdown.module.css +++ b/src/components/Markdown/Markdown.module.css @@ -198,6 +198,11 @@ html[mode="light"] .markdown .light-dark img:last-child { vertical-align: middle; } +.markdown .logo { + width: auto; + max-height: 2rem; +} + @keyframes fade { 0% { mask-size: 0rem 0rem; diff --git a/src/components/Markdown/Markdown.tsx b/src/components/Markdown/Markdown.tsx index 8720812..468decf 100644 --- a/src/components/Markdown/Markdown.tsx +++ b/src/components/Markdown/Markdown.tsx @@ -38,6 +38,10 @@ const handleDetails = (text: string): string | null => { return `
${result}` } +const handleLogos = (text: string): string => { + return text.replace(/\bLOGO:([a-z]+)\b/g, ``) +} + // You can override the default renderer to customize the output class MarkdownRenderer extends Renderer { heading(text: string, level: number, raw: string): string { @@ -68,6 +72,7 @@ class MarkdownRenderer extends Renderer { } table(header: string, body: string): string { + body = handleLogos(body) return `