Commit e6efa778 authored by Zhou Fang's avatar Zhou Fang
Browse files

Standardized how we display members on IDE WG

parent 4caf6ed5
......@@ -15,16 +15,26 @@ import 'eclipsefdn-solstice-assets';
import 'jquery';
(function ($) {
if ($('.ide-members-slider').length) {
if ($('.ide-members').length) {
$.ajax({
url: 'https://api.eclipse.org/public/member?pagesize=100&page=1&working_group=eclipse-ide',
type: 'GET',
dataType: 'json',
success: function (data) {
let index = data.length,
randomIndex = 0,
temp;
while (index--) {
randomIndex = Math.floor(Math.random() * (index + 1));
// swap randomly chosen item with current item
temp = data[index];
data[index] = data[randomIndex];
data[randomIndex] = temp;
}
$(data).each(function () {
const featuredMembersItem = $('<div></div>');
featuredMembersItem.attr({
class: 'featured-members-item item padding-20',
class: 'featured-members-item item',
});
const img = $('<img>');
......@@ -45,27 +55,7 @@ import 'jquery';
} else {
featuredMembersItem.append(img);
}
$('.ide-members-slider').append(featuredMembersItem);
});
$('.ide-members-slider').owlCarousel({
responsive: {
0: {
items: $('.ide-members-slider').data('slider-xs-count') || 1,
},
768: {
items: $('.ide-members-slider').data('slider-sm-count') || 2,
},
992: {
items: $('.ide-members-slider').data('slider-md-count') || 3,
},
1170: {
items: $('.ide-members-slider').data('slider-lg-count') || 3,
},
},
pagination: true,
responsiveRefreshRate: 100,
$('.ide-members').append(featuredMembersItem);
});
},
error: function () {
......
......@@ -4,7 +4,7 @@
<div class="col-sm-18 col-sm-offset-3">
<h2>Members</h2>
<p class="big">Join leading organizations that are investing in driving the evolution, adoption, and sustainability of Eclipse IDE products and technologies</p>
<div class="owl-carousel owl-theme ide-members-slider" data-slider-xs-count="3" data-slider-sm-count="3" data-slider-md-count="4" data-slider-lg-count="4"></div>
<div class="ide-members"></div>
<p><a class="btn btn-primary" href="/membership">Contact Us About Membership</a></p>
</div>
</div>
......
......@@ -404,10 +404,18 @@ table.gsc-search-box td.gsc-input {
.featured-members {
margin-top: 40px;
.ide-members {
margin: 20px 0;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
}
.featured-members-item {
padding:0 20px;
padding: 10px 20px;
display: flex;
align-items: center;
img {
display: inherit;
margin: 0 auto;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment