Skip to content

Commit

Permalink
Merge pull request #204 from neharika-garg-20/main
Browse files Browse the repository at this point in the history
Ribbon responsiveness added
  • Loading branch information
Shibbu264 authored Nov 27, 2024
2 parents c00de70 + eb3d8c4 commit 57bec22
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 25 deletions.
4 changes: 2 additions & 2 deletions components/forms/StartupJunctionForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export default function StartupJunctionForm() {
{...register("city", { required: true })}
>
<option>Open this select preferred city</option>
<option value="Delhi/NCR">Delhi/NCR</option>
<option value="Bengaluru">Bengaluru</option>
<option value="Pune">Pune</option>
<option value="Banglore">Banglore</option>

</Form.Select>
{errors.city && (
Expand Down
43 changes: 26 additions & 17 deletions components/ribbons.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ const Ribbon = () => {
const frames = [
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

},
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

},
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

},
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

},
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

},
{
imageSrc: "https://s3.ap-south-1.amazonaws.com/townscript-production/images/ST1722320782225STENDf3691766-15cd-4630-a786-0edfbeba48cd.jpg",
text: "20<sup>th</sup> TO 22<sup>nd</sup> SEPT 2024"

}
];


const repeatedFrames = [...frames, ...frames];

return (
<div className="overflow-hidden bg-white shadow-md relative">
<div className="overflow-hidden bg-white shadow-md relative mb-16">
<style>
{`
@keyframes moveRibbon {
Expand All @@ -44,11 +44,11 @@ const Ribbon = () => {
.animate-ribbon {
display: flex;
animation: moveRibbon 30s linear infinite;
width: calc(100%);
width: 100vw
}
.frame {
flex: none;
width: calc(200% / ${frames.length});
width: calc(200vw / ${frames.length});
white-space: nowrap;
Expand All @@ -58,26 +58,34 @@ const Ribbon = () => {
}
.text-container {
display: flex; /* Flexbox for horizontal alignment */
align-items: center; /* Center vertically */
display: flex;
align-items: center;
flex-wrap:wrap;
}
.text-shadow {
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5); /* Add your desired shadow here */
font-weight: bold; /* Make text bold */
font-size: 1.5rem;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);
font-weight: bold;
}
`}
</style>
<div className="flex animate-ribbon">
{repeatedFrames.map((frame, index) => (
<div key={index} className="frame bg-white shadow-md flex items-center justify-center py-2">
<div className="text-container mx-2 text-sm sm:text-base font-bold">
<div className="text-container flex flex-wrap justify-center items-center mx-2 text-sm sm:text-base font-bold">
<img
src={frame.imageSrc}
alt="Event"
className="h-15 sm:h-16 mr-2"
className="h-12 sm:h-10 md:h-11 lg:h-12 xl:h-14 mr-2"
/>
<span className="text-gray-700 text-shadow" dangerouslySetInnerHTML={{ __html: frame.text }} />
<div className="text-gray-700 justify-center items-center flex flex-wrap text-shadow" />

<div className="ml-2 mr-2">20<sup>th</sup></div>
<div className="mr-2">TO</div>
<div className="mr-2">22<sup>nd</sup></div>
<div className="mr-2">SEPT</div>
<div className="mr-2">2024</div>

</div>
</div>
))}
Expand All @@ -87,3 +95,4 @@ const Ribbon = () => {
};

export default Ribbon;

31 changes: 29 additions & 2 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import "../styles/globals.scss";
import React from "react";
import Summit from "../public/summit.png";
import Ribbon from "../components/ribbons"

export default function Home() {

return (
<>
<Head>
Expand Down Expand Up @@ -48,10 +50,21 @@ export default function Home() {
cardType: "summary_large_image",
}}
/>


<Nav />
<Ribbon></Ribbon>





<div>
<Row>
<Ribbon></Ribbon>
</Row>

<Container fluid className="body">

{/*
<section className={styles.sectionHero}>
<div className={styles.hero}>
Expand Down Expand Up @@ -195,9 +208,23 @@ export default function Home() {
</section> */}


<Row className="header" >

<Row className="header">
<Col className="info">














<h1>E-Cell IIT BHU</h1>
<h2>
{"Accelerate Your"}
Expand Down
13 changes: 9 additions & 4 deletions pages/startup_junction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ const StartupJunction: FunctionComponent<Props> = () => {
<div className={styles.venue}>
<div>
<CalendarDays />
<span className={styles.heroDate}> 15th December 2023</span>
<span className={styles.heroDate}> 13th December 2024</span>
</div>
<div>
<MapPin />
<span className={styles.heroDate}>
{" "}
Delhi/NCR and Bengaluru
Pune and Banglore
</span>
</div>
</div>
Expand All @@ -49,13 +49,18 @@ const StartupJunction: FunctionComponent<Props> = () => {
propel your startup forward.
</p>


<Link
href="https://forms.gle/LZhuEfNJ1Qhkc4cy7"
target={"_blank"}
href="/forms/startup_junction"
target="_blank"
rel="noopener noreferrer"
className={`${styles.btn} ${styles.btnFill} ${styles.marginRightBtn}`}
>
Register
</Link>



<Link
href={"/startup_junction#about"}
className={`${styles.btn} ${styles.btnOutline} ${styles.marginRightBtn}`}
Expand Down
11 changes: 11 additions & 0 deletions styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ ul {
}
}
@media only screen and (max-width: 1015px) and (min-width: 991px) {

.dropdown-item div h4 {
font-size: 1rem;
}
Expand All @@ -609,9 +610,12 @@ ul {
margin-left: 1em;
width: 65px;
}

}

@media (max-width: 991px) {


.notification {
display: none;
}
Expand Down Expand Up @@ -727,6 +731,7 @@ ul {
.nav-item:hover {
box-shadow: none;
}


button {
display: inline;
Expand Down Expand Up @@ -837,6 +842,8 @@ ul {
.body {
max-width: 1390px;
margin: auto;


}
.header {
/* max-width: 1480px; */
Expand Down Expand Up @@ -901,11 +908,15 @@ ul {
color: grey;
}
@media (max-width: 991px) {
.body{
margin-top:200px;
}
.header {
height: 100%;
display: grid;
grid-template-columns: 1fr;
margin-top: 100px;

}
.info {
padding-left: 0px;
Expand Down

0 comments on commit 57bec22

Please sign in to comment.