Restyle, topbar

This commit is contained in:
pepa65 2022-09-16 10:28:02 +07:00
parent 973cb735ab
commit 4362244f33
2 changed files with 36 additions and 30 deletions

View File

@ -14,18 +14,22 @@ function respond(){
function filename(){ function filename(){
var name = document.getElementById("name"); var name = document.getElementById("name");
name.innerHTML = document.getElementById("input").files[0].name; name.innerHTML = document.getElementById("input").files[0].name;
name.style.color = "black";
name.style.fontWeight = "normal"; name.style.fontWeight = "normal";
} }
</script> </script>
<div class="user"><p class="user">User:&nbsp;<b>'.$user.'</b></p>
<form action="check.php" method="post">
<input id="logoff" type="submit" name="logoff" value="Logoff">
</form></div>
<div class="container"> <div class="container">
<div class="incontainer"> <div class="incontainer">
<h1>Stream Upload</h1> <h1>Stream Upload</h1>
<div class="user"><p>User: <b>'.$user.'</b></p>
<form action="check.php" method="post">
<input id="logoff" type="submit" name="logoff" value="Logoff">
</form></div>
<form action="upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()"> <form action="upload.php" method="post" enctype="multipart/form-data" onsubmit="respond()">
<div class="fileinput">
<input id="input" type="file" name="file" required accept=".mp4" onchange="filename()">
<input class="abs" id="fakeinput">
<p class="abs" id="name">Click to select the video</p>
</div>
<select name="target" id="target" required title="Click to select where to stream to"> <select name="target" id="target" required title="Click to select where to stream to">
<option value="" disabled selected hidden>Streaming Destination</option> <option value="" disabled selected hidden>Streaming Destination</option>
<option value="Restream">Restream</option> <option value="Restream">Restream</option>
@ -35,11 +39,6 @@ function filename(){
<input type="text" name="streamkey" placeholder="Stream Key" required title="Enter a string of 0-9, a-z, A-Z, underscore or dash characters" pattern="[a-zA-Z0-9_-]+"> <input type="text" name="streamkey" placeholder="Stream Key" required title="Enter a string of 0-9, a-z, A-Z, underscore or dash characters" pattern="[a-zA-Z0-9_-]+">
<input type="datetime-local" name="datetime" title="Click on the date to get a popup" required> <input type="datetime-local" name="datetime" title="Click on the date to get a popup" required>
<!--input type="file" name="file" required accept=".mp4" title="Click to select a video"--> <!--input type="file" name="file" required accept=".mp4" title="Click to select a video"-->
<div class="fileinput">
<input id="input" type="file" name="file" required accept=".mp4" onchange="filename()">
<input class="abs">
<p class="abs" id="name">Click to select the video</p>
</div>
<input type="email" name="email" placeholder="Email to notify" title="Not required"> <input type="email" name="email" placeholder="Email to notify" title="Not required">
<input type="submit" value="Schedule Stream" name="schedule"> <input type="submit" value="Schedule Stream" name="schedule">
<p id="response"></p> <p id="response"></p>

View File

@ -1,15 +1,32 @@
body { body {
background-color:#eee;
margin:0; margin:0;
font-family:sans-serif; font-family:sans-serif;
font-size:16px; font-size:16px;
text-align:center; text-align:center;
} }
.user {
display:flex;
width:100%;
justify-content:left;
background-color:#ccc;
box-sizing:border-box;
}
p.user {
margin:0;
padding:.9em;
}
#logoff {
margin:0;
background-color:darkorange;
width:100px;
}
.container { .container {
display:flex; display:flex;
flex-direction:column; flex-direction:column;
justify-content:center; justify-content:center;
align-items:center; align-items:center;
height:100vh; height:95vh;
} }
.incontainer { .incontainer {
width:325px; width:325px;
@ -17,38 +34,36 @@ body {
} }
h4 { h4 {
border-radius:4px; border-radius:4px;
color:white;
background-color:red; background-color:red;
padding:.9em; padding:.9em;
} }
input,select { input,select {
background-color:#fff;
text-align:center; text-align:center;
width:100%; width:100%;
padding:12px 20px; padding:12px 20px;
margin:3px 0; margin:3px 0;
display:inline-block; display:inline-block;
border:1px solid #ccc; border:1px solid #aaa;
border-radius:4px; border-radius:4px;
box-sizing:border-box; box-sizing:border-box;
font-size:16px; font-size:16px;
font-weight:bold; font-weight:bold;
} }
select { select {
margin-top:10px; background-color:#fff;
margin-top:5px;
cursor:pointer; cursor:pointer;
padding-top:12px; padding-top:12px;
padding-bottom:-7px; padding-bottom:-7px;
} }
input[type=datetime-local] { input[type=datetime-local] {
cursor:pointer; cursor:pointer;
margin-bottom:-3px;
} }
input[type=email] { input[type=email] {
margin-bottom:15px; margin-bottom:15px;
} }
input[type=file] { input[type=file] {
background-color:#4CAF50;
color:white;
text-align:left; text-align:left;
cursor:pointer; cursor:pointer;
} }
@ -60,26 +75,17 @@ input[type=submit] {
border:none; border:none;
cursor:pointer; cursor:pointer;
} }
.user { ::file-selector-button {
display:flex;
width:100%;
justify-content:space-between;
}
#logoff {
width:100px;
}
/*::file-selector-button {
-moz-opacity:0; -moz-opacity:0;
filter:alpha(opacity:0); filter:alpha(opacity:0);
opacity:0; opacity:0;
}*/ }
.fileinput { .fileinput {
position:relative; position:relative;
max-width:fit-content(325px); max-width:fit-content(325px);
} }
#name { #name {
padding-top:5px; padding-top:5px;
color:white;
font-weight:bold; font-weight:bold;
width:100%; width:100%;
text-align:center; text-align:center;
@ -88,11 +94,12 @@ input[type=submit] {
text-overflow:ellipsis; text-overflow:ellipsis;
} }
input.abs { input.abs {
background-color:#4CAF50; background-color:#cfc;
padding:14px 20px; padding:14px 20px;
margin:8px 0; margin:8px 0;
border:none; border:1px solid #aaa;
border-radius:4px; border-radius:4px;
box-sizing:border-box;
cursor:pointer; cursor:pointer;
font-size:16px font-size:16px
} }