|
|
@@ -17,38 +17,6 @@ var swiperNewMessage = new Swiper(".newslist", { |
|
|
disableOnInteraction: false, |
|
|
disableOnInteraction: false, |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
var swiperEvent = new Swiper(".event-list", { |
|
|
|
|
|
slidesPerView: 1, |
|
|
|
|
|
spaceBetween: 30, |
|
|
|
|
|
// pagination: { |
|
|
|
|
|
// el: ".swiper-pagination", |
|
|
|
|
|
// clickable: true, |
|
|
|
|
|
// }, |
|
|
|
|
|
autoplay: { |
|
|
|
|
|
delay: 2500, |
|
|
|
|
|
disableOnInteraction: false, |
|
|
|
|
|
}, |
|
|
|
|
|
breakpoints: { |
|
|
|
|
|
768: { |
|
|
|
|
|
slidesPerView: 2, |
|
|
|
|
|
}, |
|
|
|
|
|
1024: { |
|
|
|
|
|
slidesPerView: 3, |
|
|
|
|
|
}, |
|
|
|
|
|
1200: { |
|
|
|
|
|
slidesPerView: 3, |
|
|
|
|
|
}, |
|
|
|
|
|
1440: { |
|
|
|
|
|
slidesPerView: 4, |
|
|
|
|
|
}, |
|
|
|
|
|
1840: { |
|
|
|
|
|
slidesPerView: 4, |
|
|
|
|
|
}, |
|
|
|
|
|
1920: { |
|
|
|
|
|
slidesPerView: 4, |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var swiperRepo = new Swiper(".homepro-list", { |
|
|
var swiperRepo = new Swiper(".homepro-list", { |
|
|
slidesPerView: 1, |
|
|
slidesPerView: 1, |
|
|
@@ -579,13 +547,13 @@ function queryRecommendData(){ |
|
|
|
|
|
|
|
|
function displayActivity(json){ |
|
|
function displayActivity(json){ |
|
|
var activityDiv = document.getElementById("recommendactivity"); |
|
|
var activityDiv = document.getElementById("recommendactivity"); |
|
|
if (!activityDiv) return; |
|
|
|
|
|
|
|
|
if (!activityDiv) return; |
|
|
var html = ""; |
|
|
var html = ""; |
|
|
if (json != null && json.length > 0){ |
|
|
if (json != null && json.length > 0){ |
|
|
for(var i = 0; i < json.length;i++){ |
|
|
for(var i = 0; i < json.length;i++){ |
|
|
var record = json[i]; |
|
|
var record = json[i]; |
|
|
var name = isZh ? (record["name"] || '') : (record["name_en"] || record["name"]); |
|
|
var name = isZh ? (record["name"] || '') : (record["name_en"] || record["name"]); |
|
|
html += "<div class=\"swiper-slide\">"; |
|
|
|
|
|
|
|
|
html += "<div class=\"swiper-slide\" style=\"text-align:center;\">"; |
|
|
html += "<a href=\"" + record["image_link"] + "\">"; |
|
|
html += "<a href=\"" + record["image_link"] + "\">"; |
|
|
html += " <div class=\"image ui card\"><img src=\"" + record["url"] + "\">"; |
|
|
html += " <div class=\"image ui card\"><img src=\"" + record["url"] + "\">"; |
|
|
html += ' <div class="image-name" title="' + name + '">' + name + "</div>"; |
|
|
html += ' <div class="image-name" title="' + name + '">' + name + "</div>"; |
|
|
@@ -593,10 +561,42 @@ function displayActivity(json){ |
|
|
html += "</a>"; |
|
|
html += "</a>"; |
|
|
html += "</div>"; |
|
|
html += "</div>"; |
|
|
} |
|
|
} |
|
|
|
|
|
var swiperEvent = new Swiper(".event-list", { |
|
|
|
|
|
slidesPerView: 1, |
|
|
|
|
|
spaceBetween: 30, |
|
|
|
|
|
// pagination: { |
|
|
|
|
|
// el: ".swiper-pagination", |
|
|
|
|
|
// clickable: true, |
|
|
|
|
|
// }, |
|
|
|
|
|
autoplay: { |
|
|
|
|
|
delay: 2500, |
|
|
|
|
|
disableOnInteraction: false, |
|
|
|
|
|
}, |
|
|
|
|
|
breakpoints: { |
|
|
|
|
|
768: { |
|
|
|
|
|
slidesPerView: Math.min(2, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
1024: { |
|
|
|
|
|
slidesPerView: Math.min(3, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
1200: { |
|
|
|
|
|
slidesPerView: Math.min(3, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
1440: { |
|
|
|
|
|
slidesPerView: Math.min(4, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
1840: { |
|
|
|
|
|
slidesPerView: Math.min(4, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
1920: { |
|
|
|
|
|
slidesPerView: Math.min(4, json.length), |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
activityDiv.innerHTML = html; |
|
|
|
|
|
swiperEvent.updateSlides(); |
|
|
|
|
|
swiperEvent.updateProgress(); |
|
|
} |
|
|
} |
|
|
activityDiv.innerHTML = html; |
|
|
|
|
|
swiperEvent.updateSlides(); |
|
|
|
|
|
swiperEvent.updateProgress(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function displayRepo(json){ |
|
|
function displayRepo(json){ |
|
|
@@ -624,9 +624,7 @@ function displayRepo(json){ |
|
|
// <i class="ri-star-line"></i>${repo["NumStars"]}<i class="ri-git-branch-line am-ml-10"></i>${repo["NumForks"]}</span> <div class="ui tags nowrap am-mt-10"></div> |
|
|
// <i class="ri-star-line"></i>${repo["NumStars"]}<i class="ri-git-branch-line am-ml-10"></i>${repo["NumForks"]}</span> <div class="ui tags nowrap am-mt-10"></div> |
|
|
html += `<div class="ui fluid card" style="border-radius:6px;"> |
|
|
html += `<div class="ui fluid card" style="border-radius:6px;"> |
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
<span class="right floated meta"> |
|
|
|
|
|
<img class="left floated mini ui image" src="${repo["Avatar"]}"> |
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
<img class="left floated mini ui image" src="${repo["Avatar"]}"> |
|
|
<a class="header nowrap" style="color:rgb(50, 145, 248);font-size:14px;" href="/${repo["OwnerName"]}/${repo["Name"]}" title="${repo["Alias"]}"> + ${repo["Alias"]}</a> |
|
|
<a class="header nowrap" style="color:rgb(50, 145, 248);font-size:14px;" href="/${repo["OwnerName"]}/${repo["Name"]}" title="${repo["Alias"]}"> + ${repo["Alias"]}</a> |
|
|
<div class="description nowrap-2" style="rgba(136,136,136,1);;font-size:12px;" title="${repo["Description"]}">${repo["Description"]}</div> |
|
|
<div class="description nowrap-2" style="rgba(136,136,136,1);;font-size:12px;" title="${repo["Description"]}">${repo["Description"]}</div> |
|
|
`; |
|
|
`; |
|
|
|