diff --git a/src/sigal/themes/photoswipe/templates/album.html b/src/sigal/themes/photoswipe/templates/album.html
index 5de0b3d..4576542 100644
--- a/src/sigal/themes/photoswipe/templates/album.html
+++ b/src/sigal/themes/photoswipe/templates/album.html
@@ -1,92 +1,10 @@
{% from 'description.html' import img_description %}
{% extends "base.html" %}
-{% block extra_head %}
-
-
-{% endblock extra_head %}
+{% include "ps_head.html" %}
{% block content %}
- {% include 'download_zip.html' %}
- {% include 'map.html' %}
-
- {% for media in album.medias %}
- {% if media.type == "image" %}
-
-
-
-
-
- {{ img_description(media, with_big=False) }}
-
- {{ media.title }} - {{ media.exif.datetime }}
-
- {% endif %}
- {% if media.type == "video" %}
-
-
-
-
-
- {{ img_description(media, with_big=False) }}
-
- {{ media_title }}
-
- {% endif %}
- {% endfor %}
-
+ {% include "album_items.html" %}
{% endblock %}
{% block extra_footer %}
diff --git a/src/sigal/themes/photoswipe/templates/album_items.html b/src/sigal/themes/photoswipe/templates/album_items.html
new file mode 100644
index 0000000..31064e3
--- /dev/null
+++ b/src/sigal/themes/photoswipe/templates/album_items.html
@@ -0,0 +1,39 @@
+{% from 'description.html' import img_description %}
+
+ {% include 'download_zip.html' %}
+ {% include 'map.html' %}
+
+ {% for media in album.medias %}
+ {% if media.type == "image" %}
+
+
+
+
+
+ {{ img_description(media, with_big=False) }}
+
+ {{ media.title }} - {{ media.exif.datetime }}
+
+ {% endif %}
+ {% if media.type == "video" %}
+
+
+
+
+
+ {{ img_description(media, with_big=False) }}
+
+ {{ media_title }}
+
+ {% endif %}
+ {% endfor %}
+
diff --git a/src/sigal/themes/photoswipe/templates/album_list.html b/src/sigal/themes/photoswipe/templates/album_list.html
index ddc6e53..7e7786c 100644
--- a/src/sigal/themes/photoswipe/templates/album_list.html
+++ b/src/sigal/themes/photoswipe/templates/album_list.html
@@ -1,4 +1,9 @@
{% extends "base.html" %}
+
+{% if album.medias %}
+ {% include "ps_head.html" %}
+{% endif %}
+
{% block content %}
{% for alb in album.albums %}
@@ -10,4 +15,6 @@
{% endfor %}
+
+ {% include "album_items.html" %}
{% endblock %}
diff --git a/src/sigal/themes/photoswipe/templates/ps_head.html b/src/sigal/themes/photoswipe/templates/ps_head.html
new file mode 100644
index 0000000..77b1e0c
--- /dev/null
+++ b/src/sigal/themes/photoswipe/templates/ps_head.html
@@ -0,0 +1,51 @@
+{% block extra_head %}
+
+
+
+{% endblock extra_head %}