diff --git a/data/db.sqlite3 b/data/db.sqlite3 index 3ba7c3e..3230a49 100644 Binary files a/data/db.sqlite3 and b/data/db.sqlite3 differ diff --git a/links/collection_views.py b/links/collection_views.py index e4ef3d7..8a08bca 100644 --- a/links/collection_views.py +++ b/links/collection_views.py @@ -44,3 +44,8 @@ class CollectionDeleteView(DeleteView): def delete(self, request, *args, **kwargs): messages.success(request, _('Collection deleted successfully.')) return super().delete(request, *args, **kwargs) + +class CollectionSlideshowView(DetailView): + model = ImageCollection + template_name = 'links/collection_slideshow.html' + context_object_name = 'collection' diff --git a/links/templates/links/collection_detail.html b/links/templates/links/collection_detail.html index 94b5932..360cb16 100644 --- a/links/templates/links/collection_detail.html +++ b/links/templates/links/collection_detail.html @@ -69,6 +69,15 @@ {% trans "Delete Collection" %} + diff --git a/links/templates/links/collection_slideshow.html b/links/templates/links/collection_slideshow.html new file mode 100644 index 0000000..20ce6dd --- /dev/null +++ b/links/templates/links/collection_slideshow.html @@ -0,0 +1,222 @@ +{% extends 'base_blank.html' %} +{% load i18n %} +{% load static %} + +{% block extra_css %} + +{% endblock %} + +{% block content %} +
+
+ + {% for image in collection.images.all %} +
+ {{ image.title }} +
+ {% endfor %} + +
+ + + + +
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/links/urls.py b/links/urls.py index 6a7518f..d9e3b22 100644 --- a/links/urls.py +++ b/links/urls.py @@ -3,6 +3,7 @@ from . import views from . import page_views from . import search_views from . import newsletter_views +from . import collection_views urlpatterns = [ # Regular UI URLs @@ -50,4 +51,9 @@ urlpatterns = [ path('/', views.redirect_to_original, name='redirect_to_original'), path('//', views.redirect_to_original, name='redirect_to_original_with_param'), path('alias//', views.LinkDetailView.as_view(), name='link_detail_by_alias'), + + # Collection slideshow + path('ui/collections//slideshow/', + collection_views.CollectionSlideshowView.as_view(), + name='collection-slideshow'), ] diff --git a/new_theme/static/css/dist/styles.css b/new_theme/static/css/dist/styles.css index 3e84b9f..1bcdfe3 100644 --- a/new_theme/static/css/dist/styles.css +++ b/new_theme/static/css/dist/styles.css @@ -1340,6 +1340,11 @@ video { background-color: rgb(254 249 195 / var(--tw-bg-opacity)); } +.bg-green-600 { + --tw-bg-opacity: 1; + background-color: rgb(22 163 74 / var(--tw-bg-opacity)); +} + .bg-opacity-50 { --tw-bg-opacity: 0.5; } diff --git a/templates/base_blank.html b/templates/base_blank.html new file mode 100644 index 0000000..d6cb349 --- /dev/null +++ b/templates/base_blank.html @@ -0,0 +1,18 @@ + + + + + + {% block title %}{% endblock %} + + {% load static %} + + + {% block extra_css %}{% endblock %} + + + {% block content %}{% endblock %} + + {% block extra_js %}{% endblock %} + +