|
44 | 44 | <link rel="apple-touch-icon" href="./assets/logo/MONAI-logo_favicon.png"> |
45 | 45 |
|
46 | 46 | <!-- Stylesheets --> |
47 | | - <link rel="stylesheet" type="text/css" href="./assets/css/animate.css"> |
48 | 47 | <link rel="stylesheet" type="text/css" href="./assets/css/tailwind.css"> |
49 | 48 |
|
50 | 49 | <!-- Alpine.js --> |
|
109 | 108 | <link rel="apple-touch-icon" href="./assets/logo/MONAI-logo_favicon.png"> |
110 | 109 |
|
111 | 110 | <!-- Stylesheets --> |
112 | | - <link rel="stylesheet" type="text/css" href="./assets/css/animate.css"> |
113 | 111 | <link rel="stylesheet" type="text/css" href="./assets/css/tailwind.css"> |
114 | 112 |
|
115 | 113 | <!-- Alpine.js --> |
|
143 | 141 | </head> |
144 | 142 |
|
145 | 143 | <body class="flex flex-col min-h-screen"> |
146 | | - <!-- Header Area wrapper Starts --> |
| 144 | + <!-- Banner System --> |
| 145 | +<div x-data="bannerSystem()" x-init="init()"> |
| 146 | + <!-- Banner Container --> |
| 147 | + <div x-show="activeBanner" |
| 148 | + x-ref="banner" |
| 149 | + class="fixed top-0 left-0 right-0 text-white py-2 px-4 text-sm z-50" |
| 150 | + :class="activeBanner ? activeBanner.bgColor : ''" |
| 151 | + x-transition:leave="transition ease-in duration-200" |
| 152 | + x-transition:leave-start="opacity-100" |
| 153 | + x-transition:leave-end="opacity-0"> |
| 154 | + <div class="container flex items-center justify-center gap-2"> |
| 155 | + <svg x-show="activeBanner && activeBanner.icon === 'check'" class="w-4 h-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 156 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path> |
| 157 | + </svg> |
| 158 | + <svg x-show="activeBanner && activeBanner.icon === 'megaphone'" class="w-4 h-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 159 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"></path> |
| 160 | + </svg> |
| 161 | + <span class="font-medium" x-text="activeBanner ? activeBanner.message : ''"></span> |
| 162 | + <a x-show="activeBanner && activeBanner.link" |
| 163 | + :href="activeBanner ? activeBanner.link : '#'" |
| 164 | + target="_blank" |
| 165 | + class="underline hover:no-underline ml-1" |
| 166 | + x-text="activeBanner ? activeBanner.linkText : ''"></a> |
| 167 | + <button @click="dismissBanner()" |
| 168 | + class="ml-4 hover:opacity-80 transition-opacity" |
| 169 | + aria-label="Dismiss banner"> |
| 170 | + <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 171 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path> |
| 172 | + </svg> |
| 173 | + </button> |
| 174 | + </div> |
| 175 | + </div> |
| 176 | +</div> |
| 177 | + |
| 178 | +<script> |
| 179 | +function bannerSystem() { |
| 180 | + return { |
| 181 | + banners: [ |
| 182 | + { |
| 183 | + id: 'monai_core_v1.5', |
| 184 | + message: 'MONAI Core v1.5 is now available!', |
| 185 | + link: 'https://docs.monai.io/en/stable/whatsnew_1_5.html', |
| 186 | + linkText: 'See what\'s new →', |
| 187 | + bgColor: 'bg-brand-primary', |
| 188 | + icon: 'check', |
| 189 | + priority: 2 |
| 190 | + }, |
| 191 | + { |
| 192 | + id: 'community-survey-2025', |
| 193 | + message: 'Help shape the future of MONAI!', |
| 194 | + link: 'https://forms.gle/tovHc3ch13FwJEqo6', |
| 195 | + linkText: 'Take our 5-minute community survey →', |
| 196 | + bgColor: 'bg-purple-600', |
| 197 | + icon: 'megaphone', |
| 198 | + priority: 1 |
| 199 | + } |
| 200 | + ], |
| 201 | + activeBanner: null, |
| 202 | + bannerHeight: 0, |
| 203 | + |
| 204 | + init() { |
| 205 | + this.selectActiveBanner(); |
| 206 | + this.$nextTick(() => { |
| 207 | + if (this.activeBanner && this.$refs.banner) { |
| 208 | + this.bannerHeight = this.$refs.banner.offsetHeight; |
| 209 | + this.updateBodyPadding(); |
| 210 | + this.updateNavPosition(); |
| 211 | + } |
| 212 | + }); |
| 213 | + }, |
| 214 | + |
| 215 | + selectActiveBanner() { |
| 216 | + // Filter out dismissed banners and sort by priority |
| 217 | + const availableBanners = this.banners |
| 218 | + .filter(banner => localStorage.getItem(`hideBanner_${banner.id}`) !== 'true') |
| 219 | + .sort((a, b) => b.priority - a.priority); |
| 220 | + |
| 221 | + this.activeBanner = availableBanners[0] || null; |
| 222 | + |
| 223 | + // Dispatch event for header to know if banner is visible |
| 224 | + window.dispatchEvent(new CustomEvent('banner-visibility-changed', { |
| 225 | + detail: { visible: !!this.activeBanner } |
| 226 | + })); |
| 227 | + }, |
| 228 | + |
| 229 | + dismissBanner() { |
| 230 | + if (this.activeBanner) { |
| 231 | + localStorage.setItem(`hideBanner_${this.activeBanner.id}`, 'true'); |
| 232 | + this.activeBanner = null; |
| 233 | + this.bannerHeight = 0; |
| 234 | + this.updateBodyPadding(); |
| 235 | + this.updateNavPosition(); |
| 236 | + window.dispatchEvent(new CustomEvent('banner-visibility-changed', { |
| 237 | + detail: { visible: false, height: 0 } |
| 238 | + })); |
| 239 | + } |
| 240 | + }, |
| 241 | + |
| 242 | + updateBodyPadding() { |
| 243 | + const mainElement = document.querySelector('main'); |
| 244 | + if (mainElement) { |
| 245 | + if (this.activeBanner) { |
| 246 | + mainElement.style.paddingTop = `calc(4rem + ${this.bannerHeight}px)`; |
| 247 | + } else { |
| 248 | + mainElement.style.paddingTop = '4rem'; |
| 249 | + } |
| 250 | + } |
| 251 | + }, |
| 252 | + |
| 253 | + updateNavPosition() { |
| 254 | + const navElement = document.querySelector('.navigation'); |
| 255 | + if (navElement) { |
| 256 | + if (this.activeBanner && this.bannerHeight) { |
| 257 | + navElement.style.top = `${this.bannerHeight}px`; |
| 258 | + } else { |
| 259 | + navElement.style.top = '0'; |
| 260 | + } |
| 261 | + } |
| 262 | + } |
| 263 | + } |
| 264 | +} |
| 265 | +</script> |
| 266 | + |
| 267 | +<!-- Header Area wrapper Starts --> |
147 | 268 | <header id="header-wrap" class="relative"> |
148 | 269 | <!-- Navbar Start --> |
149 | | - <div class="navigation fixed top-0 left-0 w-full z-30 duration-300 bg-white border-b border-gray-100"> |
| 270 | + <div class="navigation fixed top-0 left-0 w-full z-40 duration-300 bg-white border-b border-gray-100 transition-all"> |
150 | 271 | <div class="container"> |
151 | 272 | <nav class="navbar flex justify-between items-center relative duration-300 h-16" x-data="{ isOpen: false, frameworksOpen: false, communityOpen: false }"> |
152 | 273 | <a class="navbar-brand" href="index.html"> |
|
203 | 324 | x-transition:enter-end="opacity-100 translate-y-0" |
204 | 325 | x-cloak> |
205 | 326 | <div class="flex flex-col space-y-2"> |
| 327 | + <a href="about.html" class="px-3 py-2 rounded-md transition-colors hover:bg-gray-50 hover:text-brand-primary">About Us</a> |
206 | 328 | <a href="https://github.com/Project-MONAI" target="_blank" class="px-3 py-2 rounded-md transition-colors hover:bg-gray-50 hover:text-brand-primary">GitHub</a> |
207 | 329 | <a href="https://join.slack.com/t/projectmonai/shared_invite/zt-2t7z8e9tu-xE5SPw0TC8LUxyPVpl2WVQ" target="_blank" class="px-3 py-2 rounded-md transition-colors hover:bg-gray-50 hover:text-brand-primary">Join Slack</a> |
208 | | - <a href="about.html" class="px-3 py-2 rounded-md transition-colors hover:bg-gray-50 hover:text-brand-primary">About Us</a> |
209 | 330 | <div class="border-t border-gray-100 mt-2 pt-2"> |
210 | 331 | <div class="grid grid-cols-2 gap-1"> |
211 | 332 | <a href="https://twitter.com/ProjectMONAI" target="_blank" class="px-3 py-2 rounded-md transition-colors hover:bg-gray-50 hover:text-brand-primary">Twitter</a> |
|
224 | 345 | </div> |
225 | 346 | <!-- Navbar End --> |
226 | 347 | </header> |
227 | | -<!-- Header Area wrapper End --> |
| 348 | +<!-- Header Area wrapper End --> |
| 349 | + |
228 | 350 |
|
229 | 351 | <main class="flex-grow pt-20"> |
230 | 352 | <!-- About Section --> |
@@ -652,16 +774,10 @@ <h5 class="font-medium text-gray-800">Wenqi Li</h5> |
652 | 774 | </footer> |
653 | 775 | <!-- Scripts Component --> |
654 | 776 | <!-- Common JavaScript Files --> |
655 | | -<script src="./assets/js/wow.js"></script> |
656 | 777 | <script src="./assets/js/particles.min.js"></script> |
657 | 778 | <script src="./assets/js/countUp.min.js"></script> |
658 | 779 | <script src="./assets/js/main.js"></script> |
659 | 780 |
|
660 | | -<!-- Initialize WOW.js --> |
661 | | -<script> |
662 | | - new WOW().init(); |
663 | | -</script> |
664 | | - |
665 | 781 | <!-- Performance Optimizations --> |
666 | 782 | <script> |
667 | 783 | // Defer non-critical images |
@@ -689,8 +805,7 @@ <h5 class="font-medium text-gray-800">Wenqi Li</h5> |
689 | 805 | // Preload critical resources |
690 | 806 | const preloadLinks = [ |
691 | 807 | './assets/css/tailwind.css', |
692 | | - './assets/css/animate.css', |
693 | | - './assets/img/MONAI-logo_color.png' |
| 808 | + './assets/img/MONAI-logo_color_full.png' |
694 | 809 | ]; |
695 | 810 |
|
696 | 811 | preloadLinks.forEach(link => { |
|
0 commit comments