@@ -11,7 +11,9 @@ import Svg.Styled.Attributes as SAttr
11
11
12
12
13
13
14
- -- LAMBDA LOGO --
14
+ -- -----------------------------------------------------------------------------
15
+ -- LAMBDA LOGOS
16
+ -- -----------------------------------------------------------------------------
15
17
16
18
17
19
animFill =
@@ -60,7 +62,7 @@ lambdaPath =
60
62
]
61
63
)
62
64
, Css . property " stroke-dasharray" " 1000"
63
- , Css . property " animation-duration " " 2s "
65
+ , Css . animationDuration ( sec 2 )
64
66
, Css . property " animation-timing-function" " ease-in-out"
65
67
, Css . property " stroke" Theme . colorRaw. primary
66
68
, Css . property " stroke-width" " 2px"
@@ -96,7 +98,9 @@ lambdaLogoSmall =
96
98
97
99
98
100
101
+ -- -----------------------------------------------------------------------------
99
102
-- Common Elements
103
+ -- -----------------------------------------------------------------------------
100
104
101
105
102
106
boxStyled =
@@ -162,6 +166,20 @@ headerTitle size txt =
162
166
[ text txt ]
163
167
164
168
169
+ headerTitleXLarge =
170
+ headerTitle XLarge
171
+
172
+
173
+ headerTitleLarge =
174
+ headerTitle Large
175
+
176
+
177
+ type alias LinkData =
178
+ { url : String
179
+ , label : String
180
+ }
181
+
182
+
165
183
link themeColor { url, label } =
166
184
a
167
185
[ href url
@@ -184,6 +202,12 @@ linkText =
184
202
link Theme . color. text
185
203
186
204
205
+
206
+ -- -----------------------------------------------------------------------------
207
+ -- ICONS
208
+ -- -----------------------------------------------------------------------------
209
+
210
+
187
211
icon srcIcon =
188
212
img
189
213
[ src srcIcon
@@ -209,55 +233,140 @@ navigationIcon =
209
233
icon " assets/navigation-feather-icon.svg"
210
234
211
235
236
+
237
+ -- -----------------------------------------------------------------------------
238
+ -- HOME ELEMENTS
239
+ -- -----------------------------------------------------------------------------
240
+
241
+
242
+ type alias ContentHome =
243
+ { title : String
244
+ , groupLink : LinkData
245
+ , textInvite : String
246
+ , description : String
247
+ }
248
+
249
+
250
+ animaWidth =
251
+ Anima . property " width"
252
+
253
+
254
+ lambdaSeparator =
255
+ div
256
+ [ css
257
+ [ Css . maxWidth ( px 120 )
258
+ , backgroundColor Theme . color. primary
259
+ , borderColor Theme . color. primary
260
+ , borderWidth ( px 1 )
261
+ , borderStyle solid
262
+ , Css . height ( px 6 )
263
+ , Css . width ( pct 100 )
264
+ , margin3 ( rem 1.5 ) ( rem 0 ) ( rem 3 )
265
+ , animationName
266
+ ( Anima . keyframes
267
+ [ ( 0 , [ animaWidth " 0%" , Anima . backgroundColor Theme . color. background ] )
268
+ , ( 80 , [ animaWidth " 30%" , Anima . backgroundColor Theme . color. background ] )
269
+ , ( 100 , [ animaWidth " 100%" , Anima . backgroundColor Theme . color. primary ] )
270
+ ]
271
+ )
272
+ , Css . animationDuration ( sec 2 )
273
+ , Css . property " animation-timing-function" " ease-in-out"
274
+ , Theme . breakpoint. tablet [ Css . height ( px 4 ) , Css . maxWidth ( px 60 ) ]
275
+ ]
276
+ ]
277
+ []
278
+
279
+
280
+ homeParagraphStyled =
281
+ styled textStyled
282
+ [ Theme . textSize. large
283
+ , textAlign center
284
+ , Theme . breakpoint. tablet [ Theme . textSize. medium ]
285
+ ]
286
+
287
+
288
+ lambdaDescription contents =
289
+ boxStyled
290
+ [ css
291
+ [ padding ( rem 4 )
292
+ , backgroundColor Theme . color. backgroundAlpha
293
+ , Theme . breakpoint. tablet [ padding ( rem 1 ) ]
294
+ ]
295
+ ]
296
+ [ homeParagraphStyled []
297
+ [ text contents. description ]
298
+ , homeParagraphStyled []
299
+ [ text contents. textInvite
300
+ , linkDefault contents. groupLink
301
+ , text " ."
302
+ ]
303
+ ]
304
+
305
+
306
+ homeContent : ContentHome -> Html msg
307
+ homeContent contents =
308
+ div
309
+ [ css
310
+ [ displayFlex
311
+ , justifyContent center
312
+ , flexDirection column
313
+ , alignItems center
314
+ , padding3 ( rem 6 ) ( rem 0 ) ( rem 0 )
315
+ , maxWidth ( px 720 )
316
+ , boxSizing borderBox
317
+ , margin auto
318
+ , zIndex ( int 2 )
319
+ , position relative
320
+ , Theme . breakpoint. tablet [ maxWidth ( px 520 ) ]
321
+ ]
322
+ ]
323
+ [ lambdaLogoLarge
324
+ , headerTitleXLarge contents. title
325
+ , lambdaSeparator
326
+ , lambdaDescription contents
327
+ ]
328
+
329
+
330
+
331
+ -- -----------------------------------------------------------------------------
332
+ -- REPOSITORY ELEMENTS
333
+ -- -----------------------------------------------------------------------------
334
+
335
+
212
336
repositoryRow repoLinkData =
213
337
div
214
338
[ css
215
- -- TODO: use the Styles
216
339
[ displayFlex
217
340
, padding2 ( rem 1 ) ( rem 0 )
218
341
, alignItems center
219
342
]
220
343
]
221
344
[ div
222
345
[ css
223
- -- TODO: Refactor Icon element
224
- -- TODO: use the StyleGuide
225
- -- TODO: add an interaction here
226
346
[ paddingRight ( rem 3 )
227
- , withMedia
228
- [ only screen [ Media . maxWidth ( px 800 ) ] ]
229
- [ paddingRight ( rem 1.5 ) ]
347
+ , Theme . breakpoint. tablet [ paddingRight ( rem 1.5 ) ]
230
348
]
231
349
]
232
350
[ githubIcon ]
233
351
, div []
234
- -- TODO: transform the link* in a styled element
235
352
[ spanStyled
236
353
[ css
237
354
[ Theme . textSize. large
238
- , Theme . breakpoint. tablet
239
- [ Theme . textSize. medium ]
355
+ , Theme . breakpoint. tablet [ Theme . textSize. medium ]
240
356
]
241
357
]
242
358
[ linkText repoLinkData ]
243
359
]
244
360
]
245
361
246
362
247
-
248
- -- TODO: split this element, plz
249
-
250
-
251
363
repositoryContainer { title, content } =
252
364
div
253
365
[ css
254
366
[ padding2 ( rem 4 ) ( rem 0 )
255
- , withMedia
256
- [ only screen [ Media . maxWidth ( px 800 ) ] ]
257
- [ Css . maxWidth ( pct 100 ) ]
367
+ , Theme . breakpoint. tablet [ Css . maxWidth ( pct 100 ) ]
258
368
]
259
369
]
260
- -- TODO: add an interation here
261
370
[ boxStyled
262
371
[ css
263
372
[ display inlineBlock
@@ -290,6 +399,23 @@ repositoryContainer { title, content } =
290
399
]
291
400
292
401
402
+ repositoriesSection repositories =
403
+ section
404
+ [ css
405
+ [ displayFlex
406
+ , flexWrap Css . wrap
407
+ , justifyContent spaceAround
408
+ ]
409
+ ]
410
+ ( List . map repositoryContainer repositories)
411
+
412
+
413
+
414
+ -- -----------------------------------------------------------------------------
415
+ -- LANGUAGES ELEMENTS
416
+ -- -----------------------------------------------------------------------------
417
+
418
+
293
419
languageWrapper ( { label, rot, url } as lang) =
294
420
let
295
421
( tx, ty ) =
@@ -311,3 +437,82 @@ languageWrapper ({ label, rot, url } as lang) =
311
437
]
312
438
]
313
439
[ linkDefault { label = label, url = url } ]
440
+
441
+
442
+ languageContainer languages =
443
+ div
444
+ [ css
445
+ [ minWidth ( px 240 )
446
+ , maxWidth ( px 720 )
447
+ , minHeight ( rem 8 )
448
+ , displayFlex
449
+ , Theme . breakpoint. tablet [ minHeight ( rem 6 ) ]
450
+ , flex ( int 1 )
451
+ , justifyContent spaceBetween
452
+ ]
453
+ ]
454
+ ( List . map languageWrapper languages)
455
+
456
+
457
+ languagesSection languagesTuple =
458
+ section
459
+ [ css
460
+ [ displayFlex
461
+ , padding2 ( rem 12 ) ( rem 2 )
462
+ , maxWidth ( px 1440 )
463
+ , overflow Css . hidden
464
+ , flexWrap Css . wrap
465
+ , Css . width ( pct 100 )
466
+ , Theme . breakpoint. tablet [ padding2 ( rem 2 ) ( rem 1 ) ]
467
+ ]
468
+ ]
469
+ [ div [ css [ padding4 ( rem 0 ) ( rem 3 ) ( rem 0 ) ( rem 1 ) ] ] [ lambdaLogoSmall ]
470
+ , languageContainer ( Tuple . first languagesTuple)
471
+ , languageContainer ( Tuple . second languagesTuple)
472
+ ]
473
+
474
+
475
+
476
+ -- -----------------------------------------------------------------------------
477
+ -- FOOTER ELEMENTS
478
+ -- -----------------------------------------------------------------------------
479
+
480
+
481
+ footerLink data =
482
+ div [ css [ displayFlex, padding3 ( rem 2 ) ( rem 1 ) ( rem 0 ) ] ]
483
+ [ data. icon
484
+ , div [ css [ paddingLeft ( rem 1.5 ) ] ]
485
+ [ spanStyled
486
+ [ css
487
+ [ Theme . textSize. large
488
+ , Theme . breakpoint. tablet [ Theme . textSize. medium ]
489
+ ]
490
+ ]
491
+ [ linkText data. link ]
492
+ ]
493
+ ]
494
+
495
+
496
+ footerSection linksData title =
497
+ footer
498
+ [ css
499
+ [ -- TODO: create some styles for flex*
500
+ displayFlex
501
+ , flexDirection column
502
+ , alignItems center
503
+ , justifyContent center
504
+ , padding2 ( rem 3 ) ( rem 0 )
505
+ , backgroundColor Theme . color. footer
506
+ ]
507
+ ]
508
+ -- Split this elements
509
+ [ div [ css [ displayFlex ] ]
510
+ [ lambdaLogoMedium
511
+ , div [ css [ paddingLeft ( rem 2 ) ] ] [ headerTitleLarge title ]
512
+ ]
513
+ , div [ css [ displayFlex, justifyContent spaceAround ] ]
514
+ ( List . map
515
+ footerLink
516
+ linksData
517
+ )
518
+ ]
0 commit comments