remove old table

This commit is contained in:
Balakrishnan Balasubramanian 2022-07-14 16:22:06 -04:00
parent e2ac680121
commit 1a77862e4a

View File

@ -53,67 +53,32 @@
<input class="btn btn-outline-primary mx-2" type="submit" value="Download">
</form>
</div>
<div class="row row-cols-1 row-cols-md-3 row-cols-lg-4 m-4 g-3">
{{ range .Items }}
<div class="col my-2">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">
{{ if eq .Title "Loading" }}
<span data-yttitle="" data-ytid="{{.Id}}">Loading...</span>
{{ else }}
{{ .Title }}
{{ end }}
</h5>
<h6 class="card-subtitle mb-2 text-muted">On {{ .Date }}</h6>
<a href="{{ .URL }}" class="card-link d-block mb-2">Youtube Link</a>
{{ if eq .Status "Done" }}
<a class="btn btn-primary w-100" target="_blank" href="{{ $.VidoesUrl }}/{{ .FileName }}">Watch</a>
{{ else if eq .Status "InProgress" }}
<span class="border border-info w-100 text-center d-block" data-ytstatus="progress" data-ytid="{{.Id}}">In Progress</span>
<div class="row row-cols-1 row-cols-md-3 row-cols-lg-4 m-4 g-3">
{{ range .Items }}
<div class="col my-2">
<div class="card h-100">
<div class="card-body">
<h5 class="card-title">
{{ if eq .Title "Loading" }}
<span data-yttitle="" data-ytid="{{.Id}}">Loading...</span>
{{ else }}
<span class="border border-danger w-100 text-center d-block"> {{ .Status }} </span>
{{ .Title }}
{{ end }}
</div>
</h5>
<h6 class="card-subtitle mb-2 text-muted">On {{ .Date }}</h6>
<a href="{{ .URL }}" class="card-link d-block mb-2">Youtube Link</a>
{{ if eq .Status "Done" }}
<a class="btn btn-primary w-100" target="_blank" href="{{ $.VidoesUrl }}/{{ .FileName }}">Watch</a>
{{ else if eq .Status "InProgress" }}
<span class="border border-info w-100 text-center d-block" data-ytstatus="progress" data-ytid="{{.Id}}">In Progress</span>
{{ else }}
<span class="border border-danger w-100 text-center d-block"> {{ .Status }} </span>
{{ end }}
</div>
</div>
{{ end }}
</div>
<table>
<caption>All Vidoes</caption>
<thead>
<tr>
<th>Date</th>
<th>URL</th>
<th>Title</th>
<th>Link</th>
</tr>
</thead>
<tbody>
{{ range .Items }}
<tr>
<td>{{ .Date }}</td>
<td>{{ .URL }}</td>
<td>
{{ if eq .Title "Loading" }}
<span data-yttitle="" data-ytid="{{.Id}}">Loading...</span>
{{ else }}
{{ .Title }}
{{ end }}
</td>
<td>
{{ if eq .Status "Done" }}
<a target="_blank" href="{{ $.VidoesUrl }}/{{ .FileName }}">Watch</a>
{{ else if eq .Status "InProgress" }}
<span data-ytstatus="progress" data-ytid="{{.Id}}">In Progress</span>
{{ else }}
{{ .Status }}
{{ end }}
</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
</div>
</div>
</body>
</html>