diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
commit | 7ba9257a7ff659417501baf7358216555cebcd86 (patch) | |
tree | ffc842cec4165d1069220ae16e08a0b824952f4b /templates/ng | |
parent | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff) | |
download | gitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip |
Add suburl support
Diffstat (limited to 'templates/ng')
-rw-r--r-- | templates/ng/base/head.tmpl | 22 | ||||
-rw-r--r-- | templates/ng/base/header.tmpl | 26 | ||||
-rw-r--r-- | templates/ng/base/social.tmpl | 8 |
3 files changed, 28 insertions, 28 deletions
diff --git a/templates/ng/base/head.tmpl b/templates/ng/base/head.tmpl index 222edb690f..efdc965358 100644 --- a/templates/ng/base/head.tmpl +++ b/templates/ng/base/head.tmpl @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> - <head{{if AppRootSubUrl}} data-suburl="{{AppRootSubUrl}}"{{end}}> + <head{{if AppSubUrl}} data-suburl="{{AppSubUrl}}"{{end}}> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="author" content="Gogs - Go Git Service" /> @@ -9,27 +9,27 @@ <meta name="_csrf" content="{{.CsrfToken}}" /> {{if .Repository.IsGoget}}<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">{{end}} - <link rel="shortcut icon" href="{{AppRootSubUrl}}/img/favicon.png" /> + <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" /> {{if CdnMode}} <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> {{else}} - <link rel="stylesheet" href="{{AppRootSubUrl}}/css/font-awesome.min.css"> + <link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome.min.css"> - <script src="{{AppRootSubUrl}}/ng/js/lib/jquery-1.11.1.min.js"></script> + <script src="{{AppSubUrl}}/ng/js/lib/jquery-1.11.1.min.js"></script> {{end}} <!-- Stylesheet --> - <link rel="stylesheet" href="{{AppRootSubUrl}}/ng/css/ui.css"> - <link rel="stylesheet" href="{{AppRootSubUrl}}/ng/css/gogs.css"> - <link rel="stylesheet" href="{{AppRootSubUrl}}/ng/fonts/octicons.css"> - <link rel="stylesheet" href="{{AppRootSubUrl}}/css/github.min.css"> + <link rel="stylesheet" href="{{AppSubUrl}}/ng/css/ui.css"> + <link rel="stylesheet" href="{{AppSubUrl}}/ng/css/gogs.css"> + <link rel="stylesheet" href="{{AppSubUrl}}/ng/fonts/octicons.css"> + <link rel="stylesheet" href="{{AppSubUrl}}/css/github.min.css"> <!-- JavaScript --> - <script src="{{AppRootSubUrl}}/ng/js/lib/tabs.js"></script> - <script src="{{AppRootSubUrl}}/ng/js/lib/lib.js"></script> - <script src="{{AppRootSubUrl}}/ng/js/gogs.js"></script> + <script src="{{AppSubUrl}}/ng/js/lib/tabs.js"></script> + <script src="{{AppSubUrl}}/ng/js/lib/lib.js"></script> + <script src="{{AppSubUrl}}/ng/js/gogs.js"></script> <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title> </head> diff --git a/templates/ng/base/header.tmpl b/templates/ng/base/header.tmpl index af3bc02f93..aec4e2ef66 100644 --- a/templates/ng/base/header.tmpl +++ b/templates/ng/base/header.tmpl @@ -2,37 +2,37 @@ <ul class="menu menu-line container" id="header-nav"> {{if not .PageIsHome}} <li class="head" id="header-nav-logo"> - <img src="{{AppRootSubUrl}}/img/favicon.png" alt="avatar" class="avatar-30"/> + <img src="{{AppSubUrl}}/img/favicon.png" alt="avatar" class="avatar-30"/> </li> <li {{if .PageIsDashboard}}class="current"{{end}}> - <a href="{{AppRootSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a> + <a href="{{AppSubUrl}}/">{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}</a> </li> - <li><a href="{{AppRootSubUrl}}/explore">{{.i18n.Tr "explore"}}</a></li> + <li><a href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a></li> <li><a target="_blank" href="http://gogs.io/docs">{{.i18n.Tr "help"}}</a></li> {{end}} {{if .IsSigned}} <li class="right" id="header-nav-sign-out"> - <a href="{{AppRootSubUrl}}/user/logout" title="{{.i18n.Tr "sign_out"}}"><i class="octicon octicon-sign-out"></i></a> + <a href="{{AppSubUrl}}/user/logout" title="{{.i18n.Tr "sign_out"}}"><i class="octicon octicon-sign-out"></i></a> </li> <li class="right {{if .PageIsUserSettings}}current{{end}}"> - <a href="{{AppRootSubUrl}}/user/settings" title="{{.i18n.Tr "account_settings"}}"><i class="octicon octicon-settings"></i></a> + <a href="{{AppSubUrl}}/user/settings" title="{{.i18n.Tr "account_settings"}}"><i class="octicon octicon-settings"></i></a> </li> {{if .IsAdmin}} <li class="right {{if .PageIsAdmin}}current{{end}}"> - <a href="{{AppRootSubUrl}}/admin" title="{{.i18n.Tr "admin_panel"}}"><i class="octicon octicon-circuit-board"></i></a> + <a href="{{AppSubUrl}}/admin" title="{{.i18n.Tr "admin_panel"}}"><i class="octicon octicon-circuit-board"></i></a> </li> {{end}} <li class="right down"> <a href="#"><i class="octicon octicon-plus"></i></a> <ul class="menu menu-down" id="header-new-repo-menu"> - <li><a href="{{AppRootSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li> - <li><a href="{{AppRootSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li> - <li><a href="{{AppRootSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li> + <li><a href="{{AppSubUrl}}/repo/create"><i class="octicon octicon-repo-create"></i>{{.i18n.Tr "new_repo"}}</a></li> + <li><a href="{{AppSubUrl}}/repo/migrate"><i class="octicon octicon-repo-clone"></i>{{.i18n.Tr "new_migrate"}}</a></li> + <li><a href="{{AppSubUrl}}/org/create"><i class="octicon octicon-organization"></i>{{.i18n.Tr "new_org"}}</a></li> </ul> </li> <li class="right" id="header-nav-user"> - <a href="{{AppRootSubUrl}}/{{.SignedUser.Name}}" class="text-bold"> + <a href="{{AppSubUrl}}/{{.SignedUser.Name}}" class="text-bold"> <img src="{{.SignedUser.AvatarLink}}" alt="user-avatar" class="avatar-30"/> {{.SignedUser.Name}} </a> @@ -43,14 +43,14 @@ <a target="_blank" href="http://gogs.io/docs"><i class="octicon octicon-info"></i> {{.i18n.Tr "help"}}</a> </li> <li class="right" id="header-nav-explore"> - <a href="{{AppRootSubUrl}}/explore"><i class="octicon octicon-globe"></i> {{.i18n.Tr "explore"}}</a> + <a href="{{AppSubUrl}}/explore"><i class="octicon octicon-globe"></i> {{.i18n.Tr "explore"}}</a> </li> {{else}} <li class="right" id="header-nav-sign-in"> - <a href="{{AppRootSubUrl}}/user/login" title="Sign In"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a> + <a href="{{AppSubUrl}}/user/login" title="Sign In"><i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}</a> </li> <li class="right"> - <a href="{{AppRootSubUrl}}/user/sign_up" title="Account Settings"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a> + <a href="{{AppSubUrl}}/user/sign_up" title="Account Settings"><i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}</a> </li> {{end}} {{end}} diff --git a/templates/ng/base/social.tmpl b/templates/ng/base/social.tmpl index 78040fbd30..2d4acd28eb 100644 --- a/templates/ng/base/social.tmpl +++ b/templates/ng/base/social.tmpl @@ -1,4 +1,4 @@ -{{if .OauthService.GitHub}}<a class="btn github" href="{{AppRootSubUrl}}/user/login/github?next=/user/sign_up"><i class="fa fa-github"></i>GitHub</a>{{end}} -{{if .OauthService.Google}}<a class="btn google" href="{{AppRootSubUrl}}/user/login/google?next=/user/sign_up"><i class="fa fa-google"></i>Google +</a>{{end}} -{{if .OauthService.Weibo}}<a class="btn weibo" href="{{AppRootSubUrl}}/user/login/weibo?next=/user/sign_up"><i class="fa fa-weibo"></i>新浪微博</a>{{end}} -{{if .OauthService.Tencent}}<a class="btn qq" href="{{AppRootSubUrl}}/user/login/qq?next=/user/sign_up"><i class="fa fa-qq"></i>腾讯 QQ </a>{{end}}
\ No newline at end of file +{{if .OauthService.GitHub}}<a class="btn github" href="{{AppSubUrl}}/user/login/github?next=/user/sign_up"><i class="fa fa-github"></i>GitHub</a>{{end}} +{{if .OauthService.Google}}<a class="btn google" href="{{AppSubUrl}}/user/login/google?next=/user/sign_up"><i class="fa fa-google"></i>Google +</a>{{end}} +{{if .OauthService.Weibo}}<a class="btn weibo" href="{{AppSubUrl}}/user/login/weibo?next=/user/sign_up"><i class="fa fa-weibo"></i>新浪微博</a>{{end}} +{{if .OauthService.Tencent}}<a class="btn qq" href="{{AppSubUrl}}/user/login/qq?next=/user/sign_up"><i class="fa fa-qq"></i>腾讯 QQ </a>{{end}}
\ No newline at end of file |