summaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/head.tmpl13
-rw-r--r--templates/base/stylesheets.tmpl8
2 files changed, 11 insertions, 10 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index d702b9fcef..690cade8d7 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -20,7 +20,6 @@
{{end}}
<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
- <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{AssetVersion}}">
{{template "base/head_script" .}}
<noscript>
<style>
@@ -63,15 +62,9 @@
<meta property="og:url" content="{{AppUrl}}">
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
-<meta property="og:site_name" content="{{AppName}}">
-{{if .IsSigned}}
- {{if ne .SignedUser.Theme "gitea"}}
- <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
- {{end}}
-{{else if ne DefaultTheme "gitea"}}
- <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{DefaultTheme | PathEscape}}.css?v={{AssetVersion}}">
-{{end}}
-{{template "custom/header" .}}
+ <meta property="og:site_name" content="{{AppName}}">
+ {{template "base/stylesheets" .}}
+ {{template "custom/header" .}}
</head>
<body>
{{template "custom/body_outer_pre" .}}
diff --git a/templates/base/stylesheets.tmpl b/templates/base/stylesheets.tmpl
new file mode 100644
index 0000000000..7e8cba2aed
--- /dev/null
+++ b/templates/base/stylesheets.tmpl
@@ -0,0 +1,8 @@
+<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/index.css?v={{AssetVersion}}">
+{{if .IsSigned}}
+ {{if ne .SignedUser.Theme "gitea"}}
+ <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
+ {{end}}
+{{else if ne DefaultTheme "gitea"}}
+ <link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{DefaultTheme | PathEscape}}.css?v={{AssetVersion}}">
+{{end}}