adding preload for fonts, changing sprite prefetch>preload

This commit is contained in:
Adam Piontek 2021-04-07 08:13:35 -04:00
parent e3482568ad
commit 91efe2469a

View file

@ -8,7 +8,11 @@
<%= live_title_tag assigns[:page_title] || "", prefix: assigns[:page_title] && "73k \\ " || "73k" %> <%= live_title_tag assigns[:page_title] || "", prefix: assigns[:page_title] && "73k \\ " || "73k" %>
<meta name="author" content="Adam Piontek"/> <meta name="author" content="Adam Piontek"/>
<link rel="alternate" type="application/rss+xml" title="73k Blog - Adam Piontek" href="<%= Routes.feed_path(@conn, :rss) %>" /> <link rel="alternate" type="application/rss+xml" title="73k Blog - Adam Piontek" href="<%= Routes.feed_path(@conn, :rss) %>" />
<link rel="prefetch" href="<%= Routes.static_path(@conn, "/images/icons.svg") %>" as="image" type="image/svg+xml"> <link rel="preload" href="<%= Routes.static_path(@conn, "/images/icons.svg") %>" as="image" type="image/svg+xml" crossorigin="anonymous">
<link rel="preload" href="<%= Routes.static_path(@conn, "/fonts/righteous-latin-400-normal.woff2") %>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="<%= Routes.static_path(@conn, "/fonts/open-sans-latin-400-normal.woff2") %>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="<%= Routes.static_path(@conn, "/fonts/fira-code-latin-400-normal.woff2") %>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="<%= Routes.static_path(@conn, "/fonts/open-sans-latin-600-normal.woff2") %>" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="me" href="mailto:adam@73k.us"/> <link rel="me" href="mailto:adam@73k.us"/>
<link rel="me" href="sms:+16462341697"/> <link rel="me" href="sms:+16462341697"/>
<link rel="authorization_endpoint" href="https://indieauth.com/auth"/> <link rel="authorization_endpoint" href="https://indieauth.com/auth"/>
@ -27,9 +31,6 @@
</head> </head>
<body> <body>
<%# inserting img code to suppress img prefetch warning for svg sprites %>
<img src="<%= Routes.static_path(@conn, "/images/icons.svg") %>" style="display: none">
<%= render "_navbar.html", assigns %> <%= render "_navbar.html", assigns %>
<%= @inner_content %> <%= @inner_content %>