Skip to content

Commit fe8b39c

Browse files
committed
Added contributors section on homepage
1 parent c6a8607 commit fe8b39c

File tree

4 files changed

+41
-41
lines changed

4 files changed

+41
-41
lines changed

userdocs/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ extra_css:
111111

112112
extra_javascript:
113113
- https://cdn.jsdelivr.net/npm/@glidejs/glide
114+
- https://cdnjs.cloudflare.com/ajax/libs/axios/0.21.1/axios.min.js
115+
- javascripts/extra.js
114116

115117
# Extensions
116118
markdown_extensions:

userdocs/src/javascripts/extra.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
const Github_contributors_url = 'https://api.github.com/repos/eksctl-io/eksctl/contributors?per_page=100';
2+
3+
const getContributors = () => {
4+
axios
5+
.get(Github_contributors_url)
6+
.then((response) => {
7+
const contributors = response.data;
8+
const container = document.getElementById('contributors');
9+
const imageTags = contributors.map(img => `<a href="${img.html_url}" ><img src="${img.avatar_url}"></a>`);
10+
container.innerHTML = imageTags.join('');
11+
})
12+
.catch((error) => console.error(error));
13+
};
14+
15+
document.addEventListener( 'DOMContentLoaded', function() {
16+
// Show Github Contributors on Homepage
17+
getContributors();
18+
19+
// Show adopters carousel
20+
new Glide('.adopters', {
21+
type: 'carousel',
22+
autoplay: 4000,
23+
hoverpause: false,
24+
perView: 3,
25+
animationTimingFunc: 'linear',
26+
animationDuration: 1000
27+
}).mount()
28+
});

userdocs/theme/home.html

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -161,34 +161,6 @@
161161
background-color: var(--md-default-bg-color)
162162
}
163163

164-
/* .mdx-parallax__layer {
165-
height: max(120vh,100vw);
166-
pointer-events: none;
167-
position: absolute;
168-
top: 0;
169-
transform: translateZ(calc(var(--md-parallax-perspective)*var(--md-parallax-depth)*-1)) scale(calc(var(--md-parallax-depth) + 1));
170-
transform-origin: 50vw 50vh;
171-
width: 100vw;
172-
z-index: calc(10 - var(--md-parallax-depth, 0))
173-
}
174-
175-
.mdx-parallax__image {
176-
display: block;
177-
height: 100%;
178-
object-fit: cover;
179-
object-position: var(--md-image-position,50%);
180-
position: absolute;
181-
width: 100%;
182-
z-index: -1
183-
}
184-
185-
.mdx-parallax__blend {
186-
background-image: linear-gradient(to bottom,#0000,var(--md-default-bg-color));
187-
bottom: 0;
188-
height: min(100vh,100vw);
189-
top: auto
190-
} */
191-
192164
.mdx-content__column:last-child {
193165
margin-top: 2.4rem
194166
}
@@ -509,6 +481,11 @@
509481
.md-banner {
510482
display: none;
511483
}
484+
485+
.contributors img {
486+
width: 3rem;
487+
padding: .2rem;
488+
}
512489
</style>
513490

514491
<div class="mdx-parallax" data-mdx-component="parallax">
@@ -575,7 +552,7 @@ <h1 id="create-cluster-in-minutes">Create a basic cluster in minutes with just o
575552
Tel Aviv (<code>il-central-1</code>),
576553
US ISO - (<code>us-iso-east-1</code> and <code>us-isob-east-1</code>)
577554
</p>
578-
<p>EKS supported versions <code>1.25</code> (default), <code>1.26</code> and </code>1.27</code>.</p>
555+
<p>EKS supported versions <code>1.25</code> (default), <code>1.26</code>, <code>1.27</code> and <code>1.28</code>.</p>
579556
<p><a href="/usage/creating-and-managing-clusters/" aria-label="Usage">
580557
<span class="twemoji">
581558
{% include ".icons/octicons/arrow-right-16.svg" %}
@@ -658,6 +635,10 @@ <h2>Eksctl Maintainers</h2>
658635
<figure class="mdx-users__testimonial"><a href="https://github.com/yuxiang-zhang"><img src="https://avatars.githubusercontent.com/u/23327251?v=4" title="yuxiang-zhang" alt="yuxiang-zhang" loading="lazy"></a></figure>
659636
<figure class="mdx-users__testimonial"><a href="https://github.com/a-hilaly"><img src="https://avatars.githubusercontent.com/u/10897901?v=4" title="a-hilaly" alt="a-hilaly" loading="lazy"></a></figure>
660637
</div>
638+
<header class="md-typeset">
639+
<h3>Thank you for all your contributions.<span class="twemoji">{% include ".icons/octicons/star-16.svg" %}</span></h3>
640+
</header>
641+
<div class="contributors" id="contributors"></div>
661642
</div>
662643
</div>
663644
</section>

userdocs/theme/main.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,5 @@
1313
{% block scripts %}
1414
<!-- Add scripts that need to run before here -->
1515
{{ super() }}
16-
<script>
17-
document.addEventListener( 'DOMContentLoaded', function() {
18-
new Glide('.adopters', {
19-
type: 'carousel',
20-
autoplay: 4000,
21-
hoverpause: false,
22-
perView: 3,
23-
animationTimingFunc: 'linear',
24-
animationDuration: 1000
25-
}).mount()
26-
});
27-
</script>
16+
2817
{% endblock %}

0 commit comments

Comments
 (0)