Skip to content

Commit 8d4b1c1

Browse files
Add sponsor logos
1 parent 7fadad3 commit 8d4b1c1

File tree

7 files changed

+148
-15
lines changed

7 files changed

+148
-15
lines changed

_data/scala-days-sponsors.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Sponsors Data
2+
# ----------------------------------------------------------------------------------------------------------
3+
# ----------------------------------------------------------------------------------------------------------
4+
5+
sponsorship-types:
6+
- title: Platinum
7+
icon: img/assets/icon-platinum.svg
8+
- title: Gold
9+
icon: img/assets/icon-gold.svg
10+
11+
sponsors:
12+
- title: VirtusLab
13+
type: Platinum
14+
logo: /resources/img/scala-days-sponsors/virtuslab.png
15+
url: https://virtuslab.com
16+
17+
- title: Signify Technology
18+
type: Platinum
19+
logo: /resources/img/scala-days-sponsors/signify.png
20+
url: https://signify.com
21+
22+
- title: Gradle
23+
type: Gold
24+
logo: /resources/img/scala-days-sponsors/gradle.png
25+
url: https://gradle.org
26+
27+
- title: JetBrains
28+
type: Gold
29+
logo: /resources/img/scala-days-sponsors/jetbrains.svg
30+
url: https://jetbrains.com
31+
32+
- title: Scalac
33+
type: Gold
34+
logo: /resources/img/scala-days-sponsors/scalac.svg
35+
url: https://scalac.io
36+
37+
- title: Xebia
38+
type: Gold
39+
logo: /resources/img/scala-days-sponsors/xebia.svg
40+
url: https://xebia.com

_includes/scala-days-announcement.html

Lines changed: 0 additions & 10 deletions
This file was deleted.

_includes/scala-days-sponsors.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<div class="scala-days-sponsors-bar">
2+
<div class="sponsors-carousel">
3+
<div class="sponsors-track">
4+
{% for sponsor in site.data.scala-days-sponsors.sponsors %}
5+
<a href="{{ sponsor.url }}" class="sponsor-logo-link" target="_blank" rel="noopener">
6+
<img src="{{ sponsor.logo }}" alt="{{ sponsor.title }}" class="sponsor-logo" />
7+
</a>
8+
{% endfor %}
9+
{% for sponsor in site.data.scala-days-sponsors.sponsors %}
10+
<a href="{{ sponsor.url }}" class="sponsor-logo-link" target="_blank" rel="noopener">
11+
<img src="{{ sponsor.logo }}" alt="{{ sponsor.title }}" class="sponsor-logo" />
12+
</a>
13+
{% endfor %}
14+
</div>
15+
</div>
16+
</div>

_layouts/frontpage.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</nav>
4040
</div>
4141
{% include scala-days-countdown.html %}
42-
{% include scala-days-announcement.html %}
42+
{% include scala-days-sponsors.html %}
4343
<div class="wrap flex-row-align-end">
4444
<!-- Inner Text -->
4545
<div class="col-lg-6">
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
// SCALA DAYS 2025 SPONSORS
2+
//------------------------------------------------
3+
//------------------------------------------------
4+
5+
.scala-days-sponsors-bar {
6+
width: 100%;
7+
overflow: hidden;
8+
background: transparent;
9+
padding: 0.5em 0;
10+
position: relative;
11+
}
12+
13+
.sponsors-carousel {
14+
width: 100%;
15+
overflow: hidden;
16+
position: relative;
17+
white-space: nowrap;
18+
}
19+
20+
.sponsors-track {
21+
display: flex;
22+
flex-direction: row;
23+
align-items: center;
24+
white-space: nowrap;
25+
width: max-content;
26+
animation: sponsors-scroll 40s linear infinite;
27+
will-change: transform;
28+
}
29+
30+
.sponsor-logo-link {
31+
display: flex;
32+
align-items: center;
33+
justify-content: center;
34+
width: 140px;
35+
height: 48px;
36+
margin: 0 1em;
37+
flex: 0 0 auto;
38+
}
39+
40+
.sponsor-logo {
41+
max-height: 40px;
42+
max-width: 120px;
43+
width: auto;
44+
height: auto;
45+
filter: brightness(0) invert(1);
46+
opacity: 0.92;
47+
transition: opacity 0.2s;
48+
display: block;
49+
margin: 0 auto;
50+
}
51+
.sponsor-logo-link:hover .sponsor-logo {
52+
opacity: 1;
53+
}
54+
55+
@keyframes sponsors-scroll {
56+
0% { transform: translateX(0); }
57+
100% { transform: translateX(-50%); }
58+
}
59+
60+
@media (max-width: 700px) {
61+
.sponsor-logo-link {
62+
width: 80px;
63+
height: 28px;
64+
margin: 0 0.5em;
65+
}
66+
.sponsor-logo {
67+
max-height: 24px;
68+
max-width: 60px;
69+
}
70+
}

resources/css/style.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@
7676
@import 'components/tab';
7777
@import 'components/tag';
7878
@import 'components/search';
79-
@import 'components/countdown';
79+
@import 'components/countdown';
80+
@import 'components/scala-days-sponsors';

resources/js/functions.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
---
2-
---
3-
41
// Sliding Panel
52
$(document).ready(function() {
63
$('.navigation-panel-button,.navigation-fade-screen,.navigation-panel-close').on('click touchstart', function(e) {
@@ -629,3 +626,22 @@ $(document).ready(function() {
629626
}, 60000);
630627
}
631628
});
629+
630+
// Seamless infinite scroll for Scala Days sponsors bar (no memory leak, no visible jump)
631+
document.addEventListener("DOMContentLoaded", function() {
632+
var track = document.getElementById('sponsors-track');
633+
if (!track) return;
634+
635+
// Get the width of one set of logos (half the track)
636+
var totalWidth = track.scrollWidth / 2;
637+
var pos = 0;
638+
function animateSponsorsBar() {
639+
pos -= 1; // px per frame, adjust for speed
640+
if (Math.abs(pos) >= totalWidth) {
641+
pos = 0;
642+
}
643+
track.style.transform = 'translateX(' + pos + 'px)';
644+
requestAnimationFrame(animateSponsorsBar);
645+
}
646+
animateSponsorsBar();
647+
});

0 commit comments

Comments
 (0)