summaryrefslogtreecommitdiffstats
path: root/templates/base/head.tmpl
diff options
context:
space:
mode:
authorMartin van Beurden <chadoe@gmail.com>2014-09-14 19:35:22 +0200
committerMartin van Beurden <chadoe@gmail.com>2014-09-18 20:50:48 +0200
commit0055cbd3651ebde0f8b6cc70c9c44de56dc38830 (patch)
tree64a9ea617ba1f704139881c3960fa2425dad9018 /templates/base/head.tmpl
parent4f74b4e6578be4251af65cd08daa37c884e431a0 (diff)
downloadgitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.tar.gz
gitea-0055cbd3651ebde0f8b6cc70c9c44de56dc38830.zip
Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
Conflicts: modules/setting/setting.go Conflicts: templates/repo/release/list.tmpl templates/user/dashboard/dashboard.tmpl Conflicts: routers/repo/setting.go
Diffstat (limited to 'templates/base/head.tmpl')
-rw-r--r--templates/base/head.tmpl26
1 files changed, 13 insertions, 13 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index a58299f8cf..55dd469093 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
- <head>
+ <head{{if AppRootSubUrl}} data-suburl="{{AppRootSubUrl}}"{{end}}>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="shortcut icon" href="/img/favicon.png" />
+ <link rel="shortcut icon" href="{{AppRootSubUrl}}/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="/css/bootstrap.min.css" rel="stylesheet" />
- <link href="/css/font-awesome.min.css" rel="stylesheet" />
+ <link href="{{AppRootSubUrl}}/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="{{AppRootSubUrl}}/css/font-awesome.min.css" rel="stylesheet" />
- <script src="/js/jquery-1.10.1.min.js"></script>
- <script src="/js/bootstrap.min.js"></script>
+ <script src="{{AppRootSubUrl}}/js/jquery-1.10.1.min.js"></script>
+ <script src="{{AppRootSubUrl}}/js/bootstrap.min.js"></script>
{{end}}
- <link href="/css/todc-bootstrap.min.css" rel="stylesheet" />
- <link href="/css/datepicker3.css" rel="stylesheet" />
- <link href="/css/bootstrap-colorpicker.min.css" rel="stylesheet" />
- <link href="/css/markdown.css" rel="stylesheet" />
- <link href="/css/gogs.css" rel="stylesheet" />
+ <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" />
- <script src="/js/lib.js"></script>
- <script src="/js/app.js"></script>
+ <script src="{{AppRootSubUrl}}/js/lib.js"></script>
+ <script src="{{AppRootSubUrl}}/js/app.js"></script>
<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
</head>
<body>