Add files via upload

This commit is contained in:
Iefan 2023-02-23 00:54:02 +05:30 committed by GitHub
parent c5cb3cd2e1
commit e0483fdb38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 552 additions and 0 deletions

193
index.html Normal file
View File

@ -0,0 +1,193 @@
<!DOCTYPE html>
<html data-theme="light" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Primary Meta Tags -->
<title>Nostryfied</title>
<meta name="title" content="Nostr broadcast" />
<meta
name="description"
content="Fetch, backup and broadcast your Nostr events" />
<!-- Favicon -->
<link
rel="shortcut icon"
href="https://nostr-utils.pages.dev/img/broadcast.png"
type="image/x-icon" />
<!-- CSS -->
<link rel="stylesheet" href="style.css" />
<!-- Lightning -->
<meta name="lightning" content="bordalix@getalby.com" />
<!-- PWA -->
<meta name="theme-color" content="#ffffff" />
<link
rel="apple-touch-icon"
href="https://nostr-utils.pages.dev/img/broadcast.png" />
</head>
<body>
<main class="container">
<div class="header-space">
<h1>Welcome to Nostryfied</h1>
</div>
<h2><b>Nostryfied</b> offers an <b>Broadcast & Export Service</b> that allows you to <b>Download a
Copy of your Data</b> & when you use this service, all of your data will also be <b>Broadcasted to Major Relays</b>
on the network. <br><br>This design ensures that the data is <b> Widely Distributed</b>
and makes it more <b>Resistant to Censorship.</b>
</h2>
<div>
<form>
<div>
<form>
<div class="space-between">
<p>
<input
type="text"
id="pubkey"
name="pubkey"
onchange="pubkeyOnChange()"
placeholder="Public key (npub or hex)"
style="width: 180px"
required />
</p>
</div>
</form>
</div>
<style>
#pubkey {
width: 600px; /* change width value */
font-size: 16px;
padding: 5px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
max-width: 100%;
margin: 0 auto;
display: block;
}
#pubkey::placeholder {
color: #999;
}
</style>
<p>
<button
id="fetch-and-broadcast"
onclick="fetchAndBroadcast(); return false;">
Backup & Broadcast
</button>
<button
id="get-from-extension"
onclick="getFromExtension(); return false;"
style="display: none">
Get from extension
</button>
</p>
</div>
</form>
</div>
<div class="box">
<div class="box-content">
<p id="fetching-status"></p>
<p style="padding-top: 2px">
<progress
type="range"
id="fetching-progress"
name="fetching-progress"
min="0"
max="20"
value="0"
style="visibility: hidden" />
</p>
</div>
<div class="box-content">
<p id="file-download"></p>
<p id="events-found"></p>
</div>
<div class="box-content">
<p id="broadcasting-status"></p>
<p style="padding-top: 2px">
<progress
type="range"
id="broadcasting-progress"
name="broadcasting-progress"
min="0"
max="20"
value="0"
style="visibility: hidden" />
</p>
</div>
</div>
<div class="wrapper">
<div class="divider div-transparent"></div>
</div>
<p>
<a href="https://formfaca.de/sm/t5B7tbyRB"
>Auto Backup (beta)</a
>
</p>
<div class="wrapper">
<div class="divider div-transparent"></div>
<h4><b>Why you should Use this backup Servive?</b></h1>
</div>
<h2>
Have you been using the new social network Nostr
that's <b>free, open, and not controlled</b> by the likes of Big Tech?
If so, you might be wondering where your <b>data is stored and
how you can get a copy of it.</b> Nostr is designed
with a <b>decentralized architecture</b> that stores your data on <b>multiple servers,</b>
making it more difficult for any one entity to control or access it. <br><br>
<b>Nostryfied</b> provides an <b>Export & Broadcast service</b> that allows you to <b>download a copy of your data,
& Broadcast it to all the major relays</b> although please note that this service is not a complete backup and might not
include all of your data.
</h4>
<p>
<a href="https://snort.social/p/npub1cmmswlckn82se7f2jeftl6ll4szlc6zzh8hrjyyfm9vm3t2afr7svqlr6f" class="linkbutton">Founder</a>
<a href="https://snort.social/p/npub1ctpqas992k2ewy72f3qycnfveq8xewgx7kmyy9c8qcf2pjhzn33qauqp94" class="linkbutton">Support</a>
</p>
</div>
<div class="wrapper">
<div class="divider div-transparent"></div>
<h4><b>What is Nostr? How to get started</b></h1>
</div>
<h2>
<b>Notes and Other Stuff Transmitted by Relays</b> Nostr is a <b>relay-based network</b> that broadcasts your messages to multiple servers.
This design helps to make the network more <b>resistant to censorship and also ensures
that the network is distributed</b>, providing a higher level of <b>availability and reliability.</b> <br><br>
<b>NOSTR Lightning integrating</b> By integrating Bitcoin and Lightning into NOSTR, not only do users
<b>unlock a decentralized way to transact funds,</b> but relays are also given a way to <b>monetize or control
for denial-of-service (DOS) spam attacks.</b>
</h2>
<p>
<a href="https://nostr-resources.com/" class="linkbutton">Resources</a>&nbsp;&nbsp;
<a href="https://www.austrich.net/nostr/" class="linkbutton">Nostr Tools</a>
</p>
</div>
<footer>
<h5>
<p>Please note that our data export service is a best-effort service and not
a complete backup. While we do our best to ensure that all data is included
in the export, we cannot guarantee that all data will be exported."</p>
</h4>
<p>
<a href="https://nostr-utils.pages.dev"
>learn more</a
>
</p>
</footer>
</main>
<script src="https://bundle.run/buffer@6.0.3"></script>
<script src="https://bundle.run/bech32@2.0.0"></script>
<script src="https://nostr-utils.pages.dev/js/jquery-3.6.2.min.js"></script>
<script src="https://nostr-utils.pages.dev/js/nostr-utils.js"></script>
<script src="js/relays.js"></script>
<script src="js/nostr-broadcast.js"></script>
</body>
</html>

