Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the carousel issue #25 #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"react-dom": "^18.2.0",
"react-router-dom": "^6.17.0",
"react-scripts": "5.0.1",
"react-slick": "^0.30.2",
"react-snowfall": "^1.2.1",
"react-tsparticles": "^2.12.2",
"slick-carousel": "^1.8.1",
"tsparticles-engine": "^2.12.0",
"tsparticles-preset-snow": "^2.12.0",
"web-vitals": "^2.1.4"
Expand Down
Binary file added public/img/1_RxrAEthB92moDcYZRpzk5g.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/83565e03ff74ee06cbc690bd3f144377.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/dhritrashtra-and-gandhari.webp
Binary file not shown.
Binary file added public/img/download (1).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/download (2).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/download (3).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/download (5).jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/mahabharata-bhishma-pitamah.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/the-geeta-1-chandresh-patel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/wp2765079.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
name="description"
content="Web site created using create-react-app"
/>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
<!--
Expand Down
4 changes: 1 addition & 3 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
font-family: 'Roboto Condensed', sans-serif;
}

.App {
text-align: center;
}


.App-logo {
height: 40vmin;
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Chapters from './components/Chapters';
import './App.css';
import Resources from './components/Resources';
import AboutUs from './components/AboutUs';
import Chronicle from './components/Chronicle';

const App = () => {
return (
Expand All @@ -21,6 +22,7 @@ const App = () => {
<Route path='/api/chapter/:chap' element={<Chapters />} />
<Route path='/api/resources' element={<Resources/>}/>
<Route path='/api/aboutus' element={<AboutUs/>}/>
<Route path='/chronicle' element={<Chronicle/>}/>
<Route path='*' element={<h1>404 Not Found</h1>} />
</Routes>
</div>
Expand Down
99 changes: 99 additions & 0 deletions src/components/Chronicle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import React from 'react'
import './chronicle.css'
import logounder from "./LogoUnder.png"
import Slider from "react-slick";
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
const Chronicle = () => {
const imageList = [
{ src: "./img/download (5).jpeg", alt: "Image 3" },
{ src: "./img/9 Times Krishna Showed How He Is The Real Boss In Mahabharata.jpeg", alt: "Image 1"},
{ src: "./img/An Italian Painter Studied Mahabharat & Made These Breathtaking Paintings In A Span Of 12 Years - ScoopWhoop (1).jpeg", alt: "Image 2" },
{ src: "./img/An Italian Painter Studied Mahabharat & Made These Breathtaking Paintings In A Span Of 12 Years - ScoopWhoop.jpeg", alt: "Image 3" },
{ src: "./img/download (1).jpeg", alt: "Image 3" },
{ src: "./img/download (2).jpeg", alt: "Image 3" },
{ src: "./img/download (3).jpeg", alt: "Image 3" },
{ src: "./img/Draupadi's greatest regret after the Mahabharata war.jpeg", alt: "Image 3" },
{ src: "./img/Indian Mythology, An Inspiration for International Artists.jpeg", alt: "Image 3" },
{ src: "./img/the-geeta-1-chandresh-patel.jpg", alt: "Image 3" },
{ src: "./img/Lord Krishna and Arjuna on chariot in Mahabharata.jpeg", alt: "Image 3" },
{ src: "./img/Lord Krishna showing his Universal form to Arjuna.jpeg", alt: "Image 3" },
{ src: "./img/Abhimanyu-and-the-Chakravyuha-Padmavyuha-Mahabharta.jpg", alt: "Image 3" },
{ src: "./img/1_RxrAEthB92moDcYZRpzk5g.jpg", alt: "Image 3" },
{ src: "./img/83565e03ff74ee06cbc690bd3f144377.jpg", alt: "Image 3" },
{ src: "./img/DraupadiHumiliatedInKauravaCourt-RajaRaviVarma-VintageIndianMahabharatPainting_f281c45b-5f23-45cf-9070-e331d6f2f937.jpg", alt: "Image 3" },
{ src: "./img/mahabharata-bhishma-pitamah.jpg", alt: "Image 3" },
{ src: "./img/dhritrashtra-and-gandhari.webp", alt: "Image 3" },
{ src: "./img/wp2765079.jpg", alt: "Image 3" },



/*{ src: "", alt: "Image 4" },*/
];

const settings = {
dots: true,
infinite: true,
speed: 1000,
slidesToShow: 1,
slidesToScroll: 1,
initialSlide: 0,
autoplay: true,
arrows: true,
autoplaySpeed: 2000,
appendDots: (dots) => (
<div>
<ul style={{ padding: "0", margin :"0" }}>{dots}</ul>
</div>
),

};

return (
<>
<h1 className='yada' style={{textAlign:'center'}}>"Yada Yada hi dharmasya glanir bhavati bharata</h1>
<h1 className='yada' style={{textAlign:'center'}}><span> Abhyutthanam adharmasya tadatmanam srjamy aham"</span></h1>
<div className="Carousel" style={{margin:"0", padding:"0",backgroundAttachment:'fixed'}}>
<img className='under' src={logounder}></img>
<div style={{maxWidth: "700px", margin: "0 auto",marginTop: "50px",objectFit:"cover",backgroundColor:"#03071e"}}>
<Slider {...settings}>
{imageList.map((image, index) => (
<div key={index} style={{ margin: "0 0px" }}>
<div
className="box"
style={{
margin:"50px",
padding:0,
height:'400px',
maxWidth: "700px",
background: "#758e4f",
overflow: "hidden",
color: "",
cursor: "pointer",
display: "flex",
flexDirection: "column",
alignItems: "center",
justifyContent: "center",
}}
>
<img
src={image.src}
alt={image.alt}
style={{
width: "80%",
height: "90%",

}}
/>
</div>
</div>
))}
</Slider>
</div>
</div>
</>
);
};


export default Chronicle
1 change: 1 addition & 0 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Navbar = () => {
<Link to={"/"}><li><a className="text-[1.5rem] text-blue-700 hover:text-yellow-500">Home</a></li></Link>
<li><a href="#" className="text-[1.5rem] text-blue-700 hover:text-yellow-500">Resources</a></li>
<Link to={"/api/aboutus"}><li><a href="#" className="text-[1.5rem] text-blue-700 hover:text-yellow-500">About Us</a></li></Link>
<Link to={"/chronicle"} className="text-[1.5rem] text-blue-700 hover:text-yellow-500">Chronicles</Link>
</ul>
</div>
</section>
Expand Down
21 changes: 21 additions & 0 deletions src/components/chronicle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*{
margin: 0;
padding: 0;
font-family: "Montserrat";
}
.yada{
font-family: "Montserrat";
text-transform: uppercase;
font-size: 1.5rem;
font-weight: 700;
z-index: -8;
margin-top: 30px;
font-style: italic;
word-spacing: 3px;
color: #003049;
}
.under{
width: 35%;
margin: 0 auto;
position: relative;
}