Skip to content

Commit

Permalink
improved pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
markokroselj committed Dec 7, 2023
1 parent 670703c commit 2112d69
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 18 deletions.
Binary file added public/images/logo-144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logo-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/logo-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/maskable_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/maskable_icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/screenshots/desktop-daily.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/screenshots/desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/screenshots/mobile-daily.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/screenshots/mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions public/images/site.webmanifest

This file was deleted.

37 changes: 37 additions & 0 deletions public/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Fri menza jedilnik",
"short_name": "Fri menza jedilnik",
"start_url": "/",
"lang": "sl",
"theme_color": "#ef4444",
"background_color": "#ef4444",
"display": "standalone",
"orientation": "portrait",
"description": "Dnevni in tedenski jedilnik FRI menze.",
"icons": [
{
"src": "/images/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "any"
},
{
"src": "/images/logo-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/images/maskable_icon_x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/images/logo-144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "any"
}
]
}
3 changes: 2 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p>
Made with ♥ by <a href="https://github.com/markokroselj" class="hover:underline" target="_blank"
>Marko Krošelj</a
> using Astro.js 🚀 <a href="https://astro.build"
> <span class="pwa:hidden">using Astro.js 🚀 <a href="https://astro.build"
><img
src="https://astro.badg.es/v2/built-with-astro/tiny.svg"
alt="Built with Astro"
Expand All @@ -16,5 +16,6 @@
class="inline-block"
/></a
>
</span>
</p>
</footer>
4 changes: 2 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { title = "Fri menza", description = "Jedilnik FRI menze" } = Astro.props;
<link rel="apple-touch-icon" sizes="76x76" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="manifest" href="/images/site.webmanifest">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#ef4444">
<link rel="shortcut icon" href="/images/favicon.ico">
<meta name="msapplication-TileColor" content="#ef4444">
Expand All @@ -31,7 +31,7 @@ const { title = "Fri menza", description = "Jedilnik FRI menze" } = Astro.props;
</head>
<body class="flex flex-col min-h-[100dvh] bg-pattern bg-cover">
<Header />
<main class="p-3 flex-grow">
<main class="p-3 flex-grow" transition:animate="slide">
<slot />
</main>
<Footer />
Expand Down
6 changes: 5 additions & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
module.exports = {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
extend: {
screens: {
pwa: { raw: '(display-mode: standalone)' },
},
},
},
plugins: [],
}

0 comments on commit 2112d69

Please sign in to comment.