From 4af84b39b782683cbaea7449fc63bc4a4267bcc6 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Thu, 17 Apr 2025 17:27:06 +0200 Subject: [PATCH] Add more SEO --- web/src/components/icon-details.tsx | 60 +++++++++++++++++++---------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/web/src/components/icon-details.tsx b/web/src/components/icon-details.tsx index ddcf8800..0ee7dcd6 100644 --- a/web/src/components/icon-details.tsx +++ b/web/src/components/icon-details.tsx @@ -15,6 +15,7 @@ import { useCallback, useState } from "react" import { toast } from "sonner" import { Carbon } from "./carbon" import { MagicCard } from "./magicui/magic-card" +import { Badge } from "./ui/badge" export type IconDetailsProps = { icon: string @@ -270,8 +271,8 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { -
-
+
+

@@ -303,19 +304,17 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {

{iconData.categories && iconData.categories.length > 0 && ( -
+

Categories

{iconData.categories.map((category) => ( - - {category - .split("-") - .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) - .join(" ")} + + + {category + .split("-") + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" ")} + ))}
@@ -323,22 +322,41 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) { )} {iconData.aliases && iconData.aliases.length > 0 && ( -
+

Aliases

{iconData.aliases.map((alias) => ( - {alias} - + ))}
-

These aliases can be used to find this icon in search results.

)} + +
+

About this icon

+
+

This icon is licensed under the open source MIT license

+

+ Available in{" "} + {availableFormats.length > 1 + ? `${availableFormats.length} formats (${availableFormats.map((f) => f.toUpperCase()).join(", ")})` + : `${availableFormats[0].toUpperCase()} format`}{" "} + with a base format of {iconData.base.toUpperCase()}. + {iconData.colors && " Includes both light and dark theme variants for better integration with different UI designs."} +

+

+ Use the {icon} icon in your web applications, dashboards, or documentation to enhance visual communication and user + experience. +

+
+
@@ -390,7 +408,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
-
+

Base format

@@ -398,7 +416,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
-
+

Available formats

{availableFormats.map((format) => ( @@ -410,7 +428,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
{iconData.colors && ( -
+

Color variants

{Object.entries(iconData.colors).map(([theme, variant]) => ( @@ -424,7 +442,7 @@ export function IconDetails({ icon, iconData, authorData }: IconDetailsProps) {
)} -
+

Source