Remove Contact app & add about template
This commit is contained in:
parent
3ca3f6616d
commit
1017ca86b7
18 changed files with 40 additions and 183 deletions
24
gallery/templates/gallery/about.html
Normal file
24
gallery/templates/gallery/about.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% extends "base_dark.html" %}
|
||||
{% load top_tags %}
|
||||
|
||||
<!-- Title -->
|
||||
{% block title %} Gallery : About{% endblock %}
|
||||
|
||||
<!-- Content -->
|
||||
{% block content %}
|
||||
|
||||
<div class="uk-margin-top uk-width-1-4@m">
|
||||
<div class="uk-card uk-card-default uk-card-body uk-padding-small">
|
||||
{% load static %}
|
||||
<img src="{% static 'img/profile.png' %}" alt="Contact">
|
||||
|
||||
<div class="uk-container uk-margin-small-top">
|
||||
<a href="https://bsky.app/profile/nyymix.net" uk-icon="icon: bluesky"></a>
|
||||
<a href="https://twitter.com/nyymix" uk-icon="icon: twitter"></a>
|
||||
<a href="https://www.instagram.com/nyymix/" uk-icon="icon: instagram"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
|
@ -1,3 +1,4 @@
|
|||
from django.shortcuts import redirect
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
@ -7,9 +8,15 @@ app_name = 'gallery'
|
|||
urlpatterns = [
|
||||
|
||||
path('', views.AlbumsList.as_view(), name='main_url'),
|
||||
path('about/', views.About.as_view(), name='about_url'),
|
||||
path('photostream/', views.PhotosList.as_view(), name='photos_url'),
|
||||
path('albums/<path:album_slug>/<int:photo_slug>/', views.PhotoDetail.as_view(), name='photo_url'),
|
||||
path('albums/<path:album_slug>/', views.AlbumDetail.as_view(), name='album_url'),
|
||||
path('albums/', views.AlbumsList.as_view(), name='albums_url'),
|
||||
path('<path:redir_path>/', views.redirect_to_album, name='redirect_to_album'),
|
||||
]
|
||||
|
||||
def custom_404_view(request, exception):
|
||||
return redirect('/')
|
||||
|
||||
handler404 = 'gallery.urls.custom_404_view'
|
|
@ -89,6 +89,11 @@ class PhotoDetail(DetailView):
|
|||
return redirect('gallery:photo_url', album_slug=self.kwargs['album_slug'], photo_slug=self.kwargs['photo_slug'])
|
||||
|
||||
|
||||
class About(TemplateView):
|
||||
template_name = "gallery/about.html"
|
||||
|
||||
|
||||
|
||||
def redirect_to_album(request, redir_path):
|
||||
redir = get_object_or_404(Redir, path=redir_path)
|
||||
return redirect('gallery:album_url', album_slug=redir.album.slug)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue