add 404 page for incorrect download codes

This commit is contained in:
xenofem 2022-05-03 18:31:50 -04:00
parent 106c99d398
commit 9d87934cf4
8 changed files with 92 additions and 36 deletions

53
static/css/states.css Normal file
View file

@ -0,0 +1,53 @@
/**
* List of classes the body can have:
*
* landing: haven't entered upload password yet
* no_files: no files are selected
* selecting: upload hasn't started yet
* uploading: upload is in progress
* completed: upload is done
* error: an error has occurred
*/
.section_heading { display: none; }
body.landing .section_heading { display: revert; }
#download { display: none; }
body.landing #download { display: revert; }
body.noscript #upload { display: none; }
#message { display: none; }
body.completed #message {
display: revert;
color: #060;
border-color: #0a0;
}
body.error #message {
display: revert;
color: #d00;
border-color: #f24;
}
#upload_password_form { display: none; }
body.landing #upload_password_form { display: revert; }
body.landing #upload_controls { display: none; }
#upload_settings { display: none; }
body.selecting #upload_settings { display: revert; }
body.no_files #upload_settings { display: none; }
body.selecting #download_code_container { display: none; }
#progress_container { display: none; }
body.uploading #progress_container { display: revert; }
body.no_files #file_list { display: none; }
body.completed #file_list { background-color: #7af; }
.delete_button { display: none; }
body.selecting .delete_button { display: revert; }
#file_input_container { display: none; }
body.selecting #file_input_container { display: revert; }

172
static/css/transbeam.css Normal file
View file

@ -0,0 +1,172 @@
body {
text-align: center;
font-family: sans-serif;
max-width: 512px;
margin: 0.5em auto;
padding: 0 1em;
}
#header h1 {
margin-top: 5px;
color: black;
}
#header a {
text-decoration: none;
}
#message {
border: 1px solid;
border-radius: 4px;
padding: 10px;
width: fit-content;
margin: 10px auto;
}
#progress_container {
margin: 10px auto;
}
#progress_bar {
height: 20px;
border-radius: 10px;
border: 1px solid #48f;
background-image: linear-gradient(0deg, #27f, #27f);
background-repeat: no-repeat;
background-size: 0;
}
#download_code_container {
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
cursor: pointer;
width: fit-content;
margin: 10px auto;
position: relative;
}
#download_code_container:hover {
border-color: #777;
}
#download_code_main {
display: flex;
align-items: center;
gap: 10px;
}
.copy_button {
width: 18px;
height: 18px;
background-color: #333;
mask-image: url("images/feather-icons/copy.svg");
mask-size: contain;
mask-repeat: no-repeat;
}
#download_code_container:hover .copy_button {
background-color: #000;
}
#copied_message {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
height: fit-content;
display: none;
}
#download_code_container.copied #copied_message {
display: revert;
}
#download_code_container.copied #download_code_main {
visibility: hidden;
}
table {
border-collapse: collapse;
margin: 20px auto;
}
tr {
background-image: linear-gradient(0deg, #7af, #7af);
background-repeat: no-repeat;
background-size: 0;
}
tr + tr td {
border-top: 1px solid #ddd;
}
td {
padding: 10px;
}
.delete_button {
background-color: #888;
mask-image: url("images/feather-icons/x.svg");
mask-size: contain;
mask-repeat: no-repeat;
mask-position: center;
padding-left: 15px;
padding-right: 15px;
cursor: pointer;
}
.delete_button:hover {
background-color: #f00;
}
td.file_size {
text-align: right;
}
td.file_name {
text-align: left;
}
input[type="file"] {
display: none;
}
button, .fake_button, input[type="submit"] {
font-size: 18px;
color: #000;
background-color: #ccc;
border: 1px solid #bbb;
border-radius: 4px;
padding: 6px 12px;
cursor: pointer;
}
button:hover, .fake_button:hover, input[type="submit"]:hover {
background-color: #aaa;
}
button:disabled, input:disabled + .fake_button, input[type="submit"]:disabled {
color: #666;
background-color: #eee;
border-color: #ddd;
cursor: not-allowed;
}
#lifetime_container {
margin-top: 10px;
}
input[type="text"], input[type="password"] {
font-size: 18px;
margin-bottom: 10px;
}
.section {
margin: 30px auto;
}
#footer h5 {
margin: 5px auto;
}