Skip to content

Commit 553d3e1

Browse files
committed
homepage updates and building carousel
1 parent 189d0d1 commit 553d3e1

File tree

7 files changed

+179
-2
lines changed

7 files changed

+179
-2
lines changed

CSS/currentResearch.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.bannerImage{
2-
background-image: url(../src/Banner/DSC09695.jpeg);
2+
background-image: url(../src/Banner/Research.jpeg);
33
background-size: cover;
44
background-position: top;
55
}

CSS/index.css

+16
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,22 @@ a {
219219
text-align: center;
220220
border-bottom: 1px solid gray;
221221
}
222+
.upcomingEvents {
223+
position:relative;
224+
animation: move-words 28s linear infinite;
225+
margin: 0;
226+
color: rgb(24, 24, 24);
227+
}
228+
229+
@keyframes move-words {
230+
0% {
231+
left: 100%;
232+
}
233+
100% {
234+
left: -100%;
235+
}
236+
}
237+
222238
/*
223239
.Newshighlightscontent {
224240
margin: 20px 14vw 20px;

CSS/indexContent.css

+115-1
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,68 @@
5858
height: 100%;
5959
}
6060
/*end code for photo collage*/
61+
/*
62+
.Newsbanner{
63+
display: grid;
64+
/*margin-top: 10vh;
65+
width: 100vw;
66+
height: 65vh;
67+
grid-template-rows: 40% 60%;
68+
background: linear-gradient(rgb(204, 68, 68), rgb(162, 140, 140));
69+
color: white;
70+
}
71+
*/
72+
/*
73+
.carousel {
74+
width: 100vw;
75+
height: 65vh;
76+
overflow: hidden;
77+
position: relative;
78+
}
6179
80+
.carousel-container {
81+
display: flex;
82+
transition: transform 0.5s ease;
83+
}
6284
85+
.carousel-item {
86+
flex: 0 0 100%; /* Adjust this value to changa the number of visible items
87+
background-size: 100vw;
88+
background-position: top;
89+
background-repeat: no-repeat;
90+
position: relative;
91+
}
92+
93+
.carousel-text {
94+
position: absolute;
95+
top: 10px;
96+
left: 10px;
97+
color: white;
98+
font-size: 24px;
99+
font-weight: bold;
100+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
101+
}
102+
103+
.carousel-controls {
104+
position: absolute;
105+
top: 50%;
106+
transform: translateY(-50%);
107+
width: 100%;
108+
display: flex;
109+
justify-content: space-between;
110+
}
111+
112+
.carousel-control {
113+
cursor: pointer;
114+
padding: 10px;
115+
background-color: rgba(0, 0, 0, 0.5);
116+
color: white;
117+
}
118+
119+
.carousel-control:hover {
120+
background-color: rgba(0, 0, 0, 0.8);
121+
}
122+
*/
63123
.meetTheTeam{
64124
height: 1700px;
65125
color:rgb(255, 255, 255);
@@ -431,6 +491,58 @@
431491
text-decoration: underline;
432492
}
433493

494+
/*
495+
.Newshighlightscontent {
496+
margin: 20px 14vw 20px;
497+
width: 78vw;
498+
display: grid;
499+
grid-template-columns: 1fr 1fr;
500+
column-gap: 3vw;
501+
grid-gap: 8vh;
502+
grid-template-rows: 1fr;
503+
}
504+
505+
.newshighlightPanel{
506+
grid-column: 1;
507+
width: 100%;
508+
}
509+
510+
.titleNewshighlight{
511+
width: 100%;
512+
margin-left: 2.5%;
513+
text-align: center;
514+
515+
}
516+
517+
.newshighlight {
518+
width: 90%;
519+
padding: 2%;
520+
background-color:rgb(240, 248, 255);
521+
margin: 2% 0;
522+
border-width: 100%;
523+
border-radius: 15px;
524+
/*border-top: 1px solid black;
525+
border-bottom: 1px solid black;
526+
}
527+
.newshighlight img {
528+
max-width: 100%;
529+
height: auto;
530+
}
531+
532+
.newshighlight h1 {
533+
font-size: 2vw;
534+
margin: 0;
535+
}
536+
.newshighlight h2 {
537+
font-size: 1.5vw;
538+
padding-bottom: 5px;
539+
}
540+
541+
.newshighlight p, i {
542+
font-size: calc(17px + 0.3vw);
543+
544+
}
545+
/*
434546
435547
.meetTheTeam{
436548
height: 2100px;
@@ -533,4 +645,6 @@
533645
.meetTheTeam h1{
534646
text-align: center;
535647
}
536-
}
648+
}
649+
650+

index.html

+47
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,30 @@ <h1>Mountain Hydrology Research Group</h1>
2626
<img src="src/MTNHYDLOGO_large.png" />
2727
</div>
2828
</div>
29+
<div>
30+
<h2 class="upcomingEvents"> <p></p>Upcoming Events: MTNHYDR goes to Engineering Discovery Days May 2nd & 3rd, 2024!</h2>
31+
</div>
2932
<div class="twitterfollow">
3033
<a href="https://twitter.com/uwmtnhydr?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">Follow @uwmtnhydr</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
3134
</div>
35+
<!--<div class="Newsbanner">
36+
<h1 id="Newsbanner">News Updates</h1>
37+
</div>-->
38+
<!--
39+
<div class="carousel">
40+
<div class="carousel-text">News Updates</div>
41+
<div class="carousel-container">
42+
<div class="carousel-item" > <img src="src/20221010_SOS GOTHIC BASIN_01169-X4.jpg"> </div>
43+
<div class="carousel-item"> </div><img src="src/Banner/"> </div>
44+
<div class="carousel-item" > </div><img src="src/Banner/Research.jpeg"> </div>
45+
**** Add more images as needed ****
46+
</div>
47+
<div class="carousel-controls">
48+
<div class="carousel-control prev">&lt;</div>
49+
<div class="carousel-control next">&gt;</div>
50+
</div>
51+
</div>
52+
-->
3253
<div class="page" id="pageTwo">
3354
<div class="initialInfo" id="infoRight">
3455
<h2 class="initInfoBold">Our research goals</h2>
@@ -227,5 +248,31 @@ <h4>Undergraduate Student</h4>
227248
</div>
228249
<script src="./JS/jquery-3.6.0.min.js"></script>
229250
<script src="./JS/index.js"></script>
251+
<script>
252+
document.addEventListener('DOMContentLoaded', function () {
253+
const container = document.querySelector('.carousel-container');
254+
const prevBtn = document.querySelector('.prev');
255+
const nextBtn = document.querySelector('.next');
256+
257+
let currentIndex = 0;
258+
259+
function showSlide(index) {
260+
container.style.transform = `translateX(-${index * 100}%)`;
261+
}
262+
263+
function nextSlide() {
264+
currentIndex = (currentIndex + 1) % container.children.length;
265+
showSlide(currentIndex);
266+
}
267+
268+
function prevSlide() {
269+
currentIndex = (currentIndex - 1 + container.children.length) % container.children.length;
270+
showSlide(currentIndex);
271+
}
272+
273+
nextBtn.addEventListener('click', nextSlide);
274+
prevBtn.addEventListener('click', prevSlide);
275+
});
276+
</script>
230277
</body>
231278
</html>

src/.DS_Store

0 Bytes
Binary file not shown.

src/Banner/.DS_Store

0 Bytes
Binary file not shown.

src/Banner/Research.jpeg

331 KB
Loading

0 commit comments

Comments
 (0)