From 9b0fbc34615a53b947f86e5a7fecaeee0a15f1cb Mon Sep 17 00:00:00 2001 From: chenshihai Date: Thu, 24 Nov 2022 18:45:48 +0800 Subject: [PATCH] home page --- custom/public/css/git.openi.css | 8 +- public/home/home.js | 36 ++++---- templates/base/footer_content.tmpl | 6 +- templates/base/head_navbar.tmpl | 2 +- templates/custom/home/home_activity.tmpl | 10 +-- templates/custom/home/home_org.tmpl | 2 +- templates/custom/home/home_repo.tmpl | 2 +- templates/custom/home/home_top.tmpl | 103 +++++++++++------------ templates/home.tmpl | 4 +- templates/notice.tmpl | 2 +- web_src/less/openi.less | 2 +- 11 files changed, 83 insertions(+), 94 deletions(-) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index 1b14481ff..117727b9d 100755 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -72,9 +72,7 @@ z-index: 10; } .ui.secondary.c2net.segment{ - /* background: #f8faff; - border: none;*/ - margin-bottom: 5em; + padding-bottom: 3em; padding-top: 2em; color: rgba(0,0,0,.87); background-image: linear-gradient(to bottom left,var(--tw-gradient-stops)); @@ -203,7 +201,7 @@ padding: 0; } .newslist{ - height: 300px; + height: 260px; overflow: hidden; } @@ -299,7 +297,7 @@ background-color: #FFF; box-shadow: 0px 5px 10px 0px rgba(105, 192, 255, .3); border: 1px solid rgba(105, 192, 255, .4); - min-height: 10.8em; + /* min-height: 10.8em; */ } .homepro-list .ui.card>.content>.header{ line-height: 40px !important; diff --git a/public/home/home.js b/public/home/home.js index b9a2a4ee2..4028987e0 100755 --- a/public/home/home.js +++ b/public/home/home.js @@ -9,8 +9,9 @@ if(isEmpty(token)){ var swiperNewMessage = new Swiper(".newslist", { direction: "vertical", - slidesPerView: 9, + slidesPerView: 6, loop: true, + spaceBetween: 8, autoplay: { delay: 2500, disableOnInteraction: false, @@ -618,22 +619,23 @@ function displayRepo(json){ for (var i = 0, iLen = repos.length; i < iLen; i++) { if (i >= 4) break; var repo = repos[i]; + // ${repo["NumStars"]}${repo["NumForks"]}
html += `
- - ${repo["NumStars"]}${repo["NumForks"]} - - + ${repo["Alias"]} -
${repo["Description"]}
-
`; - if (repo["Topics"] != null) { - for(var j = 0; j < repo["Topics"].length; j++){ - var topic = repo["Topics"][j]; - var url = "/explore/repos?q=" + (topic) + "&topic=" - html += `${topic}`; - } - } - html += `
+ + + + + ${repo["Alias"]} +
${repo["Description"]}
+ `; + // if (repo["Topics"] != null) { + // for(var j = 0; j < repo["Topics"].length; j++){ + // var topic = repo["Topics"][j]; + // var url = "/explore/repos?q=" + (topic) + "&topic=" + // html += `${topic}`; + // } + // } + html += `
`; } @@ -725,8 +727,8 @@ function displayUserExp(data) {
-
${dataI.name}
-
${dataI.desc}
+
${dataI.fullname || dataI.name}
+
${dataI.desc}
` } diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index 2bafde5a1..7e1ac7786 100755 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -1,4 +1,4 @@ -