summaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-01-25 19:58:26 +0100
committerLauris BH <lauris@nix.lv>2020-01-25 20:58:26 +0200
commit75a124b4490adb7d333046ecafbee209751b2bbe (patch)
tree8c749302760d2400f3adb58a36630761a7500bea /templates/base
parent15af6bec601b13dfb3f4ee469446d196a04cbcd1 (diff)
downloadgitea-75a124b4490adb7d333046ecafbee209751b2bbe.tar.gz
gitea-75a124b4490adb7d333046ecafbee209751b2bbe.zip
remove loadCSS and preload woff2 icon fonts (#9976)
loadCSS was used as a polyfill for rel=preload but it seems we only used it on a single CSS file which did not help much. Changed the icon CSS to a blocking load and preload the woff2 variants which does work in modern browsers (Firefox currently needs the network.preload about:config setting but should gain proper support soon). Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/head.tmpl14
1 files changed, 4 insertions, 10 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index 523d83dd41..5a27467f3b 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -50,7 +50,6 @@
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
{{end}}
-
<script>
{{SafeJS `/*
@licstart The following is the entire license notice for the
@@ -84,13 +83,13 @@
for the JavaScript code in this page.
*/`}}
</script>
-
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png" />
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
- <link rel="preload" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
- <noscript><link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
+ <link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/octicons/octicons.min.css">
-
+ <link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/icons.woff2" type="font/woff2">
+ <link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/outline-icons.woff2" type="font/woff2">
+ <link rel="preload" as="font" href="{{StaticUrlPrefix}}/vendor/assets/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6" type="font/woff2">
{{if .RequireSimpleMDE}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
{{end}}
@@ -98,8 +97,6 @@
{{if .RequireTribute}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/tribute/tribute.css">
{{end}}
-
- <!-- Stylesheet -->
<link rel="stylesheet" href="{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}">
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
<noscript>
@@ -125,9 +122,6 @@
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.css">
{{end}}
<style class="list-search-style"></style>
-
- <script src="{{StaticUrlPrefix}}/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
- <script src="{{StaticUrlPrefix}}/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
{{if .PageIsUserProfile}}
<meta property="og:title" content="{{.Owner.Name}}" />
<meta property="og:type" content="profile" />