From 1acb67d85c2f82f1df26647c88cf8bf7847b62a6 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 15 Feb 2022 10:33:48 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E8=A7=A3=E5=86=B3#1461?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/user/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/user/notification.go b/routers/user/notification.go index 9724c81088..0fd6df0072 100644 --- a/routers/user/notification.go +++ b/routers/user/notification.go @@ -132,7 +132,7 @@ func getNotifications(c *context.Context) { } c.Data["Title"] = c.Tr("notifications") - c.Data["Keyword"] = keyword + //c.Data["Keyword"] = keyword c.Data["Status"] = status c.Data["Notifications"] = notifications -- 2.34.1 From 6d2b3062481412a06b7eb0755f1ce99ae223c8d0 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 15 Feb 2022 11:47:36 +0800 Subject: [PATCH 02/11] =?UTF-8?q?#1410=E9=A6=96=E9=A1=B5=E9=80=82=E9=85=8D?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/css/git.openi.css | 143 +++++++++++++++++++++++++++++--- public/home/home.js | 10 ++- templates/home.tmpl | 8 +- 3 files changed, 144 insertions(+), 17 deletions(-) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index 502ba8d887..c97b48056e 100644 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -44,6 +44,12 @@ -webkit-line-clamp: 2; -webkit-box-orient: vertical; } +.ui.label{ + font-weight: normal; +} +.active { + color: #0366D6 !important; +} .opacity5{ opacity:0.5;} .radius15{ border-radius:1.5rem !important; } @@ -252,6 +258,11 @@ .homeorg-list .card .ui.small.header .content{ width: calc(100% - 3.25em); } +.homepro-tit{ + background: #FFF; + z-index: 9; + position: relative; +} .homepro-list{ position: relative; z-index: 9; @@ -261,8 +272,8 @@ .homepro-list .ui.card{ border-radius: 15px; background-color: #FFF; - box-shadow: 0px 5px 10px 0px rgba(105, 192, 255, 30); - border: 1px solid rgba(105, 192, 255, 40); + box-shadow: 0px 5px 10px 0px rgba(105, 192, 255, .3); + border: 1px solid rgba(105, 192, 255, .4); min-height: 10.8em; } .homepro-list .ui.card>.content>.header{ @@ -277,26 +288,134 @@ position: relative; } +/**seach**/ +/**搜索导航条适配窄屏**/ +.seachnav{ + overflow-x: auto; + overflow-y: hidden; + scrollbar-width: none; /* firefox */ + -ms-overflow-style: none; /* IE 10+ */ +} +.seachnav::-webkit-scrollbar { + display: none; /* Chrome Safari */ +} +.ui.green.button, .ui.green.buttons .button{ + background-color: #5BB973; +} +.seach .repos--seach{ + padding-bottom: 0; + border-bottom: none; +} +.seach .ui.secondary.pointing.menu{ + border-bottom: none; +} +.seach .ui.secondary.pointing.menu .item > i{ + margin-right: 5px; +} +.seach .ui.secondary.pointing.menu .active.item{ + border-bottom-width: 2px; + margin: 0 0 -1px; +} +.seach .ui.menu .active.item>.label { + background: #1684FC; + color: #FFF; +} +.seach .ui.menu .item>.label:not(.active.item>.label) { + background: #e8e8e8; + color: rgba(0,0,0,.6); +} + +.highlight{ + color: red; +} +.ui.list .list>.item>img.image+.content, .ui.list>.item>img.image+.content { + width: calc(100% - 3.0em); + margin-left: 0; +} + +.seach .ui.list .list>.item .header, .seach .ui.list>.item .header{ + margin-bottom: 0.5em; + font-size: 1.4rem !important; + font-weight: normal; +} +.seach .time, .seach .time a{ + font-size: 12px; + color: grey; +} + +.seach .list .item.members .ui.avatar.image { + width: 3.2em; + height: 3.2em; +} +.ui.list .list>.item.members>img.image+.content, .ui.list>.item.members>img.image+.content { + width: calc(100% - 4.0em); + margin-left: 0; +} + @media only screen and (max-width: 767px) { .am-mt-30{ margin-top: 1.5rem !important;} .ui.secondary.hometop.segment{ - margin-bottom: 2.0rem; + margin-bottom: 5.0rem; } - .bannerpic, .i-code-pic{ + .bannerpic{ display: none; } - .i-code h2::before { - left: calc(-5.0rem + 6px); + #homenews{ + bottom: -3em; } - .i-code h2.am-bw::before{ - left: calc(-4.0rem + 6px); + #homenews > p { + margin-left: 1.0em; + } + .homenews{ + padding-left: 1.3em !important; + border-radius: 1.5em; + } + .homenews::before{ + left: 2em; + } + .homeorg{ + padding-left: 3.5em; + } + .homeorg-tit::after { + left: -2.3em; + } + .homeorg-list{ + margin: 0 0 2.0em !important; + } + .homeorg-list > .column{ + width: 3em !important; + margin-left: -0.5em; + padding: 0.5rem 0 0 !important; + } + .homeorg-list .card{ + background: none !important; + } + .homeorg-list .card > .content{ + padding: 0 !important; + } + + .homeorg-list > .column .card .ui.header>img{ + width: 3.0em; + height: 3.0em; + border-radius: 2.0em; + border: 2px solid #FFF; + } + .homeorg-list > .column .card .ui.header > .content{ + display: none; } .leftline01{ - width: calc(50% - 4.0rem); + width: 4.0em; + bottom: 4em; + border-radius: 0 0 0 3.0em; + } + .leftline02, .leftline02-2{ + left: 6.0em; + top: calc(-4.0em - 2px); + border-radius: 0 3.0em 3.0em 0; + width: calc(50% - 6.0em); } - .leftline02{ - left: calc(50% - 1.0rem); - top: calc(-3.5rem - 2px); + .leftline02-2 { + width: calc(50% - 8.0em); } } diff --git a/public/home/home.js b/public/home/home.js index f49c8248b1..bc89326423 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -17,7 +17,7 @@ var swiperNewMessage = new Swiper(".newslist", { }, }); var swiperRepo = new Swiper(".homepro-list", { - slidesPerView: 3, + slidesPerView: 1, slidesPerColumn: 2, slidesPerColumnFill:'row', spaceBetween: 30, @@ -29,6 +29,14 @@ var swiperRepo = new Swiper(".homepro-list", { delay: 2500, disableOnInteraction: false, }, + breakpoints: { + 768: { + slidesPerView: 2, + }, + 1024: { + slidesPerView: 3, + }, + }, }); var output = document.getElementById("newmessage"); diff --git a/templates/home.tmpl b/templates/home.tmpl index f43639a14f..08893d71e5 100755 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -20,7 +20,7 @@

