diff --git a/links/mini_apps_views.py b/links/mini_apps_views.py new file mode 100644 index 0000000..11840c1 --- /dev/null +++ b/links/mini_apps_views.py @@ -0,0 +1,73 @@ +from django.views.generic import TemplateView +from django.shortcuts import render + + +class MiniAppsListView(TemplateView): + template_name = 'links/mini_apps/list.html' + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + + # Define mini apps with their info + mini_apps = [ + { + 'name': 'Image Gallery', + 'description': 'A beautiful fullscreen image slideshow application with smooth transitions and auto-play functionality.', + 'url': 'mini-apps-image-gallery', + 'thumbnail': 'https://picsum.photos/seed/picsum/400/300?fit=crop', + 'icon': 'fas fa-images', + 'color': '#3498db' + }, + { + 'name': 'Weather Dashboard', + 'description': 'Real-time weather information with beautiful visualizations and forecasts.', + 'url': '#', + 'thumbnail': 'https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?w=400&h=300&fit=crop', + 'icon': 'fas fa-cloud-sun', + 'color': '#e74c3c' + }, + { + 'name': 'Music Player', + 'description': 'Stream and organize your favorite music with an elegant interface.', + 'url': '#', + 'thumbnail': 'https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?w=400&h=300&fit=crop', + 'icon': 'fas fa-music', + 'color': '#9b59b6' + }, + { + 'name': 'Task Manager', + 'description': 'Organize your tasks and boost productivity with smart scheduling.', + 'url': '#', + 'thumbnail': 'https://images.unsplash.com/photo-1484480974693-6ca0a78fb36b?w=400&h=300&fit=crop', + 'icon': 'fas fa-tasks', + 'color': '#2ecc71' + }, + { + 'name': 'Code Editor', + 'description': 'A lightweight code editor with syntax highlighting and themes.', + 'url': '#', + 'thumbnail': 'https://images.unsplash.com/photo-1461749280684-dccba630e2f6?w=400&h=300&fit=crop', + 'icon': 'fas fa-code', + 'color': '#f39c12' + }, + { + 'name': 'Calculator', + 'description': 'Scientific calculator with advanced mathematical functions.', + 'url': '#', + 'thumbnail': 'https://images.unsplash.com/photo-1611224923853-80b023f02d71?w=400&h=300&fit=crop', + 'icon': 'fas fa-calculator', + 'color': '#1abc9c' + } + ] + + context['mini_apps'] = mini_apps + return context + + +class ImageGalleryView(TemplateView): + template_name = 'links/mini_apps/image_gallery.html' + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + # Add any context data needed for the image gallery + return context diff --git a/links/templates/links/mini_apps/image_gallery.html b/links/templates/links/mini_apps/image_gallery.html new file mode 100644 index 0000000..be18e43 --- /dev/null +++ b/links/templates/links/mini_apps/image_gallery.html @@ -0,0 +1,579 @@ +{% extends 'base_blank.html' %} +{% load i18n %} + +{% block title %}{% trans "Image Gallery" %} - {% trans "GoLinks" %}{% endblock %} + +{% block extra_css %} + + +{% endblock %} + +{% block content %} +
+
+ + + {% trans "Back to Mini Apps" %} + +
+
+ +
+
+
+
{% trans "Animation Effect" %}
+ +
+ +
+
{% trans "Interval (seconds)" %}
+ +
+ +
+
{% trans "Actions" %}
+ +
+
+ +
+ + 00:15 +
+ +
+
+
{% trans "Loading..." %}
+
+
+{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/links/templates/links/mini_apps/list.html b/links/templates/links/mini_apps/list.html new file mode 100644 index 0000000..c24f7d7 --- /dev/null +++ b/links/templates/links/mini_apps/list.html @@ -0,0 +1,81 @@ +{% extends 'base.html' %} +{% load i18n %} + +{% block content %} +
+ +
+

+ + {% trans "Mini Apps" %} +

+

+ {% trans "Discover a collection of powerful mini applications designed to enhance your productivity and creativity." %} +

+
+ + +
+ {% for app in mini_apps %} +
+ +
+ {{ app.name }} +
+ + +
+ + +
+ +
+
+ +
+

{{ app.name }}

+
+ + +

+ {{ app.description }} +

+ + + {% if app.url != "#" %} + + + {% trans "Launch App" %} + + {% else %} +
+ + {% trans "Coming Soon" %} +
+ {% endif %} +
+ + +
+
+ {% endfor %} +
+ +
+ + +{% endblock %} diff --git a/links/urls.py b/links/urls.py index 072610d..1bd2b89 100644 --- a/links/urls.py +++ b/links/urls.py @@ -4,6 +4,7 @@ from . import page_views from . import search_views from . import post_views from . import collection_views +from . import mini_apps_views from django.views.generic import TemplateView urlpatterns = [ @@ -46,6 +47,10 @@ urlpatterns = [ collection_views.CollectionSlideshowView.as_view(), name='collection-slideshow'), + # Mini Apps + path('ui/mini-apps/', mini_apps_views.MiniAppsListView.as_view(), name='mini-apps-list'), + path('ui/mini-apps/image-gallery/', mini_apps_views.ImageGalleryView.as_view(), name='mini-apps-image-gallery'), + # API Documentation path('ui/api-docs/', TemplateView.as_view(template_name='links/api_docs.html'), diff --git a/run_server.sh b/run_server.sh index 992239a..860513e 100755 --- a/run_server.sh +++ b/run_server.sh @@ -1,5 +1,5 @@ #!/bin/bash set -eu -source 3.12/bin/activate +source .venv/bin/activate echo "Starting Django development server..." python manage.py runserver diff --git a/run_tailwind.sh b/run_tailwind.sh index c5b17b4..40126ed 100755 --- a/run_tailwind.sh +++ b/run_tailwind.sh @@ -1,6 +1,6 @@ #!/bin/bash set -eu -source 3.12/bin/activate +source .venv/bin/activate echo "Starting Tailwind CSS compiler..." python manage.py tailwind start diff --git a/templates/base.html b/templates/base.html index 55430ce..0f93558 100644 --- a/templates/base.html +++ b/templates/base.html @@ -139,6 +139,16 @@ + +
+ + + + {% trans "Mini Apps" %} +
+
+