diff --git a/src/server/index.tsx b/src/server/index.tsx index 0f74bcc..ca01fa1 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -73,10 +73,8 @@ server.get("/*", async (req, res) => { - ${helmet.link.toString()} -
${root}
diff --git a/src/shared/components/app.tsx b/src/shared/components/app.tsx index c186502..9fc26d4 100644 --- a/src/shared/components/app.tsx +++ b/src/shared/components/app.tsx @@ -5,8 +5,7 @@ import { i18n } from "../i18next"; import { routes } from "../routes"; import { NoMatch } from "./no-match"; import { Symbols } from "./symbols"; -import { Navbar } from "./navbar"; -import { Footer } from "./footer"; +import { Footer, Navbar } from "./navbar"; import { BACKGROUND_GRADIENT_1, BACKGROUND_GRADIENT_2 } from "./common"; export class App extends Component { @@ -18,19 +17,21 @@ export class App extends Component {
- {/* */} - - {routes.map(({ path, exact, component: C, ...rest }) => ( - } - /> - ))} - } /> - - {/* Footer /> */} +
+ + + {routes.map(({ path, exact, component: C, ...rest }) => ( + } + /> + ))} + } /> + +
+
diff --git a/src/shared/components/footer.tsx b/src/shared/components/footer.tsx deleted file mode 100644 index fad00c4..0000000 --- a/src/shared/components/footer.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from "inferno"; -import { LinkLine } from "./link-line"; -import { T } from "inferno-i18next"; - -export class Footer extends Component { - constructor(props: any, context: any) { - super(props, context); - } - - render() { - return ( - - ); - } -} diff --git a/src/shared/components/link-line.tsx b/src/shared/components/link-line.tsx deleted file mode 100644 index 330765e..0000000 --- a/src/shared/components/link-line.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { Component } from "inferno"; -import { Link } from "inferno-router"; -import { i18n } from "../i18next"; - -export class LinkLine extends Component { - constructor(props: any, context: any) { - super(props, context); - } - render() { - return ( - <> - {i18n.t("join_a_server")} - {i18n.t("news")} - {i18n.t("apps")} - {i18n.t("donate")} - {i18n.t("docs")} - {i18n.t("contact")} - - ); - } -} diff --git a/src/shared/components/navbar.tsx b/src/shared/components/navbar.tsx index ea15a46..9ec01e0 100644 --- a/src/shared/components/navbar.tsx +++ b/src/shared/components/navbar.tsx @@ -1,69 +1,89 @@ -import { Component, ChangeEvent, linkEvent } from "inferno"; +import { ChangeEvent, linkEvent } from "inferno"; import { Link } from "inferno-router"; -import { LinkLine } from "./link-line"; import { Icon } from "./icon"; import { i18n, languages } from "../i18next"; +import classNames from "classnames"; -export class Navbar extends Component { - constructor(props: any, context: any) { - super(props, context); - } +const NavLink = ({ content }) =>
  • {content}
  • ; - handleLanguageChange(_: any, event: ChangeEvent) { - location.href = `/?lang=${event.target.value}`; - } +const NavLinks = () => ( + <> + {i18n.t("join_a_server")}} /> + {i18n.t("news")}} /> + {i18n.t("apps")}} /> + {i18n.t("donate")}} /> + {i18n.t("docs")}} /> + {i18n.t("contact")}} /> + +); - languageList() { - return Object.keys(i18n.services.resourceStore.data).sort(); - } - - render() { - return ( - <> - - - - ); - } +function languageList() { + return Object.keys(i18n.services.resourceStore.data).sort(); } + +function handleLanguageChange(_: any, event: ChangeEvent) { + location.href = `/?lang=${event.target.value}`; +} + +export const Footer = () => ; + +export const Navbar = ({ footer = false }) => ( +
    +
    + + + +
    +
    +
      + +
    +
    +
    + {footer ? ( + + @c Lemmy -2023. All Rights Reserved. + + ) : ( + <> + + + + + + )} +
    + + +
    +
    +
    +); diff --git a/src/shared/components/symbols.tsx b/src/shared/components/symbols.tsx index b49a829..520f973 100644 --- a/src/shared/components/symbols.tsx +++ b/src/shared/components/symbols.tsx @@ -20,6 +20,9 @@ export class Symbols extends Component { xmlnsXlink="http://www.w3.org/1999/xlink" > + + + diff --git a/src/style.css b/src/style.css index ad2d80f..c4ba537 100644 --- a/src/style.css +++ b/src/style.css @@ -4,8 +4,8 @@ .icon { display: inline-block; - max-width: 1rem; - max-height: 1rem; + max-width: 4rem; + max-height: 4rem; stroke-width: 0; stroke: currentColor; fill: currentColor;