Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1034 Reviewed-by: zhoupzh <zhoupzh@pcl.ac.cn>tags/v1.21.12.1^2
| @@ -17,19 +17,23 @@ | |||
| {{if .IsSigned}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "index"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <a class="item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| <div class=" item" > | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/dashboard"> | |||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_explore'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| @@ -43,24 +47,26 @@ | |||
| </div> | |||
| </div> | |||
| {{else if .IsLandingPageHome}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "home"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <!-- 未登录跳转登录界面 --> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| <div class=" item"> | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/user/login"> | |||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_PageHome'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <div class="menu" > | |||
| <a class="item" href="{{AppSubUrl}}/explore/users">{{.i18n.Tr "explore.users"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "explore.organizations"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/images">{{.i18n.Tr "explore.images"}}</a> | |||
| @@ -17,18 +17,22 @@ | |||
| {{if .IsSigned}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "index"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <a class="item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| <div class="item" > | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/dashboard"> | |||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_explore'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| @@ -42,19 +46,22 @@ | |||
| </div> | |||
| </div> | |||
| {{else if .IsLandingPageHome}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "home"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <!-- 未登录跳转登录界面 --> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| <div class="item" > | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/user/login"> | |||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_PageHome'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| @@ -9,18 +9,22 @@ | |||
| </div> | |||
| {{if .IsSigned}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "index"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <a class="item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| <div class="item" > | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/dashboard"> | |||
| <span > {{.i18n.Tr "index"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_explore'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| @@ -34,21 +38,23 @@ | |||
| </div> | |||
| </div> | |||
| {{else if .IsLandingPageHome}} | |||
| <div class="ui dropdown item"> | |||
| {{.i18n.Tr "home"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| <!-- 未登录跳转登录界面 --> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| <div class="item" > | |||
| <div class="dropdown-menu"> | |||
| <a class=" item" href="/user/login"> | |||
| <span > {{.i18n.Tr "home"}}   <i class="dropdown icon"></i></span> | |||
| </a> | |||
| <div class="dropdown-content" style="min-width: 110px;border-radius:4px"> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a> | |||
| <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a> | |||
| </div> | |||
| </div> | |||
| </div> | |||
| <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a> | |||
| <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a> | |||
| <div class="ui dropdown item"> | |||
| <div class="ui dropdown item" id='dropdown_PageHome'> | |||
| {{.i18n.Tr "explore"}} | |||
| <i class="dropdown icon"></i> | |||
| <div class="menu"> | |||
| @@ -2933,6 +2933,7 @@ $(document).ready(async () => { | |||
| initNotificationsTable(); | |||
| initNotificationCount(); | |||
| initTribute(); | |||
| initDropDown(); | |||
| // Repo clone url. | |||
| if ($('#repo-clone-url').length > 0) { | |||
| @@ -4100,3 +4101,11 @@ $.get(`${window.config.StaticUrlPrefix}/img/svg/icons.svg`, (data) => { | |||
| div.innerHTML = new XMLSerializer().serializeToString(data.documentElement); | |||
| document.body.insertBefore(div, document.body.childNodes[0]); | |||
| }); | |||
| function initDropDown() { | |||
| $("#dropdown_PageHome").dropdown({ | |||
| on:'hover' ,//鼠标悬浮显示,默认值是click | |||
| }); | |||
| $("#dropdown_explore").dropdown({ | |||
| on:'hover' ,//鼠标悬浮显示,默认值是click | |||
| }); | |||
| } | |||