adding svg sprite file prefetch

This commit is contained in:
Adam Piontek 2021-04-06 19:31:28 -04:00
parent 9137559685
commit 2027ecc1d5

View file

@ -8,6 +8,7 @@
<%= live_title_tag assigns[:page_title] || "", prefix: assigns[:page_title] && "73k \\ " || "73k" %>
<meta name="author" content="Adam Piontek"/>
<link rel="alternate" type="application/rss+xml" title="Blog Title" 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="me" href="mailto:adam@73k.us"/>
<link rel="me" href="sms:+16462341697"/>
<link rel="authorization_endpoint" href="https://indieauth.com/auth"/>
@ -26,6 +27,9 @@
</head>
<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 %>
<%= @inner_content %>