From 7d7afd64a7881f43c51bbdcbce7d8d92ac2713c3 Mon Sep 17 00:00:00 2001 From: andrei Date: Sat, 20 Apr 2024 17:46:00 +0500 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20=D0=BC=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CineSync/static/css/base.css | 8 +++ CineSync/static/css/home/homepage.css | 8 +++ CineSync/static/css/timetable/session.css | 66 ++++++++++--------- .../templates/tickets/ticket_details.html | 0 CineSync/templates/timetable/session.html | 42 ++++++------ CineSync/timetable/views.py | 2 +- 6 files changed, 75 insertions(+), 51 deletions(-) create mode 100644 CineSync/templates/tickets/ticket_details.html diff --git a/CineSync/static/css/base.css b/CineSync/static/css/base.css index 450190c..f93fb7e 100644 --- a/CineSync/static/css/base.css +++ b/CineSync/static/css/base.css @@ -3,4 +3,12 @@ } body { background-color: #0d1d3a; +} +html::-webkit-scrollbar { + width: 0.8vw; +} +html::-webkit-scrollbar-thumb { + background-color: #eaeaea; + border-radius: 5vw; + border: 4px solid #0d1d3a; } \ No newline at end of file diff --git a/CineSync/static/css/home/homepage.css b/CineSync/static/css/home/homepage.css index 38e3870..216fc4d 100644 --- a/CineSync/static/css/home/homepage.css +++ b/CineSync/static/css/home/homepage.css @@ -17,4 +17,12 @@ height: 35vw !important; width: 25vw !important; border-radius: 3vw; +} +.film_card_column::-webkit-scrollbar { + height: 7px; +} +.film_card_column::-webkit-scrollbar-thumb { + background-color: #0d1d3a; + border-radius: 5vw; + border: 1px solid #ffffff; } \ No newline at end of file diff --git a/CineSync/static/css/timetable/session.css b/CineSync/static/css/timetable/session.css index 61c107c..f82955a 100644 --- a/CineSync/static/css/timetable/session.css +++ b/CineSync/static/css/timetable/session.css @@ -1,36 +1,19 @@ .seats_card { + margin-left: 27%; + margin-right: 27%; + margin-top: 2vw; + margin-bottom: 5vw; background-color: #eaeaea; border-radius: 3vw; display: flex; - flex-direction: row; + flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: center; - - width: 50%; - margin: 0 auto; - margin-top: 2vw; - + width: 46%; overflow-x: auto; overflow-y: auto; } -.card_body { - width: 80%; -} -.line { - width: 30%; - height: 0.5vw; - background-color: black; - position: absolute; - top: 70%; - border-radius: 3vw; - margin-left: 5%; - margin-top: 8vw; -} -h6 { - text-align: center; - margin-top: 0.4vw; -} .seat_number { width: 1vw; height: 1.1vw; @@ -54,29 +37,34 @@ h6 { border-radius: 3vw; } .film_info_block { - margin-right: 25%; - margin-left: 25%; - width: 50%; + margin-top: 5vw; + margin-right: 27%; + margin-left: 27%; + width: 46%; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: flex-end; + height: 20vw; } .film_info_text_block { height: 20vw; display: flex; flex-direction: column; flex-wrap: nowrap; - justify-content: space-evenly; - margin: 2vw; + justify-content: flex-start; + align-items: flex-start; + margin-left: 1vw; } -.film_info_text { +.film_info_text, .film_info_description { color: #eaeaea; } +.film_info_description { + max-height: 9.9vw; + overflow-y: auto; +} .cell { background-color: transparent !important; -} -.cell { height: 4vw; width: 3.5vw; } @@ -84,4 +72,20 @@ h6 { display: flex; align-items: center; justify-content: center; + width: 3vw; +} +.seats_card::-webkit-scrollbar { + height: 7px; +} +.seats_card::-webkit-scrollbar-thumb { + background-color: #0d1d3a; + border-radius: 5vw; + border: 1px solid #eaeaea; +} +.film_info_description::-webkit-scrollbar { + width: 5px; +} +.film_info_description::-webkit-scrollbar-thumb { + background-color: #eaeaea; + border-radius: 5vw; } \ No newline at end of file diff --git a/CineSync/templates/tickets/ticket_details.html b/CineSync/templates/tickets/ticket_details.html new file mode 100644 index 0000000..e69de29 diff --git a/CineSync/templates/timetable/session.html b/CineSync/templates/timetable/session.html index f2b996c..8dcc941 100644 --- a/CineSync/templates/timetable/session.html +++ b/CineSync/templates/timetable/session.html @@ -14,29 +14,33 @@

{{ session.film.name }}

{{ session.auditorium.number }}

{{ session.start_datetime }}

+

{{ session.film.description }}

+
+ {% for genre in session.film.genres.all %} +
{{genre.name}}
+ {% endfor %} +
-
- - - {% for row in session.auditorium.row_count|get_range %} - - - {% for seat in seats %} - - {% endfor %} - +
{{ row }} - - {{ seat.row_number }} - -
+ + {% for row in session.auditorium.row_count|get_range %} + + + {% for seat in seats %} + {% endfor %} - -
Ряд {{ row }} + + {{ seat.row_number }} + +
-
- -
+ + {% endfor %} + + +
+
diff --git a/CineSync/timetable/views.py b/CineSync/timetable/views.py index 9d4b80c..5a5ef88 100644 --- a/CineSync/timetable/views.py +++ b/CineSync/timetable/views.py @@ -45,7 +45,7 @@ def session_view(request, sess_id): FilmSession.objects.all(), id=sess_id, ) - height = session.auditorium.row_count * 6 + height = round(session.auditorium.row_count * 4 + 7) context = { 'session': session, 'seats': Row.objects.filter(auditorium_id=session.auditorium.id),