Skip to content

Commit

Permalink
added looks
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushRatan1 committed Jul 31, 2024
1 parent 4e0e77f commit b0f8e2d
Show file tree
Hide file tree
Showing 4 changed files with 390 additions and 174 deletions.
187 changes: 187 additions & 0 deletions components/CountdownTimer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
import React, { useEffect, useState } from 'react';

// Define the type for the timeLeft state
type TimeLeft = {
days: number;
hours: number;
minutes: number;
seconds: number;
};

const CountdownTimer = () => {
const calculateTimeLeft = (): TimeLeft => {
const difference = +new Date('2024-11-08') - +new Date();
let timeLeft: TimeLeft = {
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
};

if (difference > 0) {
timeLeft = {
days: Math.floor(difference / (1000 * 60 * 60 * 24)),
hours: Math.floor((difference / (1000 * 60 * 60)) % 24),
minutes: Math.floor((difference / 1000 / 60) % 60),
seconds: Math.floor((difference / 1000) % 60),
};
}

return timeLeft;
};

const [timeLeft, setTimeLeft] = useState<TimeLeft>(calculateTimeLeft());
const [showCSITSS, setShowCSITSS] = useState(true);

useEffect(() => {
const timer = setTimeout(() => {
setTimeLeft(calculateTimeLeft());
}, 1000);

if (showCSITSS) {
setTimeout(() => setShowCSITSS(false), 2000); // Show "CSITSS" for 2 seconds
}

return () => clearTimeout(timer);
}, [timeLeft, showCSITSS]);

return (
<div className="countdown-timer">
{showCSITSS ? (
<div className="csitss">
{'CSITSS'.split('').map((char, index) => (
<div key={index} className="char">
{char}
</div>
))}
</div>
) : (
<div className="time-circle">
<div className="time">
<span className="time-number">{timeLeft.days}</span>
<span className="time-label">Days</span>
</div>
<div className="time">
<span className="time-number">{timeLeft.hours}</span>
<span className="time-label">Hours</span>
</div>
<div className="time">
<span className="time-number">{timeLeft.minutes}</span>
<span className="time-label">Minutes</span>
</div>
<div className="time">
<span className="time-number">{timeLeft.seconds}</span>
<span className="time-label">Seconds</span>
</div>
</div>
)}
<style jsx>{`
.countdown-timer {
position: fixed;
top: 50%;
right: 0;
transform: translateY(-50%);
background-color: rgba(255, 255, 255, 0.5);
border-radius: 10px;
padding: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
transition: opacity 1s;
}
.csitss {
display: flex;
flex-direction: column;
align-items: center;
font-size: 3rem;
font-weight: bold;
color: #1e40af;
animation: fadeOut 2s forwards;
}
.char {
margin: 2px 0;
}
.time-circle {
display: flex;
flex-direction: column;
align-items: center;
border: 1px solid #1e40af;
border-radius: 10px;
padding: 10px;
background-color: rgba(255, 255, 255, 0.8);
}
.time {
text-align: center;
margin: 5px 0;
}
.time-number {
display: block;
font-size: 2rem;
font-weight: bold;
color: #1e40af;
}
.time-label {
display: block;
font-size: 1rem;
color: #1e40af;
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@media (max-width: 768px) {
.countdown-timer {
top: auto;
bottom: 0;
right: 0;
width: 100%;
transform: translateY(0);
padding: 5px;
}
.csitss {
flex-direction: row;
font-size: 1.5rem;
}
.char {
margin: 0 2px;
}
.time-circle {
flex-direction: row;
justify-content: space-around;
border: 2px solid #1e40af;
padding: 5px;
width: 100%;
}
.time-number {
font-size: 1.5rem;
}
.time-label {
font-size: 0.8rem;
}
.time {
margin: 0 5px;
}
}
`}</style>
</div>
);
};

export default CountdownTimer;
2 changes: 2 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { AppProps } from 'next/app'
import WrapApp from '../components/NavBar'
import { NextSeo } from 'next-seo'


const theme: MantineThemeOverride = {
colorScheme: 'light',
primaryColor: 'indigo',
Expand Down Expand Up @@ -45,6 +46,7 @@ function MyApp({ Component, pageProps }: AppProps) {
}}
/>
<Component {...pageProps} />

