Skip to content

Commit

Permalink
[refs #104] Remove dns-prefetch and reorder preconnect
Browse files Browse the repository at this point in the history
Reorder the asset `preconnect` and remove unneeded `dns-prefetch` and
also reorder attributes to be consistent with those in the frontend
library.
  • Loading branch information
mcheung-nhs committed Apr 8, 2019
1 parent 7842aad commit bbfc44d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
15 changes: 8 additions & 7 deletions app/views/includes/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@

<title>{% block pageTitle %}{{ serviceName }}{% endblock %}</title>

<link rel="preload" as="font" href="https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2" type="font/woff2" crossorigin>
<link rel="preconnect dns-prefetch" href="https://www.nhs.uk/">
<link rel="preconnect dns-prefetch" href="https://assets.nhs.uk/" crossorigin>
<link href="https://www.nhs.uk/" rel="preconnect">
<link href="https://assets.nhs.uk/" rel="preconnect" crossorigin>

<link rel="stylesheet" href="/css/main.css">
<link type="font/woff2" href="https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2" rel="preload" as="font" crossorigin>
<link type="font/woff2" href="https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2" rel="preload" as="font" crossorigin>

<link href="/css/main.css" rel="stylesheet">

<script src="/nhsuk-frontend/nhsuk.min.js" defer></script>

{% block headIcons %}
<!--[if IE]><link rel="shortcut icon" href="/nhsuk-frontend/assets/favicons/favicon.ico"><![endif]-->
<link rel="apple-touch-icon" href="/nhsuk-frontend/assets/favicons/apple-touch-icon.png">
<link rel="icon" href="/nhsuk-frontend/assets/favicons/favicon.png">
<link href="/nhsuk-frontend/assets/favicons/apple-touch-icon.png" rel="apple-touch-icon">
<link href="/nhsuk-frontend/assets/favicons/favicon.png" rel="icon">
{% endblock %}
</head>

Expand Down
4 changes: 2 additions & 2 deletions docs/views/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
{% from 'textarea/macro.njk' import textarea %}

{% block headCSS %}
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/docs.css">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/docs.css" rel="stylesheet">
{% endblock %}

{% block pageTitle %}
Expand Down
15 changes: 8 additions & 7 deletions docs/views/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@

<title>{% block pageTitle %}NHS.UK prototype kit{% endblock %}</title>

<link rel="preload" as="font" href="https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2" type="font/woff2" crossorigin>
<link rel="preload" as="font" href="https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2" type="font/woff2" crossorigin>
<link rel="preconnect dns-prefetch" href="https://www.nhs.uk/">
<link rel="preconnect dns-prefetch" href="https://assets.nhs.uk/" crossorigin>
<link href="https://www.nhs.uk/" rel="preconnect">
<link href="https://assets.nhs.uk/" rel="preconnect" crossorigin>

<link type="font/woff2" href="https://assets.nhs.uk/fonts/FrutigerLTW01-55Roman.woff2" rel="preload" as="font" crossorigin>
<link type="font/woff2" href="https://assets.nhs.uk/fonts/FrutigerLTW01-65Bold.woff2" rel="preload" as="font" crossorigin>

{% block headCSS %}
<link rel="stylesheet" href="/css/main.css">
<link href="/css/main.css" rel="stylesheet">
{% endblock %}

<script src="/nhsuk-frontend/nhsuk.min.js" defer></script>

{% block headIcons %}
<!--[if IE]><link rel="shortcut icon" href="/nhsuk-frontend/assets/favicons/favicon.ico"><![endif]-->
<link rel="apple-touch-icon" href="/nhsuk-frontend/assets/favicons/apple-touch-icon.png">
<link rel="icon" href="/nhsuk-frontend/assets/favicons/favicon.png">
<link href="/nhsuk-frontend/assets/favicons/apple-touch-icon.png" rel="apple-touch-icon">
<link href="/nhsuk-frontend/assets/favicons/favicon.png" rel="icon">
{% endblock %}
</head>

Expand Down

0 comments on commit bbfc44d

Please sign in to comment.