Skip to content

Commit

Permalink
Deploying to gh-pages from @ f6b3a77 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
webraa committed Dec 30, 2023
0 parents commit d3ce960
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions domik.js

Large diffs are not rendered by default.

Binary file added domik_bg.wasm
Binary file not shown.
6 changes: 6 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype html><meta content="text/html; charset=utf-8" http-equiv=Content-Type><meta content="width=device-width,initial-scale=1.0,user-scalable=no" name=viewport><title>egui WebApp Template</title><script type=module>
import init, * as bindings from '/domik/domik.js';
init('/domik/domik_bg.wasm');
window.wasmBindings = bindings;

</script><base href=/domik/><link href=manifest.json rel=manifest><style>html{touch-action:manipulation}body{background:#909090}@media (prefers-color-scheme: dark){body{background:#404040}}body,html{overflow:hidden;margin:0!important;padding:0!important;height:100%;width:100%}canvas{margin-right:auto;margin-left:auto;display:block;position:absolute;top:0%;left:50%;transform:translate(-50%,0%)}.centered{margin-right:auto;margin-left:auto;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#f0f0f0;font-size:24px;font-family:Ubuntu-Light,Helvetica,sans-serif;text-align:center}.lds-dual-ring{display:inline-block;width:24px;height:24px}.lds-dual-ring:after {content:" ";display:block;width:24px;height:24px;margin:0;border-radius:50%;border:3px solid #fff;border-color:#fff;animation:lds-dual-ring 1.2s linear infinite}@keyframes lds-dual-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}</style><link as=fetch crossorigin href=/domik/domik_bg.wasm integrity=sha384-B8JhBqjbvrtxsD_OLLwR9hNfV8CEACNZDGyaC2WXP5wuKStnIlTUb-7kAJxtdfM2 rel=preload type=application/wasm><link crossorigin href=/domik/domik.js integrity=sha384-l9erIhsEvRIvASJRXlxE5zBtqC-pvFV6jmSYr4WA6i5YqJM69f2L9s8sb9bE_Atj rel=modulepreload></head><body><p>..egui webapp..</p><canvas id=raa_canvas_id></canvas><script>if('serviceWorker' in navigator&&window.location.hash!=="#dev"){window.addEventListener('load',function(){navigator.serviceWorker.register('sw.js')})}</script></body></html>
12 changes: 12 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "DoMiK",
"short_name": "domik-pwa",


"lang": "en-US",
"id": "/index.html",
"start_url": "./index.html",
"display": "standalone",
"background_color": "white",
"theme_color": "white"
}
26 changes: 26 additions & 0 deletions sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var cacheName = 'domik-pwa';
var filesToCache = [
'./',
'./index.html',
'./domik.js',
'./domik_bg.wasm',
];

/* Start the service worker and cache all of the app's content */
self.addEventListener('install', function (e) {
e.waitUntil(
caches.open(cacheName).then(function (cache) {
return cache.addAll(filesToCache);
})
);
});


/* Serve cached content when offline */
self.addEventListener('fetch', function (e) {
e.respondWith(
caches.match(e.request).then(function (response) {
return response || fetch(e.request);
})
);
});

0 comments on commit d3ce960

Please sign in to comment.