Video page styling

This commit is contained in:
Carl Pearson
2024-09-26 05:33:08 -06:00
parent a5d80f4e01
commit 28e4b3d6f5
2 changed files with 70 additions and 42 deletions

View File

@@ -22,13 +22,20 @@ button {
.media-card button { .media-card button {
display: inline-block; display: inline-block;
padding: 10px 15px; padding: 10px 15px;
margin: 1rem;
text-decoration: none; text-decoration: none;
border-radius: 4px; border-radius: 4px;
} }
.new-transcode button { .media-card a {
background-color: green; display: inline-block;
padding: 10px 15px;
margin: 1rem;
margin-bottom: 0;
background-color: #007bff;
color: white; color: white;
text-decoration: none;
border-radius: 4px;
} }
.media-card h3 { .media-card h3 {
@@ -38,6 +45,24 @@ button {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
.new-transcode form {
display: flex;
flex-direction: column;
}
.new-transcode .selects {
display: flex;
flex-direction: row;
}
.new-transcode select {
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ccc;
flex-grow: 1;
margin: 1rem;
}
.audio-container audio { .audio-container audio {
width: 100%; width: 100%;
} }
@@ -49,30 +74,20 @@ button {
margin: 0 auto; margin: 0 auto;
} }
.media-download { .media-buttons {
padding: 15px;
text-align: center; text-align: center;
} }
.media-download a { .delete-button {
display: inline-block;
padding: 10px 15px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 4px;
}
.media-controls {
text-align: center;
padding-bottom: 15px;
}
.media-controls button {
background-color: red; background-color: red;
color: white; color: white;
} }
.transcode-button {
background-color: green;
color: white;
}
/* narrower than 600px */ /* narrower than 600px */
@media (max-width: 600px) { @media (max-width: 600px) {
.media-grid { .media-grid {

View File

@@ -24,29 +24,40 @@
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
</div> </div>
<div class="media-download"> <div class="media-buttons">
<a href="/data/{{.Filename}}" download="{{.DownloadFilename}}">Download ({{.Size}}, {{.StreamRate}})</a> <a href="/data/{{.Filename}}" download="{{.DownloadFilename}}">Download ({{.Size}},
</div> {{.StreamRate}})</a>
{{if ne .Source "original"}} {{if ne .Source "original"}}
<div class="media-controls">
<form action="/delete_video/{{.ID}}" method="post"> <form action="/delete_video/{{.ID}}" method="post">
<button type="submit">Delete</button> <button class="delete-button" type="submit">Delete</button>
</form> </form>
</div>
{{end}} {{end}}
</div> </div>
</div>
{{end}} {{end}}
<div class="media-card new-transcode"> <div class="media-card new-transcode">
<h3>New Transcode</h3>
<form action="/transcode_to_video/{{.original.ID}}" method="post"> <form action="/transcode_to_video/{{.original.ID}}" method="post">
<input type="hidden" name="original_id" value="{{.original.ID}}"> <input type="hidden" name="original_id" value="{{.original.ID}}">
<label for="height-select">Height:</label> <div class="selects">
<select name="height" id="height-select"> <select name="height" id="height-select">
<option value="144">144p</option> <option value="144">144p</option>
<option value="240">240p</option> <option value="240">240p</option>
<option value="360">360p</option> <option value="360">360p</option>
<option value="480">480p</option>
<option value="720">720p</option>
<option value="1080">1080p</option>
<option value="2160">2160p</option>
</select> </select>
<button type="submit">Transcode</button> <select name="fps" id="fps-select">
<option value="24">24 fps</option>
<option value="25">25 fps</option>
<option value="30">30 fps</option>
<option value="60">60 fps</option>
</select>
</div>
<button class="transcode-button" type="submit">Transcode</button>
</form> </form>
</div> </div>
</div> </div>
@@ -60,28 +71,30 @@
Your browser does not support the audio tag. Your browser does not support the audio tag.
</audio> </audio>
</div> </div>
<div class="media-download"> <div class="media-buttons">
<a href="/data/{{.Filename}}" download="{{.DownloadFilename}}">Download ({{.Size}}, {{.StreamRate}})</a> <a href="/data/{{.Filename}}" download="{{.DownloadFilename}}">Download ({{.Size}},
</div> {{.StreamRate}})</a>
{{if ne .Source "original"}} {{if ne .Source "original"}}
<div class="media-controls">
<form action="/delete_audio/{{.ID}}" method="post"> <form action="/delete_audio/{{.ID}}" method="post">
<button type="submit">Delete</button> <button class="delete-button" type="submit">Delete</button>
</form> </form>
</div>
{{end}} {{end}}
</div> </div>
</div>
{{end}} {{end}}
<div class="media-card new-transcode"> <div class="media-card new-transcode">
<h3>New Transcode</h3>
<form action="/transcode_to_audio/{{.original.ID}}" method="post"> <form action="/transcode_to_audio/{{.original.ID}}" method="post">
<input type="hidden" name="original_id" value="{{.original.ID}}"> <input type="hidden" name="original_id" value="{{.original.ID}}">
<label for="kbps-select">Kbps:</label>
<select name="kbps" id="kbps-select"> <select name="kbps" id="kbps-select">
<option value="64">64 kbps</option> <option value="64">64 kbps</option>
<option value="96">96 kbps</option> <option value="96">96 kbps</option>
<option value="128">128 kbps</option>
<option value="160">160 kbps</option>
<option value="192">192 kbps</option>
</select> </select>
<button type="submit">Transcode</button> <button class="transcode-button" type="submit">Transcode</button>
</form> </form>
</div> </div>
</div> </div>