diff --git a/source/main/static/css/main.css b/source/main/static/css/main.css index 82c1966..38adeee 100644 --- a/source/main/static/css/main.css +++ b/source/main/static/css/main.css @@ -23,6 +23,10 @@ width: 100%; } +.navbar-burger { + margin-left: 0; +} + /* Cada flecha en los títulos de secciones */ .arrows { font-size: 1.5rem; @@ -297,17 +301,35 @@ section#notice a { /* SEARCH */ +#search-form { + width: 80vw; + margin: auto auto auto 3rem; +} + .search-div > * { display: inline-block; } .search-div input { width: calc(100% - 4.1rem); + vertical-align: text-top; } .search-div button { - width: 3.8rem; - height: 3.8rem; + width: 2.9rem; + height: 2.9rem; +} + +/* LOGIN / LOGOUT */ + +#login-form { + width: 16rem; + margin: auto; + text-align: center; +} + +#login-form > * { + margin-top: .5rem; } /* ICONS; cfr: https://css.gg */ diff --git a/source/main/views.py b/source/main/views.py index 0cb8760..a407e55 100644 --- a/source/main/views.py +++ b/source/main/views.py @@ -44,3 +44,7 @@ def movie(request, id): def api(request): context = Movie.objects.api(request) return JsonResponse(context) + + +def error_404(request, exception): + return render(request, "404.html") diff --git a/source/mauflix/urls.py b/source/mauflix/urls.py index f5a2e96..50d31e3 100644 --- a/source/mauflix/urls.py +++ b/source/mauflix/urls.py @@ -17,4 +17,7 @@ urlpatterns = [ path("movie/", views.movie, name="movie"), path("ultimas/rss/", LatestMoviesFeed()), path("admin/", admin.site.urls), + path("user/", include("django.contrib.auth.urls")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +handler404 = views.error_404 diff --git a/source/static/css/main.css b/source/static/css/main.css index 82c1966..a4ab280 100644 --- a/source/static/css/main.css +++ b/source/static/css/main.css @@ -297,17 +297,26 @@ section#notice a { /* SEARCH */ +#search-form { + width: calc(100% - 7em); +} + +.search-div { + margin-top: .5em; +} + .search-div > * { display: inline-block; } .search-div input { width: calc(100% - 4.1rem); + font-size: 1.25rem; } .search-div button { - width: 3.8rem; - height: 3.8rem; + width: 3.1rem; + height: 3.1rem; } /* ICONS; cfr: https://css.gg */ diff --git a/source/templates/404.html b/source/templates/404.html new file mode 100644 index 0000000..01fddf2 --- /dev/null +++ b/source/templates/404.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + +
+
+

¡Ups! Página no encontrada.

+
+
+ +{% endblock %} diff --git a/source/templates/nav.html b/source/templates/nav.html index a1242bd..807897d 100644 --- a/source/templates/nav.html +++ b/source/templates/nav.html @@ -4,6 +4,11 @@ + {% if query %} + {% include 'search-bar.html' with query=query %} + {% else %} + {% include 'search-bar.html' %} + {% endif %} diff --git a/source/templates/registration/login.html b/source/templates/registration/login.html new file mode 100644 index 0000000..410524c --- /dev/null +++ b/source/templates/registration/login.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+ {% csrf_token %} + + + +
+
+
+{% endblock %} diff --git a/source/templates/search-bar.html b/source/templates/search-bar.html new file mode 100644 index 0000000..307162d --- /dev/null +++ b/source/templates/search-bar.html @@ -0,0 +1,8 @@ +
+
+ +
+ +
+
+
diff --git a/source/templates/search.html b/source/templates/search.html index d65ef56..996af18 100644 --- a/source/templates/search.html +++ b/source/templates/search.html @@ -2,17 +2,6 @@ {% block content %} -
-
-
- -
- -
-
-
-
- {% if movies %} {% include 'section.html' with section='Resultados de búsqueda.' content=movies %} {% else %}