ftd.code
ftd.code
is a component used to render the code component in an ftd
document.-- ftd.code:
lang: py
print("hello world")
print("hello world")
text: caption or body
text
-- ftd.code:
lang: py
text: print("hello world")
print("hello world")
lang: optional string
lang
property defines the language of the code. It is an
optional field. In case if the value is not provided, this
will take txt
as default value.lang
-- ftd.code:
lang: py
value = "hello world"
print(value)
value = "hello world"
print(value)
theme: optional string
The theme
property defines the theme for the code block.
It is an optional field with default value fastn-theme.dark
.
Note
: Use your desired background color
based on your theme when using
any fastn code themes since these fastn themes doesn't define any background
color by itself.
The available themes are:
fastn Themesfastn-theme.dark
theme-- ftd.code:
lang: py
theme: fastn-theme.dark
background.solid: black
value = "hello world"
print(value)
value = "hello world"
print(value)
fastn-theme.light
theme-- ftd.code:
lang: py
theme: fastn-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
material-theme.light
theme-- ftd.code:
lang: py
theme: material-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
material-theme.dark
theme-- ftd.code:
lang: py
theme: material-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
gruvbox-theme.light
theme-- ftd.code:
lang: py
theme: gruvbox-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
gruvbox-theme.dark
theme-- ftd.code:
lang: py
theme: gruvbox-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
coldark-theme.light
theme-- ftd.code:
lang: py
theme: coldark-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
coldark-theme.dark
theme-- ftd.code:
lang: py
theme: coldark-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.light
theme-- ftd.code:
lang: py
theme: duotone-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.dark
theme-- ftd.code:
lang: py
theme: duotone-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.earth
theme-- ftd.code:
lang: py
theme: duotone-theme.earth
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.forest
theme-- ftd.code:
lang: py
theme: duotone-theme.forest
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.sea
theme-- ftd.code:
lang: py
theme: duotone-theme.sea
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
duotone-theme.space
theme-- ftd.code:
lang: py
theme: duotone-theme.space
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
one-theme.light
theme-- ftd.code:
lang: py
theme: one-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
one-theme.dark
theme-- ftd.code:
lang: py
theme: one-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
vs-theme.light
theme-- ftd.code:
lang: py
theme: vs-theme.light
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
vs-theme.dark
theme-- ftd.code:
lang: py
theme: vs-theme.dark
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
dracula-theme
theme-- ftd.code:
lang: py
theme: dracula-theme
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
coy-theme
theme-- ftd.code:
lang: py
theme: coy-theme
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
laserwave-theme
theme-- ftd.code:
lang: py
theme: laserwave-theme
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
ztouch-theme
theme-- ftd.code:
lang: py
theme: ztouch-theme
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)
nightowl-theme
theme-- ftd.code:
lang: py
theme: nightowl-theme
background.solid: white
value = "hello world"
print(value)
value = "hello world"
print(value)