Skip to content

Commit 3b33e68

Browse files
authored
Merge pull request #13 from ameen4455/homepage-fixes
Homepage fixes
2 parents 61a17e9 + 4ad6019 commit 3b33e68

File tree

3 files changed

+31
-34
lines changed

3 files changed

+31
-34
lines changed

src/components/common/Layout.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ const DefaultLayout = ({ data, children, bodyClass, isHome }) => {
6868
<div className="viewport-top">
6969
{/* The main header section on top of the screen */}
7070
<header className="bg-center bg-cover py-5 text-white bg-bg-black">
71-
<div className="md:mx-auto max-w-screen-xl px-4">
72-
<div className="flex items-center justify-between" id="site-mast">
71+
<div className="px-4">
72+
<div className="flex items-center justify-between max-w-6xl mx-auto" id="site-mast">
7373
<Link to="/">
7474
{isHome ? null : (
7575
<img
@@ -109,31 +109,31 @@ const DefaultLayout = ({ data, children, bodyClass, isHome }) => {
109109
</div>
110110
</div>
111111
{isHome ? (
112-
<div id="site-banner" className="my-0 mx-auto">
113-
<img src="/images/logo.svg" className="h-28 mt-28" />
112+
<div id="site-banner" className="my-0 mx-auto responsive-container ">
113+
<img src="/images/logo.svg" className=" w-72 mt-24" />
114114
<h1
115115
id=" site-banner-title"
116-
className="mt-12 font-bold text-2xl leading-7 not-italic max-w-lg"
116+
className="mt-12 text-white text-superheading not-italic max-w-2xl"
117117
>
118118
{localData.description}
119119
</h1>
120120
<p
121121
id="site-banner-desc"
122-
className="my-4 max-w-lg text-body-grey text-xl leading-6 not-italic"
122+
className="mt-4 text-gray-400 text-big-body not-italic max-w-2xl"
123123
>
124124
{localData.subDescription}
125125
</p>
126126
<p
127127
id="site-banner-desc"
128-
className="my-4 max-w-lg text-body-grey text-xl leading-6 not-italic mb-14"
128+
className="mt-4 text-gray-400 text-big-body not-italic max-w-2xl"
129129
>
130130
{localData.cta}
131131
</p>
132-
<div id="action" className="mb-40">
133-
<button class="bg-iff-orange hover:bg-iff-orange-700 text-white font-normal text-xl leading-6 not-italic py-2 px-4 rounded w-36 h-14">
132+
<div id="action" className="mb-20 mt-8 flex">
133+
<button class="btn w-full text-xl md:w-36 h-14">
134134
Donate
135135
</button>
136-
<button class="border border-iff-orange hover:text-white text-iff-orange font-normal text-xl leading-6 not-italic py-2 ml-8 rounded w-36 h-14">
136+
<button class="btn-secondary ml-4 w-full text-xl md:w-36 h-14">
137137
Subscribe
138138
</button>
139139
</div>

src/styles/global.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
}
2121

2222
.btn {
23-
@apply border-2 border-iff-orange text-white bg-iff-orange px-6 py-2 rounded-md;
23+
@apply border-2 border-iff-orange text-white bg-iff-orange hover:bg-opacity-80 px-6 py-2 rounded-md;
2424
}
2525

2626
.btn-secondary {
27-
@apply border border-iff-orange text-iff-orange px-6 py-2 rounded-md;
27+
@apply border border-iff-orange text-iff-orange hover:bg-iff-orange hover:bg-opacity-10 px-6 py-2 rounded-md;
2828
}
2929

3030
.responsive-container {
3131
@apply md:mx-auto max-w-screen-lg;
3232
}
3333

3434
.text-superheading {
35-
@apply text-gray-900 text-7xl md:text-3xl font-semibold
35+
@apply text-gray-900 text-2xl md:text-3xl font-semibold
3636
}
3737

3838
.text-subheading-1 {

src/templates/index.js

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
Pagination,
99
PostCarousel,
1010
ProjectCarousel,
11+
PostCardBlog
1112
} from "../components/common";
1213
import { MetaData } from "../components/common/meta";
1314
import DonateCard from "../components/common/DonateCard";
@@ -30,34 +31,22 @@ const Index = ({ data, location, pageContext }) => {
3031
<>
3132
<MetaData location={location} />
3233
<Layout isHome={true}>
33-
<div
34-
id="container"
35-
className="mt-20 my-0 ml-5 md:mx-auto text-left lg:max-w-4xl"
36-
>
37-
<h1 className="text-3xl mb-6 font-bold">Blogposts</h1>
34+
<div id="container" className="responsive-container px-4 mt-4 text-left">
35+
<h1 className="text-subheading-1 mb-4 mt-24 font-bold">Blogposts</h1>
3836
<section id="post-feed">
3937
{posts.map(({ node }, index) => (
4038
// The tag below includes the markup for each post - components/common/PostCard.js
41-
<PostCard key={node.id} post={node} number={index + 1} />
39+
<PostCardBlog key={node.id} post={node} number={index + 1} />
4240
))}
4341
</section>
4442

45-
{/* <Pagination pageContext={pageContext} /> */}
46-
<p className="ml-14 text-body-grey">
43+
<p className="text-body-grey">
4744
Read more blogs on numerous other topics
4845
</p>
49-
<button class="ml-14 mt-6 mb-20 bg-iff-orange hover:bg-iff-orange-700 text-white font-normal text-xl leading-6 not-italic py-2 px-4 rounded w-36 h-14">
46+
<button class="mt-6 mb-16 bg-iff-orange hover:bg-iff-orange-700 text-white font-normal text-xl leading-6 not-italic py-2 px-4 rounded w-36 h-14">
5047
Read more
5148
</button>
5249
<hr></hr>
53-
<h1 className="text-3xl mt-20 mb-6 font-bold">Our latest work</h1>
54-
<section id="post-feed" className="flex flex-col lg:w-1/3 md:flex-row">
55-
{posts.map(({ node }, index) => (
56-
// The tag below includes the markup for each post - components/common/PostCard.js
57-
<PostCarousel key={node.id} post={node} number={index + 1} />
58-
))}
59-
</section>
60-
<hr></hr>
6150
<h1 className="text-3xl mt-20 font-bold">Campaigns & Projects</h1>
6251
<p className="text-base text-body-grey mt-6 mb-6">
6352
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
@@ -80,7 +69,11 @@ const Index = ({ data, location, pageContext }) => {
8069
</section>
8170

8271
<div className="flex items-center justify-center">
83-
<button id="leftScroll" className="px-3" onClick={() => scroll(-200)}>
72+
<button
73+
id="leftScroll"
74+
className="px-3"
75+
onClick={() => scroll(-200)}
76+
>
8477
<svg
8578
width="32"
8679
height="32"
@@ -104,7 +97,11 @@ const Index = ({ data, location, pageContext }) => {
10497
/>
10598
</svg>
10699
</button>
107-
<button id="rightScroll" className="px-3" onClick={() => scroll(200)}>
100+
<button
101+
id="rightScroll"
102+
className="px-3"
103+
onClick={() => scroll(200)}
104+
>
108105
<svg
109106
width="32"
110107
height="32"
@@ -129,7 +126,6 @@ const Index = ({ data, location, pageContext }) => {
129126
</svg>
130127
</button>
131128
</div>
132-
133129
</div>
134130

135131
</Layout>
@@ -161,8 +157,9 @@ export const pageQuery = graphql`
161157
edges {
162158
node {
163159
...GhostPostFields
164-
}
160+
}
165161
}
166162
}
167163
}
168164
`;
165+

0 commit comments

Comments
 (0)