@yz-social/civildefense.io 4.5.29 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/index.js +1 -0
  2. package/package.json +4 -2
  3. package/public/about/add-topic-autocomplete.png +0 -0
  4. package/public/about/add-topic.png +0 -0
  5. package/public/about/can-happen.jpg +0 -0
  6. package/public/about/en.html +72 -30
  7. package/public/about/identity.html +48 -0
  8. package/public/about/index.html +1 -1
  9. package/public/about/join.webp +0 -0
  10. package/public/about/notification.html +71 -0
  11. package/public/about/posters.jpeg +0 -0
  12. package/public/about/pwa.html +61 -0
  13. package/public/about/style.css +15 -2
  14. package/public/about/template.html +28 -0
  15. package/public/about/topics.png +0 -0
  16. package/public/about/train-radio-button.png +0 -0
  17. package/public/about/train.png +0 -0
  18. package/public/about/ukraine-fires.jpeg +0 -0
  19. package/public/about/ukraine-fires.png +0 -0
  20. package/public/index.html +17 -9
  21. package/public/javascripts/alert.js +203 -119
  22. package/public/javascripts/browser-push.js +56 -0
  23. package/public/javascripts/conversation.js +6 -3
  24. package/public/javascripts/display.js +2 -1
  25. package/public/javascripts/hashtags.js +3 -1
  26. package/public/javascripts/main.js +102 -64
  27. package/public/javascripts/map.js +13 -6
  28. package/public/javascripts/p2pWebNetwork.js +37 -4
  29. package/public/javascripts/protocol.js +3 -3
  30. package/public/javascripts/pubsub.js +107 -98
  31. package/public/javascripts/push.js +28 -0
  32. package/public/javascripts/s2.js +24 -2
  33. package/public/javascripts/service-manager.js +11 -7
  34. package/public/javascripts/store-memory.js +74 -0
  35. package/public/javascripts/store-redis.js +101 -0
  36. package/public/javascripts/translations.js +6 -6
  37. package/public/service-worker.js +50 -5
  38. package/public/stylesheets/style.css +50 -17
  39. package/server/websocket.js +12 -5
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { P2PWebNetwork } from "./public/javascripts/p2pWebNetwork.js";
2
+ export { dht } from './public/javascripts/protocol.js';
2
3
  export { topicRegion, agentTopic, alertTopic, canonicalTag } from "./public/javascripts/versions.js";
3
4
  export { getContainingCells } from "./public/javascripts/s2.js";
4
5
  export { location } from "./server/getLocation.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yz-social/civildefense.io",
3
3
  "description": "Browser app to safely share live sightings on a map.",
4
- "version": "4.5.29",
4
+ "version": "5.0.3",
5
5
  "keywords": [
6
6
  "map",
7
7
  "browser",
@@ -20,7 +20,7 @@
20
20
  ".": "./index.js"
21
21
  },
22
22
  "dependencies": {
23
- "@axona/protocol": "github:axona-net/axona-protocol#semver:^4.62.2",
23
+ "@axona/protocol": "github:axona-net/axona-protocol#semver:^4.84.0",
24
24
  "cors": "^2.8.6",
25
25
  "express": "^4.22.1",
26
26
  "leaflet": "^1.9.4",
@@ -28,8 +28,10 @@
28
28
  "morgan": "^1.10.1",
29
29
  "node-datachannel": "^0.32.3",
30
30
  "pica": "^9.0.1",
31
+ "redis": "^6.2.1",
31
32
  "s2js": "^1.44.0",
32
33
  "uuid": "^14.0.0",
34
+ "web-push": "^3.6.7",
33
35
  "ws": "^8.21.3",
34
36
  "yargs": "^18.0.0"
35
37
  },
Binary file
Binary file
@@ -16,10 +16,10 @@
16
16
  <header class="hero">
17
17
  <div class="hero-inner">
18
18
  <img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo">
19
- <h1>The Civil Defense <span>App</span></h1>
20
- <!-- <div class="hero-divider"></div> -->
21
- <!-- <p class="hero-tagline">Realtime crowdmapping that is resistant to tracking, censorship, and takedown</p> -->
19
+ <h1>The Civil Defense <a href="/" target="civildefense"><span>App</span></a></h1>
22
20
  </div>
