From b90449667331871d7d49439ae900afcd34f5292e Mon Sep 17 00:00:00 2001 From: Adrien Abraham Date: Thu, 14 Sep 2023 22:38:52 +0200 Subject: [PATCH] remove a bunch of pages --- idre/urls.py | 7 --- label/static/label/css/artist.css | 56 ------------------- label/static/label/css/artists.css | 73 ------------------------- label/static/label/css/release.css | 35 ------------ label/static/label/css/releases.css | 39 -------------- label/static/label/css/videos.css | 11 ---- label/templates/label/artist.html | 84 ----------------------------- label/templates/label/artists.html | 53 ------------------ label/templates/label/release.html | 68 ----------------------- label/templates/label/videos.html | 25 --------- label/urls.py | 6 +-- label/views.py | 40 ++------------ news/urls.py | 2 +- 13 files changed, 5 insertions(+), 494 deletions(-) delete mode 100644 label/static/label/css/artist.css delete mode 100644 label/static/label/css/artists.css delete mode 100644 label/static/label/css/release.css delete mode 100644 label/static/label/css/releases.css delete mode 100644 label/static/label/css/videos.css delete mode 100644 label/templates/label/artist.html delete mode 100644 label/templates/label/artists.html delete mode 100644 label/templates/label/release.html delete mode 100644 label/templates/label/videos.html diff --git a/idre/urls.py b/idre/urls.py index 31860db..4671e56 100644 --- a/idre/urls.py +++ b/idre/urls.py @@ -5,7 +5,6 @@ from django.urls import path from idre.views import about_view import label.urls -import news.urls admin.autodiscover() @@ -14,15 +13,9 @@ admin.autodiscover() urlpatterns = [ path("about/", about_view, name="about"), path("admin/", admin.site.urls), - *news.urls.urlpatterns, *label.urls.urlpatterns, ] - # [ url(r"^about/$", idre.views.about_view, name="about") ] + - # label.urls.urlpatterns + - # news.urls.urlpatterns + - # [ url(r"^admin/", include(admin.site.urls)) ] - if settings.DEBUG: urlpatterns += static( diff --git a/label/static/label/css/artist.css b/label/static/label/css/artist.css deleted file mode 100644 index 5dc6b2b..0000000 --- a/label/static/label/css/artist.css +++ /dev/null @@ -1,56 +0,0 @@ -#content { - text-align: center; -} - - - -.logo { - max-width: 300px; - max-height: 300px; - border-radius: 5px; - background-color: white; -} - -.minilogo { - width: 16px; - height: 16px; -} - - -#infos { - margin: auto; -} - -#infos #left, #infos #right { - width: 50%; - padding: 10px; - vertical-align: top; -} - -#infos #left { - text-align: right; -} - -#infos #right { - text-align: left; -} - - - -#releases { - /*margin: auto;*/ -} - -#releases td { - padding-left: 10px; - padding-right: 10px; -} - -.release { - /*-o-transition: .5s;*/ - /*-ms-transition: .5s;*/ - /*-moz-transition: .5s;*/ - /*-webkit-transition: .5s;*/ - /*transition: .5s;*/ -} - diff --git a/label/static/label/css/artists.css b/label/static/label/css/artists.css deleted file mode 100644 index 9e456a3..0000000 --- a/label/static/label/css/artists.css +++ /dev/null @@ -1,73 +0,0 @@ -#content { - text-align: center; -} - -#content > h1 { - margin-bottom: 0; -} - -#content > p { - margin-top: 0; -} - -.artists { - width: 700px; - margin: auto; -} - -.artists .artist { - width: 160px; - position: relative; - margin: 5px; - display: inline-block; - line-height: 1.5em; -} - -.artists .artist a { - color: #929292; - text-decoration: none; - transition: 0.3s; -} - -@keyframes logoslide { - 0% { background-position: 0%; } - 33% { background-position: 100%; } - 66% { background-position: 100%; } - 100% { background-position: 0%; } -} - -.artists .artist .logo { - height: 160px; - width: 160px; - background-color: white; - background-size: auto 100%; - background-position: 0%; - border: none; - border-radius: 5px; -} - -.artists .artist-genre { - display: flex; - align-items: end; - position: absolute; - top: 0px; - left: 0px; - height: 150px; - width: 150px; - padding: 5px; - justify-content: center; - background-image: linear-gradient(rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.6)); - border-radius: 5px; - color: white; - opacity: 0; - transition: 0.3s; - pointer-events: none; -} - -.artists .artist .logo:hover { - animation: logoslide 3s; -} - -.artists .artist .logo:hover ~ .artist-genre { - opacity: 1; -} diff --git a/label/static/label/css/release.css b/label/static/label/css/release.css deleted file mode 100644 index d9e4fe1..0000000 --- a/label/static/label/css/release.css +++ /dev/null @@ -1,35 +0,0 @@ -#content { - text-align: center; -} - - -.logo { - max-width: 300px; - max-height: 300px; - border-radius: 5px; -} - -.minilogo { - width: 16px; - height: 16px; -} - - -#infos { - margin: auto; -} - -#infos #left, -#infos #right { - width: 50%; - padding: 10px; - vertical-align: top; -} - -#infos #left { - text-align: right; -} - -#infos #right { - text-align: left; -} \ No newline at end of file diff --git a/label/static/label/css/releases.css b/label/static/label/css/releases.css deleted file mode 100644 index c4021b2..0000000 --- a/label/static/label/css/releases.css +++ /dev/null @@ -1,39 +0,0 @@ -#content { - display: flex; - flex-direction: column; - width: 100%; -} - -.release { - display: flex; - align-items: top; - margin-bottom: 20px; - height: 120px; - transition: height .5s ease-in-out; -} - -.release:hover { - height: 300px; -} - -.release .cover { - flex-shrink: 0; - width: 300px; - background-size: cover; - cursor: pointer; -} - -.release .infos { - margin-top: 10px; - margin-left: 10px; -} - -.release .infos p { - margin: 0; -} - -.release .infos .title { - width: 100%; - font-weight: bold; - font-size: 1.4em; -} diff --git a/label/static/label/css/videos.css b/label/static/label/css/videos.css deleted file mode 100644 index c1eced8..0000000 --- a/label/static/label/css/videos.css +++ /dev/null @@ -1,11 +0,0 @@ -#content { - text-align: center; -} - -.video h2 { - margin-bottom: 0; -} - -.video .embed { - margin: 1em; -} diff --git a/label/templates/label/artist.html b/label/templates/label/artist.html deleted file mode 100644 index 15ee629..0000000 --- a/label/templates/label/artist.html +++ /dev/null @@ -1,84 +0,0 @@ -{% extends "base.html" %} -{% load static %} - - -{% block stylesheets %} - -{% endblock %} - - -{% block content %} - -

