echo ${FILES} | xargs --replace={} --delimiter=" " echo "${1}"
}
-echo "HTTP/1.1 200 OK"
-echo "Content-type: text/html"
-echo "
+PAGE="
<!DOCTYPE html>
<html>
<head>
<title>GdriveProxy</title>
+ <meta name='viewport' content='width=device-width'>
<style>
body {
- border: ridge 5px;
- max-width: max-content;
- }
- .container {
- background-color: PowderBlue;
- padding: 7px;
+ background-color: #7fa99b;
}
form {
+ width: min(400px, 100%);
+ }
+ fieldset {
+ background-color: #f1d18a;
display: flex;
flex-direction: column;
row-gap: 10px;
}
- button {
- align-self: end;
- }
</style>
</head>
<body>
- <div class='container'>
- <h3>Upload</h3>
- <form action='/upload' method='post' enctype='multipart/form-data'>
+ <form action='/upload' method='post' enctype='multipart/form-data'>
+ <fieldset>
+ <legend>Upload</legend>
<input type='file' name='file' required />
<input type='text' name='name' pattern='[a-zA-Z0-9_\/]*' required
placeholder='Name on drive' />
<button type='submit'>Upload</button>
- </form>
+ </fieldset>
+ </form>
- <hr />
-
- <h3>Download</h3>
- <form action='/download'>
+ <form action='/download'>
+ <fieldset>
+ <legend>Download</legend>
<select id='name' name='name'>
$(format_files "<option value='{}'>{}</option>")
</select>
<button type='submit'>Download</button>
- </form>
-
- <hr />
+ </fieldset>
+ </form>
- <h3>Delete</h3>
- <form action='/delete'>
+ <form action='/delete'>
+ <fieldset>
+ <legend>Delete</legend>
<select id='name' name='name'>
$(format_files "<option value='{}'>{}</option>")
</select>
<button type='submit'>Delete</button>
- </form>
- </div>
+ </fieldset>
+ </form>
</body>
</html>"
+
+echo "HTTP/1.1 200 OK"
+echo "Content-type: text/html"
+echo "${PAGE}" | sed 's/^[ \t]*//g'