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/base | |
parent | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff) | |
download | gitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip |
Add suburl support
Diffstat (limited to 'templates/base')
-rw-r--r-- | templates/base/head.tmpl | 26 | ||||
-rw-r--r-- | templates/base/navbar.tmpl | 18 |
2 files changed, 22 insertions, 22 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 55dd469093..7775933ca9 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -1,8 +1,8 @@ <!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" /> - <link rel="shortcut icon" href="{{AppRootSubUrl}}/img/favicon.png" /> + <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> <meta name="author" content="Gogs - Go Git Service" /> @@ -19,21 +19,21 @@ <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script> {{else}} - <link href="{{AppRootSubUrl}}/css/bootstrap.min.css" rel="stylesheet" /> - <link href="{{AppRootSubUrl}}/css/font-awesome.min.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/bootstrap.min.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/font-awesome.min.css" rel="stylesheet" /> - <script src="{{AppRootSubUrl}}/js/jquery-1.10.1.min.js"></script> - <script src="{{AppRootSubUrl}}/js/bootstrap.min.js"></script> + <script src="{{AppSubUrl}}/js/jquery-1.10.1.min.js"></script> + <script src="{{AppSubUrl}}/js/bootstrap.min.js"></script> {{end}} - <link href="{{AppRootSubUrl}}/css/todc-bootstrap.min.css" rel="stylesheet" /> - <link href="{{AppRootSubUrl}}/css/datepicker3.css" rel="stylesheet" /> - <link href="{{AppRootSubUrl}}/css/bootstrap-colorpicker.min.css" rel="stylesheet" /> - <link href="{{AppRootSubUrl}}/css/markdown.css" rel="stylesheet" /> - <link href="{{AppRootSubUrl}}/css/gogs.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/todc-bootstrap.min.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/datepicker3.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/bootstrap-colorpicker.min.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/markdown.css" rel="stylesheet" /> + <link href="{{AppSubUrl}}/css/gogs.css" rel="stylesheet" /> - <script src="{{AppRootSubUrl}}/js/lib.js"></script> - <script src="{{AppRootSubUrl}}/js/app.js"></script> + <script src="{{AppSubUrl}}/js/lib.js"></script> + <script src="{{AppSubUrl}}/js/app.js"></script> <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title> </head> <body> diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index 991e773d8b..b69e9dc4a0 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -1,8 +1,8 @@ <div class="masthead navbar" id="masthead"> <div class="container"> <nav class="nav"> - <a id="nav-logo" class="nav-item pull-left{{if .PageIsHome}} active{{end}}" href="{{AppRootSubUrl}}/"><img src="{{AppRootSubUrl}}/img/favicon.png" alt="Gogs Logo" id="logo"></a> - <a class="nav-item pull-left{{if .PageIsUserDashboard}} active{{end}}" href="{{AppRootSubUrl}}/">Dashboard</a> + <a id="nav-logo" class="nav-item pull-left{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/"><img src="{{AppSubUrl}}/img/favicon.png" alt="Gogs Logo" id="logo"></a> + <a class="nav-item pull-left{{if .PageIsUserDashboard}} active{{end}}" href="{{AppSubUrl}}/">Dashboard</a> <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" target="_blank" href="http://gogs.io/docs">Help</a> {{if .IsSigned}} {{if .HasAccess}} @@ -22,27 +22,27 @@ </div> </form> --> {{end}} - <a id="nav-out" class="nav-item navbar-right navbar-btn btn btn-danger" href="{{AppRootSubUrl}}/user/logout/"><i class="fa fa-power-off fa-lg"></i></a> + <a id="nav-out" class="nav-item navbar-right navbar-btn btn btn-danger" href="{{AppSubUrl}}/user/logout/"><i class="fa fa-power-off fa-lg"></i></a> <a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}"> <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/> </a> - <a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="{{AppRootSubUrl}}/user/settings" data-toggle="tooltip" data-placement="bottom" title="Settings"><i class="fa fa-cogs fa-lg"></i></a> + <a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="{{AppSubUrl}}/user/settings" data-toggle="tooltip" data-placement="bottom" title="Settings"><i class="fa fa-cogs fa-lg"></i></a> {{if .IsAdmin}} - <a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="{{AppRootSubUrl}}/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a> + <a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="{{AppSubUrl}}/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a> {{end}} <div class="navbar-right nav-item pull-right{{if .PageIsNewRepo}} active{{end}}" id="nav-repo-new" data-toggle="tooltip" data-placement="bottom" title="New Repo"> <button type="button" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus-square fa-lg"></i></button> <div class="dropdown-menu"> <ul class="list-unstyled"> - <li><a href="{{AppRootSubUrl}}/repo/create"><i class="fa fa-book"></i>Repository</a></li> - <li><a href="{{AppRootSubUrl}}/repo/migrate"><i class="fa fa-clipboard"></i>Migration</a></li> + <li><a href="{{AppSubUrl}}/repo/create"><i class="fa fa-book"></i>Repository</a></li> + <li><a href="{{AppSubUrl}}/repo/migrate"><i class="fa fa-clipboard"></i>Migration</a></li> <!-- <li><a href="#"><i class="fa fa-users"></i>Organization</a></li> --> </ul> </div> </div> {{else}} - <a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="{{AppRootSubUrl}}/user/login/" rel="nofollow">Sign In</a> - <a id="nav-signup" class="nav-item navbar-right" href="{{AppRootSubUrl}}/user/sign_up/" rel="nofollow">Sign Up</a> + <a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="{{AppSubUrl}}/user/login/" rel="nofollow">Sign In</a> + <a id="nav-signup" class="nav-item navbar-right" href="{{AppSubUrl}}/user/sign_up/" rel="nofollow">Sign Up</a> {{end}} </nav> </div> |