From 234aba4abab8d68e5d9b73776ab6077671fb4db7 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Wed, 5 Nov 2025 13:39:25 +0700 Subject: [PATCH 01/16] Demo for sponsor banners --- scripts/demo_run_tools.py | 7 +- src/serena/resources/dashboard/dashboard.css | 172 +++++++++++++++++++ src/serena/resources/dashboard/index.html | 144 ++++++++++++++++ 3 files changed, 320 insertions(+), 3 deletions(-) diff --git a/scripts/demo_run_tools.py b/scripts/demo_run_tools.py index dad0c1cd..0c73fcfa 100644 --- a/scripts/demo_run_tools.py +++ b/scripts/demo_run_tools.py @@ -9,19 +9,20 @@ from pprint import pprint from serena.agent import SerenaAgent from serena.config.serena_config import SerenaConfig from serena.constants import REPO_ROOT -from serena.tools import FindFileTool, FindReferencingSymbolsTool, GetSymbolsOverviewTool, SearchForPatternTool +from serena.tools import FindFileTool, FindReferencingSymbolsTool, GetSymbolsOverviewTool, SearchForPatternTool, JetBrainsFindSymbolTool if __name__ == "__main__": - agent = SerenaAgent(project=REPO_ROOT, serena_config=SerenaConfig(gui_log_window_enabled=False, web_dashboard=True)) + agent = SerenaAgent(project=REPO_ROOT) # apply a tool + find_symbol_tool = agent.get_tool(JetBrainsFindSymbolTool) find_refs_tool = agent.get_tool(FindReferencingSymbolsTool) find_file_tool = agent.get_tool(FindFileTool) search_pattern_tool = agent.get_tool(SearchForPatternTool) overview_tool = agent.get_tool(GetSymbolsOverviewTool) result = agent.execute_task( - lambda: overview_tool.apply_ex(relative_file_path="src/solidlsp/ls.py"), + lambda: find_symbol_tool.apply("displayBasicStats"), ) pprint(json.loads(result)) # input("Press Enter to continue...") diff --git a/src/serena/resources/dashboard/dashboard.css b/src/serena/resources/dashboard/dashboard.css index 91c34590..92547f5a 100644 --- a/src/serena/resources/dashboard/dashboard.css +++ b/src/serena/resources/dashboard/dashboard.css @@ -143,6 +143,178 @@ body { margin: 5px 0; } +/* Sponsor Banners */ +.sponsors-container { + background-color: var(--bg-secondary); + border-bottom: 1px solid var(--border-color); + transition: background-color 0.3s ease, border-color 0.3s ease; +} + +.platinum-sponsors-section { + position: relative; + display: flex; + align-items: center; + justify-content: center; + height: 80px; +} + +.platinum-banner { + position: relative; + width: 100%; + max-width: 800px; + height: 80px; + overflow: hidden; +} + +.platinum-sponsor-slide { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.5s ease-in-out; + pointer-events: none; +} + +.platinum-sponsor-slide.active { + opacity: 1; + pointer-events: auto; +} + +.platinum-sponsor-slide .sponsor-content { + font-size: 60px; + font-weight: bold; + color: var(--text-primary); + text-align: center; + width: 100%; + transition: background-color 0.3s ease, color 0.3s ease; +} + +.gold-sponsors-section { + position: relative; + display: flex; + align-items: center; + justify-content: center; + height: 60px; + background-color: var(--bg-primary); + border-top: 1px solid var(--border-color); +} + +.gold-banner { + position: relative; + width: 100%; + max-width: 900px; + height: 60px; + overflow: hidden; +} + +.gold-sponsor-group { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: 15px; + opacity: 0; + transition: opacity 0.5s ease-in-out; + pointer-events: none; +} + +.gold-sponsor-group.active { + opacity: 1; + pointer-events: auto; +} + +.gold-sponsor-item { + flex: 1; + display: flex; + align-items: center; + justify-content: center; +} + +.gold-sponsor-item .sponsor-content { + font-size: 18px; + font-weight: 600; + color: var(--text-primary); + text-align: center; + padding: 10px 15px; + border: 2px solid var(--border-color); + border-radius: 6px; + background-color: var(--bg-secondary); + width: 100%; + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; +} + +.sponsor-nav-btn { + position: absolute; + background-color: transparent; + color: var(--text-muted); + border: none; + font-size: 36px; + cursor: pointer; + padding: 10px 15px; + transition: color 0.3s ease; + z-index: 10; + user-select: none; + opacity: 0.3; +} + +.sponsor-nav-btn:hover { + color: var(--text-primary); +} + +.sponsor-nav-btn:active { + color: var(--btn-primary); +} + +.platinum-sponsors-section .sponsor-nav-left { + left: 7px; +} + +.platinum-sponsors-section .sponsor-nav-right { + right: 7px; +} + +.gold-sponsors-section .sponsor-nav-btn { + font-size: 28px; +} + +.gold-sponsors-section .sponsor-nav-left { + left: 7px; +} + +.gold-sponsors-section .sponsor-nav-right { + right: 7px; +} + +/* Responsive adjustments for sponsors */ +@media (max-width: 768px) { + .platinum-sponsor-slide .sponsor-content { + font-size: 24px; + padding: 15px; + } + + .gold-sponsor-item .sponsor-content { + font-size: 14px; + padding: 8px 10px; + } + + .sponsor-nav-btn { + font-size: 28px; + padding: 5px 10px; + } + + .gold-sponsors-section .sponsor-nav-btn { + font-size: 24px; + } +} .page-view { max-width: 1600px; margin: 0 auto; diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index 3da2ec6f..1ce20343 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -38,6 +38,59 @@ + + +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ + +
+ +
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+
@@ -315,8 +368,99 @@
From 5b6b6cac20f383698c831d5ca11f3779ca4dd178 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Wed, 5 Nov 2025 19:04:42 +0700 Subject: [PATCH 02/16] Better positioning of sponsor banners --- src/serena/resources/dashboard/dashboard.css | 122 ++++++++++++------- src/serena/resources/dashboard/dashboard.js | 113 +++++++++++++++++ src/serena/resources/dashboard/index.html | 98 +++++++-------- 3 files changed, 239 insertions(+), 94 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.css b/src/serena/resources/dashboard/dashboard.css index 92547f5a..bf3e580b 100644 --- a/src/serena/resources/dashboard/dashboard.css +++ b/src/serena/resources/dashboard/dashboard.css @@ -62,18 +62,21 @@ body { right: 0; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); - padding: 20px; + padding: 20px 20px; display: flex; justify-content: space-between; align-items: center; + gap: 20px; z-index: 1000; transition: background-color 0.3s ease, border-color 0.3s ease; - min-height: 70px; + min-height: 90px; box-shadow: var(--shadow); + max-width: 1600px; + margin: 0 auto; } .logo-container { - flex: 1; + flex-shrink: 0; } .logo-container img { @@ -87,6 +90,7 @@ body { display: flex; align-items: center; gap: 10px; + flex-shrink: 0; } .menu-button { @@ -144,28 +148,42 @@ body { } /* Sponsor Banners */ -.sponsors-container { - background-color: var(--bg-secondary); - border-bottom: 1px solid var(--border-color); - transition: background-color 0.3s ease, border-color 0.3s ease; -} - .platinum-sponsors-section { position: relative; display: flex; align-items: center; justify-content: center; height: 80px; + margin-bottom: 20px; + background-color: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: 5px; + padding: 0; + box-shadow: var(--shadow); + transition: background-color 0.3s ease, border-color 0.3s ease; +} + +/* Platinum sponsor in header */ +.platinum-sponsors-section.header-sponsor { + flex: 1; + margin-bottom: 0; + height: 60px; + background-color: transparent; + border: 1px solid var(--border-color); + box-shadow: none; } .platinum-banner { position: relative; width: 100%; - max-width: 800px; height: 80px; overflow: hidden; } +.header-sponsor .platinum-banner { + height: 60px; +} + .platinum-sponsor-slide { position: absolute; top: 0; @@ -186,7 +204,7 @@ body { } .platinum-sponsor-slide .sponsor-content { - font-size: 60px; + font-size: 48px; font-weight: bold; color: var(--text-primary); text-align: center; @@ -194,25 +212,30 @@ body { transition: background-color 0.3s ease, color 0.3s ease; } +.header-sponsor .platinum-sponsor-slide .sponsor-content { + font-size: 32px; +} + .gold-sponsors-section { position: relative; display: flex; align-items: center; justify-content: center; height: 60px; - background-color: var(--bg-primary); - border-top: 1px solid var(--border-color); + background-color: var(--bg-secondary); + border: 1px solid var(--border-color); + border-radius: 5px; + padding: 0; } .gold-banner { position: relative; width: 100%; - max-width: 900px; height: 60px; overflow: hidden; } -.gold-sponsor-group { +.gold-sponsor-slide { position: absolute; top: 0; left: 0; @@ -221,33 +244,22 @@ body { display: flex; align-items: center; justify-content: center; - gap: 15px; opacity: 0; transition: opacity 0.5s ease-in-out; pointer-events: none; } -.gold-sponsor-group.active { +.gold-sponsor-slide.active { opacity: 1; pointer-events: auto; } -.gold-sponsor-item { - flex: 1; - display: flex; - align-items: center; - justify-content: center; -} - -.gold-sponsor-item .sponsor-content { - font-size: 18px; +.gold-sponsor-slide .sponsor-content { + font-size: 16px; font-weight: 600; color: var(--text-primary); text-align: center; padding: 10px 15px; - border: 2px solid var(--border-color); - border-radius: 6px; - background-color: var(--bg-secondary); width: 100%; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; } @@ -257,17 +269,18 @@ body { background-color: transparent; color: var(--text-muted); border: none; - font-size: 36px; + font-size: 28px; cursor: pointer; - padding: 10px 15px; + padding: 8px 12px; transition: color 0.3s ease; z-index: 10; user-select: none; - opacity: 0.3; + opacity: 0.4; } .sponsor-nav-btn:hover { color: var(--text-primary); + opacity: 0.7; } .sponsor-nav-btn:active { @@ -275,44 +288,67 @@ body { } .platinum-sponsors-section .sponsor-nav-left { - left: 7px; + left: 5px; } .platinum-sponsors-section .sponsor-nav-right { - right: 7px; + right: 5px; } .gold-sponsors-section .sponsor-nav-btn { - font-size: 28px; + font-size: 24px; } .gold-sponsors-section .sponsor-nav-left { - left: 7px; + left: 5px; } .gold-sponsors-section .sponsor-nav-right { - right: 7px; + right: 5px; } /* Responsive adjustments for sponsors */ @media (max-width: 768px) { .platinum-sponsor-slide .sponsor-content { - font-size: 24px; - padding: 15px; + font-size: 28px; + padding: 10px; } - .gold-sponsor-item .sponsor-content { + .header-sponsor .platinum-sponsor-slide .sponsor-content { + font-size: 18px; + } + + .gold-sponsor-slide .sponsor-content { font-size: 14px; padding: 8px 10px; } .sponsor-nav-btn { - font-size: 28px; - padding: 5px 10px; + font-size: 22px; + padding: 5px 8px; } .gold-sponsors-section .sponsor-nav-btn { - font-size: 24px; + font-size: 20px; + } + + .header { + flex-wrap: wrap; + min-height: auto; + } + + .logo-container { + order: 1; + } + + .header-nav { + order: 3; + } + + .header-sponsor { + order: 2; + width: 100%; + margin-top: 10px; } } .page-view { diff --git a/src/serena/resources/dashboard/dashboard.js b/src/serena/resources/dashboard/dashboard.js index f24742bc..f264974f 100644 --- a/src/serena/resources/dashboard/dashboard.js +++ b/src/serena/resources/dashboard/dashboard.js @@ -243,6 +243,9 @@ class Dashboard { // Initialize theme this.initializeTheme(); + // Initialize sponsor rotation + this.initializeSponsorRotation(); + // Add ESC key handler for closing modals $(document).keydown(function (e) { if (e.key === 'Escape' || e.keyCode === 27) { @@ -1831,4 +1834,114 @@ class Dashboard { // Close menu self.$menuDropdown.hide(); } + + // ===== Sponsor Rotation Methods ===== + + initializeSponsorRotation() { + const self = this; + + // Platinum sponsor rotation + this.platinumCurrentIndex = 0; + this.platinumInterval = null; + + $('#platinum-prev').click(function() { + self.rotatePlatinumSponsor('prev'); + }); + + $('#platinum-next').click(function() { + self.rotatePlatinumSponsor('next'); + }); + + // Start automatic platinum rotation + this.startPlatinumRotation(); + + // Gold sponsor rotation + this.goldCurrentIndex = 0; + this.goldInterval = null; + + $('#gold-prev').click(function() { + self.rotateGoldSponsor('prev'); + }); + + $('#gold-next').click(function() { + self.rotateGoldSponsor('next'); + }); + + // Start automatic gold rotation + this.startGoldRotation(); + } + + rotatePlatinumSponsor(direction) { + const $slides = $('.platinum-sponsor-slide'); + const totalSlides = $slides.length; + + if (totalSlides === 0) return; + + // Remove active class from current slide + $slides.eq(this.platinumCurrentIndex).removeClass('active'); + + // Calculate new index + if (direction === 'next') { + this.platinumCurrentIndex = (this.platinumCurrentIndex + 1) % totalSlides; + } else { + this.platinumCurrentIndex = (this.platinumCurrentIndex - 1 + totalSlides) % totalSlides; + } + + // Add active class to new slide + $slides.eq(this.platinumCurrentIndex).addClass('active'); + + // Reset auto-rotation timer + this.startPlatinumRotation(); + } + + startPlatinumRotation() { + const self = this; + + // Clear existing interval + if (this.platinumInterval) { + clearInterval(this.platinumInterval); + } + + // Start new interval (30 seconds) + this.platinumInterval = setInterval(function() { + self.rotatePlatinumSponsor('next'); + }, 30000); + } + + rotateGoldSponsor(direction) { + const $slides = $('.gold-sponsor-slide'); + const totalSlides = $slides.length; + + if (totalSlides === 0) return; + + // Remove active class from current slide + $slides.eq(this.goldCurrentIndex).removeClass('active'); + + // Calculate new index + if (direction === 'next') { + this.goldCurrentIndex = (this.goldCurrentIndex + 1) % totalSlides; + } else { + this.goldCurrentIndex = (this.goldCurrentIndex - 1 + totalSlides) % totalSlides; + } + + // Add active class to new slide + $slides.eq(this.goldCurrentIndex).addClass('active'); + + // Reset auto-rotation timer + this.startGoldRotation(); + } + + startGoldRotation() { + const self = this; + + // Clear existing interval + if (this.goldInterval) { + clearInterval(this.goldInterval); + } + + // Start new interval (30 seconds) + this.goldInterval = setInterval(function() { + self.rotateGoldSponsor('next'); + }, 30000); + } } diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index 1ce20343..9d629d4a 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -20,6 +20,25 @@
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ - -
- -
- -
-
- -
-
- -
-
- -
- - -
- -
-
-
- -
-
- -
-
-
-
- -
-
- -
-
- -
-
-
- -
-
+

Current Configuration

@@ -174,6 +143,33 @@
Loading contexts...
+ + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
From ac25c0522004019a3cb0dba1604ea02463274a9b Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Thu, 6 Nov 2025 11:49:55 +0700 Subject: [PATCH 03/16] Sponsor banners with images --- src/serena/resources/dashboard/dashboard.css | 22 +++++++++++++------- src/serena/resources/dashboard/index.html | 14 ++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.css b/src/serena/resources/dashboard/dashboard.css index bf3e580b..2ba33830 100644 --- a/src/serena/resources/dashboard/dashboard.css +++ b/src/serena/resources/dashboard/dashboard.css @@ -153,7 +153,7 @@ body { display: flex; align-items: center; justify-content: center; - height: 80px; + height: 100px; margin-bottom: 20px; background-color: var(--bg-secondary); border: 1px solid var(--border-color); @@ -165,23 +165,22 @@ body { /* Platinum sponsor in header */ .platinum-sponsors-section.header-sponsor { - flex: 1; margin-bottom: 0; - height: 60px; + width: 450px; + height: 100px; background-color: transparent; - border: 1px solid var(--border-color); box-shadow: none; } .platinum-banner { position: relative; width: 100%; - height: 80px; + height: 100px; overflow: hidden; } .header-sponsor .platinum-banner { - height: 60px; + height: 100px; } .platinum-sponsor-slide { @@ -216,9 +215,18 @@ body { font-size: 32px; } +.sponsor-image { + max-height: 100%; + max-width: 100%; + height: auto; + width: auto; + object-fit: contain; +} + .gold-sponsors-section { + margin: 0 auto; + width: 235px; position: relative; - display: flex; align-items: center; justify-content: center; height: 60px; diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index 9d629d4a..1197c31e 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -28,10 +28,10 @@
- +
- +
- +
- +
- +
- +
- +
-
-
- +
+ +
+ + +
+
+
-
- +
+ +
+
+
-
@@ -371,8 +352,8 @@ this.goldIndex = 0; this.platinumTimer = null; this.goldTimer = null; - this.platinumInterval = 30000; // 30 seconds - this.goldInterval = 30000; // 30 seconds + this.platinumInterval = 5000; + this.goldInterval = 5000; this.init(); } @@ -383,12 +364,6 @@ // Initialize gold rotation this.startGoldRotation(); - - // Setup manual navigation buttons - $('#platinum-prev').on('click', () => this.rotatePlatinum('prev')); - $('#platinum-next').on('click', () => this.rotatePlatinum('next')); - $('#gold-prev').on('click', () => this.rotateGold('prev')); - $('#gold-next').on('click', () => this.rotateGold('next')); } startPlatinumRotation() { From 68bbcc64a96ee7b70f611da1f27692b49c298432 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 17:43:47 +0100 Subject: [PATCH 05/16] Simplify sponsor rotation JS code, fixing duplication --- src/serena/resources/dashboard/dashboard.js | 192 +++++++++----------- src/serena/resources/dashboard/index.html | 85 --------- 2 files changed, 81 insertions(+), 196 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.js b/src/serena/resources/dashboard/dashboard.js index 1df0edff..261d4f58 100644 --- a/src/serena/resources/dashboard/dashboard.js +++ b/src/serena/resources/dashboard/dashboard.js @@ -40,6 +40,86 @@ class LogMessage { }; } +class SponsorRotation { + constructor() { + this.platinumIndex = 0; + this.goldIndex = 0; + this.platinumTimer = null; + this.goldTimer = null; + this.platinumInterval = 5000; + this.goldInterval = 5000; + + this.init(); + } + + init() { + this.startPlatinumRotation(); + this.startGoldRotation(); + } + + startPlatinumRotation() { + const self = this; + this.platinumTimer = setInterval(() => { + self.rotatePlatinum('next'); + }, this.platinumInterval); + } + + startGoldRotation() { + const self = this; + this.goldTimer = setInterval(() => { + self.rotateGold('next'); + }, this.goldInterval); + } + + rotatePlatinum(direction) { + const $slides = $('.platinum-sponsor-slide'); + const total = $slides.length; + + if (total === 0) return; + + // Remove active class from current slide + $slides.eq(this.platinumIndex).removeClass('active'); + + // Calculate next index + if (direction === 'next') { + this.platinumIndex = (this.platinumIndex + 1) % total; + } else { + this.platinumIndex = (this.platinumIndex - 1 + total) % total; + } + + // Add active class to new slide + $slides.eq(this.platinumIndex).addClass('active'); + + // Reset timer + clearInterval(this.platinumTimer); + this.startPlatinumRotation(); + } + + rotateGold(direction) { + const $groups = $('.gold-sponsor-slide'); + const total = $groups.length; + + if (total === 0) return; + + // Remove active class from current group + $groups.eq(this.goldIndex).removeClass('active'); + + // Calculate next index + if (direction === 'next') { + this.goldIndex = (this.goldIndex + 1) % total; + } else { + this.goldIndex = (this.goldIndex - 1 + total) % total; + } + + // Add active class to new group + $groups.eq(this.goldIndex).addClass('active'); + + // Reset timer + clearInterval(this.goldTimer); + this.startGoldRotation(); + } +} + class Dashboard { constructor() { let self = this; @@ -244,7 +324,7 @@ class Dashboard { this.initializeTheme(); // Initialize sponsor rotation - this.initializeSponsorRotation(); + this.sponsorRotation = new SponsorRotation(); // Add ESC key handler for closing modals $(document).keydown(function (e) { @@ -1834,114 +1914,4 @@ class Dashboard { // Close menu self.$menuDropdown.hide(); } - - // ===== Sponsor Rotation Methods ===== - - initializeSponsorRotation() { - const self = this; - - // Platinum sponsor rotation - this.platinumCurrentIndex = 0; - this.platinumInterval = null; - - $('#platinum-prev').click(function() { - self.rotatePlatinumSponsor('prev'); - }); - - $('#platinum-next').click(function() { - self.rotatePlatinumSponsor('next'); - }); - - // Start automatic platinum rotation - this.startPlatinumRotation(); - - // Gold sponsor rotation - this.goldCurrentIndex = 0; - this.goldInterval = null; - - $('#gold-prev').click(function() { - self.rotateGoldSponsor('prev'); - }); - - $('#gold-next').click(function() { - self.rotateGoldSponsor('next'); - }); - - // Start automatic gold rotation - this.startGoldRotation(); - } - - rotatePlatinumSponsor(direction) { - const $slides = $('.platinum-sponsor-slide'); - const totalSlides = $slides.length; - - if (totalSlides === 0) return; - - // Remove active class from current slide - $slides.eq(this.platinumCurrentIndex).removeClass('active'); - - // Calculate new index - if (direction === 'next') { - this.platinumCurrentIndex = (this.platinumCurrentIndex + 1) % totalSlides; - } else { - this.platinumCurrentIndex = (this.platinumCurrentIndex - 1 + totalSlides) % totalSlides; - } - - // Add active class to new slide - $slides.eq(this.platinumCurrentIndex).addClass('active'); - - // Reset auto-rotation timer - this.startPlatinumRotation(); - } - - startPlatinumRotation() { - const self = this; - - // Clear existing interval - if (this.platinumInterval) { - clearInterval(this.platinumInterval); - } - - // Start new interval (30 seconds) - this.platinumInterval = setInterval(function() { - self.rotatePlatinumSponsor('next'); - }, 5000); - } - - rotateGoldSponsor(direction) { - const $slides = $('.gold-sponsor-slide'); - const totalSlides = $slides.length; - - if (totalSlides === 0) return; - - // Remove active class from current slide - $slides.eq(this.goldCurrentIndex).removeClass('active'); - - // Calculate new index - if (direction === 'next') { - this.goldCurrentIndex = (this.goldCurrentIndex + 1) % totalSlides; - } else { - this.goldCurrentIndex = (this.goldCurrentIndex - 1 + totalSlides) % totalSlides; - } - - // Add active class to new slide - $slides.eq(this.goldCurrentIndex).addClass('active'); - - // Reset auto-rotation timer - this.startGoldRotation(); - } - - startGoldRotation() { - const self = this; - - // Clear existing interval - if (this.goldInterval) { - clearInterval(this.goldInterval); - } - - // Start new interval (30 seconds) - this.goldInterval = setInterval(function() { - self.rotateGoldSponsor('next'); - }, 5000); - } } diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index a8372bff..c1752bd7 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -345,93 +345,8 @@
From 8f0d87e37d594a22de78e73e08f5047e338a3613 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 18:12:18 +0100 Subject: [PATCH 06/16] Load sponsor data dynamically (from hades) --- src/serena/resources/dashboard/dashboard.js | 41 +++++++++++++++++++-- src/serena/resources/dashboard/index.html | 19 +--------- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.js b/src/serena/resources/dashboard/dashboard.js index 261d4f58..a28627d1 100644 --- a/src/serena/resources/dashboard/dashboard.js +++ b/src/serena/resources/dashboard/dashboard.js @@ -53,8 +53,41 @@ class SponsorRotation { } init() { - this.startPlatinumRotation(); - this.startGoldRotation(); + let self = this; + this.loadSponsors(function() { + self.startPlatinumRotation(); + self.startGoldRotation(); + }); + } + + loadSponsors(onSuccess) { + $.ajax({ + url: 'https://v32155.1blu.de/serena-sponsors/manifest.php', + type: 'GET', + success: function (response) { + console.log('Sponsors loaded:', response); + let $goldContainer = $('#gold-sponsors'); + $.each(response.gold, function (index, sponsor) { + let $sponsor = $('
'); + if (index === 0) { + $sponsor.addClass('active'); + } + $goldContainer.append($sponsor); + }); + let $platinumContainer = $('#platinum-sponsors'); + $.each(response.platinum, function (index, sponsor) { + let $sponsor = $('
'); + if (index === 0) { + $sponsor.addClass('active'); + } + $platinumContainer.append($sponsor); + }); + onSuccess(); + }, + error: function (xhr, status, error) { + console.error('Error loading sponsors:', error); + } + }); } startPlatinumRotation() { @@ -414,7 +447,9 @@ class Dashboard { console.log('Polling for config overview...'); let self = this; $.ajax({ - url: '/get_config_overview', type: 'GET', success: function (response) { + url: '/get_config_overview', + type: 'GET', + success: function (response) { self.failureCount = 0; // Check if the config data has actually changed diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index c1752bd7..17870a6e 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -24,16 +24,7 @@
-
-
- -
-
- -
-
- -
+
@@ -143,13 +134,7 @@ -
-
- -
-
- -
+
From 4c0ed000425ffeedf02d7ae817a30d3dc3993051 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 18:14:55 +0100 Subject: [PATCH 07/16] Remove obsolete sponsor styles --- src/serena/resources/dashboard/dashboard.css | 87 -------------------- 1 file changed, 87 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.css b/src/serena/resources/dashboard/dashboard.css index af24da8a..458482b9 100644 --- a/src/serena/resources/dashboard/dashboard.css +++ b/src/serena/resources/dashboard/dashboard.css @@ -255,93 +255,6 @@ body { object-fit: contain; } -.sponsor-nav-btn { - position: absolute; - background-color: transparent; - color: var(--text-muted); - border: none; - font-size: 28px; - cursor: pointer; - padding: 8px 12px; - transition: color 0.3s ease; - z-index: 10; - user-select: none; - opacity: 0.4; -} - -.sponsor-nav-btn:hover { - color: var(--text-primary); - opacity: 0.7; -} - -.sponsor-nav-btn:active { - color: var(--btn-primary); -} - -.platinum-sponsors-section .sponsor-nav-left { - left: 5px; -} - -.platinum-sponsors-section .sponsor-nav-right { - right: 5px; -} - -.gold-sponsors-section .sponsor-nav-btn { - font-size: 24px; -} - -.gold-sponsors-section .sponsor-nav-left { - left: 5px; -} - -.gold-sponsors-section .sponsor-nav-right { - right: 5px; -} - -/* Responsive adjustments for sponsors */ -@media (max-width: 768px) { - .platinum-sponsor-slide .sponsor-content { - font-size: 28px; - padding: 10px; - } - - .header-sponsor .platinum-sponsor-slide .sponsor-content { - font-size: 18px; - } - - .gold-sponsor-slide .sponsor-content { - font-size: 14px; - padding: 8px 10px; - } - - .sponsor-nav-btn { - font-size: 22px; - padding: 5px 8px; - } - - .gold-sponsors-section .sponsor-nav-btn { - font-size: 20px; - } - - .header { - flex-wrap: wrap; - min-height: auto; - } - - .header-nav { - order: 2; - } - - .logo-container { - order: 1; - } - - .header-sponsor { - order: 2; - width: 100%; - margin-top: 10px; - } -} .page-view { max-width: 1600px; margin: 0 auto; From 28f90481fd8110fc2bacfc129a3c031720107482 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 18:20:53 +0100 Subject: [PATCH 08/16] Factorise sponsor element generation --- src/serena/resources/dashboard/dashboard.js | 29 +++++++++------------ 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.js b/src/serena/resources/dashboard/dashboard.js index a28627d1..1920ac1f 100644 --- a/src/serena/resources/dashboard/dashboard.js +++ b/src/serena/resources/dashboard/dashboard.js @@ -66,22 +66,19 @@ class SponsorRotation { type: 'GET', success: function (response) { console.log('Sponsors loaded:', response); - let $goldContainer = $('#gold-sponsors'); - $.each(response.gold, function (index, sponsor) { - let $sponsor = $('
'); - if (index === 0) { - $sponsor.addClass('active'); - } - $goldContainer.append($sponsor); - }); - let $platinumContainer = $('#platinum-sponsors'); - $.each(response.platinum, function (index, sponsor) { - let $sponsor = $('
'); - if (index === 0) { - $sponsor.addClass('active'); - } - $platinumContainer.append($sponsor); - }); + + function fillSponsors($container, sponsors, className) { + $.each(sponsors, function (index, sponsor) { + let $sponsor = $('
'); + if (index === 0) { + $sponsor.addClass('active'); + } + $container.append($sponsor); + }); + } + + fillSponsors($('#gold-sponsors'), response.gold, 'gold-sponsor'); + fillSponsors($('#platinum-sponsors'), response.platinum, 'platinum-sponsor'); onSuccess(); }, error: function (xhr, status, error) { From cb2b9213265165ab22635ce01abae15c55acabf1 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 18:25:19 +0100 Subject: [PATCH 09/16] Add sponsor links --- src/serena/resources/dashboard/dashboard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serena/resources/dashboard/dashboard.js b/src/serena/resources/dashboard/dashboard.js index 1920ac1f..87ff199f 100644 --- a/src/serena/resources/dashboard/dashboard.js +++ b/src/serena/resources/dashboard/dashboard.js @@ -69,7 +69,11 @@ class SponsorRotation { function fillSponsors($container, sponsors, className) { $.each(sponsors, function (index, sponsor) { - let $sponsor = $('
'); + let $img = $(''); + let $anchor = $(''); + $anchor.append($img); + let $sponsor = $('
'); + $sponsor.append($anchor); if (index === 0) { $sponsor.addClass('active'); } From 960a3cb894d5f6ad029c71cd24eef60d09fd0982 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Thu, 6 Nov 2025 18:32:22 +0100 Subject: [PATCH 10/16] Align heights of menu/theme buttons, fix button and menu positions --- src/serena/resources/dashboard/dashboard.css | 5 +++-- src/serena/resources/dashboard/index.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/serena/resources/dashboard/dashboard.css b/src/serena/resources/dashboard/dashboard.css index 458482b9..21c1ee37 100644 --- a/src/serena/resources/dashboard/dashboard.css +++ b/src/serena/resources/dashboard/dashboard.css @@ -103,8 +103,9 @@ body { .header-nav { position: relative; display: flex; - align-items: center; + align-items: flex-end; width: 200px; + height: 100%; gap: 10px; flex-shrink: 0; } @@ -129,7 +130,7 @@ body { .menu-dropdown { position: absolute; - top: 45px; + top: calc(var(--header-height) + 10px); right: 0; background-color: var(--bg-secondary); border: 1px solid var(--border-color); diff --git a/src/serena/resources/dashboard/index.html b/src/serena/resources/dashboard/index.html index 17870a6e..12e12da0 100644 --- a/src/serena/resources/dashboard/index.html +++ b/src/serena/resources/dashboard/index.html @@ -30,7 +30,7 @@