This file contains hidden or 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deploy | |
labels: | |
app: nginx-app | |
spec: | |
replicas: 3 | |
template: |
This file contains hidden or 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
.grid-container { | |
margin-top: 60px; | |
position: relative; | |
width: 970px; | |
margin: auto; | |
} | |
.grid-container .grid-columns { | |
text-align: left; | |
display: flex; |
This file contains hidden or 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
<div class="grid-container"> | |
<div class="grid-columns"> | |
<div class="grid-column grid-col-4"> | |
<div class="grid-container_column--sagement ui secondary-img "> | |
<h2>Effective</h2> | |
<p>Every day hundreds of new ads.</p> | |
</div> | |
</div> | |
<div class="grid-column grid-col-4"> | |
<div class="grid-container_column--sagement ui secondary-img "> |
This file contains hidden or 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
<header class="main-header"> | |
<a href="index.html" class="main-header__brand"> | |
<img src="./images/nanny.png" alt="uHost - Your favorite hosting company"> | |
</a> | |
<nav class="main-nav"> | |
<ul class="main-nav__items"> | |
<li class="main-nav__item"> | |
<a href="packages/index.html">Account</a> | |
</li> | |
<li class="main-nav__item"> |
This file contains hidden or 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 body { | |
width: 100%; | |
height: 100%; | |
margin: 0px; | |
font-family: 'Roboto', sans-serif; | |
} | |
.main-header { | |
width: 100%; | |
position: fixed; |
This file contains hidden or 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
workbox.routing.registerRoute( | |
new RegExp('.css$'), | |
workbox.strategies.cacheFirst({ | |
cacheName: 'poc-cache-Stylesheets', | |
plugins: [ | |
new workbox.expiration.Plugin({ | |
maxAgeSeconds: 60 * 60 * 24 * 7, // cache for one week | |
maxEntries: 20, // only cache 20 request | |
purgeOnQuotaError: true, | |
}), |
This file contains hidden or 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
export default function register() { | |
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { | |
// The URL constructor is available in all browsers that support SW. | |
const publicUrl = new URL(process.env.PUBLIC_URL, window.location); | |
if (publicUrl.origin !== window.location.origin) { | |
// Our service worker won't work if PUBLIC_URL is on a different origin | |
// from what our page is served on. This might happen if a CDN is used to | |
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 | |
return; | |
} |
This file contains hidden or 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
/* eslint-disable no-undef */ | |
// See https://developers.google.com/web/tools/workbox/guides/configure-workbox | |
workbox.core.setLogLevel(workbox.core.LOG_LEVELS.debug); | |
self.addEventListener('install', event => event.waitUntil(self.skipWaiting())); | |
self.addEventListener('activate', event => event.waitUntil(self.clients.claim())); | |
workbox.routing.registerRoute( | |
new RegExp('.css$'), | |
workbox.strategies.cacheFirst({ |
This file contains hidden or 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
{ | |
"name": "react-with-workbox", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"axios": "^0.19.0", | |
"eslint-config-prettier": "^6.1.0", | |
"prettier": "^1.18.2", | |
"react": "^16.4.2", | |
"react-app-rewire-workbox": "^2.0.1", |
This file contains hidden or 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
const {rewireWorkboxInject, defaultInjectConfig} = require('react-app-rewire-workbox'); | |
const path = require('path'); | |
module.exports = function override(config, env) { | |
if (env === "production") { | |
console.log("Production build - Adding Workbox for PWAs"); | |
// Extend the default injection config with required swSrc | |
const workboxConfig = { | |
...defaultInjectConfig, | |
swSrc: path.join(__dirname, 'src', 'custom-sw.js') |