diff --git a/template/artwork.html b/template/artwork.html
index 222fc1c..037aa44 100644
--- a/template/artwork.html
+++ b/template/artwork.html
@@ -52,17 +52,6 @@
{{ end }}
Related works
- {{ range .Related }}
-
- {{ end }}
+ {{ template "thumbnail-container.html" .Related }}
{{ template "footer.html" }}
diff --git a/template/index.html b/template/index.html
index f9e573d..a72c831 100644
--- a/template/index.html
+++ b/template/index.html
@@ -1,29 +1,8 @@
{{ template "header.html" }}
Recommended works
-
- {{ range .Recommended }}
-
- {{ end }}
-
+ {{ template "scrollable-container.html" .Recommended }}
Today's rankings
@@ -68,28 +47,6 @@
Newest by all
-
- {{ range .Newest }}
-
- {{ end }}
-
+ {{ template "thumbnail-container.html" .Newest }}
{{ template "footer.html" }}
diff --git a/template/scrollable-container.html b/template/scrollable-container.html
new file mode 100644
index 0000000..e3d865c
--- /dev/null
+++ b/template/scrollable-container.html
@@ -0,0 +1,23 @@
+
+ {{ range . }}
+
+ {{ end }}
+
diff --git a/template/thumbnail-container.html b/template/thumbnail-container.html
new file mode 100644
index 0000000..84d8d98
--- /dev/null
+++ b/template/thumbnail-container.html
@@ -0,0 +1,23 @@
+
+ {{ range . }}
+
+ {{ end }}
+