diff --git a/tubearchivist/home/templates/home/home.html b/tubearchivist/home/templates/home/home.html
index d24263a3..9d517144 100644
--- a/tubearchivist/home/templates/home/home.html
+++ b/tubearchivist/home/templates/home/home.html
@@ -2,6 +2,46 @@
{% block content %}
{% load static %}
+ {% if continue_vids %}
+
+
Continue Watching
+
+
+ {% for video in continue_vids %}
+
+ {% endfor %}
+
+ {% endif %}
Recent Videos
diff --git a/tubearchivist/home/views.py b/tubearchivist/home/views.py
index dd87ac06..781b6907 100644
--- a/tubearchivist/home/views.py
+++ b/tubearchivist/home/views.py
@@ -175,6 +175,7 @@ class ArchivistResultsView(ArchivistViewConfig):
if not results or not self.context["results"]:
return
+ self.context["continue_vids"] = []
progress = {i["youtube_id"]: i["position"] for i in results}
for hit in self.context["results"]:
video = hit["source"]
@@ -182,6 +183,7 @@ class ArchivistResultsView(ArchivistViewConfig):
played_sec = progress.get(video["youtube_id"])
total = video["player"]["duration"]
video["player"]["progress"] = 100 * (played_sec / total)
+ self.context["continue_vids"].append(video)
def single_lookup(self, es_path):
"""retrieve a single item from url"""
diff --git a/tubearchivist/static/css/style.css b/tubearchivist/static/css/style.css
index 22e1b2e8..8f124d35 100644
--- a/tubearchivist/static/css/style.css
+++ b/tubearchivist/static/css/style.css
@@ -370,16 +370,18 @@ button:hover {
}
/* video list */
-.video-list.grid {
+.video-list {
display: grid;
- grid-template-columns: 1fr 1fr 1fr;
grid-gap: 1rem;
+ margin-top: 1rem;
+}
+
+.video-list.grid {
+ grid-template-columns: 1fr 1fr 1fr;
}
.video-list.list {
- display: grid;
grid-template-columns: unset;
- grid-gap: 1rem;
}
.video-item {