Browse Source

#597 增加个人信息页面内容

tags/v1.21.12.1^2
Gitea 4 years ago
parent
commit
b423801ea1
3 changed files with 55 additions and 11 deletions
  1. +1
    -0
      public/img/member.svg
  2. +1
    -0
      public/img/pro_num.svg
  3. +53
    -11
      templates/user/profile.tmpl

+ 1
- 0
public/img/member.svg View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="120" height="120"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 22h-2v-2a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v2H4v-2a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v2zm-8-9a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8z" fill="rgba(0,0,0,0.4)"/></svg>

+ 1
- 0
public/img/pro_num.svg View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="120" height="120"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 3l2 4v13a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7.004L4 3h16zm0 6H4v10h16V9zm-8 1l4 4h-3v4h-2v-4H8l4-4zm6.764-5H5.236l-.999 2h15.527l-1-2z" fill="rgba(0,0,0,0.4)"/></svg>

+ 53
- 11
templates/user/profile.tmpl View File

@@ -50,16 +50,46 @@
{{end}}
<li>{{svg "octicon-clock" 16}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
{{if and .Orgs .HasOrgsVisible}}
<li>
<ul class="user-orgs">
<li style="border-bottom: none;padding-bottom: 0;"><div style="border-bottom: 1px solid #eaeaea;padding-top: 5px;padding-bottom:5px"> <b> 组织</b></div></li>
<li style="padding-bottom: 0px;">
<!-- <ul class="user-orgs">
{{range .Orgs}}
{{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
<li>
<a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
<ul>
<a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
<span>{{.Name}}</span>
</ul>
</li>
{{end}}
{{end}}
</ul>
</ul> -->
{{range .Orgs}}
<ul class="user-orgs">
{{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
<li class="infor" style="width: 15%;" >
<a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
</li>
<li class="infor" style="width: 35%;">
<a class="ui image poping up" style="color: #0366D6;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" href="{{.HomeLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted">{{.Name}}</a>
</li>
<li class="infor" style="width: 25%;">
<img style="width: 14px; height: 14px;border: none;" src="/img/member.svg" >
<span style="color: rgba(0,0,0,.4);padding-left: 5px;">{{.NumMembers}}</span>
</li>
<li class="infor" style="width: 25%;">
<img style="width: 14px; height: 14px" src="/img/pro_num.svg" >
<span style="color: rgba(0,0,0,.4);padding-left: 5px;">{{.NumRepos}}</span>
</li>
{{end}}
</ul>
{{end}}
</li>
{{end}}
{{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
@@ -79,13 +109,6 @@
{{end}}
</ul>
</div>
<div >
<ul>
<li>
<ul></ul><ul></ul>
</li>
</ul>
</div>
</div>
</div>
<div class="ui eleven wide column">
@@ -155,3 +178,22 @@
</div>
</div>
{{template "base/footer" .}}

<style>
.infor{
margin: auto 0;
}
.user-orgs{
padding: 10px 0px;
}
.user-orgs li{
max-width: 50%;
float: right;
}
.user.profile .ui.card .extra.content ul {
padding: 5px 0;
}

</style>

Loading…
Cancel
Save