diff --git a/custom/public/rotation3D/img/baseimg.png b/custom/public/rotation3D/img/baseimg.png new file mode 100644 index 000000000..960f1c772 Binary files /dev/null and b/custom/public/rotation3D/img/baseimg.png differ diff --git a/public/home/home.js b/public/home/home.js index 43eab17e0..aeb51b184 100755 --- a/public/home/home.js +++ b/public/home/home.js @@ -606,8 +606,7 @@ function displayRepo(json){ if (json != null && json.length > 0){ var repoMap = {}; for (var i = 0, iLen = json.length; i < iLen; i++) { - var repo = json[i]; - var labelSearch = repo.Label; + var repo = json[i]; var label = isZh ? repo.Label : repo.Label_en; if (repoMap[label]) { repoMap[label].push(repo); @@ -618,6 +617,7 @@ function displayRepo(json){ for (var label in repoMap) { var repos = repoMap[label]; + var labelSearch = repos[0].Label; html += `
# ${label}
`; for (var i = 0, iLen = repos.length; i < iLen; i++) { if (i >= 4) break; @@ -810,15 +810,23 @@ function getRecommendModule() { function initHomeTopBanner() { var homeSlideTimer = null; var homeSlideDuration = 8000; - function homeSlide(direction) { + function homeSlide(direction, index) { var slidePages = $('._hm-pg-c ._hm-pg'); var currentPage = slidePages.filter('._hm-pg-show'); + var slidePagination = $('._hm-slide-pagination-c ._hm-slide-pagination-item'); var currentIndex = currentPage.index(); - var next = direction == 'left' ? currentIndex - 1 : currentIndex + 1; + var next = 0; + if (direction) { + next = direction == 'left' ? currentIndex - 1 : currentIndex + 1; + } else { + next = index || 0; + } 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'); + slidePagination.removeClass('_hm-slide-pagination-item-active'); + slidePagination.eq(next).addClass('_hm-slide-pagination-item-active'); } function startSlide() { @@ -846,6 +854,12 @@ function initHomeTopBanner() { }).on('mouseleave', function() { startSlide(); }); + $('._hm-slide-pagination-c ._hm-slide-pagination-item').on('click', function() { + var self = $(this); + if (self.hasClass('_hm-slide-pagination-item-active')) return; + homeSlide('', self.index()); + startSlide(); + }); setTimeout(function() { startSlide(); }, 500); } diff --git a/templates/custom/home/home_top.tmpl b/templates/custom/home/home_top.tmpl index 3d5b58167..4020a219d 100644 --- a/templates/custom/home/home_top.tmpl +++ b/templates/custom/home/home_top.tmpl @@ -425,6 +425,23 @@ ._hm-pg-bg-2 { background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%221%22%20x1%3D%220%22%20x2%3D%221%22%20y1%3D%220%22%20y2%3D%220%22%20gradientTransform%3D%22matrix(6.117110761741029e-17%2C%200.999%2C%20-0.21820798177083334%2C%206.117110761741029e-17%2C%200%2C%200)%22%3E%3Cstop%20stop-color%3D%22%239c6af2%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%2363d0f9%22%20stop-opacity%3D%221%22%20offset%3D%220.78%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%2378fbed%22%20stop-opacity%3D%221%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); } + ._hm-pg-bg-3-placeholder-1 { + position: absolute; + width: 100%; + height: 51%; + top: 0; + left: 0; + background-color: #2e035f; + display: none; + } + ._hm-pg-bg-3-placeholder-2 { + position: absolute; + height: 50%; + width: 100%; + bottom: 0; + left: 0; + display: none; + } ._hm-pg-bg-3 { background: url("/img/home-banner-01.jpg"); background-repeat: no-repeat; @@ -464,6 +481,31 @@ border-left: none; } + ._hm-slide-pagination-c { + position: absolute; + display: none; + z-index: 30; + text-align: center; + height: 30px; + width: 100%; + bottom: 0; + } + + ._hm-slide-pagination-item { + display: inline-block; + width: 8px; + height: 8px; + background: rgb(185, 227, 244); + border-radius: 100%; + margin: 0 2px; + cursor: pointer; + } + ._hm-slide-pagination-item-active { + width: 40px; + border-radius: 4px; + cursor: default; + } + ._hm-circle { position: absolute; top: 180px; @@ -1658,13 +1700,102 @@ .homenews .swiper-slide .content { color: white; } + + @media only screen and (max-width: 767px) { + ._hm-pg-bg-1 { + background: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20version%3D%221.1%22%3E%3Cdefs%3E%3CradialGradient%20id%3D%221%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientTransform%3D%22matrix(-1.393%2C%200.2919999999999999%2C%20-0.06390807221064813%2C%20-1.395786%2C%201%2C%200.997)%22%3E%3Cstop%20stop-color%3D%22%233b83fe%22%20stop-opacity%3D%221%22%20offset%3D%220%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%232abcff%22%20stop-opacity%3D%221%22%20offset%3D%220.51%22%3E%3C%2Fstop%3E%3Cstop%20stop-color%3D%22%238e4cb7%22%20stop-opacity%3D%221%22%20offset%3D%221%22%3E%3C%2Fstop%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20fill%3D%22url(%231)%22%3E%3C%2Frect%3E%3C%2Fsvg%3E"); + background-size: 1500px 700px; + background-position: center center; + } + ._hm-person-area { + display: none; + } + ._hm-bubble-c { + display: none; + } + #homenews { + display: none; + } + ._hm-universe { + top: -70px; + left: 10%; + } + ._hm-big-descr { + font-size: 20px; + } + ._hm-big-btn-1 { + height: 56px; + } + ._hm-big-btn-2 { + width: 125px; + margin-right: 10px; + } + ._hm-circle-rect { + left: 0; + } + ._hm-pg-bg-3-placeholder-1 { + display: block; + } + ._hm-pg-bg-3-placeholder-2 { + display: block; + background: url(/img/home-banner-01.jpg); + background-repeat: no-repeat; + background-position: center center; + background-size: cover; + } + ._hm-pg-bg-3-placeholder-2-en { + background: url(/img/home-banner-01-en.jpg); + background-repeat: no-repeat; + background-position: center center; + background-size: cover; + } + ._hm-pg-bg-3 { + background: none; + } + ._hm-bg-descr-vedio-link { + display: block; + margin-left: 0px !important; + margin-top: 10px; + } + ._hm-slide-btn { + display: none; + } + ._hm-slide-pagination-c { + display: block; + } + ._hm-big-title-en { + font-size: 32px; + margin-bottom: 20px; + margin-top: -32px; + } + ._hm-big-title-mobile-margin-top { + margin-top: -40px; + margin-bottom: 26px; + } + ._hm-big-title-mobile-margin-top-en { + margin-top: -50px; + margin-bottom: 8px; + } + ._hm-computing-net-container { + display: none !important; + } + ._hm-computing-net-mobile-container { + display: block !important; + background-image: url("/rotation3D/img/baseimg.png"); + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + padding: 45% 0; + } + }
-
+