|
17 | 17 |
|
18 | 18 | gtag('config', 'G-11BY9ZPPC8'); |
19 | 19 | </script> |
| 20 | + <style> |
| 21 | + /* Carousel Styles */ |
| 22 | + .carousel { |
| 23 | + position: relative; |
| 24 | + max-width: 600px; |
| 25 | + margin: 30px auto; |
| 26 | + overflow: hidden; |
| 27 | + border-radius: 12px; |
| 28 | + box-shadow: 0 2px 12px rgba(0,0,0,0.10); |
| 29 | + } |
| 30 | + .carousel-images img { |
| 31 | + width: 100%; |
| 32 | + display: none; |
| 33 | + transition: opacity 0.5s; |
| 34 | + } |
| 35 | + .carousel-images img.active { |
| 36 | + display: block; |
| 37 | + opacity: 1; |
| 38 | + } |
| 39 | + .carousel-dots { |
| 40 | + text-align: center; |
| 41 | + position: absolute; |
| 42 | + bottom: 12px; |
| 43 | + width: 100%; |
| 44 | + } |
| 45 | + .carousel-dots span { |
| 46 | + cursor: pointer; |
| 47 | + height: 12px; |
| 48 | + width: 12px; |
| 49 | + margin: 0 3px; |
| 50 | + background-color: #bbb; |
| 51 | + border-radius: 50%; |
| 52 | + display: inline-block; |
| 53 | + transition: background 0.3s; |
| 54 | + } |
| 55 | + .carousel-dots span.active { |
| 56 | + background-color: #333; |
| 57 | + } |
| 58 | + </style> |
20 | 59 | </head> |
21 | 60 | <body> |
22 | 61 | <header> |
23 | 62 | <nav> |
24 | | - <div class="menu-bar"> |
25 | | - <!-- Name of the Webpage --> |
26 | | - <!-- <h1 class="webpage-name">Cordeiro Lab</h1> --> |
27 | | - |
| 63 | + <div class="menu-bar"> |
28 | 64 | <a href="https://www.itqb.unl.pt/research/biological-chemistry/dynamic-structural-biology" target="_blank"> |
29 | 65 | <img src="/assets/logos/Lab_Logo_2.png" alt="Cordeiro Lab Logo" class="logo"> |
30 | 66 | </a> |
31 | | - <!-- Hamburger Menu --> |
32 | 67 | <div class="hamburger" id="hamburger"> |
33 | 68 | <span class="bar"></span> |
34 | 69 | <span class="bar"></span> |
35 | 70 | <span class="bar"></span> |
36 | 71 | </div> |
37 | | - <!-- Menu Links --> |
38 | 72 | <ul class="menu" id="menu"> |
39 | 73 | <li><a href="/index.html">Home</a></li> |
40 | 74 | <li><a href="team.html">Team</a></li> |
|
45 | 79 | </div> |
46 | 80 | </nav> |
47 | 81 | </header> |
48 | | - <main> |
49 | | - <!-- Here are our amazing researchers --> |
| 82 | + <main> |
| 83 | + <!-- Carousel Start --> |
| 84 | + <div class="carousel"> |
| 85 | + <div class="carousel-images"> |
| 86 | + <img src="/assets/images/slider/image1.jpg" alt="Image 1"> |
| 87 | + <img src="/assets/images/slider/image2.jpg" alt="Image 2"> |
| 88 | + <img src="/assets/images/slider/image3.jpg" alt="Image 3"> |
| 89 | + <!-- Add more images as needed --> |
| 90 | + </div> |
| 91 | + <div class="carousel-dots"></div> |
| 92 | + </div> |
| 93 | + <script> |
| 94 | + document.addEventListener('DOMContentLoaded', function () { |
| 95 | + const images = document.querySelectorAll('.carousel-images img'); |
| 96 | + const dotsContainer = document.querySelector('.carousel-dots'); |
| 97 | + let current = 0; |
| 98 | + let interval; |
| 99 | + |
| 100 | + function showImage(idx) { |
| 101 | + images.forEach((img, i) => { |
| 102 | + img.classList.toggle('active', i === idx); |
| 103 | + dotsContainer.children[i].classList.toggle('active', i === idx); |
| 104 | + }); |
| 105 | + current = idx; |
| 106 | + } |
| 107 | + |
| 108 | + // Create dots |
| 109 | + images.forEach((_, i) => { |
| 110 | + const dot = document.createElement('span'); |
| 111 | + dot.addEventListener('click', () => { |
| 112 | + showImage(i); |
| 113 | + resetInterval(); |
| 114 | + }); |
| 115 | + dotsContainer.appendChild(dot); |
| 116 | + }); |
| 117 | + |
| 118 | + function nextImage() { |
| 119 | + showImage((current + 1) % images.length); |
| 120 | + } |
| 121 | + |
| 122 | + function resetInterval() { |
| 123 | + clearInterval(interval); |
| 124 | + interval = setInterval(nextImage, 3000); |
| 125 | + } |
| 126 | + |
| 127 | + showImage(0); |
| 128 | + resetInterval(); |
| 129 | + }); |
| 130 | + </script> |
| 131 | + <!-- Carousel End --> |
| 132 | + |
| 133 | + <!-- Here are our amazing researchers --> |
50 | 134 | <div id="container">Loading...</div> |
51 | 135 | <script> |
52 | 136 | fetch('/content/Join_us.md') |
|
58 | 142 | </main> |
59 | 143 | <footer> |
60 | 144 | <nav> |
61 | | - <!-- Logo of the Institute --> |
62 | 145 | <a href="https://www.itqb.unl.pt" target="_blank"> |
63 | 146 | <img src="/assets/logos/itqb_logo2.png" alt="Institute Logo" class="logo"> |
64 | 147 | </a> |
65 | | - <!-- Menu Links --> |
66 | 148 | <ul class="menu1"> |
67 | 149 | <li><a href="/index.html">Home</a></li> |
68 | 150 | <li><a href="team.html">Team</a></li> |
|
0 commit comments