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

refactor: fix readme button hidden cookiebanner #5546

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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
149 changes: 100 additions & 49 deletions app/web/features/landing/LandingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Box,
Button as MuiButton,
Container,
ContainerProps,
Expand Down Expand Up @@ -54,6 +55,9 @@ const StyledSection = styled("section")(({ theme }) => ({
}));

const StyledContent = styled("div")(({ theme }) => ({
display: "flex",
flexDirection: "column",
alignItems: "center",
width: "100%",
marginBottom: theme.spacing(2),
[theme.breakpoints.up("md")]: {
Expand Down Expand Up @@ -87,6 +91,10 @@ const StyledIntroduction = styled("div")(({ theme }) => ({
width: "45%",
maxWidth: theme.breakpoints.values.lg / 2,
marginInlineEnd: "10%",
gap: theme.spacing(2),
}));

const StyledIntroductionText = styled("div")(({ theme }) => ({
[theme.breakpoints.down("md")]: {
display: "none",
},
Expand Down Expand Up @@ -204,33 +212,67 @@ export default function LandingPage() {
<StyledSection>
<StyledContent>
<StyledIntroduction>
<Typography
variant="h1"
component="h1"
sx={{
[theme.breakpoints.up("md")]: {
fontSize: "2rem",
lineHeight: "1.15",
textAlign: "left",
},
}}
>
{t("landing:introduction_title")}
</Typography>
<Typography
variant="h2"
component="span"
sx={{
[theme.breakpoints.up("md")]: {
display: "inline-block",
marginTop: theme.spacing(4),
position: "relative",
},
}}
<StyledIntroductionText>
<Typography
variant="h1"
component="h1"
sx={{
[theme.breakpoints.up("md")]: {
fontSize: "2rem",
lineHeight: "1.15",
textAlign: "left",
},
}}
>
{t("landing:introduction_title")}
</Typography>
<Typography
variant="h2"
component="span"
sx={{
[theme.breakpoints.up("md")]: {
display: "inline-block",
marginTop: theme.spacing(4),
position: "relative",
},
}}
>
{t("landing:introduction_subtitle")}
<StyledDivider />
</Typography>
</StyledIntroductionText>
<Box
display={{ xs: "none", md: "flex" }}
flexDirection="column"
width="100%"
mt={2}
>
{t("landing:introduction_subtitle")}
<StyledDivider />
</Typography>
<MuiButton
onClick={scrollToMore}
variant="text"
size="medium"
sx={{
"&.MuiButtonBase-root:hover": {
bgcolor: "transparent",
},
color: theme.palette.common.white,
}}
>
{t("global:read_more")}
</MuiButton>
<IconButton
onClick={scrollToMore}
size="small"
sx={{
"&.MuiButtonBase-root:hover": {
bgcolor: "transparent",
},
color: theme.palette.common.white,
}}
>
<ExpandMoreIcon fontSize="large" />
</IconButton>
</Box>
</StyledIntroduction>
<StyledFormWrapper>
<Typography variant="h2" component="h3">
Expand Down Expand Up @@ -271,30 +313,39 @@ export default function LandingPage() {
</Trans>
</Typography>
</StyledFormWrapper>
<Box
display={{ xs: "flex", md: "none" }}
flexDirection="column"
width="100%"
mt={2}
>
<MuiButton
onClick={scrollToMore}
variant="text"
sx={{
color: theme.palette.common.white,
"&.MuiButtonBase-root:hover": {
bgcolor: "transparent",
},
}}
disableRipple
>
{t("global:read_more")}
</MuiButton>
<IconButton
onClick={scrollToMore}
size="small"
sx={{
color: theme.palette.common.white,
"&.MuiButtonBase-root:hover": {
bgcolor: "transparent",
},
}}
>
<ExpandMoreIcon />
</IconButton>
</Box>
</StyledContent>

<MuiButton
onClick={scrollToMore}
variant="text"
sx={{
color: theme.palette.common.white,
background: "none",
border: "none",
}}
>
Read more
</MuiButton>
<IconButton
onClick={scrollToMore}
size="small"
sx={{
color: theme.palette.common.white,
background: "none",
border: "none",
}}
>
<ExpandMoreIcon />
</IconButton>
{process.env.NEXT_PUBLIC_COUCHERS_ENV !== "prod" && (
<StyledVercelLink
rel="noopener noreferrer"
Expand Down
1 change: 1 addition & 0 deletions app/web/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"submit": "Submit",
"confirm": "Confirm",
"load_more": "Load more",
"read_more": "Read more",
"cookie_message": "We use cookies to ensure that we give you the best experience on our website. If you continue to use this site, we will assume that you are happy with it. You can read more about our <1>Terms of Service</1>.",
"hosting_status": {
"any": "Any",
Expand Down