359
style.css Normal file
View File

@ -0,0 +1,359 @@
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Text:wght@400;700&display=swap');
:root{
--color: #333;
}
body {
font-family: 'Red Hat Text', sans-serif;
}
.container {
text-align: center;
color: var(--color);
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-size: cover;
background-position: center;
/* this is where the magic happens: */
background-attachment: fixed;
}
h1 {font-family: Arial,Helvetica Neue,Helvetica,sans-serif;
line-height: 1.5;
font-weight: 700;
font-size: 2rem;
}
.header-space {
display: flex;
justify-content: center;
margin-top: 2px;
font-family: "Courier", monospace;
margin-bottom: 2px;
}
.box {
background-color: #f2f2f2;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
progress {
-webkit-appearance: none;
appearance: none;
height: 10px;
background-color: #eee;
border-radius: 10px;
overflow: hidden;
}
progress::-webkit-progress-bar {
background-color: #eee;
border-radius: 10px;
}
progress::-webkit-progress-value {
background-color: #007bff;
border-radius: 10px;
animation: loading 2s ease-out infinite;
}
@keyframes loading {
0% {
width: 0%;
}
100% {
width: 100%;
}
}
progress {
-webkit-appearance: none;
appearance: none;
height: 10px;
background-color: #eee;
border-radius: 10px;
overflow: hidden;
}
progress::-webkit-progress-bar {
background-color: #eee;
border-radius: 10px;
}
progress::-webkit-progress-value {
background-color: #007bff;
border-radius: 10px;
}
progress[value="25"]::-webkit-progress-value {
background-color: #ffc107;
}
progress[value="50"]::-webkit-progress-value {
background-color: #28a745;
}
progress[value="75"]::-webkit-progress-value {
background-color: #dc3545;
}
p {
max-width: 52ch;
line-height: 1.5;
padding: .3em;
margin-top: 5px;
margin: 0;
}
a {
display: inline-block;
padding: .5em 1.5em;
background-color: var(--color);
color: white;
text-decoration: none;
text-transform: uppercase;
border-radius: 0.3em;
font-weight: 700;
letter-spacing: .5px;
font-size: .875rem;
text-align: center;
}
.blank,
.other {
width: 100%;
min-height: 60vh;
background-color: var(--color);
}
.second {
background-image:url(https://images.unsplash.com/photo-1514496959998-c01c40915c5f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80);
background-attachment: fixed;
height: 1200px;
}
.second {
background-image:url(https://images.unsplash.com/photo-1514496959998-c01c40915c5f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80);
background-attachment: fixed;
height: 1200px;
}
.space-between {
display: flex;
justify-content: center;
margin-bottom: 10px;
}
h2 {
font-family: Arial,Helvetica Neue,Helvetica,sans-serif;
font-size: 1em;
line-height: 1.5;
font-weight: 500; /* Set font-weight to lighter */
margin-bottom: 5px;
width: 50%; /* set the width of h2 element to 50% of its parent's width */
margin: 10 auto; /* set the top and bottom margin to 0, and left and right margin to auto */
word-wrap: break-word;
padding: 10px;
}
@media screen and (max-width: 1080px) { /* apply this style only when the screen width is less than or equal to 600px */
h2 {
width: 70%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
@media screen and (max-width: 800px) { /* apply this style only when the screen width is less than or equal to 600px */
h2 {
width: 90%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
@media screen and (max-width: 600px) { /* apply this style only when the screen width is less than or equal to 600px */
h2 {
width: 90%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
#pubkey {
width: 600px !important;
}
@media screen and (max-width: 1080px) {
#pubkey {
width: 600px !important;
}
}
@media screen and (max-width: 800px) {
#pubkey {
width: 500px !important;
}
}
@media screen and (max-width: 600px) {
#pubkey {
width: 400px !important;
}
}
main div p img {
position: relative;
top: 6px;
height: 1rem;
margin-left: 0.5rem;
}
details {
background-color: rgba(242, 241, 238, 0.3);
border: 1px solid #ccc;
padding: 0.5rem;
margin: 1rem 0;
}
p,
li {
line-height: 1.33;
margin-bottom: 1rem;
}
ul {
margin-left: -1rem;
}
.box {
border: 1px solid #ccc;
padding: 0 0.5rem;
margin: 1rem 0;
}
.box-content {
display: flex;
justify-content: center;
margin-top: 10px;
font-family: Arial,Helvetica Neue,Helvetica,sans-serif;
}
button {
appearance: none;
background-color: #087bee;
border: 1px solid rgba(27, 31, 35, 0.15);
border-radius: 6px;
box-shadow: rgba(27, 31, 35, 0.04) 0 1px 0, rgba(255, 255, 255, 0.25) 0 1px 0 inset;
box-sizing: border-box;
color: #f9fafb;
cursor: pointer;
display: inline-block;
font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
font-size: 14px;
font-weight: 500;
line-height: 20px;
list-style: none;
padding: 6px 16px;
position: relative;
transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
vertical-align: middle;
white-space: nowrap;
word-wrap: break-word;
}
.gray {
background-color: rgba(183, 177, 168, 0.3);
}
.red {
background-color: rgba(229, 60, 8, 0.3);
}
.box button {
background-color: rgba(0, 0, 0, 0.813);
color: rgb(255, 255, 255);
}
.wrapper
{
padding-bottom: 20px;
}
.divider
{
position: relative;
margin-top: 5px;
height: 5px;
margin-bottom: 5px;
}
.div-transparent:before
{
content: "";
position: absolute;
top: 0;
left: 5%;
right: 5%;
width: 90%;
height: 1px;
background-image: linear-gradient(to right, transparent, rgb(48,49,51), transparent);}
h4 {
font-family: Arial,Helvetica Neue,Helvetica,sans-serif;
line-height: 1.5;
font-weight: 450;
font-size: 1.4rem;
}
h5 {
margin: 0px;
padding: 10px 10px 10px 10px;
text-align: center;
display: inline-block;
font-weight: 600;
}
@media screen and (max-width: 1080px) { /* apply this style only when the screen width is less than or equal to 600px */
h5 {
width: 70%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
@media screen and (max-width: 800px) { /* apply this style only when the screen width is less than or equal to 600px */
h5 {
width: 90%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
@media screen and (max-width: 600px) { /* apply this style only when the screen width is less than or equal to 600px */
h5 {
width: 90%; /* set the width of h2 element to 100% of its parent's width */
margin: 0; /* set all margins to 0 */
}
}
footer p {
margin: 0px;
padding: 10px 10px 10px 10px;
text-align: center;
display: inline-block;;
}