forked from tidbyt/pixlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.star
47 lines (44 loc) · 2.95 KB
/
example.star
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
load("render.star", "render")
load("schema.star", "schema")
load("encoding/base64.star", "base64")
def main(config):
encoded = config.get("photo", DEFAULT_PHOTO)
photo = base64.decode(encoded)
return render.Root(
child = render.Image(photo),
)
def get_schema():
return schema.Schema(
version = "1",
fields = [
schema.PhotoSelect(
id = "photo",
name = "Add Photo",
desc = "A photo to display.",
icon = "gear",
),
],
)
DEFAULT_PHOTO = """
iVBORw0KGgoAAAANSUhEUgAAAEAAAAAgCAYAAACinX6EAAAG1klEQVR4Ab1YTWhdRRQ+TW6x4RVj8UljlBgSxZq0cdEmaVMQ+gQRf0AQya6mmIVVdGWgO3VX
0JWg6UJR60KkCAVbkIJRA42mIYtWjZEmIURiXjCSRvJIgqT1fnPvmXfm3JmXlyJ+kN53Z86c/3Pm3EYHTzbdIoGWlj3kw8zMstnj58hPK9SQu+mlzQ3tNM+9
/bszPKSMxQ9Xabp708sjxFvyB0qFfzK6QzeJ1tFaQ4dzWqdIvtw3dhdtjN2i+c4bDlNW3H3WULFU4zDrOVCfGDa0ag0EtFC5x/AZ3NnVSGNX/rA6SMPBEzyw
xk4AjdYJ4H2cgXOgJzspkgeKbX/TwYk7DRNWSEdcOkSD14vdNcbreh2AwiOlWHi333jwvztf5/BNlI15khtx+Vvz0o6QmS2z12QARw6KjsdO0AyKqbewVkyV
0YJ0BOFtaTjopFNkFKSsztT4r74tpivlPZRLTxqAB6/cSzP5ZWuYjj70YZmlwk27r/WMsFCumRrnsA+8x8zYEJQPSofPhQQyZJ1KeTCcAyIh12D0VMtCLISM
I4y8/LLlJflOI9NK/oCBj9MDIGTjC7cHSIZtvybCik2LlhlnhzReGiRLhnvBtGpSRaWgbrAom8XRcs/gxt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