Skip to content

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
linfindel authored Jul 19, 2024
2 parents baab734 + d92691d commit 7293649
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<body class="absolute-centre">
<div class="card column">
<div class="text-center">
<h1 style="font-size: 5rem;" class="material-symbols-rounded">raven</h1>
<h1 style="font-size: 5rem;" class="material-symbols-rounded" translate="no">raven</h1>
<h1>Carrier Pigeon</h1>
<p id="desc">Send files with plaintext</p>
</div>

<div class="row-flat">
<button onclick="location.href = 'send.html'">
<span class="material-symbols-rounded">send</span>
<span class="material-symbols-rounded" translate="no">send</span>
Send
</button>

<button onclick="location.href = 'receive.html'">
<span class="material-symbols-rounded">download</span>
<span class="material-symbols-rounded" translate="no">download</span>
Receive
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion receive.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<div id="download-card" class="card-subtle-flat-top column" style="width: calc(100% - 5rem);">
<button id="download-button" class="button-subtle" inert>
<span id="download-icon" class="material-symbols-rounded">download</span>
<span id="download-icon" class="material-symbols-rounded" translate="no">download</span>
<span id="download-text">Download file</span>
</button>
</div>
Expand Down
2 changes: 2 additions & 0 deletions receive.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ function download(string) {

document.getElementById("download-icon").innerText = "downloading";
document.getElementById("download-text").innerText = "Downloading...";

location.href = '.';
}
}
10 changes: 5 additions & 5 deletions send.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<link rel="stylesheet" href="https://linfindel.github.io/nadircss/nadir.css">
</head>
<body class="absolute-centre column-flat">
<div id="upload-card" class="card-flat-bottom column" style="width: calc(100% - 5rem);">
<button id="upload-button" onclick="upload()">
<span id="upload-icon" class="material-symbols-rounded">upload</span>
<span id="upload-text">Upload file</span>
<div id="open-card" class="card-flat-bottom column" style="width: calc(100% - 5rem);">
<button id="open-button" onclick="openFile()">
<span id="open-icon" class="material-symbols-rounded" translate="no">folder_open</span>
<span id="open-text">Open file</span>
</button>
</div>

<div id="copy-card" class="card-subtle-flat-top column" style="width: calc(100% - 5rem);">
<button id="copy-button" class="button-subtle" inert>
<span id="copy-icon" class="material-symbols-rounded">content_copy</span>
<span id="copy-icon" class="material-symbols-rounded" translate="no">content_copy</span>
<span id="copy-text">Copy text</span>
</button>
</div>
Expand Down
14 changes: 7 additions & 7 deletions send.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function upload() {
function openFile() {
let input = document.createElement('input');
input.type = 'file';

Expand All @@ -17,14 +17,14 @@ function upload() {
}

function success(string) {
document.getElementById("upload-card").classList.remove("card-flat-bottom");
document.getElementById("upload-card").classList.add("card-success-flat-bottom");
document.getElementById("open-card").classList.remove("card-flat-bottom");
document.getElementById("open-card").classList.add("card-success-flat-bottom");

document.getElementById("upload-button").classList.add("button-success");
document.getElementById("upload-button").inert = "true";
document.getElementById("open-button").classList.add("button-success");
document.getElementById("open-button").inert = "true";

document.getElementById("upload-icon").innerText = "check";
document.getElementById("upload-text").innerText = "File uploaded";
document.getElementById("open-icon").innerText = "check";
document.getElementById("open-text").innerText = "File opened";

document.getElementById("copy-card").classList.remove("card-subtle-flat-top");
document.getElementById("copy-card").classList.add("card-flat-top");
Expand Down

0 comments on commit 7293649

Please sign in to comment.