-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcode-block.ftd
73 lines (51 loc) · 1.22 KB
/
code-block.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/lib as ft
-- ft.page: Events
-- ft.row-container:
-- code: hello world ftd
lang: ftd
\-- ftd.column show-repo:
repo o:
padding.px: 20
width: fill-container
border-radius.px: 5
-- end: ft.row-container
-- ft.footer:
-- end: ft.page
-- component code:
optional caption caption:
optional body body:
string lang:
-- ftd.column:
padding-bottom.px: 12
padding-top.px: 12
width: fill-container
-- ftd.text: $code.caption
if: {code.caption != NULL}
role: $inherited.types.copy-regular
color: $inherited.colors.text
width: fill-container
background.solid: $inherited.colors.custom.five
padding-top.px: 10
padding-bottom.px: 10
padding-left.px: 20
padding-right.px: 20
border-top-left-radius.px: 4
border-top-right-radius.px: 4
-- ftd.code:
text: $code.body
lang: $code.lang
width: fill-container
role: $inherited.types.copy-regular
color: $inherited.colors.text
padding-top.px: 10
padding-left.px: 20
padding-bottom.px: 10
padding-right.px: 20
background.solid: #2b303b
border-top-left-radius.px if {$code.caption == NULL}: 4
border-top-right-radius.px if {$code.caption == NULL}: 4
border-bottom-left-radius.px: 4
border-bottom-right-radius.px: 4
overflow-x: auto
-- end: ftd.column
-- end: code