Adding follow communities block.

This commit is contained in:
Dessalines 2023-09-21 14:10:34 -04:00
parent 82a92ccd50
commit 71625d9887
4 changed files with 31 additions and 33 deletions

View file

@ -50,12 +50,12 @@ server.get("/*", async (req, res) => {
const root = renderToString(wrapper); const root = renderToString(wrapper);
const helmet = Helmet.renderStatic(); const helmet = Helmet.renderStatic();
// TODO make eruda only work in debug mode
res.send(` res.send(`
<!DOCTYPE html> <!DOCTYPE html>
<html ${helmet.htmlAttributes.toString()} lang="en"> <html ${helmet.htmlAttributes.toString()} lang="en">
<head> <head>
// TODO make these only work in debug mode
<script src="//cdn.jsdelivr.net/npm/eruda"></script> <script src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script> <script>eruda.init();</script>

View file

@ -17,7 +17,7 @@ export class App extends Component<any, any> {
<> <>
<div> <div>
<Provider i18next={i18n}> <Provider i18next={i18n}>
<Navbar /> {/* <Navbar /> */}
<Switch> <Switch>
{routes.map(({ path, exact, component: C, ...rest }) => ( {routes.map(({ path, exact, component: C, ...rest }) => (
<Route <Route
@ -29,7 +29,7 @@ export class App extends Component<any, any> {
))} ))}
<Route render={props => <NoMatch {...props} />} /> <Route render={props => <NoMatch {...props} />} />
</Switch> </Switch>
<Footer /> {/* Footer /> */}
<Symbols /> <Symbols />
</Provider> </Provider>
</div> </div>

View file

@ -6,23 +6,19 @@ import { i18n } from "../i18next";
import { T } from "inferno-i18next"; import { T } from "inferno-i18next";
import { isBrowser } from "../utils"; import { isBrowser } from "../utils";
const LemmyTitle = () => ( const LemmyTitleBlock = () => (
<div className="flex flex-col items-center">
<div className="flex flex-col items-center mb-2">
<p className="text-2xl font-bold bg-gradient-to-r bg-clip-text text-transparent from-[#69D066] to-[#03A80E]"> <p className="text-2xl font-bold bg-gradient-to-r bg-clip-text text-transparent from-[#69D066] to-[#03A80E]">
Lemmy Lemmy
</p> </p>
); <p className="text-xl font-medium text-center">{i18n.t("lemmy_desc")}</p>
</div>
const LemmyDesc = () => ( <div className="flex flex-row justify-around gap-2">
<p className="text-xl font-medium">{i18n.t("lemmy_desc")}</p>
);
const LemmyTitleBlock = () => (
<div className="flex">
<LemmyTitle />
<LemmyDesc />
<JoinServerButton /> <JoinServerButton />
<RunServerButton /> <RunServerButton />
</div> </div>
</div>
); );
const JoinServerButton = () => ( const JoinServerButton = () => (
@ -40,6 +36,20 @@ const RunServerButton = () => (
</a> </a>
); );
const FollowCommunitiesBlock = () => (
<div className="flex flex-col items-center">
<div className="card card-bordered w-11/12 bg-neutral-800 shadow-xl">
<div className="card-body items-center px-32 py-16">
<p class="card-title text-center">{i18n.t("follow_communities")}</p>
<p class="text-sm text-gray-300 text-center mb-3">
{i18n.t("lemmy_long_desc")}
</p>
<JoinServerButton />
</div>
</div>
</div>
);
export class Main extends Component<any, any> { export class Main extends Component<any, any> {
constructor(props: any, context: any) { constructor(props: any, context: any) {
super(props, context); super(props, context);
@ -59,21 +69,8 @@ export class Main extends Component<any, any> {
<meta property={"title"} content={title} />{" "} <meta property={"title"} content={title} />{" "}
</Helmet> </Helmet>
<LemmyTitleBlock /> <LemmyTitleBlock />
<div class="container"> <FollowCommunitiesBlock />
<div class="text-center">
<h2>{i18n.t("follow_communities")}</h2>
<p>
<T i18nKey="lemmy_long_desc">
#<a href="https://github.com/LemmyNet">#</a>
<a href="https://reddit.com">#</a>
<a href="https://lobste.rs">#</a>
<a href="https://news.ycombinator.com/">#</a>
<b>#</b>
</T>
</p>
</div>
</div>
<br />
<div class="bg-success"> <div class="bg-success">
<br /> <br />

View file

@ -7,6 +7,7 @@ module.exports = {
...require("daisyui/src/theming/themes")["[data-theme=halloween]"], ...require("daisyui/src/theming/themes")["[data-theme=halloween]"],
primary: "#12D10E", primary: "#12D10E",
secondary: "#06AFC6", secondary: "#06AFC6",
"base-content": "#ffffff",
}, },
}, },
], ],