21
+
22
+
23
23
  <div class="language-selector">
24
24
  <label for="language">Language:</label>
25
25
  <select id="language" name="language" onchange="location = this.value;">
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
 
44
44
  <div class="carousel-slide">
45
- <a href="/?tags=%F0%9F%A9%B7%20community%20%20DEMO,%F0%9F%91%81%EF%B8%8F%20observer%20DEMO,%F0%9F%A7%B0%20utility%20DEMO&lat=44.942473404432015&lng=-93.26251878766926&z=14" target="civildefense"><img src="streets-of-minneapolis.jpg" alt="Map view showing alert markers scattered across a neighborhood"></a>
45
+ <a href="/?tags=%F0%9F%A9%B7%20community%20DEMO,%F0%9F%91%81%EF%B8%8F%20observer%20DEMO,%F0%9F%A7%B0%20utility%20DEMO&lat=44.942473404432015&lng=-93.26251878766926&z=14" target="civildefense"><img src="streets-of-minneapolis.jpg" alt="Map view showing alert markers scattered across a neighborhood"></a>
46
46
  <div class="carousel-caption">Like Twitter, you create the topics.<br>But you only get alerts based on your current map.<br>Like Snapchat, alerts fade away after 24 hours.</div>
47
47
  </div>
48
48
 
@@ -54,6 +54,14 @@
54
54
  </div>
55
55
  </div>
56
56
 
57
+ <div class="carousel-slide">
58
+ <a href="/?tags=%F0%9F%94%A5%20fire,%F0%9F%86%98%20help&lat=48.15529671483125&lng=31.630317514459872&z=6" target="civildefense"><img src="ukraine-fires.jpeg" alt="Map of Ukraine with NASA FIRMS data"></a>
59
+ <div class="carousel-caption">
60
+ <span>Civil Defense can integrate massive amounts of authoritative and crowd-reported data. Here people can report and discuss fires alongside the last 24 hours of NASA satellite data on wildfires, polution fires, and war.</span>
61
+ <a href="/?tags=%F0%9F%94%A5%20fire,%F0%9F%86%98%20help&lat=48.15529671483125&lng=31.630317514459872&z=6" target="civildefense">Show me!</a>
62
+ </div>
63
+ </div>
64
+
57
65
  <div class="carousel-slide">
58
66
  <a href="/?tags=%F0%9F%8E%BC%20classical,%F0%9F%8E%A7%20edm,%F0%9F%8E%A4%20hiphop,%F0%9F%8E%99%EF%B8%8F%20news,%F0%9F%8E%B5%20pop&lat=47.51951505778901&lng=1.6779639902073742&z=6" target="civildefense"><img src="radio-europe.jpg" alt="Map of Western Europe with playable streaming radio station markers"></a>
59
67
  <div class="carousel-caption">
@@ -90,66 +98,100 @@
90
98
  <!-- ── CONTENT ───────────────────────────────────────────────── -->
91
99
  <main class="content-wrap">
92
100
 
93
- <h1>What You Do With It</h1>
101
+ <h1 id="do">What You Do With It</h1>
94
102
 
95
103
  <ul>
96
- <li>Warn others of danger by tapping the map.</li>
97
- <li>Add comments, photos, video, or other attachments.</li>
104
+ <li>Warn others of danger by tapping the map, creating an alert for others to see.</li>
105
+ <li>Add comments, photos, video, or other attachments by tapping on an alert.</li>
98
106
  <li>Get notified of new alerts near you or on your current map.</li>
99
107
  <li>Share to social media, text, or email.</li>
100
- <li>Discuss an alert by secure video conference. (Coming this Fall.)</li>
108
+ <!-- <li>Discuss an alert by secure video conference. (Coming this Fall.)</li> -->
101
109
  <!-- <li>Alerts disappear after 24 hours—this is not an archive or long-term storage system. (This Winter, users will be able to download tamper-evident reports for use in other systems.)</li> -->
102
110
  </ul>
103
111
 
112
+ <p>
104
113
  <a href="/?tags=%F0%9F%8E%B8%20classic%20rock,%F0%9F%8E%BC%20classical,%F0%9F%A4%A0%20country,%F0%9F%8E%B7%20jazz,%F0%9F%8E%99%EF%B8%8F%20news,%F0%9F%8E%B5%20pop&z=5&lang=en" class="launch-btn" target="civildefense">
