This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box-shadow: 0 3px 16px 0 rgba(0,0,0,.6); | |
-o-box-shadow: 0 3px 16px 0 rgba(0,0,0,.6); | |
-ms-box-shadow: 0 3px 16px 0 rgba(0,0,0,.6); | |
-moz-box-shadow: 0 3px 16px 0 rgba(0,0,0,.6); | |
-webkit-box-shadow: 0 3px 16px 0 rgba(0,0,0,.6); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Syntax */ | |
/* background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip bg-attachment initial|inherit; */ | |
-webkit-background: /* add values */; | |
-moz-background: /* add values */; | |
-ms-background: /* add values */; | |
-o-background: /* add values */; | |
background: /* add values */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Extra small devices and above */ | |
@media only screen and (min-width: 319px) { | |
/* content; */ | |
} | |
/* Small devices and above */ | |
@media only screen and (min-width: 479px) { | |
/* content; */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
-ms-text-size-adjust: 100%; /* 2 */ | |
-webkit-text-size-adjust: 100%; /* 2 */ | |
} | |
* { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*::-webkit-scrollbar { | |
width: 5px; | |
height: 5px; | |
opacity: 0.35; | |
-webkit-transition: all 0.35s; | |
-moz-transition: all 0.35s; | |
-ms-transition: all 0.35s; | |
-o-transition: all 0.35s; | |
transition: all 0.35s; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::selection { | |
background-color: #aa00ff; | |
text-shadow: none; | |
color: #151515; | |
} | |
::-moz-selection { | |
background-color: #aa00ff; | |
text-shadow: none; | |
color: #151515; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// use a cacheName for cache versioning | |
var cacheName = 'v1:static'; | |
// during the install phase you usually want to cache static assets | |
self.addEventListener('install', function(e) { | |
// once the SW is installed, go ahead and fetch the resources to make this work offline | |
e.waitUntil( | |
caches.open(cacheName).then(function(cache) { | |
return cache.addAll([ | |
'./styles/css/', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "Web app short name", | |
"name": "Web app name", | |
"description": "Web app description", | |
"start_url": ".", | |
"display": "standalone", | |
"background_color": "#aa00ff", | |
"theme_color": "#76ff03", | |
"lang": "en-GB", | |
"icons": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "Web app short name", | |
"name": "Web app name", | |
"description": "Web app description", | |
"start_url": ".", | |
"display": "standalone", | |
"background_color": "#aa00ff", | |
"theme_color": "#76ff03", | |
"lang": "en-GB", | |
"icons": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ('serviceWorker' in navigator) { // || 'ServiceWorker' in window | |
sw(); | |
} | |
function sw() { | |
const registration = navigator.serviceWorker.register('/sw.js', {scope: '/'}) | |
.then(function(_registration) { | |
console.log('Registration succeeded. Scope is ' + _registration.scope); | |
// request push notification permission only when user clicks the notification button as a good practise | |
$('#notifications-button').on("click", function() { |