-
Notifications
You must be signed in to change notification settings - Fork 1
/
image.ftd
75 lines (56 loc) · 1.46 KB
/
image.ftd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- import: fifthtry.github.io/fastn-ui/typography as tf
-- import: fifthtry.github.io/fastn-ui/lib as ft
-- import: fifthtry.github.io/fastn-ui/assets
-- ft.page: Events
-- ft.col-container:
width: 1160
spacing: 30
-- image: This is the image with caption
src: $assets.files.static.events.event-banner.svg
width.fixed.px: 500
-- image: This is the image with caption
src: $assets.files.static.events.event-banner.svg
-- end: ft.col-container
-- ft.footer:
-- end: ft.page
-- component image:
optional caption caption:
optional body body:
optional string link:
optional ftd.align alignment: center
optional ftd.resizing width:
optional ftd.resizing height:
ftd.image-src src:
-- ftd.column:
width if {image.width != NULL}: auto
width: auto
max-width.fixed.px: 800
height: auto
align-content if {image.width == NULL}: center
-- ftd.image:
src: $image.src
width: $image.width
height: $image.height
max-width.fixed.px: 800
;;align-content: $image.alignment
-- ftd.text:
if: {image.caption != NULL}
text: $image.caption
color: $inherited.colors.text
;;width if {image.width != NULL}: $width
width: fill-container
role: $inherited.types.label-large
border-bottom-left-radius.px: 5
border-bottom-right-radius.px: 5
background.solid:$inherited.colors.background.step-1
padding-vertical.px: 8
padding-horizontal.px: 20
text-align: center
-- ftd.column:
if: {image.body != NULL}
margin-top.px: 20
-- tf.markdown:
body: $image.body
-- end: ftd.column
-- end: ftd.column
-- end: image