105
114
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
106
115
  Try it!
107
116
  </a>
117
+ </p>
118
+
119
+ <h2 id="topics">Topics</h2>
120
+
121
+ <p>Control what topics are shown on the map by simply touching the topic labels to toggle them on and off.</p>
122
+
123
+ <div class="centered">
124
+ <a href="/?tags=%F0%9F%9A%82%20train&highlight=%5Blabel%3D%22%F0%9F%9A%82%20train%22%5D" target="civildefense"><img src="train.png" alt="train topic button"></a>
125
+ </div>
126
+
127
+ <p>You can add or create your own by typing them into the "add topic" box. If your text begins with an emoji, that will be used as the marker in the map.</p>
128
+
129
+ <div class="centered">
130
+ <a href="/?highlight=.newtag" target="civildefense"><img src="add-topic.png" alt="add topic box with autocomplete"></a>
131
+ </div>
132
+
133
+ <p>The red "radio button" next to a topic name indicates that it will be the initial topic for a new alert you create by touching the map. You can also change the topic of an alert you create by touching the topic name in the alert-conversation popup.</p>
134
+
135
+ <div class="centered">
136
+ <a href="/?tags=%F0%9F%9A%82%20train&highlight=%5Blabel%3D%22%F0%9F%9A%82%20train%22%5D%20md-icon-button" target="civildefense"><img src="train-radio-button.png" alt="train topic radio button"></a>
137
+ </div>
138
+
139
+ <h2 id="sharing">Sharing</h2>
140
+
141
+ <p>Every alert you make will be immediately visible to anyone with the app who is looking at that point on the map. Every reply you make will be immediately shared with anyone looking at the same alert.</p>
142
+ <p>You can use the share button to pass a link and message to those that may not yet have the app. The button appears on the map, at the top of an alert-conversation display, and next to each reply, and it shares whatever the button appears with.</p>
143
+
144
+ <div class="centered">
145
+ <a href="/?highlight=%23share" target="civildefense"><img class="button-img" src="../images/share.svg" alt="share"></a>
146
+ </div>
147
+
148
+ <h2 id="options">Options</h2>
149
+
150
+ <p>The app's "<span class="cd">CD</span>" button gives you control over <a href="notification.html">notifications</a>, <a href="identity.html">how you appear to others</a>, and <a href="pwa.html">updates</a>.</p>
151
+
152
+ <div class="hero-inner">
153
+ <a href="/?highlight=%23aboutButton" target="civildefense"><img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo"></a>
154
+ </div>
108
155
 
109
156
  <!-- <hr class="rule"> -->
110
157
 
111
- <h1>Broadcast Safely</h1>
158
+ <h1 id="broadcast">Broadcast Safely</h1>
112
159
 
113
- <h2>Resist Tracking</h2>
160
+ <h2 id="tracking">Resist Tracking</h2>
114
161
  <ul>
115
162
  <li>You cannot be identified as a person because there is no login, sign-up, or accounts. No phone number or email is used. There is no app store logging downloads. Users can choose to let others recognize them over multiple interactions — without divulging their actual identity.</li>
116
- <li>It is extremely difficult to identify your IP address or network patterns, because alerts are distributed phone-to-phone over a peer-to-peer network.</li>
117
- <li>Notifications are sent directly through the foreground app on your phone, without going through Apple or Google's messaging service. (Backgrounded app notifications available this Winter.)</li>
118
- <li>Each alert disappears everywhere on the network after 24 hours. There are no collected records of messages, comments, or requested topics, and this is not an archive or long-term storage system.</li>
163
+ <li>It is extremely difficult to identify your IP address or network patterns, because alerts are distributed phone-to-phone over a peer-to-peer network.<a href="#p2p"><sup>1</sup></a></li>
164
+ <li>Messages are signed by the sender, sent directly through the network, or through Apple or Google's messaging service without identifying the app, topic, sender, or contents.</li>
165
+ <li>Each alert disappears everywhere on the network after 24 hours. There are no collected records of messages, comments, or requested topics<a href="#p2p"><sup>1</sup></a>, and this is not an archive or long-term storage system.</li>
119
166
  </ul>
