Skip to content

Commit

Permalink
Install favicon into app
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jun 3, 2024
1 parent 117c495 commit a91a0d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/views/_tailwind/application/_html_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
<%= javascript_include_tag "https://cdn.jsdelivr.net/npm/@tsparticles/[email protected]/tsparticles.confetti.bundle.min.js", defer: true %>
<%= javascript_include_tag "https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js", defer: true %>
<%= javascript_include_tag "tailwind/application" %>
<%# TODO: Move these to the root directory once the tailwind theme is the default %>
<link rel="apple-touch-icon" sizes="180x180" href="/tailwind/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/tailwind/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/tailwind/favicon-16x16.png">
<link rel="manifest" href="/tailwind/site.webmanifest">
<script>
(g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})({
key: "<%= Rails.application.credentials.dig(:google_maps, :api_key) %>",
Expand Down
2 changes: 1 addition & 1 deletion public/tailwind/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
{"name":"","short_name":"","icons":[{"src":"/tailwind/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/tailwind/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

0 comments on commit a91a0d5

Please sign in to comment.