-
Notifications
You must be signed in to change notification settings - Fork 3
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
Basic carousel for new site #42
Changes from 12 commits
aa5c2d0
743726b
8c0d3e7
8a202c0
083405e
1e8b633
2bc4f3a
1f674a9
2c7b585
fd500b5
641ffd5
fb51bed
e7a02bb
de65c94
f95dd88
997fe60
d9f17df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ | |
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.sliderContainer { | ||
h3 { | ||
font-size: 36px; | ||
margin: 10px; | ||
padding: 2% 0; | ||
background: var(--ifm-color-primary); | ||
color: #fff; | ||
line-height: 100px; | ||
text-align: center; | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
'use client'; | ||
import Slider from 'react-slick'; | ||
import styles from './Carousel.module.scss'; | ||
import { basePath } from '../../utils/constants'; | ||
import Image from 'next/image'; | ||
|
||
export default function SimpleSlider() { | ||
nickbristow marked this conversation as resolved.
Show resolved
Hide resolved
|
||
const images = [ | ||
`${basePath}/images/placeholder-carousel-numbered-1.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-2.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-3.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-4.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-5.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-6.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-7.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-1.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-2.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-3.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-4.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-5.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-6.png`, | ||
`${basePath}/images/placeholder-carousel-numbered-7.png`, | ||
]; | ||
|
||
const settings = { | ||
infinite: true, | ||
speed: 15000, // Adjust speed to make it constant | ||
slidesToShow: 7, // Number of visible slides | ||
slidesToScroll: 1, | ||
autoplay: true, | ||
autoplaySpeed: 0, // Continuous without pause | ||
cssEase: 'linear', // For smooth, continuous movement | ||
pauseOnHover: false, | ||
}; | ||
|
||
return ( | ||
<div className={styles.sliderContainer}> | ||
<Slider {...settings}> | ||
{images.map((src, index) => ( | ||
<div key={index}> | ||
<Image | ||
src={src} | ||
alt={`Slide ${index + 1}`} | ||
width={160} | ||
height={100} | ||
draggable={false} | ||
/> | ||
</div> | ||
))} | ||
</Slider> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ import Header from './components/Header/Header'; | |
import Footer from './components/Footer/Footer'; | ||
import USABanner from './components/UsaBanner/UsaBanner'; | ||
import { basePath } from './utils/constants'; | ||
import 'slick-carousel/slick/slick.css'; | ||
import 'slick-carousel/slick/slick-theme.css'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could move these two imports into |
||
import './globals.scss'; | ||
import './custom-styles.css'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { Grid, GridContainer } from '@trussworks/react-uswds'; | ||
import Image from 'next/image'; | ||
import { basePath } from './utils/constants'; | ||
import SimpleCarousel from './components/Carousel/Carousel'; | ||
import Hero from './components/Hero/Hero'; | ||
import { ContentContainer } from './components/ContentContainer/ContentContainer'; | ||
import Link from 'next/link'; | ||
|
@@ -105,17 +106,26 @@ function SectionTwo() { | |
|
||
function SectionThree() { | ||
return ( | ||
<ContentContainer align> | ||
<div className="flex flex-col items-center"> | ||
<h2 className="text-center text-[2rem] font-bold text-[#224a58]"> | ||
Jurisdictions working with DIBBs | ||
</h2> | ||
<p className="text-center text-base font-normal leading-relaxed text-[#224a58]"> | ||
State and local public health jurisdictions across the United States | ||
used DIBBs to solve their toughest data challenges | ||
</p> | ||
<> | ||
<ContentContainer align classes="px-14 pt-20 pb-10"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please double check that your styling still works here once you merge #41 in 😃 |
||
<Grid row gap> | ||
<Grid col={12}> | ||
<div className="flex flex-col items-center"> | ||
<h2 className="text-center text-[2rem] font-bold text-[#224a58]"> | ||
Jurisdictions working with DIBBs | ||
</h2> | ||
<p className="text-center text-base font-normal leading-relaxed text-[#224a58]"> | ||
State and local public health jurisdictions across the United | ||
States used DIBBs to solve their toughest data challenges | ||
</p> | ||
</div> | ||
</Grid> | ||
</Grid> | ||
</ContentContainer> | ||
<div className="pb-20 pt-10"> | ||
<SimpleCarousel /> | ||
</div> | ||
</ContentContainer> | ||
</> | ||
); | ||
} | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these styles? Looks like maybe not.