Skip to content

Commit 99b6e69

Browse files
committed
Add funding carousel to home page and reorganize logos
1 parent 38e9f0f commit 99b6e69

6 files changed

Lines changed: 136 additions & 0 deletions

File tree

_pages/home.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,62 @@ permalink: /
2626
<img src="/assets/img/logos/hiro_lab.jpg" alt="HiRo Lab">
2727
</div>
2828
</div>
29+
30+
<div class="funding-section">
31+
<h2>Funding & Support</h2>
32+
<div class="funding-carousel">
33+
<button class="carousel-btn prev-btn" aria-label="Previous">&lt;</button>
34+
<div class="carousel-container">
35+
<div class="carousel-track">
36+
<div class="funding-logo">
37+
<img src="/assets/img/logos/iisc.jpg" alt="IISc">
38+
</div>
39+
<div class="funding-logo">
40+
<img src="/assets/img/logos/artpark.png" alt="ARTPARK">
41+
</div>
42+
<div class="funding-logo">
43+
<img src="/assets/img/logos/drdo.png" alt="DRDO">
44+
</div>
45+
<div class="funding-logo">
46+
<img src="/assets/img/logos/dst.jpg" alt="DST">
47+
</div>
48+
<div class="funding-logo">
49+
<img src="/assets/img/logos/govtofkarnataka.png" alt="Government of Karnataka">
50+
</div>
51+
</div>
52+
</div>
53+
<button class="carousel-btn next-btn" aria-label="Next">&gt;</button>
54+
</div>
55+
</div>
56+
57+
<script>
58+
document.addEventListener('DOMContentLoaded', function() {
59+
const track = document.querySelector('.carousel-track');
60+
const prevBtn = document.querySelector('.prev-btn');
61+
const nextBtn = document.querySelector('.next-btn');
62+
const logos = document.querySelectorAll('.funding-logo');
63+
let currentIndex = 0;
64+
65+
function updateCarousel() {
66+
track.style.transform = `translateX(-${currentIndex * 100}%)`;
67+
prevBtn.disabled = currentIndex === 0;
68+
nextBtn.disabled = currentIndex === logos.length - 1;
69+
}
70+
71+
prevBtn.addEventListener('click', () => {
72+
if (currentIndex > 0) {
73+
currentIndex--;
74+
updateCarousel();
75+
}
76+
});
77+
78+
nextBtn.addEventListener('click', () => {
79+
if (currentIndex < logos.length - 1) {
80+
currentIndex++;
81+
updateCarousel();
82+
}
83+
});
84+
85+
updateCarousel();
86+
});
87+
</script>

assets/css/main.css

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,83 @@ body {
147147
border-radius: 8px;
148148
}
149149

150+
/* Funding Section */
151+
.funding-section {
152+
margin-top: 5rem;
153+
padding: 3rem 2rem;
154+
background: var(--bg-light);
155+
border-radius: 8px;
156+
}
157+
158+
.funding-section h2 {
159+
text-align: center;
160+
font-size: 2rem;
161+
color: var(--primary-color);
162+
margin-bottom: 2rem;
163+
}
164+
165+
.funding-carousel {
166+
position: relative;
167+
display: flex;
168+
align-items: center;
169+
justify-content: center;
170+
gap: 1rem;
171+
max-width: 900px;
172+
margin: 0 auto;
173+
}
174+
175+
.carousel-container {
176+
overflow: hidden;
177+
width: 100%;
178+
max-width: 700px;
179+
}
180+
181+
.carousel-track {
182+
display: flex;
183+
transition: transform 0.5s ease;
184+
}
185+
186+
.funding-logo {
187+
flex: 0 0 100%;
188+
display: flex;
189+
align-items: center;
190+
justify-content: center;
191+
padding: 2rem;
192+
}
193+
194+
.funding-logo img {
195+
max-width: 250px;
196+
max-height: 150px;
197+
width: auto;
198+
height: auto;
199+
object-fit: contain;
200+
}
201+
202+
.carousel-btn {
203+
background: var(--primary-color);
204+
color: white;
205+
border: none;
206+
width: 40px;
207+
height: 40px;
208+
border-radius: 50%;
209+
font-size: 1.2rem;
210+
cursor: pointer;
211+
display: flex;
212+
align-items: center;
213+
justify-content: center;
214+
flex-shrink: 0;
215+
transition: background 0.3s;
216+
}
217+
218+
.carousel-btn:hover {
219+
background: #333;
220+
}
221+
222+
.carousel-btn:disabled {
223+
background: #ccc;
224+
cursor: not-allowed;
225+
}
226+
150227
/* Lab/People Page */
151228
.lab-section,
152229
.people-section {

assets/img/logos/artpark.png

239 KB
Loading

assets/img/logos/drdo.png

17.9 KB
Loading

assets/img/logos/dst.jpg

20.5 KB
Loading
62.6 KB
Loading

0 commit comments

Comments
 (0)