Skip to content

Commit 1474a83

Browse files
authored
Merge pull request #14 from ameen4455/campaigns
Feat: Update campaigns
2 parents 3b33e68 + 75d31e9 commit 1474a83

File tree

6 files changed

+39
-44
lines changed

6 files changed

+39
-44
lines changed

src/components/common/ProjectCarousel.js

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@ import * as React from "react";
22
import PropTypes from "prop-types";
33
import { Link } from "gatsby";
44

5-
const ProjectCarousel = ({ post, number }) => {
6-
const url = `/${post.slug}/`;
5+
const ProjectCarousel = ({ title, img, url, desc }) => {
76

87
return (
98
<>
10-
<Link to={url} id="post-card" className="mb-16 flex basis-0 grow items-start min-h-[414px] min-w-[300px] bg-project-bg mx-2">
9+
<Link to={url} id="post-card" className="mb-4 flex basis-0 grow items-start h-xl w-lg bg-project-bg mx-1 cursor-pointer">
1110
<div id="post-features" className="">
12-
<header className="post-card-header">
13-
<img src="/images/project_sample.png"/>
14-
{post.featured && <span>Featured</span>}
11+
<header className="w-full">
12+
<img className="w-full" src={img} />
1513
</header>
16-
<section id="post-card-excerpt" className="mb-3 mt-12 mx-8 text-heading-black mb-2">
17-
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
18-
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
14+
<section id="post-card-excerpt" className="mt-7 mx-5 text-heading-black text-sm mb-2">
15+
<p>{desc}</p>
1916
</section>
20-
<footer id="post-card-footer" className="flex mb-3 ml-8">
21-
<div id="post-card-footer-left" className="mr-3 text-iff-orange">
17+
<footer id="post-card-footer" className="flex mb-3 mx-5">
18+
<div id="post-card-footer-left" className="mr-3 text-iff-orange text-sm">
2219
<span>Know more</span>
2320
</div>
2421
</footer>
@@ -28,23 +25,5 @@ const ProjectCarousel = ({ post, number }) => {
2825
);
2926
};
3027

31-
ProjectCarousel.propTypes = {
32-
post: PropTypes.shape({
33-
slug: PropTypes.string.isRequired,
34-
title: PropTypes.string.isRequired,
35-
featured: PropTypes.bool,
36-
tags: PropTypes.arrayOf(
37-
PropTypes.shape({
38-
name: PropTypes.string,
39-
})
40-
),
41-
excerpt: PropTypes.string.isRequired,
42-
primary_author: PropTypes.shape({
43-
name: PropTypes.string.isRequired,
44-
profile_image: PropTypes.string,
45-
}).isRequired,
46-
}).isRequired,
47-
};
48-
4928
export default ProjectCarousel;
5029

src/templates/index.js

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Pagination,
99
PostCarousel,
1010
ProjectCarousel,
11-
PostCardBlog
11+
PostCardBlog,
1212
} from "../components/common";
1313
import { MetaData } from "../components/common/meta";
1414
import DonateCard from "../components/common/DonateCard";
@@ -31,7 +31,10 @@ const Index = ({ data, location, pageContext }) => {
3131
<>
3232
<MetaData location={location} />
3333
<Layout isHome={true}>
34-
<div id="container" className="responsive-container px-4 mt-4 text-left">
34+
<div
35+
id="container"
36+
className="responsive-container px-4 mt-4 text-left"
37+
>
3538
<h1 className="text-subheading-1 mb-4 mt-24 font-bold">Blogposts</h1>
3639
<section id="post-feed">
3740
{posts.map(({ node }, index) => (
@@ -49,27 +52,40 @@ const Index = ({ data, location, pageContext }) => {
4952
<hr></hr>
5053
<h1 className="text-3xl mt-20 font-bold">Campaigns & Projects</h1>
5154
<p className="text-base text-body-grey mt-6 mb-6">
52-
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
55+
{/* Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
5356
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
5457
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
55-
pariatur.
58+
pariatur. */}
5659
</p>
5760
<section
5861
id="post-feed"
59-
ref={scrollElement}
60-
className="flex flex-col md:flex-row scrolling-touch overflow-x-hidden"
62+
// ref={scrollElement}
63+
className="flex flex-col lg:flex-row overflow-x-hidden"
6164
>
62-
{posts.map(({ node }, index) => (
63-
// The tag below includes the markup for each post - components/common/ProjectCarousel.js
64-
<>
65-
<ProjectCarousel key={node.id} post={node} number={index + 1} />
66-
<ProjectCarousel key={node.id} post={node} number={index + 1} />
67-
</>
68-
))}
65+
<ProjectCarousel
66+
url={"https://patrakardefence.in/?ref=internetfreedom.in"}
67+
img="/images/digital.png"
68+
desc={`The Digital Patrakar Defence Clinic provides pro bono legal assistance to all journalists in India who face legal threats related to their reporting.`}
69+
/>
70+
<ProjectCarousel
71+
url={"https://panoptic.in/?ref=internetfreedom.in"}
72+
img="/images/panoptic.png"
73+
desc={`IFF’s Project Panoptic aims to bring transparency and accountability to the relevant government stakeholders involved in the deployment and implementation of facial recognition technology (FRT) projects in India.`}
74+
/>
75+
<ProjectCarousel
76+
url={"https://saveourprivacy.in/?ref=internetfreedom.in"}
77+
img="/images/privacy.png"
78+
desc={`#SaveOurPrivacy is an online collective launched in May, 2018 to safeguard your privacy and ensure a citizen centric data protection law.`}
79+
/>
80+
<ProjectCarousel
81+
url={"https://zombietracker.in/?ref=internetfreedom.in"}
82+
img="/images/zombie.png"
83+
desc={`The ‘Zombie Tracker’ is a platform which monitors cases which include a charge under Section 66A of the Information Technology Act 2000 which was deemed unconstitutional by the Hon’ble Supreme Court of India in Shreya Singhal v Union of India.`}
84+
/>
6985
</section>
7086

7187
<div className="flex items-center justify-center">
72-
<button
88+
{/* <button
7389
id="leftScroll"
7490
className="px-3"
7591
onClick={() => scroll(-200)}
@@ -124,7 +140,7 @@ const Index = ({ data, location, pageContext }) => {
124140
stroke-linejoin="round"
125141
/>
126142
</svg>
127-
</button>
143+
</button> */}
128144
</div>
129145
</div>
130146

static/images/digital.png

89.2 KB
Loading

static/images/panoptic.png

57.8 KB
Loading

static/images/privacy.png

33.6 KB
Loading

static/images/zombie.png

53.5 KB
Loading

0 commit comments

Comments
 (0)