120
167
 
121
- <h2>Resist Censorship</h2>
168
+ <h2 id="censorship">Resist Censorship</h2>
122
169
  <ul>
123
170
  <li>No user can be censored because there are no accounts. No one can steal your account information because there isn't any.</li>
124
- <li>No content can be censored, there is no central organization who controls the network or has power to alter content.</li>
171
+ <li>No content can be censored, there is no central organization who controls the network or has power to alter content.<a href="#p2p"><sup>1</sup></a></li>
125
172
  </ul>
126
173
 
127
- <h2>Resist Takedown</h2>
174
+ <h2 id="takedown">Resist Takedown</h2>
128
175
  <ul>
129
176
  <li>No app store can block Civil Defense — the app is just a web page.</li>
130
177
  <li>Taking down web servers or domain names cannot block access for those who already have it, because the app caches everything it needs on first use. The <a href="https://github.com/yz-social/civildefense.io" target="yz.other" rel="noopener">open-source code</a> is available so anyone can host an alternative mirror.</li>
131
- <li>There is no back-end server or data center to take down. All alert data is entirely peer-to-peer. All mirrors share this network: a post on <a href="https://civildefense.io" target="civildefense">civildefense.io</a> appears on the mirror at <a href="https://ki1r0y.com" target="ki1r0y" rel="noopener">ki1r0y.com</a> and vice versa.</li>
132
- <li>Blocking network traffic is extremely difficult, because the low-level data is identical to video conferencing traffic.</li>
133
- <li>Civil Defense is highly resistant to Denial of Service attacks. However, it does require a working Internet, and does not by itself offer any protection against a complete Internet shutdown.</li>
178
+ <li>There is no back-end server or data center to take down. All alert data is entirely peer-to-peer. All mirrors share this network: a post on <a href="https://civildefense.io" target="civildefense">civildefense.io</a> appears on the mirror at <a href="https://ki1r0y.com" target="ki1r0y" rel="noopener">ki1r0y.com</a> and vice versa.<a href="#p2p"><sup>1</sup></a></li>
179
+ <li>Blocking network traffic is extremely difficult, because the low-level data is identical to video conferencing traffic.<a href="#p2p"><sup>1</sup></a></li>
180
+ <li>Civil Defense is highly resistant to Denial of Service attacks.<a href="#p2p"><sup>1</sup></a> However, it does require a working Internet, and does not by itself offer any protection against a complete Internet shutdown.</li>
134
181
  </ul>
135
182
  <!-- <hr class="rule"> -->
136
183
 
137
- <h1>The Bigger Picture</h1>
138
- <p>The Civil Defense runs on the <a href="https://github.com/axona-net/axona-protocol" target="yz.other" rel="noopener">Axona network</a>. Both are free and open source.</p>
184
+ <h1 id="more">The Bigger Picture</h1>
185
+ <p>The Civil Defense runs on the <a href="https://github.com/axona-net/axona-protocol" target="yz.other" rel="noopener">Axona network</a><a href="#p2p"><sup>1</sup></a>. Both are free and open source.</p>
139
186
  <p>Axona is a modern descendant of the old <a href="https://en.wikipedia.org/wiki/Peer-to-peer" target="yz.other" rel="noopener">peer-to-peer networks</a> such as <a href="https://en.wikipedia.org/wiki/Napster">Napster</a>. It has a unique self-healing routing mechanism that uses neuron learning techniques to find the best way to distribute alerts. It is analogous to <a href="https://en.wikipedia.org/wiki/Tor_(network)" target="yz.other" rel="noopener">TOR</a> (The Onion Router), but designed from the ground up to run in mobile and desktop browsers.</p>
140
187
  <p>We are also developing a comprehensive quantum-ready cryptography system that will add private-groups for Civil Defense and any software on the network. We believe there are many applications where developers, users, and the public all benefit from open software and secure, decentralized networks — without app stores, servers, or data centers. Beyond Civil Defense, we are also developing large-scale <a href="https://en.wikipedia.org/wiki/Distributed_computing" target="yz.other" rel="noopener">multiuser collaboration</a> and <a href="https://poverty-action.org/inclusive-instant-payment-systems-evidence-based-approach-design-impact" target="yz.other" rel="noopener">Inclusive Instant Payment Systems</a>.</p>
