Skip to content

Commit

Permalink
UI refresh for single news post page (#3860)
Browse files Browse the repository at this point in the history
# Description and Motivation
- updates `HetTags` component to add link functionality, which allows
users to filter the corresponding news post
- updates the single post formatting to remove the taviraj font via
`SinglePost` and `index.css` components

## Has this been tested? How?
tests passing

## Screenshots (if appropriate)

![desktop-news](https://github.com/user-attachments/assets/b2d3859d-2ee6-41e5-bb71-9e9448242fb8)

![mobile-news](https://github.com/user-attachments/assets/06f1d001-6ea1-46b7-98b1-2b6d62d5533b)

## Types of changes
- Refactor / chore

## New frontend preview link is below in the Netlify comment 😎

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Ben Hammond 🎛️ <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eric M Warren II <[email protected]>
Co-authored-by: eriwarr <[email protected]>
  • Loading branch information
5 people authored Dec 17, 2024
1 parent 72edae9 commit f3e9181
Show file tree
Hide file tree
Showing 7 changed files with 291 additions and 227 deletions.
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"devDependencies": {
"@axe-core/playwright": "^4.10.1",
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "^1.9.4",
"@playwright/test": "^1.49.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^16.0.1",
Expand Down
160 changes: 109 additions & 51 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,92 @@ button[data-action='back']:focus {
display: flex;
flex-direction: column;
align-items: center;
margin: 0 auto;
padding: 2rem 8rem;
width: 100%;
max-width: 1440px !important;
justify-content: center !important;

@screen xs {
padding: 0.5rem 1rem;
}

@screen sm {
padding: 2rem 3rem;
}
@screen md {
padding: 2rem 4rem;
}
}

& figure {
margin-inline: 0 !important;
& figure, div > figure > img {
margin: 0 auto !important;
width: 100%;
max-width: 80vw;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
}
justify-content: start;
}

& figure > a > img {
display: block;
min-width: 70vw;
max-width: 88vw;
margin: 1rem auto;
height: auto;
}

& figure > figcaption {
margin: 0.5rem 2rem;
padding: 0 2rem;
max-width: 88vw;
text-align: center !important;
font-size: 0.8rem !important;
font-weight: 300;
text-decoration: none !important;
font-style: italic;

@screen xs {
padding: 0;
margin: 0 auto;
}
}

& figcaption {
margin-top: 0.5rem;
margin-bottom: 4rem;
text-align: center !important;
font-size: 0.75rem !important;
font-weight: 200 !important;
font-size: 0.8rem !important;
font-weight: 300;
text-decoration: none !important;
font-style: italic;
max-width: 600px;
}

& p {
width: 100%;
max-width: 95vw;
font-size: 1rem;
}

& p > a, p > strong > a, p > em > a, div > span > a {
text-decoration: none;
font-weight: 700;
}

& p > a:hover {
text-decoration: underline;
}

& p > strong {
margin: 1rem 0;
font-weight: 600;
font-size: theme('fontSize.title') !important;
font-family: theme('fontFamily.sansTitle') !important;
}

& p,
& ul,
& ol,
& h1,
Expand All @@ -93,55 +159,67 @@ button[data-action='back']:focus {
& h4,
& h5,
& h6 {
width: 95vw;
max-width: 800px;
@media screen(sm) {
width: 75vw;
@screen sm {
width: 100%;
}
@media screen(md) {
width: 50vw;
@screen md {
width: 95%;
}
}

& ul {
list-style: disc;
margin-left: 1rem;
padding-left: 1rem;
font-size: 1rem;
}

& hr {
margin-block: 3rem;
width: 50%;
}

& blockquote {
width: 100%;
max-width: 88vw;
padding: 2rem;
}

& blockquote > p {
font-style: italic;
display: flex;
flex-direction: column;
align-items: center;
margin: 0 auto;
justify-content: center !important;
}

& h1 {
font-family: 'Taviraj', serif !important;
& h1, h1 > a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.header') !important;
line-height: 110%;
color: theme('colors.altGreen');
font-weight: 300;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 0rem;
text-align: left;
text-decoration: none;
}

& h2 {
font-family: 'Taviraj', serif !important;
& h2, h2 > a, h2 a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.header') !important;
line-height: 110%;
color: theme('colors.altGreen');
font-weight: 300;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 0rem;
text-align: left;
text-decoration: none;
}

& h3 {
font-family: 'Taviraj', serif !important;
& h3, h3 > a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.header') !important;
line-height: 110%;
color: theme('colors.altGreen');
Expand All @@ -151,60 +229,40 @@ button[data-action='back']:focus {
text-align: left;
}

& h4 {
font-family: 'Taviraj', serif !important;
font-size: theme('fontSize.smallestHeader') !important;
& h4, h4 > a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.title') !important;
line-height: 110%;
color: theme('colors.altGreen');
font-weight: 300;
margin-top: 3rem;
font-weight: 500;
margin-top: 1rem;
margin-bottom: 0rem;
text-align: left;
}

& h5 {
font-family: 'Taviraj', serif !important;
& h5, h5 > a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.title') !important;
line-height: 110%;
color: theme('colors.altGreen');
font-weight: 300;
margin-top: 3rem;
margin-top: 1rem;
margin-bottom: 0rem;
text-align: left;
}

& h6 {
font-family: 'Taviraj', serif !important;
& h6, h6 > a {
font-family: 'DM Sans Variable', sans-serif !important;
font-size: theme('fontSize.text') !important;
line-height: 110%;
color: theme('colors.altGreen');
font-weight: 300;
margin-top: 3rem;
margin-top: 1rem;
margin-bottom: 0rem;
text-align: left;
}

& h6 a {
font-family: 'DM Sans', sans-serif !important;
font-weight: 500 !important;
background-color: theme(colors.altGreen) !important;
color: theme(colors.white) !important;
border-radius: 40px !important;
padding: 16px 30px !important;
text-align: center;
text-decoration: none;
display: block;
max-width: 400px;
margin: 40px auto 0px auto;
font-size: 1.5rem !important;
}

& img {
display: block;
margin: 40px auto 10px auto;
max-width: 100%;
height: auto;
}

/* hide featured image since already in header; hide HRs; show youtube embed <figure> */
.wp-block-post-featured-image {
Expand Down
Loading

0 comments on commit f3e9181

Please sign in to comment.