Skip to content

Commit 9860d96

Browse files
committed
use absolute urls for assets so common head can be used on other domains
1 parent 9cce4a7 commit 9860d96

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

templates/_common-head.html.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="icon" type="image/png" href="https://www.w3.org/assets/logos/w3c/favicon-32.png"/>
66
<link rel="apple-touch-icon" type="image/png" href="https://www.w3.org/assets/logos/w3c/favicon-180.png"/>
77

8-
<link rel="stylesheet" href="{{ asset('styles/core.css?ver=1.4', 'website-2021') }}" media="screen"/>
8+
<link rel="stylesheet" href="{{ absolute_url(asset('styles/core.css?ver=1.4', 'website-2021')) }}" media="screen"/>
99

1010
<!--
1111
CSS Mustard Cut
@@ -14,14 +14,14 @@ Edge, Chrome 39+, Opera 26+, Safari 9+, iOS 9+, Android ~5+, Android UCBrowser ~
1414
FF 47+
1515
-->
1616
<link rel="stylesheet" id="advanced-stylesheet"
17-
href="{{ asset('styles/advanced.css?ver=1.4', 'website-2021') }}" media="
17+
href="{{ absolute_url(asset('styles/advanced.css?ver=1.4', 'website-2021')) }}" media="
1818
only print,
1919
only all and (pointer: fine), only all and (pointer: coarse), only all and (pointer: none),
2020
only all and (min--moz-device-pixel-ratio:0) and (display-mode:browser), (min--moz-device-pixel-ratio:0) and (display-mode:fullscreen)
2121
">
22-
<link rel="stylesheet" href="{{ asset('styles/print.css', 'website-2021') }}" media="print"/>
22+
<link rel="stylesheet" href="{{ absolute_url(asset('styles/print.css', 'website-2021')) }}" media="print"/>
2323

24-
<script src="{{ asset('js/libraries/fontfaceobserver.js', 'website-2021') }}"></script>
24+
<script src="{{ absolute_url(asset('js/libraries/fontfaceobserver.js', 'website-2021')) }}"></script>
2525

2626
<script>
2727
var myFont = new FontFaceObserver('Noto Sans');
@@ -34,7 +34,7 @@ FF 47+
3434
var linkEl = document.getElementById('advanced-stylesheet');
3535
if (window.matchMedia && window.matchMedia(linkEl.media).matches) {
3636
var script = document.createElement('script');
37-
script.src = '{{ asset('js/main.js?ver=1.4', 'website-2021') }}';
37+
script.src = '{{ absolute_url(asset('js/main.js?ver=1.4', 'website-2021')) }}';
3838
script.defer = true;
3939
document.querySelector('head').appendChild(script);
4040
(function (H) {

0 commit comments

Comments
 (0)