141
188
 
189
+ <hr class="rule">
190
+ <b id="p2p">1</b>: Coming in Fall, 2026
191
+ <hr class="rule">
142
192
 
143
193
  <div class="centered">
144
- <img src="serving-you.jpg" alt="Civil Defense Week poster - Serving you in time of emergency">
145
- </div>
146
-
147
- <div class="centered">
148
- <img src="prevail.jpg" alt="Cold-War Civil Defense poster - Prepare, Protect, Prevail">
149
- </div>
150
-
151
- <div class="centered">
152
- <img src="nazis.png" alt="WWII-style poster exhorting the public to use Civil Defense in case of Nazi attack.">
194
+ <img src="posters.jpeg" alt="Civil Defense posters from the 1950s">
153
195
  </div>
154
196
 
155
197
  </main>
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CivilDefense: Identity</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="style.css" />
11
+ </head>
12
+ <body>
13
+ <header class="hero">
14
+ <div class="hero-inner">
15
+ <img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo">
16
+ <h1>The <a href="index.html"><span class="about">Civil Defense</span></a> <a href="/" target="civildefense"><span>App</span></a></h1>
17
+ </div>
18
+ </header>
19
+ <main class="content-wrap">
20
+ <h1>Identity without Accounts</h1>
21
+ <p>There is no signup to use CivilDefense, and no phone number or email is asked for. Instead, each browser or <a href="pwa.html">installation</a> automatically creates a cryptographically secured random identity, and maintains it until you <a href="pwa.html#removal">remove</a> it.</p>
22
+
23
+ <h2>How Others See You</h2>
24
+
25
+ <p>When you create or reply to an <a href="index.html#do">alert</a>, the posting will be shown as "anonymous" with an automatically generated unique image.</p>
26
+ <p>If you like, you can change what will be shown for either of these by touching the "<span class="cd">CD</span>" button and suppling a different "handle" text or "avatar" image. The handle and avatar are how you choose to be recognized, do not have to be unique, and are shared with everyone.</p>
27
+
28
+ <div class="hero-inner">
29
+ <a href="/?highlight=%23aboutButton" target="civildefense"><img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo"></a>
30
+ </div>
31
+
32
+ <h2>How You See Others</h2>
33
+
34
+ <p>You may find that you want to reliably recognize some contributors over time, even if their chosen handle and avatar are not unique, or if they change their handle or avatar between postings. You can do this by touching <i>their</i> avatar image, and choosing a handle or avatar by which you will recognize them. This choice is never seen by anyone else, so feel free to label them however you need.</p>
35
+
36
+ <hr class="rule">
37
+
38
+ <div class="centered">
39
+ <img src="prevail.jpg" alt="Cold-War Civil Defense poster - Prepare, Protect, Prevail">
40
+ </div>
41
+
42
+ </main>
43
+ <footer>
44
+ <p><a href="/?lang=en" target="civildefense">civildefense.io</a> &mdash; Safe and free crowdmapping for vulnerable populations.</p>
45
+ </footer>
46
+
47
+ </body>
48
+ </html>
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <script>
5
- location = `${navigator.language.split('-')[0].toLowerCase()}.html`;
5
+ location = `${navigator.language.split('-')[0].toLowerCase()}.html${location.hash}`;
6
6
  </script>
7
7
  </head>
8
8
  </html>
Binary file
@@ -0,0 +1,71 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CivilDefense: Notifications</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="style.css" />
11
+ </head>
12
+ <body>
13
+ <header class="hero">
14
+ <div class="hero-inner">
15
+ <img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo">
16
+ <h1>The <a href="index.html"><span class="about">Civil Defense</span></a> <a href="/" target="civildefense"><span>App</span></a></h1>
17
+ </div>
18
+ </header>
19
+
20
+ <main class="content-wrap">
21
+
22
+ <h1>Notifications without a Feed</h1>
23
+
24
+ <p>When someone else drops an Alert onto the portion of the map you are watching, for a <a href="index.html#topic">topic</a> you are currently displaying, you will see it right away. You can also ask the app to send you a system notification. Touching the notification will open the alert in the app, so that you can see the conversation about it.</p>
25
+
26
+ <p>You must specifically turn this feature on, using the app's "<span class="cd">CD</span>" button. The system will then ask you if you want to enable notifications.
27
+ <ul>
28
+ <li>If you say "yes", you can then turn notifications on and off from the same place in the app.</li>
29
+ <li>If you say "no", or if you later turn off notifications in the browser or system settings, you will have to re-enable it from the browser or system settings. Notifcations on <i>Apple mobile devices</i> are only available when Civil Defense is <a href="pwa.html">installed</a>.</li>
30
+ </ul></p>
31
+
32
+ <div class="hero-inner">
33
+ <a href="/?highlight=%23aboutButton" target="civildefense"><img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo"></a>
34
+ </div>
35
+
36
+ <p>If you enable notifications, you will also see them:
37
+ <ul>
38
+ <li>If someone else drops an alert near your current position for a topic you are watching, even if you are looking someplace else on the map.</li>
39
+ <li>If someone replies to an alert that you have opened within the current map.</li>
40
+ </ul>
41
+ </p>
42
+
43
+ <h2>Privacy</h2>
44
+
45
+ <p>If the CivilDefense app is running, the notification is made entirely on the same device, without going through any other service.</p>
46
+ <p>However, mobile platforms can be quite aggressive about shutting down apps that you have opened, but which are not currently being displayed on the screen. In this case, the alert must be "pushed" (like a text message) in two steps.:
47
+ <ol>
48
+ <li>First, the CivilDefense network needs to send the message, just as it would if the app were running, but now through a "push service".
49
+ <ul>
50
+ <li>Currently, this is from civildefense.io.</li>
51
+ <li>In the <a href="index.html#broadcast">next major version</a>, this will be from the peer-to-peer network itself.
52
+ </ul>
53
+ Either way, the network encrypts the message and sends it to the push service. It is not identified to the push service as being civildefense.io, but rather with a unique key created just of your most recent Civil Defense app session.
54
+ </li>
55
+ <li>Second, the push server - either Apple or Google - pushes the message to your device. They know that you got a push message, but not the application, topic, sender, or contents.</li>
56
+ </ol>
57
+ </p>
58
+
59
+ <hr class="rule">
60
+
61
+ <div class="centered">
62
+ <img src="serving-you.jpg" alt="Civil Defense Week poster - Serving you in time of emergency">
63
+ </div>
64
+
65
+ </main>
66
+ <footer>
67
+ <p><a href="/?lang=en" target="civildefense">civildefense.io</a> &mdash; Safe and free crowdmapping for vulnerable populations.</p>
68
+ </footer>
69
+
70
+ </body>
71
+ </html>
Binary file
@@ -0,0 +1,61 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CivilDefense: Install, Update, Remove</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="style.css" />
11
+ </head>
12
+ <body>
13
+ <header class="hero">
14
+ <div class="hero-inner">
15
+ <img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo">
16
+ <h1>The <a href="index.html"><span class="about">Civil Defense</span></a> <a href="/" target="civildefense"><span>App</span></a></h1>
17
+ </div>
18
+ </header>
19
+
20
+ <main class="content-wrap">
21
+ <h1>A Real App Without an App Store</h1>
22
+ <p><a href="index.html">CivilDefense</a> is a full-featured <a href="https://en.wikipedia.org/wiki/Progressive_web_app">app in a web page</a>. However, it does not depend on any app store that can block or remove it, or track who downloaded it. You can run it directly from the <a href="/" target="civildefense">link</a>, without any installation or signup. You can also choose to install it.</p>
23
+
24
+ <h2 id="installation">Installation</h2>
25
+ <p>Installing the app makes it easy to run or <a href="#removal">remove</a> it from the home screen or dock a hurry.</p>
26
+ <p>In addition, <i>Apple mobile devices</i> allow <a href="notification.html">notifications</a> <i>only</i> from installed apps.</p>
27
+ <p>Install directly from the <a href="/" target="civildefense">app page</a> with one of these browser buttons. Note: Browser button layout changes faster than the AIs get updated!
28
+ <ul>
29
+ <li><a href="https://www.google.com/search?q=mobile+add+to+home+screen">"Add to Home Screen"</a> on <i>mobile devices</i>. Note that this button will not be visible when running inside of another app.</li>
30
+ <li><a href="https://www.google.com/search?q=safari+add+to+doc">"Add to Dock"</a> on <i>desktop Safari</i>.</li>
31
+ <li><a href="https://www.google.com/search?q=desktop+browser+install+app">"Install App"</a> on <i>other desktop browsers</i>.</li>
32
+ </ul>
33
+ </p>
34
+
35
+ <h2 id="updates">Updates</h2>
36
+ <p>Regardless of whether it is <a href="#installation">installed</a> or run from the browser, the <a href="/" target="civildefense">CivilDefense</a> app automatically keeps a local copy of itself. It periodically checks the original site for new versions, but it does not update without asking you. (You might be in the middle of something or have some other reason to stay on the old version.) The app's "<span class="cd">CD</span>" button also has a "check for updates" button to check immediately.</p>
37
+
38
+ <div class="hero-inner">
39
+ <a href="/?highlight=%23aboutButton" target="civildefense"><img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo"></a>
40
+ </div>
41
+
42
+ <h2 id="removal">Removal</h2>
43
+ <p>There are no <a href="identity.html">accounts</a>, no database of user activity and preferences, and no data centers.
44
+ Instead, the list of your current active topics and other data are kept only on your own device.
45
+ No one can see (or steal, or sell) this information without physical access to your device.</p>
46
+ <p>To remove this local data on an <i><a href="#installation">installed app</a></i>, simply delete or uninstall the app. The operating system will delete all the local data</p>
47
+ <p>To remove it from the <i>browser</i>, use the "Wipe all CivilDefense data" link under the app's "<span class="cd">CD</span>" button. On mobile Safari, Apple keeps the browser data separate from the installed-app data, and each must be removed separately. Other platforms share the data between app and browser.</p>
48
+
49
+ <hr class="rule">
50
+
51
+ <div class="centered">
52
+ <img src="nazis.png" alt="WWII-style poster exhorting the public to use Civil Defense in case of Nazi attack.">
53
+ </div>
54
+
55
+ </main>
56
+ <footer>
57
+ <p><a href="/?lang=en" target="civildefense">civildefense.io</a> &mdash; Safe and free crowdmapping for vulnerable populations.</p>
58
+ </footer>
59
+
60
+ </body>
61
+ </html>
@@ -70,6 +70,12 @@ a:hover { color: var(--red); }
70
70
  max-width: 680px;
