Skip to content

Commit a8ce8f0

Browse files
committed
refact: add text over the banner
1 parent 3ea1e32 commit a8ce8f0

4 files changed

Lines changed: 78 additions & 8 deletions

File tree

public/banner.png

-40.9 KB
Loading

src/app/page.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ProjectSection } from "@/components/ProjectCard/Section/ProjectSection"
22
import HubTemplate from "@/templates/HubTemplate";
33
import { getContent } from "@/utils/functions";
44
import { SectionHeader } from "@/utils/interfaces";
5-
import { AboutSection } from "@/components/About/About";
65
import { RecentSection } from "@/components/RecentSection/RecentSection";
76
import PreviewSection from "@/components/PreviewSection/PreviewSection";
87
import PanelSection from "@/components/PanelCard/Section/PanelSection";
@@ -36,12 +35,6 @@ export default async function Home() {
3635
(section: { fields: { id: string } }) => section.fields.id === "new",
3736
)}
3837
/>
39-
<AboutSection
40-
header={sectionHead.find(
41-
(section: { fields: { id: string } }) =>
42-
section.fields.id === "about",
43-
)}
44-
/>
4538
<PanelSection
4639
header={sectionHead.find(
4740
(sec: { fields: SectionHeader }) => sec.fields.id == "panels",

src/components/BannerImage/BannerImage.styles.tsx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const BannerContainer = styled.header`
77
background-color: ${({ theme }) => theme.colors.green};
88
padding-bottom: 1rem;
99
border-radius: 0 0 8px 8px;
10+
position: relative; /* Adicionado para posicionar a tarja */
1011
1112
@media (max-width: 1000px) {
1213
height: clamp(80px, 20vw, 140px);
@@ -21,3 +22,64 @@ export const Banner = styled.img`
2122
object-position: center;
2223
display: block;
2324
`;
25+
26+
export const BannerOverlay = styled.div`
27+
position: absolute;
28+
top: 0.5rem;
29+
left: 0.5rem;
30+
right: 0.5rem;
31+
bottom: 0.5rem;
32+
background-color: rgba(0, 0, 0, 0.4);
33+
display: flex;
34+
justify-content: flex-start;
35+
align-items: center;
36+
padding: 0 2rem;
37+
`;
38+
39+
export const TextButtonContainer = styled.div`
40+
display: flex;
41+
flex-direction: column;
42+
align-items: flex-start;
43+
width: 100%;
44+
`;
45+
46+
export const OverlayText = styled.h2`
47+
max-width: 50%;
48+
color: white;
49+
font-size: 1.8rem;
50+
font-weight: 600;
51+
margin: 0;
52+
text-align: left;
53+
font-family: "League Spartan", sans-serif;
54+
55+
@media (max-width: 1000px) {
56+
font-size: 1rem;
57+
margin: 0 0 0.5rem 0;
58+
max-width: 100%;
59+
}
60+
`;
61+
62+
export const OverlayButton = styled.button`
63+
background-color: transparent;
64+
color: white;
65+
border: 2px solid white;
66+
padding: 0.5rem 1.5rem;
67+
cursor: pointer;
68+
transition: all 0.3s ease;
69+
70+
&:hover {
71+
background-color: white;
72+
color: black;
73+
}
74+
75+
@media (max-width: 768px) {
76+
padding: 0.3rem 1rem;
77+
font-size: 0.8rem;
78+
border-width: 1px;
79+
}
80+
81+
@media (max-width: 480px) {
82+
padding: 0.2rem 0.8rem;
83+
font-size: 0.7rem;
84+
}
85+
`;

src/components/BannerImage/BannerImage.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1-
import { BannerContainer, Banner } from "./BannerImage.styles";
1+
import {
2+
BannerContainer,
3+
Banner,
4+
BannerOverlay,
5+
TextButtonContainer,
6+
OverlayText,
7+
OverlayButton,
8+
} from "./BannerImage.styles";
29

310
const BannerImage = () => {
411
return (
512
<BannerContainer>
13+
<BannerOverlay>
14+
<TextButtonContainer>
15+
<OverlayText>
16+
Interaja, pesquise e explore dados sobre o nordeste brasileiro
17+
</OverlayText>
18+
<OverlayButton>Saiba mais</OverlayButton>
19+
</TextButtonContainer>
20+
</BannerOverlay>
621
<Banner src={"/banner.png"} />
722
</BannerContainer>
823
);

0 commit comments

Comments
 (0)