* {{.page_only_dynamic}}

-
+
-
+
@@ -78,7 +78,7 @@

{{.page_dev_env}}

{{.page_dev_env_desc}}

-
+
@@ -158,4 +158,4 @@ -{{template "base/footer" .}} \ No newline at end of file +{{template "base/footer" .}} -- 2.34.1 From 9c26f857120fe3ecd7e3b2b4b09e72fda144ee3c Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 15:34:59 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index e71e8cb3a6..d513be5c3f 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -16,7 +16,7 @@ import ( ) const ( - PAGE_SIZE = 2000 + PAGE_SIZE = 10 ) func queryUserDataPage(ctx *context.Context, tableName string, queryObj interface{}) { -- 2.34.1 From 98e06e4e14b2691267816f07733d7f7f8dedc82a Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 15:49:28 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index d513be5c3f..7414de426c 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -66,8 +66,10 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac for { re, _ := models.QueryUserStaticDataByTableName(int(indexTotal), PAGE_SIZE, tableName, queryObj, "") log.Info("return count=" + fmt.Sprint(count)) - for i, userRecord := range re { - rows := fmt.Sprint(i + 2) + row := 1 + for _, userRecord := range re { + row++ + rows := fmt.Sprint(row) xlsx.SetCellValue(sheetName, "A"+rows, userRecord.ID) xlsx.SetCellValue(sheetName, "B"+rows, userRecord.Name) xlsx.SetCellValue(sheetName, "C"+rows, userRecord.CodeMergeCount) -- 2.34.1 From c29769ca904a6fd22d4befe581172e7afaa04bf9 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 15:57:22 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 7414de426c..2dab5814c2 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -63,10 +63,10 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac _, count := models.QueryUserStaticDataByTableName(1, 1, tableName, queryObj, userName) var indexTotal int64 indexTotal = 0 + row := 1 for { re, _ := models.QueryUserStaticDataByTableName(int(indexTotal), PAGE_SIZE, tableName, queryObj, "") log.Info("return count=" + fmt.Sprint(count)) - row := 1 for _, userRecord := range re { row++ rows := fmt.Sprint(row) -- 2.34.1 From f898888b6a38f7be0c9bb4745dc2836db233f2ca Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 16:14:04 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/css/git.openi.css | 8 ++++---- public/home/home.js | 32 +++++++++++++++++++++++--------- templates/home.tmpl | 6 +++++- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index c97b48056e..828e4ee0d0 100644 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -256,14 +256,14 @@ box-shadow: none !important; } .homeorg-list .card .ui.small.header .content{ - width: calc(100% - 3.25em); + width: calc(100% - 3.75em); } .homepro-tit{ background: #FFF; z-index: 9; position: relative; } -.homepro-list{ +.homepro-list, .homeorg-list{ position: relative; z-index: 9; padding: 1.0em 1.0em 3.0em; @@ -280,9 +280,9 @@ line-height: 40px !important; } -.homepro-list .swiper-pagination-bullet-active{ +.homepro-list .swiper-pagination-bullet-active, .homeorg-list .swiper-pagination-bullet-active{ width: 40px; - border-radius: 4px; + border-radius: 4px; } .i-env > div{ position: relative; diff --git a/public/home/home.js b/public/home/home.js index bc89326423..47bee87ad4 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -7,26 +7,40 @@ if(isEmpty(token)){ } } -var swiperNewMessage = new Swiper(".newslist", { - direction: "vertical", - slidesPerView: 10, - loop: true, +var swiperRepo = new Swiper(".homepro-list", { + slidesPerView: 1, + slidesPerColumn: 2, + slidesPerColumnFill:'row', + spaceBetween: 30, + pagination: { + el: ".swiper-pagination", + clickable: true, + }, autoplay: { delay: 2500, disableOnInteraction: false, }, + breakpoints: { + 768: { + slidesPerView: 2, + }, + 1024: { + slidesPerView: 3, + }, + }, }); -var swiperRepo = new Swiper(".homepro-list", { + +var swiperOrg = new Swiper(".homeorg-list", { slidesPerView: 1, - slidesPerColumn: 2, + slidesPerColumn: 4, slidesPerColumnFill:'row', - spaceBetween: 30, + spaceBetween: 15, pagination: { el: ".swiper-pagination", clickable: true, }, autoplay: { - delay: 2500, + delay: 4500, disableOnInteraction: false, }, breakpoints: { @@ -400,7 +414,7 @@ function displayOrg(json){ if (json != null && json.length > 0){ for(var i = 0; i < json.length;i++){ var record = json[i] - html += "
"; + html += "
"; html += " "; html += "
"; html += "
-
+
+
+ +
+
-- 2.34.1 From a92f6548105298729b5debc82040d085ac01533c Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 16:17:35 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/home/home.js b/public/home/home.js index 47bee87ad4..fa5d6fc45f 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -6,7 +6,15 @@ if(isEmpty(token)){ token = meta.attr("content"); } } - +var swiperNewMessage = new Swiper(".newslist", { + direction: "vertical", + slidesPerView: 10, + loop: true, + autoplay: { + delay: 2500, + disableOnInteraction: false, + }, +}); var swiperRepo = new Swiper(".homepro-list", { slidesPerView: 1, slidesPerColumn: 2, -- 2.34.1 From c969874a5fc6fdf18542b0676c4ce318fe8efa95 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 16:23:14 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/home/home.js b/public/home/home.js index fa5d6fc45f..7d5cbe4b14 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -438,4 +438,5 @@ function displayOrg(json){ } } orgDiv.innerHTML = html; + swiperOrg.updateSlides(); } -- 2.34.1 From 2cf4fd77254d575ee38e8d94236ac756a32d28df Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 17:12:52 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/css/git.openi.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index 828e4ee0d0..b849d0cd44 100644 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -259,7 +259,6 @@ width: calc(100% - 3.75em); } .homepro-tit{ - background: #FFF; z-index: 9; position: relative; } @@ -373,6 +372,9 @@ .homenews::before{ left: 2em; } + .homepro-tit > p{ + background: #FFF; + } .homeorg{ padding-left: 3.5em; } -- 2.34.1 From cd86c87e92f47267972366762f43cae35c7c64b2 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 17:23:37 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- custom/public/css/git.openi.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom/public/css/git.openi.css b/custom/public/css/git.openi.css index b849d0cd44..8e2c25b2df 100644 --- a/custom/public/css/git.openi.css +++ b/custom/public/css/git.openi.css @@ -419,6 +419,9 @@ .leftline02-2 { width: calc(50% - 8.0em); } + .i-env .ui.cards>.card>.content .description{ + display: none; + } } @media only screen and (min-width: 768px) and (max-width: 991px) { -- 2.34.1 From 5b8cbca5c11c6b27e642a6cf61e15a1949f929ec Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 16 Feb 2022 17:30:20 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/user_data_analysis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/user_data_analysis.go b/routers/repo/user_data_analysis.go index 2dab5814c2..b4adfc3470 100755 --- a/routers/repo/user_data_analysis.go +++ b/routers/repo/user_data_analysis.go @@ -16,7 +16,7 @@ import ( ) const ( - PAGE_SIZE = 10 + PAGE_SIZE = 2000 ) func queryUserDataPage(ctx *context.Context, tableName string, queryObj interface{}) { -- 2.34.1