71
71
  margin: 0 auto;
72
72
  }
73
+ .button-img { width: 80px; }
74
+ a > img {
75
+ box-shadow: 0 4px 28px rgba(255, 90, 0, 0.45);
76
+ border-radius: 18px;
77
+ border: solid thick var(--red);
78
+ }
73
79
  .hero-logo {
74
80
  width: 80px;
75
81
  height: 80px;
@@ -88,6 +94,11 @@ a:hover { color: var(--red); }
88
94
  margin-bottom: 0.75rem;
89
95
  }
90
96
  .hero h1 span { color: var(--red-light); }
97
+ .hero h1 span.about { color: var(--white); }
98
+ .cd {
99
+ color: var(--red);
100
+ font-weight: 700;
101
+ }
91
102
  .hero-tagline {
92
103
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
93
104
  color: rgba(255,255,255,0.75);
@@ -152,13 +163,15 @@ a:hover { color: var(--red); }
152
163
  font-size: 18px;
153
164
  line-height: 1.5;
154
165
  text-align: center;
155
- border-top: 2px solid var(--red);
156
166
  min-height: 3.4rem;
157
167
  display: flex;
158
168
  flex-direction: column;
159
169
  align-items: center;
160
170
  justify-content: center;
161
171
  }
172
+ video + .carousel-caption {
173
+ border-top: 2px solid var(--red);
174
+ }
162
175
  /* Prev / Next buttons */
163
176
  .carousel-btn {
164
177
  position: absolute;
@@ -245,7 +258,7 @@ a:hover { color: var(--red); }
245
258
  margin-bottom: 0.9rem;
246
259
  color: var(--body-text);
247
260
  }
