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 helmet = Helmet.renderStatic();
// TODO make eruda only work in debug mode
res.send(`
<!DOCTYPE html>
<html ${helmet.htmlAttributes.toString()} lang="en">
<head>
// TODO make these only work in debug mode
<script src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>

View file

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

View file

@ -6,22 +6,18 @@ import { i18n } from "../i18next";
import { T } from "inferno-i18next";
import { isBrowser } from "../utils";
const LemmyTitle = () => (
<p className="text-2xl font-bold bg-gradient-to-r bg-clip-text text-transparent from-[#69D066] to-[#03A80E]">
Lemmy
</p>
);
const LemmyDesc = () => (
<p className="text-xl font-medium">{i18n.t("lemmy_desc")}</p>
);
const LemmyTitleBlock = () => (
<div className="flex">
<LemmyTitle />
<LemmyDesc />
<JoinServerButton />
<RunServerButton />
<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]">
Lemmy
</p>
<p className="text-xl font-medium text-center">{i18n.t("lemmy_desc")}</p>
</div>
<div className="flex flex-row justify-around gap-2">
<JoinServerButton />
<RunServerButton />
</div>
</div>
);
@ -40,6 +36,20 @@ const RunServerButton = () => (
</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> {
constructor(props: any, context: any) {
super(props, context);
@ -59,21 +69,8 @@ export class Main extends Component<any, any> {
<meta property={"title"} content={title} />{" "}
</Helmet>
<LemmyTitleBlock />
<div class="container">
<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 />
<FollowCommunitiesBlock />
<div class="bg-success">
<br />

View file

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