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 results styles, update print styles, expand accordions #55

Merged
merged 3 commits into from
Dec 20, 2024
Merged
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
32 changes: 27 additions & 5 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
@import "colors.scss";
@import "variables.scss";
@import "mixins.scss";

@media print {
html {
font-size: 12px;
}
}

// removes default print page header/footer (date, url, etc.)
@page {
size: auto;
// TODO: should remove margin for PDF if possible
margin: 24px;
}

#container {
display: flex;
Expand All @@ -21,10 +35,6 @@
text-wrap: nowrap;
z-index: 100;

@media print {
display: none;
}

h1 {
color: $OFF_WHITE_100;
font-size: 1.25rem; // 20px
Expand All @@ -36,12 +46,24 @@
color: $WHITE;
text-decoration: none;
}

@media print {
position: unset;
background-color: unset;
h1,
.header__link {
color: black;
@include body_large_desktop;
}
}
}

#main {
flex-grow: 1;
margin-top: $headerH;
// padding-top: 2.25rem; // 36px
@media print {
margin-top: 0;
}

#content {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Layout = () => {
<header id="header">
<h1>
<Link to="/" className="header__link">
Good Cause Eviction
Good Cause Eviction NYC
</Link>
</h1>
</header>
Expand Down
6 changes: 6 additions & 0 deletions src/Components/Footer/Footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@
}
}
}

@media print {
.footer {
display: none;
}
}
6 changes: 6 additions & 0 deletions src/Components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { BreadCrumbs } from "../BreadCrumbs/BreadCrumbs";
import { Address } from "../Pages/Home/Home";
import { BackLink } from "../JFCLLinkInternal";
import { toTitleCase } from "../../helpers";

type HeaderProps = {
title: string | React.ReactNode;
Expand All @@ -26,6 +27,11 @@ export const Header: React.FC<HeaderProps> = ({
<div className="headline-section">
<div className="headline-section__content">
{showBreadcrumbs && <BreadCrumbs address={address} />}
<div className="headline-section__address__print">
{toTitleCase(
`${address?.houseNumber} ${address?.streetName}, ${address?.zipcode}`
)}
</div>
{isGuide && (
<div className="headline-section__back-link">
<BackLink to="/results">Back to Coverage Result</BackLink>
Expand Down
Loading