diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index dbd3f81f8..c3e2426fb 100755
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -525,6 +525,7 @@ datasets = Datasets
activity = Public Activity
followers = Followers
starred = Starred Repositories
+badge = Achievement Badge
following = Following
follow = Follow
unfollow = Unfollow
diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini
index 21c4f45bd..bf7549918 100755
--- a/options/locale/locale_zh-CN.ini
+++ b/options/locale/locale_zh-CN.ini
@@ -530,6 +530,7 @@ datasets=数据集
activity=公开活动
followers=关注者
starred=已点赞
+badge=成就徽章
following=关注中
follow=关注
unfollow=取消关注
diff --git a/templates/repo/badge.tmpl b/templates/repo/badge.tmpl
new file mode 100644
index 000000000..61b542be8
--- /dev/null
+++ b/templates/repo/badge.tmpl
@@ -0,0 +1,25 @@
+
+ {{range .AllBadges }}
+
+
{{.CategoryName}} (已点亮{{.LightedNum}}个)
+
+
+ {{ end }}
+ {{ template "base/paginate" . }}
+
+
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index be6ecbaa0..f1328b626 100755
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -17,6 +17,17 @@
{{if .Owner.FullName}}{{end}}
{{.Owner.Name}}
+
+
+ {{range $k,$v :=.RecentBadges}}
+ {{if le $k 3}}
+
+ {{else}}
+
+ {{end}}
+ {{end}}
+
+
{{if eq .TabName "activity"}}
@@ -201,6 +217,8 @@
{{template "explore/dataset_search" .}}
{{template "explore/dataset_list" .}}
{{template "base/paginate" .}}
+ {{else if eq .TabName "badge"}}
+ {{template "repo/badge" .}}
{{else}}
{{template "explore/repo_search" .}}
{{template "explore/repo_list" .}}
diff --git a/web_src/less/_user.less b/web_src/less/_user.less
index 6acbb35ee..c2381820c 100644
--- a/web_src/less/_user.less
+++ b/web_src/less/_user.less
@@ -9,11 +9,30 @@
.username {
display: block;
}
-
+ .badge-wrap {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ .badge-img-avatar {
+ width: 32px;
+ height: 32px;
+ margin-right: 5px;
+ }
+ .badge-more-icon {
+ width: 32px;
+ height: 32px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-radius: 50%;
+ border: 1px #f8f9fa solid;
+ background: #f8f9fa;
+ }
+ }
.header {
font-weight: 700;
font-size: 1.3rem;
- margin-top: -.2rem;
+ margin-top: -0.2rem;
line-height: 1.3rem;
}
@@ -158,3 +177,65 @@
max-width: 60px;
}
}
+.badge-achive {
+ .bagde-section {
+ color: #000;
+ margin-top: 28px;
+ border-bottom: 1px solid #dededf;
+ }
+ .bagde-section:last-child {
+ color: #000;
+ margin-top: 28px;
+ border-bottom: none;
+ }
+ .badge-section-title {
+ position: relative;
+ font-size: 16px;
+ line-height: 24px;
+ padding-left: 8px;
+ margin-bottom: 20px;
+ display: flex;
+ justify-content: space-between;
+ }
+ .badge-section-children {
+ width: 100%;
+ }
+ .badge-honor-badge {
+ margin-bottom: 25px;
+ }
+ .badge-honor-badge-basic {
+ display: flex;
+ align-items: flex-start;
+ flex-wrap: wrap;
+ }
+ .badge-honor-badge-basic-item {
+ text-align: center;
+ font-size: 12px;
+ margin-right: 30px;
+ color: #101010;
+ }
+ .is-not-pointer {
+ cursor: pointer;
+ pointer-events: none;
+ }
+ .badge-honor-badge-basic-img {
+ width: 56px;
+ height: 56px;
+ margin-bottom: 5px;
+ }
+ .badge-honor-badge-basic-txt {
+ line-height: 20px;
+ width: 65px;
+ word-break: break-all;
+ }
+ .badge-section-title:before {
+ content: "";
+ position: absolute;
+ top: 50%;
+ left: 0;
+ transform: translateY(-50%);
+ width: 3px;
+ height: 1em;
+ background-color: #000;
+ }
+}