From 88252eea0654b3ed218b833ff215d17e2ff9990c Mon Sep 17 00:00:00 2001 From: Jordan Roher Date: Mon, 18 Dec 2023 13:09:47 -0800 Subject: [PATCH] Fixed icons --- src/components/anchor.ts | 4 ++-- src/components/header.ts | 4 ++-- src/components/icon.ts | 10 +++++----- src/components/service-catalogs.ts | 4 ++-- src/components/services.ts | 10 +++++----- src/pages/index.ts | 8 ++++---- tailwind.config.js | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/components/anchor.ts b/src/components/anchor.ts index 02426bd..3c0c67e 100644 --- a/src/components/anchor.ts +++ b/src/components/anchor.ts @@ -20,14 +20,14 @@ export const Anchor = function (props: IProps) { if (newWindowLocal) { return ` - + ${children} `; } return ` - + ${children} `; diff --git a/src/components/header.ts b/src/components/header.ts index fc8bb98..4641781 100644 --- a/src/components/header.ts +++ b/src/components/header.ts @@ -8,8 +8,8 @@ interface IProps { export const Header = function (props: IProps) { const { icon, title } = props; return ` -
- ${!is.null(icon) && `${title || `} +
+ ${!is.null(icon) && `${title || `}

${title}

`; diff --git a/src/components/icon.ts b/src/components/icon.ts index 7d6e288..f3406ba 100644 --- a/src/components/icon.ts +++ b/src/components/icon.ts @@ -38,7 +38,7 @@ interface IProps { export const Icon = function (props: IProps): string { const { name, uri, icon, index, iconBG, iconBubble, iconColor, iconAspect, newWindow } = props; - if (!is.null(icon)) { + if (is.null(icon)) { if (!is.null(uri)) { return Anchor({ uri: uri as string, title: name, newWindow, children: IconBlank({ index }) }); } @@ -79,7 +79,7 @@ function IconBlank(props: IIconBlankProps) { const { index } = props; return ` `; } @@ -176,14 +176,14 @@ function IconBase(props: IIconBaseProps) { switch (iconType) { case IconType.uri: - return ``; + return ``; case IconType.dashboard: icon = icon.replace(".png", "").replace(".jpg", "").replace(".svg", ""); return ` `; @@ -191,7 +191,7 @@ function IconBase(props: IIconBaseProps) { icon = icon.replace("mdi-", "").replace(".svg", ""); return ` -
+
-

${catalog.category}

+
  • +

    ${catalog.category}

    ${Services({ services: catalog.services })}
  • `; diff --git a/src/components/services.ts b/src/components/services.ts index 4314a26..e6401c8 100644 --- a/src/components/services.ts +++ b/src/components/services.ts @@ -11,7 +11,7 @@ export const Services = function (props: IServicesProps) { const { services } = props; return ` -
      +
        ${services.map((service, index) => Service({ index, service })).join("")}
      `; @@ -28,23 +28,23 @@ function Service(props: IServiceProps) { const { name, uri, description, icon, iconBG, iconBubble, iconColor, iconAspect, newWindow } = service; return ` -
    • +
    • ${ !is.null(icon) && ` - + ${Icon({ name, icon, uri, index, iconColor, iconBG, iconBubble, iconAspect, newWindow })} ` }
      -

      +

      ${Anchor({ uri, newWindow, children: name })}

      ${ !is.null(description) && ` -

      +

      ${Anchor({ uri, newWindow, children: description })}

      ` diff --git a/src/pages/index.ts b/src/pages/index.ts index 0a87383..f871f6c 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -46,17 +46,17 @@ export const IndexPage = function (props: IProps): string { } return ` -
      -
      +
      +
      ${ SHOWHEADER && ` -
      +
      ${Header({ icon, title })}
      ` } -
      +
      ${ServiceCatalogList({ catalogs: myServices })}
      diff --git a/tailwind.config.js b/tailwind.config.js index 5a92381..5168dad 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,6 +1,6 @@ /** @type {import('tailwindcss').Config} */ export default { - content: ["./dist/index.html"], + content: ["./public/index.html"], safelist: [ /* Built from icon.tsx */ {