diff --git a/TicketOffice/Pages/Routes/Index.cshtml b/TicketOffice/Pages/Routes/Index.cshtml index 61e9906..cebd8a5 100644 --- a/TicketOffice/Pages/Routes/Index.cshtml +++ b/TicketOffice/Pages/Routes/Index.cshtml @@ -45,129 +45,129 @@
- - + + + + - - - - - - - + + + + + + - @foreach (var route in Model.Routes) - { - - - - - - - - - - } + @foreach (var route in Model.Routes) + { + + + + + + + + + + }
- № автобуса - @if (Model.SortString == "increasingNumber") +
+ № автобуса + @if (Model.SortString == "increasingNumber") + { + 🠕 + } + else if (Model.SortString == "descendingNumber") + { + 🠗 + } + else + { + + } + + Звідки / Куди + + Дата + +
+ Відправлення + @if (Model.SortString == "increasingDeparture") { - 🠕 + 🠕 } - else if (Model.SortString == "descendingNumber") + else if (Model.SortString == "descendingDeparture") { - 🠗 + 🠗 } else { - + } -
- Звідки / Куди - - Дата - -
- Відправлення - @if (Model.SortString == "increasingDeparture") - { - 🠕 - } - else if (Model.SortString == "descendingDeparture") - { - 🠗 - } - else - { - - } -
-
- Прибуття - @if (Model.SortString == "increasingArrival") - { - 🠕 - } - else if (Model.SortString == "descendingArrival") - { - 🠗 - } - else - { - - } -
-
- Тривалість - @if (Model.SortString == "increasingDuration") + +
+ Прибуття + @if (Model.SortString == "increasingArrival") { - 🠕 + 🠕 } - else if (Model.SortString == "descendingDuration") + else if (Model.SortString == "descendingArrival") { - 🠗 + 🠗 } else { - + } -
- Вільніих місць - - Дії -
+ Тривалість + @if (Model.SortString == "increasingDuration") + { + 🠕 + } + else if (Model.SortString == "descendingDuration") + { + 🠗 + } + else + { + + } + + Вільніих місць + + Дії +
-
@route.Number
- -
-
@route.Cities.First().Name
-
@route.Cities.Last().Name
-
-
- - Відправлення - - - @route.Cities.First().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), - @route.Cities.First().DepartureTime?.ToString("dd.MM.yyyy") - -
-
- Прибуття - - @route.Cities.Last().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), - @route.Cities.Last().ArrivalTime?.ToString("dd.MM.yyyy") - -
-
-
@route.Cities.First().DepartureTime?.ToString("HH:mm")
-
@route.Cities.Last().ArrivalTime?.ToString("HH:mm")
-
- @{ TimeSpan? duration = route.Cities.Last().ArrivalTime - route.Cities.First().DepartureTime; } - @($"{duration?.TotalHours.ToString().Split(",")[0]}:{duration?.Minutes}") - - @(route.Capacity - route.Tickets.Count) - - Вибрати -
+
@route.Number
+ +
+
@route.Cities.First().Name
+
@route.Cities.Last().Name
+
+
+ + Відправлення + + + @route.Cities.First().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), + @route.Cities.First().DepartureTime?.ToString("dd.MM.yyyy") + +
+
+ Прибуття + + @route.Cities.Last().ArrivalTime?.ToString("f").Split(",")[0].ToLower(), + @route.Cities.Last().ArrivalTime?.ToString("dd.MM.yyyy") + +
+
+
@route.Cities.First().DepartureTime?.ToString("HH:mm")
+
@route.Cities.Last().ArrivalTime?.ToString("HH:mm")
+
+ @{ TimeSpan? duration = route.Cities.Last().ArrivalTime - route.Cities.First().DepartureTime; } + @($"{duration?.TotalHours.ToString().Split(",")[0]}:{duration?.Minutes}") + + @(route.Capacity - route.Tickets.Count) + + Вибрати +
@@ -179,4 +179,94 @@ } - \ No newline at end of file + + +@if (Model.Routes != null) +{ + foreach (var route in Model.Routes) + { + + } +} \ No newline at end of file diff --git a/TicketOffice/wwwroot/css/Routes.css b/TicketOffice/wwwroot/css/Routes.css index aa247dc..f432b46 100644 --- a/TicketOffice/wwwroot/css/Routes.css +++ b/TicketOffice/wwwroot/css/Routes.css @@ -20,6 +20,8 @@ body { margin: 2.5rem auto; } +/* ~~~~~~ search block ~~~~~~ */ + .search-block { background: #eaeef1; border-radius: 0.5rem; @@ -78,6 +80,8 @@ input.search-btn:hover { opacity: 0.8; } +/* ~~~~~~ route list table ~~~~~~ */ + .route-list { margin-top: 3rem; } @@ -203,4 +207,71 @@ td.time, td.duration { text-align: center; margin-top: 2rem; line-height: 3rem; +} + +/* ~~~~~~ popup route list ~~~~~~ */ + +.popup-container { + position: fixed; + top: 0; + left: 0; + z-index: 100; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.25); + display: none; +} + +.popup { + width: 35rem; + height: 30rem; + background: #eaeef1; + position: fixed; + top: calc(50% - 15rem); + left: calc(50% - 17.5rem); + border-radius: 0.5rem; + box-shadow: 0 10px 15px 5px #6c6e6f; +} + +.popup-header { + border-radius: 0.5rem 0.5rem 0 0; + height: 3rem; + background: #a1b0b9; + color: white; + font-weight: 700; + font-size: 1.1rem; + text-align: center; + line-height: 3rem; +} + +.popup-body { + width: calc(100% - 2rem); + height: calc(100% - 5rem); + padding: 1rem 1rem; +} + +.popup-body-main { + height: calc(100% - 4rem); + overflow-y: auto; + overflow-x: hidden; +} + +tr.tr-intermediate { + font-weight: 500; +} + +th.th-route, td.td-route { + height: 4rem; + line-height: 1.25rem; + text-align: center; + padding: 0 0.5rem; +} + +tr.tr-departure, tr.tr-arrival { + font-weight: 700; +} + +.popup-body-footer { + text-align: center; + margin-top: 1rem; } \ No newline at end of file