248
- .content-wrap ul {
261
+ .content-wrap ul, .content-wrap ol {
249
262
  margin: 0.4rem 0 1rem 1.2rem;
250
263
  }
251
264
  .content-wrap li {
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>The Civil Defense App</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="style.css" />
11
+ </head>
12
+ <body>
13
+ <header class="hero">
14
+ <div class="hero-inner">
15
+ <img class="hero-logo" src="civil-defense.png" alt="Civil Defense Logo">
16
+ <h1>The Civil Defense <a href="index.html"><span>App</span></a></h1>
17
+ </div>
18
+ </header>
19
+ <main class="content-wrap">
20
+ <h1>Some Title</h1>
21
+ <p>Lorem ipsum</p>
22
+ </main>
23
+ <footer>
24
+ <p><a href="/?lang=en" target="civildefense">civildefense.io</a> &mdash; Safe and free crowdmapping for vulnerable populations.</p>
25
+ </footer>
26
+
27
+ </body>
28
+ </html>
Binary file
Binary file
Binary file
Binary file
package/public/index.html CHANGED
@@ -78,26 +78,31 @@
78
78
 
79
79
  <div id="aboutContainer" class="hidden">
80
80
  <div class="display-content">
81
- <h1>Civil Defense</h1>
81
+ <h1>
82
+ <a id="learnMore" href="about/index.html" target="yz.sidebar"><md-icon class="material-icons">help</md-icon></a>
83
+ <span id="titleLabel">Civil Defense</span><span id="titleHostname"></span>
84
+ </h1>
82
85
  <ul>
83
86
  <li id="aboutReport"></li>
84
87
  <li id="aboutShared"></li>
85
88
  <li id="aboutFade"></li>
86
89
  </ul>
87
- <p> <a id="learnMore" href="about/index.html" target="yz.sidebar">Learn More</a> </p>
88
- <p>
89
- <span id="aboutAnyone1"></span>
90
- <a id="aboutAnyone2" href="https://github.com/YZ-social/Yz.social" target="yz.sidebar"></a>
91
- <span id="aboutAnyone3"></span>
92
- </p>
90
+ <p> </p>
91
+ <!-- <p> -->
92
+ <!-- <span id="aboutAnyone1"></span> -->
93
+ <!-- <a id="aboutAnyone2" href="https://github.com/YZ-social/Yz.social" target="yz.sidebar"></a> -->
94
+ <!-- <span id="aboutAnyone3"></span> -->
95
+ <!-- </p> -->
93
96
  <hr>
94
97
  <div>
98
+ <a id="learnNotification" href="about/notification.html" target="yz.sidebar"><md-icon class="material-icons">help</md-icon></a>
95
99
  <label>
96
100
  <md-checkbox id="showNotifications" touch-target="wrapper"></md-checkbox>
97
101
  <span id="showNotificationsLabel"></span>
98
102
  </label>
99
103
  </div>
100
104
  <div class="handle-avatar">
105
+ <a id="learnIdentity" href="about/identity.html" target="yz.sidebar"><md-icon class="material-icons">help</md-icon></a>
101
106
  <md-outlined-text-field id="myHandle" placeholder="anonymous"></md-outlined-text-field>
102
107
  <md-outlined-icon-button id="myAvatar"></md-outlined-icon-button>
103
108
  </div>
@@ -107,12 +112,15 @@
107
112
  <md-elevated-button id="downloadUpdates" class="hidden"></md-elevated-button>
108
113
  <span id="updateStatus"></span>
109
114
  </div>
110
- <p><small>
115
+ <p class="pwa">
116
+ <a id="learnPWA" href="about/pwa.html" target="yz.sidebar"><md-icon class="material-icons">help</md-icon></a>
117
+ <small>
111
118
  <label for="scriptChooser"> <span id="version">Version</span></label>
112
119
  <span id="appVersion"></span>,
113
120
  kernel: <span id="kernelVersion"></span>.
114
121
  </small>
115
- <small><a id="wipe" href="#"></a></small></p>
122
+ <small><a id="wipe" href="#"></a></small>
123
+ </p>
116
124
  <input id="scriptChooser" type="file" accept="text/javascript"></input>
117
125
  </div>
118
126
  </div>