{{ artist.name }}

- - - - - - -
- -

- -

- -
- -{% endblock %} diff --git a/label/templates/label/artists.html b/label/templates/label/artists.html deleted file mode 100644 index dcf7e56..0000000 --- a/label/templates/label/artists.html +++ /dev/null @@ -1,53 +0,0 @@ -{% extends "base.html" %} -{% load static %} - - -{% block stylesheets %} - -{% endblock %} - - -{% block content %} - -

Core

- -
- {% for artist in artists %} - {% if artist.artist_type == 0 %} - - - - {{ artist.name }} - {{ artist.genre }} - - - {% endif %} - {% endfor %} -
- -

Miscellaneous

-

Side projects, one-off collabs, acts of the past, shameless shitposting

- -
- {% for artist in artists %} - {% if artist.artist_type == 1 %} - - - - {{ artist.name }} - {{ artist.genre }} - - - {% endif %} - {% endfor %} -
- -{% endblock %} diff --git a/label/templates/label/release.html b/label/templates/label/release.html deleted file mode 100644 index 714b634..0000000 --- a/label/templates/label/release.html +++ /dev/null @@ -1,68 +0,0 @@ -{% extends "base.html" %} -{% load static %} - - -{% block stylesheets %} - -{% endblock %} - - -{% block content %} - -

