ncounter.git

git clone https://git.crispbyte.dev/ncounter.git

commit
0feedf3
parent
3565cd5
author
CheddarCrisp
date
2020-02-06 20:45:09 +0100 CET
Fix for sw.js
Style fixes
6 files changed,  +42, -3
M package-lock.json
+6, -0
 1@@ -4730,6 +4730,12 @@
 2       "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
 3       "dev": true
 4     },
 5+    "reset-css": {
 6+      "version": "5.0.1",
 7+      "resolved": "https://registry.npmjs.org/reset-css/-/reset-css-5.0.1.tgz",
 8+      "integrity": "sha512-VyuJdNFfp5x/W6e5wauJM59C02Vs0P22sxzZGhQMPaqu/NGTeFxlBFOOw3eq9vQd19gIDdZp7zi89ylyKOJ33Q==",
 9+      "dev": true
10+    },
11     "resolve-cwd": {
12       "version": "2.0.0",
13       "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
M package.json
+1, -0
1@@ -17,6 +17,7 @@
2     "google-fonts-webpack-plugin": "^0.4.4",
3     "html-webpack-plugin": "^3.2.0",
4     "idb-keyval": "^3.2.0",
5+    "reset-css": "^5.0.1",
6     "serviceworker-webpack-plugin": "^1.0.1",
7     "style-loader": "^1.1.3",
8     "svelte": "^3.4.1",
M src/index.js
+2, -0
1@@ -1,5 +1,7 @@
2 import App from './ncounter/App.svelte';
3 import runtime from 'serviceworker-webpack-plugin/lib/runtime';
4+import 'reset-css/reset.css';
5+import './ncounter/site.css';
6 
7 if ('serviceWorker' in navigator) {
8     const registration = runtime.register();
M src/ncounter/App.svelte
+5, -2
 1@@ -19,7 +19,6 @@
 2 <script>
 3 import Counter from './Counter.svelte';
 4 import { counters } from './db.js';
 5-import './site.css';
 6 
 7 let showAddDialog = false;
 8 
 9@@ -54,6 +53,10 @@ function add(){
10 </script>
11 <style>
12     .add {
13+        display: flex;
14+        align-items: center;
15+        justify-content: center;
16+
17         position: fixed;
18         bottom: 15px;
19         right: 15px;
20@@ -87,6 +90,6 @@ function add(){
21     }
22 
23     .app {
24-        margin-bottom: 60px;
25+        padding: 5px 5px 60px 5px;
26     }
27 </style>
M src/ncounter/site.css
+27, -1
 1@@ -1,10 +1,31 @@
 2+/* Box sizing reset */
 3+html {
 4+    box-sizing: border-box;
 5+}
 6+
 7+*, *:before, *:after {
 8+    box-sizing: inherit;
 9+}
10+
11+/* Screen fill */
12+html, body {
13+    width: 100%;
14+    height: 100%;
15+}
16+
17 body {
18-    font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
19+    margin: 0;
20+}
21+
22+/* Fonts */
23+body {
24+    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
25 }
26 
27 button {
28     background: 0;
29     border: 0;
30+    height: 36px;
31 }
32 
33 .dialog {
34@@ -37,4 +58,9 @@ button {
35 
36     display: flex;
37     flex-wrap: wrap;
38+}
39+
40+input[type="text"],
41+input[type="number"] {
42+    font-size: 16px;
43 }
M webpack.common.js
+1, -0
1@@ -20,6 +20,7 @@ module.exports = {
2         }),
3         new ServiceWorkerWebpackPlugin({
4             entry: path.join(__dirname, 'src/sw.js'),
5+            publicPath: './'
6         })
7     ],
8     output: {