Skip to content

Commit

Permalink
moved to a working tree and 2 folders
Browse files Browse the repository at this point in the history
  • Loading branch information
billythemusical committed Dec 9, 2022
1 parent a0beec4 commit c0e7c48
Show file tree
Hide file tree
Showing 22 changed files with 176 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cSpell.words": [
"beforeinstallprompt"
],
"liveServer.settings.CustomBrowser": "chrome",
}
1 change: 1 addition & 0 deletions a2hs
Submodule a2hs added at 7bc38a
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions misc/dynamiccally-load-favicon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const setFavicon = (iconUrl) => {
// From https://stackoverflow.com/questions/260857/changing-website-favicon-dynamically
var link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement('link');
link.rel = 'icon';
document.getElementsByTagName('head')[0].appendChild(link);
}
// link.href = iconUrl; // http could be effecting the PWA install
}
5 changes: 5 additions & 0 deletions misc/get-json.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var fs = require('fs');
var obj = JSON.parse(fs.readFileSync('manifest.json', 'utf8'));

console.log(obj.short_name)
process.exit()
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
59 changes: 59 additions & 0 deletions misc/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="Boilerplate code for a PWA with p5.js."/>

<link rel="icon" type="image/x-icon" href="/images/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">

<link rel="stylesheet" href="/styles/style.css">
<link rel="manifest" href="/js/manifest.json">
<base href="./">

<title>ReCode PWA Boilerplate</title>

<script src="/js/a2hs-installer.js"></script>
</head>

<script>
// register service worker
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('sw.js')
.then(function (reg) {
if (reg.installing) {
console.log('Service worker installing');
} else if (reg.waiting) {
console.log('Service worker installed');
} else if (reg.active) {
console.log('Service worker active');
}
})
.catch(function (error) {
// registration failed
console.log('Registration failed with ' + error);
});
}
</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script>
<script type="text/javascript" src="/js/sketch.js"></script>

<body>

<div id="app">
<div id="installer">
<div class="app-icon">
<img width="90px" height="90px" src="/images/apple-touch-icon.png" alt="A boilerplate app for a Progressive Web App">
</div>
<div>
<input id="a2hs-button" value="Install this app!" type="button"></input>
</div>
<div id="sketch-holder"></div>
</div>


</body>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions misc/localhost.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-----BEGIN CERTIFICATE-----
MIIC5TCCAc2gAwIBAgIJALJ9WgJLLP+sMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
BAMMCWxvY2FsaG9zdDAeFw0yMjA1MjUwNTM3MjBaFw0yMjA2MjQwNTM3MjBaMBQx
EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBANXZjPNR7VTYSaIiNtRROK/bonwEKD+Eb3OTuAgBZFd6fJck5y0GFx04l/cI
p4TSjYan4e5ig6kMk8H2pmogAZVPPfRXeusHoJrVkPA/TTeuR0ynpO6r7UWRbUGd
g15HtbxUg0LJRFQhTfyl7yXiaBT+hmOcE/29cX55wbM5+yYUo4IbwMvxtI2OxJBo
HD0NhxBPi6d6tRre16rO6Btb9buBwQcLW0hXj5ZElPdB49jTsXjJsEvyn0nQpQsQ
kwA/QFg3B4i/oAh6uS9cljNZvsaJo+xN9ABHbhflwJ6uM/K/9KYwNzywbkC6MEZ2
qR8v3EqGh1WQjA45m7RebKYXJQ0CAwEAAaM6MDgwFAYDVR0RBA0wC4IJbG9jYWxo
b3N0MAsGA1UdDwQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDATANBgkqhkiG9w0B
AQsFAAOCAQEANejUn63OqBV4xQ3aXoPhFjgz8OaD81S/b4L/KeUE66QRUPQArvbG
KEV9NBaIgvjk7EvfBj10C3/T7VVZLmeyIsJmqUYsXzyJDc4SiYtSAS8199R0xLCh
Xaw+TYcT7XlZXyPFtpKX+V2LJDQAIDTZjgnA3Bl9//oVyzM3CiFXwSQzo9LopinA
qM6oONi/41XRTHSyPGDGW+2aJccT3MlgXOSLkZBMMFXYW5v02Wdx9Vz7XYQ2eQZo
OZUgQnG9fM7bId5491BuNAGZ8SopDczBazUDSjnkm0x7+ROLRrVuRUaSEA2BigU0
SXrS9GO1X/IAbCWqhf5jVFdDPu4QaMm+Aw==
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions misc/localhost.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDV2YzzUe1U2Emi
IjbUUTiv26J8BCg/hG9zk7gIAWRXenyXJOctBhcdOJf3CKeE0o2Gp+HuYoOpDJPB
9qZqIAGVTz30V3rrB6Ca1ZDwP003rkdMp6Tuq+1FkW1BnYNeR7W8VINCyURUIU38
pe8l4mgU/oZjnBP9vXF+ecGzOfsmFKOCG8DL8bSNjsSQaBw9DYcQT4unerUa3teq
zugbW/W7gcEHC1tIV4+WRJT3QePY07F4ybBL8p9J0KULEJMAP0BYNweIv6AIerkv
XJYzWb7GiaPsTfQAR24X5cCerjPyv/SmMDc8sG5AujBGdqkfL9xKhodVkIwOOZu0
XmymFyUNAgMBAAECggEBAI1xZiPt1U8f+5vsi11lF1xhphfm3AQfAWRtmPRaj1a4
4j1KIEmMVK90JjczlzFn3knpMqtsp26hrf1FuY5J+yIZln3NerSHh/fBOCtfgyBH
+kq+O33N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lt7Sue9z3twhq4rrNjlvvrF
LgdOIjPApgLjK0ao2r+QFJ54
-----END PRIVATE KEY-----
24 changes: 24 additions & 0 deletions misc/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"lang": "en",
"dir": "ltr",
"name": "ReCode PWA Boilerplate",
"short_name": "recode",
"description": "A p5 PWA Boilerplate app!",
"start_url": "/",
"background_color": "rgb(255,192,203)",
"theme-color": "#c8c8c8",
"display": "fullscreen",
"icons": [
{
"src": "/images/recode-icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/images/recode-icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
}
],
"id": "recode"
}
24 changes: 24 additions & 0 deletions misc/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"lang": "en",
"dir": "ltr",
"name": "PWA Boilerplate",
"short_name": "dev-d4w",
"description": "PWA - Boilerplate",
"start_url": "/",
"background_color": "rgb(200, 200, 200)",
"theme-color": "rgb(200, 200, 200)",
"display": "fullscreen",
"icons": [
{
"src": "/images/maskable-icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/images/maskable-icon.png",
"sizes": "192x192",
"type": "image/png"
}
],
"id": "pwa-bp"
}
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions simple
Submodule simple added at abd145

0 comments on commit c0e7c48

Please sign in to comment.