- {% for contrib in contribs %} - {{ contrib.name }} - {% if not forloop.last %} & {% endif %} - {% endfor %} - - - {{ release.title }} ({{ release.year }}) -

- -{% if release.description %} - - - - - - -
- - {% if release.embed %} - {% autoescape off %} - {{ release.embed }} - {% endautoescape %} - {% else %} -

- -

- {% endif %} - -
- -{% else %} - - {% if release.embed %} - {% autoescape off %} - {{ release.embed }} - {% endautoescape %} - {% else %} -

- -

- {% endif %} - -{% endif %} - -{% endblock %} diff --git a/label/templates/label/videos.html b/label/templates/label/videos.html deleted file mode 100644 index 10f48a9..0000000 --- a/label/templates/label/videos.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} -{% load static %} - - -{% block stylesheets %} - -{% endblock %} - - -{% block content %} -{% for video in videos %} -
-

{{ video.artist }} - {{ video.title }}

-
{{ video.year }}
-
- {% autoescape off %} - {{ video.embed }} - {% endautoescape %} -
-
- {% if not forloop.last %} -
- {% endif %} -{% endfor %} -{% endblock %} diff --git a/label/urls.py b/label/urls.py index bcbcba0..104ae30 100644 --- a/label/urls.py +++ b/label/urls.py @@ -4,9 +4,5 @@ from label import views urlpatterns = [ - url(r'^artists/$', views.artists_view, name='artists'), - url(r'^artists/(?P\S+)$', views.artist_view, name='artist'), - url(r'^releases/$', views.releases_view, name='releases'), - url(r'^releases/(?P\S+)$', views.release_view, name='release'), - url(r'^videos/$', views.videos_view, name='videos'), + url(r'^(?:releases/)?$', views.releases_view, name='releases'), ] diff --git a/label/views.py b/label/views.py index 950be44..d5997e3 100644 --- a/label/views.py +++ b/label/views.py @@ -1,34 +1,14 @@ -from django.shortcuts import get_object_or_404, render -import markdown +from django.shortcuts import render -from label.models import Artist, Release, VideoClip +from label.models import Artist, Release from label.tools import ( get_catalog_tag_from_id, get_contribs, - get_id_from_catalog_tag, ) -def artists_view(request): - artists = Artist.objects.all() - context = {'artists': artists} - return render(request, 'label/artists.html', context) - - -def artist_view(request, slug): - artist = get_object_or_404(Artist, slug=slug) - artist.description = markdown.markdown(artist.description) - - releases = artist.release_set.all() - for release in releases: - release.tag = get_catalog_tag_from_id(release.ident) - - context = {'artist': artist, 'releases': releases} - return render(request, 'label/artist.html', context) - - def releases_view(request): - artists = Artist.objects.all() + Artist.objects.all() releases = Release.objects.filter(released=True) releases_and_infos = [] @@ -47,17 +27,3 @@ def releases_view(request): context = {'releases': releases_and_infos} return render(request, 'label/releases.html', context) - - -def release_view(request, tag): - ident = get_id_from_catalog_tag(tag) - release = get_object_or_404(Release, ident=ident, released=True) - contribs = get_contribs(release.contributors.all()) - context = {'release': release, 'contribs': contribs} - return render(request, 'label/release.html', context) - - -def videos_view(request): - videos = VideoClip.objects.order_by('-year', 'title') - context = {'videos': videos} - return render(request, 'label/videos.html', context) diff --git a/news/urls.py b/news/urls.py index e23ecb9..605e912 100644 --- a/news/urls.py +++ b/news/urls.py @@ -4,5 +4,5 @@ import news.views urlpatterns = [ - url(r"^(?:news/)?$", news.views.articles_view, name = "news"), + # url(r"^(?:news/)?$", news.views.articles_view, name = "news"), ]