diff --git a/custom/public/img/home-banner-1.jpg b/custom/public/img/home-banner-1.jpg
new file mode 100644
index 000000000..77ac7a3a5
Binary files /dev/null and b/custom/public/img/home-banner-1.jpg differ
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 867f26b7e..7bd439888 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -297,6 +297,7 @@ openi_experience_officer_plan=OpenI AI experience officer growth plan
more_benefits=, More benefits
org_see=See
more_notice=More notices
+vedio_detail=Video details
[explore]
repos = Repositories
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index cf8ca3be6..6f4de25ad 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -300,6 +300,7 @@ openi_experience_officer_plan=启智社区体验官成长计划
more_benefits=,超多福利大放送
org_see=。查看
more_notice=更多通知
+vedio_detail=详细介绍视频
[explore]
repos=项目
diff --git a/public/home/home.js b/public/home/home.js
index 4028987e0..8b80811e9 100755
--- a/public/home/home.js
+++ b/public/home/home.js
@@ -755,8 +755,9 @@ function getNotice() {
var noticeEl = noticeEls.eq(i);
var noticeObj = noticeList[i];
if (noticeObj) {
+ var title = isZh ? noticeObj.Title : (noticeObj.Title_en || noticeObj.Title);
noticeEl.attr('href', noticeObj.Link);
- noticeEl.find('span').text(isZh ? noticeObj.Title : (noticeObj.Title_en || noticeObj.Title));
+ noticeEl.find('span').text(title).attr('title', title);
noticeEl.show();
} else {
noticeEl.hide();
@@ -805,5 +806,48 @@ function getRecommendModule() {
});
}
+function initHomeTopBanner() {
+ var homeSlideTimer = null;
+ var homeSlideDuration = 8000;
+ function homeSlide(direction) {
+ var slidePages = $('._hm-pg-c ._hm-pg');
+ var currentPage = slidePages.filter('._hm-pg-show');
+ var currentIndex = currentPage.index();
+ var next = direction == 'left' ? currentIndex - 1 : currentIndex + 1;
+ if (next < 0) next = slidePages.length - 1;
+ if (next == slidePages.length) next = 0;
+ slidePages.removeClass('_hm-pg-show');
+ slidePages.eq(next).addClass('_hm-pg-show');
+ }
+
+ function startSlide() {
+ homeSlideTimer && clearTimeout(homeSlideTimer);
+ homeSlideTimer = setTimeout(function() {
+ homeSlide('right');
+ startSlide();
+ }, homeSlideDuration);
+ }
+
+ function stopSlide() {
+ homeSlideTimer && clearTimeout(homeSlideTimer);
+ }
+
+ $('._hm-slide-btn').on('click', function () {
+ if ($(this).hasClass('_hm-slide-btn-left')) {
+ homeSlide('left');
+ } else {
+ homeSlide('right');
+ }
+ startSlide();
+ });
+ $('._hm-pg #homenews').on('mouseenter', function() {
+ stopSlide();
+ }).on('mouseleave', function() {
+ startSlide();
+ });
+ setTimeout(function() { startSlide(); }, 500);
+}
+
+initHomeTopBanner();
getNotice();
getRecommendModule();
diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl
index 7e1ac7786..a017bf367 100755
--- a/templates/base/footer_content.tmpl
+++ b/templates/base/footer_content.tmpl
@@ -96,6 +96,11 @@
{{.i18n.Tr "home.powerdby"}}Trustie确实{{.i18n.Tr "、Gitea"}}
-
+
+
+