Skip to content

Commit 3efd387

Browse files
committed
Fix: Layout
1 parent c23a732 commit 3efd387

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

src/components/common/Layout.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ 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">
71+
<div className="responsive-container px-4">
7272
<div className="flex items-center justify-between" id="site-mast">
7373
<Link to="/">
7474
{isHome ? null : (
@@ -110,30 +110,30 @@ const DefaultLayout = ({ data, children, bodyClass, isHome }) => {
110110
</div>
111111
{isHome ? (
112112
<div id="site-banner" className="my-0 mx-auto">
113-
<img src="/images/logo.svg" className="h-28 mt-28" />
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-body-grey 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-body-grey 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="bg-iff-orange hover:bg-iff-orange-700 text-white font-normal text-xl leading-6 not-italic py-2 px-4 rounded w-full 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="border border-iff-orange hover:text-white text-iff-orange font-normal text-xl leading-6 not-italic py-2 ml-4 rounded w-full md:w-36 h-14">
137137
Subscribe
138138
</button>
139139
</div>

src/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
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: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ const Index = ({ data, location, pageContext }) => {
3030
<>
3131
<MetaData location={location} />
3232
<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-
>
33+
<div id="container" className="responsive-container mt-4 text-left">
3734
<h1 className="text-3xl mb-6 font-bold">Blogposts</h1>
3835
<section id="post-feed">
3936
{posts.map(({ node }, index) => (
@@ -51,7 +48,10 @@ const Index = ({ data, location, pageContext }) => {
5148
</button>
5249
<hr></hr>
5350
<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">
51+
<section
52+
id="post-feed"
53+
className="flex flex-col lg:w-1/3 md:flex-row"
54+
>
5555
{posts.map(({ node }, index) => (
5656
// The tag below includes the markup for each post - components/common/PostCard.js
5757
<PostCarousel key={node.id} post={node} number={index + 1} />
@@ -80,7 +80,11 @@ const Index = ({ data, location, pageContext }) => {
8080
</section>
8181

8282
<div className="flex items-center justify-center">
83-
<button id="leftScroll" className="px-3" onClick={() => scroll(-200)}>
83+
<button
84+
id="leftScroll"
85+
className="px-3"
86+
onClick={() => scroll(-200)}
87+
>
8488
<svg
8589
width="32"
8690
height="32"
@@ -104,7 +108,11 @@ const Index = ({ data, location, pageContext }) => {
104108
/>
105109
</svg>
106110
</button>
107-
<button id="rightScroll" className="px-3" onClick={() => scroll(200)}>
111+
<button
112+
id="rightScroll"
113+
className="px-3"
114+
onClick={() => scroll(200)}
115+
>
108116
<svg
109117
width="32"
110118
height="32"
@@ -129,7 +137,6 @@ const Index = ({ data, location, pageContext }) => {
129137
</svg>
130138
</button>
131139
</div>
132-
133140
</div>
134141

135142
</Layout>
@@ -161,8 +168,9 @@ export const pageQuery = graphql`
161168
edges {
162169
node {
163170
...GhostPostFields
164-
}
171+
}
165172
}
166173
}
167174
}
168175
`;
176+

0 commit comments

Comments
 (0)