1module Route.Index exposing (ActionData, Data, Model, Msg, route)
3import BackendTask exposing (BackendTask)
4import Element exposing (..)
5import Element.Background as Background
6import Element.Border as Border
7import Element.Font as Font
8import FatalError exposing (FatalError)
12import Html.Attributes as Html
13import LanguageTag.Language
14import LanguageTag.Region
16import PagesMsg exposing (PagesMsg)
18import RouteBuilder exposing (App, StatelessRoute)
21import View exposing (View)
32type alias RouteParams =
41type alias ActionData =
45route : StatelessRoute RouteParams Data ActionData
51 |> RouteBuilder.buildNoState { view = view }
54data : BackendTask FatalError Data
56 BackendTask.succeed Data
58 (BackendTask.succeed "Hello!")
62 App Data ActionData RouteParams
66 { canonicalUrlOverride = Nothing
67 , siteName = "GigaWork"
69 { url = [] |> UrlPath.join |> Pages.Url.fromPath
71 , dimensions = Nothing
74 , description = "Преимальный коворкинг у дома"
75 , locale = Just ( LanguageTag.Language.ru, LanguageTag.Region.ru )
82 App Data ActionData RouteParams
84 -> View (PagesMsg Msg)
88 column [ width (fill |> maximum 700), centerX, padding 22, spacing 76 ]
90 [ el [ unbounded, Font.color green, Font.heavy, Font.size 72 ]
93 [ paddingEach { top = 9, right = 0, left = 18, bottom = 0 }
98 (text "Премиальный коворкинг у дома")
101 , column [ spacing 27, width fill ]
103 , paragraph [ noto, Font.size 18, Font.extraBold ] [ text "Москва, Рублевское шоссе, 22" ]
104 , el [ width fill, height (px 400) ] <|
107 [ Html.src "https://yandex.ru/map-widget/v1/?um=constructor%3A6021061543ae5cffca6803ac7a0fa84e727d918c403c59250d18022f582f81d0&source=constructor"
109 , Html.attribute "frameborder" "0"
113 , column [ spacing 24, width fill ]
114 [ subtitle "Преимущества"
115 , wrappedRow [ spacing 16, centerX, width fill ]
117 { title = "Удобное расположение"
118 , body = "10 минут от метро Молодежная.\nБесплатная парковка."
119 , image = image [ width fill, height fill ] { src = "/map.png", description = "Карта" }
122 { title = "Эргономичная мебель"
123 , body = "Каждое рабочее место оснащено креслом Herman Miller."
124 , image = image [ width fill, height fill ] { src = "/chair.png", description = "Кресло Herman Miller Mirra" }
127 { title = "Свежий кофе"
128 , body = "Каждую неделю заказываем для вас свежеобжаренный кофе."
129 , image = image [ width fill, height fill ] { src = "/coffee.jpg", description = "Кофе" }
132 { title = "Проводной интернет"
133 , body = "Каждое рабочее место оснащено выходом USB-C с зарядкой и интернетом."
134 , image = image [ width fill, height fill ] { src = "/usb-c.jpg", description = "Кабель USB-C" }
138 , body = "Для вашего пользования есть лазерный принтер."
139 , image = image [ width fill, height fill ] { src = "/printer.jpg", description = "Принтер" }
142 { title = "Лаундж-зона"
143 , body = "Предусмотрена лаундж-зона для отдыха."
144 , image = image [ width fill, height fill ] { src = "/sofa.jpg", description = "Диван" }
147 { title = "Кабинки для звонков"
148 , body = "Чтобы не мешать друг другу в коворкинге стоят кабинки для звонков."
152 { title = "Комфортные условия"
153 , body = "В коворкинге установлен кондиционер и очиститель воздуха."
154 , image = image [ width fill, height fill ] { src = "/air.jpg", description = "Воздух" }
158 , column [ spacing 27, width fill ]
159 [ subtitle "График работы"
160 , row [ width fill, spaceEvenly ]
161 [ workDayCard { title = "Пн", from = "9:00", to = "18:00" }
162 , workDayCard { title = "Вт", from = "9:00", to = "18:00" }
163 , workDayCard { title = "Ср", from = "9:00", to = "18:00" }
164 , workDayCard { title = "Чт", from = "9:00", to = "18:00" }
165 , workDayCard { title = "Пт", from = "9:00", to = "18:00" }
166 , weekendDayCard { title = "Сб" }
167 , weekendDayCard { title = "Вс" }
170 , column [ spacing 27, width fill ]
172 , row [ width fill, spaceEvenly ]
173 [ priceCard { title = "1 день", price = "2 000 ₽", subtitle = "" }
174 , priceCard { title = "1 месяц", price = "25 000 ₽", subtitle = "" }
175 , priceCard { title = "3 месяца", price = "66 000 ₽", subtitle = "22 000 ₽ / месяц" }
176 , priceCard { title = "6 месяца", price = "120 000 ₽", subtitle = "20 000 ₽ / месяц" }
180 , el [ height (px 76) ] none
185mockImage : Element msg
188 [ Background.color (rgb 0.3 0.3 0.3)
195subtitle : String -> Element msg
197 paragraph [ Font.color green, Font.size 36, Font.heavy, unbounded ] [ text t ]
200unbounded : Attribute msg
202 Font.family [ Font.typeface "Unbounded" ]
207 Font.family [ Font.typeface "Noto Sans" ]
220button : String -> Element msg
223 [ Border.rounded 1000
228 , color = rgba255 0 0 0 0.2
235 , color = rgba255 0 0 0 0.2
243 , color = rgba255 0 0 0 0.2
251 [ Border.rounded 1000
253 { offset = ( -4, -4 )
256 , color = rgba 255 255 255 1
260 { offset = ( -4, -4 )
263 , color = rgba 255 255 255 1
268 { offset = ( -4, -4 )
271 , color = rgba 255 255 255 0.8
278 [ Background.color background
279 , Border.rounded 1000
284 , color = rgba255 255 255 255 1
291 , color = rgba255 255 255 255 1
299 , color = rgba255 255 255 255 1
307 { offset = ( -4, -4 )
310 , color = rgba255 0 0 0 0.15
314 { offset = ( -4, -4 )
317 , color = rgba255 0 0 0 0.2
322 { offset = ( -4, -4 )
325 , color = rgba255 0 0 0 0.2
329 , Border.rounded 1000
337card : { title : String, body : String, image : Element msg } -> Element msg
338card { title, body, image } =
341 { offset = ( -4, -4 )
344 , color = rgb 255 255 255
347 , width (minimum 312 <| fill)
356 , color = rgba 0 0 0 0.2
365 [ paragraph [ unbounded, Font.extraBold, Font.size 18, spacing 2 ] [ text title ]
366 , paragraph [ noto, Font.size 14, spacing 1 ] [ text body ]
385animate : Attribute msg
387 htmlAttribute <| Html.class "animate"
390indentedCard : { title : String, body : Element msg, color : Color, minWidth : Int } -> Element msg
391indentedCard { title, body, color, minWidth } =
393 [ Background.color color
398 , color = rgba255 0 0 0 0.2
405 { offset = ( -4, -4 )
408 , color = rgb255 255 255 255
413 column [ padding 4, width (minimum minWidth <| fill), height (px 132) ]
424 , color = rgba255 0 0 0 0.15
432 , Background.color background
439 { offset = ( -4, -4 )
442 , color = rgb255 255 255 255
452 el [ centerX, centerY ]
458workDayCard : { title : String, from : String, to : String } -> Element msg
459workDayCard { title, from, to } =
463 column [ centerX, centerY, unbounded, Font.size 14, Font.heavy, spacing 5 ] <|
464 List.map (el [ centerX ])
465 [ text from, text "—", text to ]
471weekendDayCard : { title : String } -> Element msg
472weekendDayCard { title } =
476 el [ centerX, centerY, unbounded, Font.size 14, Font.heavy, spacing 5 ] <|
477 el [ centerX ] (text "Вых.")
478 , color = rgb255 246 214 214
483priceCard : { title : String, price : String, subtitle : String } -> Element msg
489 column [ centerX, centerY, spacing 5 ] <|
490 [ el [ centerX, unbounded, Font.size 14, Font.heavy ] (text cfg.price)
491 , el [ centerX, noto, Font.size 14, Font.regular ] (text cfg.subtitle)
497callToAction : Element msg
499 el [ centerX ] <| link [] { url = "https://t.me/ilyakooo0", label = button "Узнать о свободных местах" }
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list