Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email for new content #271

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions src/components/contentToinbox.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.container {
width: 100%;
margin-top: 20px;
padding: 30px 0;
background-color: var(--ifm-footer-background-color);
border-radius: 15px;
box-shadow: none;
}

.formcontainer {
width: 50%;
margin: 0 auto;
text-align: center;
}

.elementcontainer {
display: flex;
gap: 10px;
justify-content: center;
align-items: center;
}

.textstyle {
font-size: 20px;
color: var(--ifm-color-primary-darkest);
font-weight: 700;
margin-bottom: 20px;
}

.inputstyle {
width: 65%;
height: 50px;
padding: 0 15px;
border-radius: 25px;
border: 1px solid var(--ifm-color-primary-lightest);
background-color: #fff;
color: #000;
}

.buttonstyle {
width: 30%;
height: 50px;
border-radius: 25px;
border: none;
font-weight: 600;
font-size: 16px;
color: #fff;
background-color: var(--ifm-color-primary-lighter);
cursor: pointer;
}

.buttonstyle:hover {
background-color: var(--ifm-color-primary-dark);
}

@media screen and (max-width: 800px) {
.formcontainer {
width: 90%;
}

.inputstyle,
.buttonstyle {
width: 100%;
margin-bottom: 10px;
}
}

[data-theme="light"] .container {
background-color: #f6f7f8;
}

[data-theme="light"] .textstyle {
color: #1c1e21;
}

[data-theme="light"] .inputstyle {
background-color: #fff;
color: #000;
}

[data-theme="dark"] .container {
background-color: #000;
}

[data-theme="dark"] .textstyle {
color: #fff;
}

[data-theme="dark"] .inputstyle {
background-color: #000;
color: #fff;
}
26 changes: 26 additions & 0 deletions src/components/contentToinbox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from "react";
import classes from "./contentToinbox.module.css";
export default function ContentToInbox() {
return (
<div className={classes.container}>
<form className={classes.formcontainer}>
<p className={classes.textstyle}>
Get the Flare Network latest content straight to your inbox
</p>
<div className={classes.elementcontainer}>
<input
className={classes.inputstyle}
type="email"
id="email"
name="email"
required
placeholder="Enter your email address"
></input>
<button className={classes.buttonstyle} type="submit">
Subscribe now
</button>
</div>
</form>
</div>
);
}
2 changes: 2 additions & 0 deletions src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FooterLogo from "@theme/Footer/Logo";
import FooterCopyright from "@theme/Footer/Copyright";
import FooterLayout from "@theme/Footer/Layout";
import CustomFooter from "./CustomFooter/customFooter";
import ContentToInbox from "@site/src/components/contentToinbox";

function Footer(): JSX.Element | null {
const { footer } = useThemeConfig();
Expand All @@ -16,6 +17,7 @@ function Footer(): JSX.Element | null {

return (
<>
<ContentToInbox />
{links.find((link) => link.title == "Developer links") &&
links.find((link) => link.title == "Support") ? (
<CustomFooter
Expand Down
Loading