<div id="recaptcha-container" />
</WrapApp>
</MantineProvider>
Expand Down
131 changes: 38 additions & 93 deletions pages/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,26 @@ function About() {
return (
<>
<div className="p-4">
<section className="mx-auto max-w-screen-xl px-4 py-4 sm:px-6 lg:px-8">
<div style={{ display: 'flex', alignItems: 'center' }}>
<h1
style={{
marginRight: '1rem',
background: 'linear-gradient(to right, #3b82f6, #1e3a8a)',
WebkitBackgroundClip: 'text',
fontSize: '2.5rem',
fontWeight: 'bold',
color: 'transparent',
alignContent: 'center',
}}
>
<section className="mx-auto max-w-screen-xl px-4 py-6 sm:px-6 lg:px-8">
<div className="flex flex-col items-center mb-12">
<h1 className="text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-500 to-indigo-700 animate-fadeIn">
Vision
</h1>
<hr
style={{
background: 'linear-gradient(to right, #3b82f6, transparent)',
height: '3px',
width: '100%',
border: 'none',
marginRight: '1rem',
}}
/>
<hr className="w-1/2 border-t-4 border-gradient-to-r from-blue-500 to-indigo-700 mt-2 animate-fadeIn" />
</div>
<p className="mt-4 text-gray-700 leading-relaxed">
<p className="mt-4 text-gray-700 leading-relaxed text-center">
Leadership in Quality Technical Education, Interdisciplinary Research and Innovation, focusing on Sustainable and Inclusive Technology.
</p>
</section>
<section className="mx-auto max-w-screen-xl px-4 py-4 sm:px-6 lg:px-8">
<div style={{ display: 'flex', alignItems: 'center' }}>
<h1
style={{
marginRight: '1rem',
background: 'linear-gradient(to right, #3b82f6, #1e3a8a)',
WebkitBackgroundClip: 'text',
fontSize: '2.5rem',
fontWeight: 'bold',
color: 'transparent',
alignContent: 'center',
}}
>

<section className="mx-auto max-w-screen-xl px-4 py-6 sm:px-6 lg:px-8">
<div className="flex flex-col items-center mb-12">
<h1 className="text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-500 to-indigo-700 animate-fadeIn">
Mission
</h1>
<hr
style={{
background: 'linear-gradient(to right, #3b82f6, transparent)',
height: '3px',
width: '100%',
border: 'none',
marginRight: '1rem',
}}
/>
<hr className="w-1/2 border-t-4 border-gradient-to-r from-blue-500 to-indigo-700 mt-2 animate-fadeIn" />
</div>
<ul className="mt-4 text-gray-700 leading-relaxed list-disc pl-6 space-y-2">
<ul className="mt-4 text-gray-700 leading-relaxed list-disc pl-6 space-y-2 animate-fadeIn">
<li>
To deliver outcome-based quality education, emphasizing on experiential learning with state-of-the-art infrastructure.
</li>
Expand All @@ -76,57 +41,37 @@ function About() {
</li>
</ul>
</section>
<section>
<div className="mx-auto max-w-screen-xl px-4 py-4 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2 lg:gap-16">
<div className="relative h-64 overflow-hidden rounded-lg sm:h-80 lg:order-last lg:h-full shadow-lg">
<img
className="absolute inset-0 h-full w-full object-cover"
src="/rv2.jpg"
alt="Man using a computer"
/>
</div>

<div className="lg:py-24">
<div style={{ display: 'flex', alignItems: 'center' }}>
<h1
style={{
marginRight: '1rem',
background: 'linear-gradient(to right, #3b82f6, #1e3a8a)',
WebkitBackgroundClip: 'text',
fontSize: '2rem',
fontWeight: 'bold',
color: 'transparent',
alignContent: 'center',
width: '100%',
}}
>
About RVCE
</h1>
<hr
style={{
background: 'linear-gradient(to right, #3b82f6, transparent)',
height: '3px',
width: '100%',
border: 'none',
marginRight: '1rem',
}}
/>
</div>
<p className="mt-4 text-justify text-gray-700 leading-relaxed">
RV College of Engineering (RVCE) established in 1963 is one of the earliest self-financing engineering colleges in the country. The institution is run by Rashtreeya Sikshana Samithi Trust (RSST) a not-for-profit Trust. RVCE is an Autonomous college. Currently, the institution offers 15 Bachelors, 14 Master Programs and all the departments have Research Centres, affiliated to Visvesvaraya Technological University (VTU) Belagavi. The institution has set itself a Vision "Leadership in Quality Technical Education, Interdisciplinary Research & Innovation, With a Focus on Sustainable and Inclusive Technology"
<br /><br />
Recent awards and achievements include - Ranked 96th in the Country by National Institutional Ranking Framework (NIRF: 2021-22), “Engineering College of the Year-2023” by the Higher Education Review Magazine, Ranked 10th in the country & 2nd in Karnataka - IIRF Ranking (2023), Ranked 6<sup>th</sup> among the top 10 of 100 Pvt. Engg. Colleges in the Country by Education World Magazine-2023. Ranked 1501+ in Times Higher Education World University Rankings-2024. Ranked 801+ in Computer Science and 1001+ Rank in Engineering category in THE World University Rankings-2024, Ranked 1501+ in Impact Ranking in The World University Rankings-2024, Ranking 601+ in Times Higher Education Asia University Rankings-2024 and NPTEL (Local Chapter) “AAA” Rating.
<br /><br />
RVCE has to its credit over 1700 national and international journal publications, 70 filed patents, out of which 59 were published patents, 38 granted patents and executed over Rs. 30 crores of sponsored research projects and consultancy in the last five years.
</p>
<section className="mx-auto max-w-screen-xl px-4 py-6 sm:px-6 lg:px-8">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-8">
<div className="relative overflow-hidden rounded-lg shadow-lg transition-transform duration-500 ease-in-out transform hover:scale-105">
<img
className="w-full h-full object-cover"
src="/rv2.jpg"
alt="RV College of Engineering"
/>
</div>

<div className="flex flex-col justify-center lg:py-24">
<div className="flex flex-col items-center mb-12">
<h1 className="text-3xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-blue-500 to-indigo-700 animate-fadeIn">
About RVCE
</h1>
<hr className="w-1/2 border-t-4 border-gradient-to-r from-blue-500 to-indigo-700 mt-2 animate-fadeIn" />
</div>
<p className="mt-4 text-gray-700 leading-relaxed text-justify animate-fadeIn">
RV College of Engineering (RVCE) established in 1963 is one of the earliest self-financing engineering colleges in the country. The institution is run by Rashtreeya Sikshana Samithi Trust (RSST) a not-for-profit Trust. RVCE is an Autonomous college. Currently, the institution offers 15 Bachelors, 14 Master Programs and all the departments have Research Centres, affiliated to Visvesvaraya Technological University (VTU) Belagavi. The institution has set itself a Vision "Leadership in Quality Technical Education, Interdisciplinary Research & Innovation, With a Focus on Sustainable and Inclusive Technology"
<br /><br />
Recent awards and achievements include - Ranked 96th in the Country by National Institutional Ranking Framework (NIRF: 2021-22), “Engineering College of the Year-2023” by the Higher Education Review Magazine, Ranked 10th in the country & 2nd in Karnataka - IIRF Ranking (2023), Ranked 6<sup>th</sup> among the top 10 of 100 Pvt. Engg. Colleges in the Country by Education World Magazine-2023. Ranked 1501+ in Times Higher Education World University Rankings-2024. Ranked 801+ in Computer Science and 1001+ Rank in Engineering category in THE World University Rankings-2024, Ranked 1501+ in Impact Ranking in The World University Rankings-2024, Ranking 601+ in Times Higher Education Asia University Rankings-2024 and NPTEL (Local Chapter) “AAA” Rating.
<br /><br />
RVCE has to its credit over 1700 national and international journal publications, 70 filed patents, out of which 59 were published patents, 38 granted patents and executed over Rs. 30 crores of sponsored research projects and consultancy in the last five years.
</p>
</div>
</div>
</section>
{/* <section>
<div className="mx-auto max-w-screen-xl px-4 py-4 sm:px-6 lg:px-8">
</section>

{/* <section>
<div className="mx-auto max-w-screen-xl px-4 py-6 sm:px-6 lg:px-8">
{/* <h2 className="text-3xl font-extrabold sm:text-4xl">
CONFERENCE TRACKS
</h2> */}
Expand Down
Loading

0 comments on commit b0f8e2d

Please sign in to comment.