Initial commit: KGV-PWA plugin with manifest, service worker and install prompt

This commit is contained in:
Ronny Grobel
2026-04-20 21:12:48 +02:00
commit e6930011ab
5 changed files with 891 additions and 0 deletions

84
assets/css/kgv-pwa.css Normal file
View File

@@ -0,0 +1,84 @@
/**
* KGV PWA Install-Banner
*/
#kgv-pwa-install-banner {
position: fixed;
bottom: -80px;
left: 0;
right: 0;
z-index: 99999;
display: flex;
align-items: center;
gap: 12px;
padding: 14px 20px;
background: #1b5e20;
color: #fff;
font-family: inherit;
font-size: 14px;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
transition: bottom 0.3s ease;
}
#kgv-pwa-install-banner.kgv-pwa-banner--visible {
bottom: 0;
}
.kgv-pwa-banner__text {
flex: 1;
}
.kgv-pwa-banner__install {
flex-shrink: 0;
padding: 7px 18px;
background: #fff;
color: #1b5e20;
border: none;
border-radius: 4px;
font-weight: 600;
font-size: 14px;
cursor: pointer;
transition: background 0.2s;
}
.kgv-pwa-banner__install:hover,
.kgv-pwa-banner__install:focus {
background: #e8f5e9;
outline: 2px solid #fff;
outline-offset: 2px;
}
.kgv-pwa-banner__close {
flex-shrink: 0;
background: transparent;
border: none;
color: #fff;
font-size: 20px;
line-height: 1;
cursor: pointer;
padding: 0 4px;
opacity: 0.8;
}
.kgv-pwa-banner__close:hover,
.kgv-pwa-banner__close:focus {
opacity: 1;
outline: 1px solid rgba(255, 255, 255, 0.6);
border-radius: 2px;
}
/* Schmale Bildschirme */
@media ( max-width: 480px ) {
#kgv-pwa-install-banner {
flex-wrap: wrap;
gap: 8px;
}
.kgv-pwa-banner__text {
flex-basis: 100%;
}
.kgv-pwa-banner__install {
flex: 1;
}
}