Search Apps Documentation Source Content File Folder Download Copy

z2_filetest.gno

2.35 Kb ยท 72 lines
 1package main
 2
 3import (
 4	"std"
 5
 6	"gno.land/r/moul/home"
 7)
 8
 9func main() {
10	std.TestSetOrigCaller("g1manfred47kzduec920z88wfr64ylksmdcedlf5")
11	home.AddTodo("aaa")
12	home.AddTodo("bbb")
13	home.AddTodo("ccc")
14	home.AddTodo("ddd")
15	home.AddTodo("eee")
16	home.UpdateStatus("Lorem Ipsum")
17	home.DeleteTodo(3)
18	println(home.Render("?debug=1"))
19}
20
21// Output:
22// Click [here](https://moul.github.io/gno-moul-home-web25/) to visit the full rendering experience.
23// # Manfred's (gn)home Dashboard
24// ## Meme
25// ![meme](https://i.imgflip.com/7ze8dc.jpg)
26//
27// ## Status
28// Lorem Ipsum
29//
30// [update](/r/moul/home$help&func=UpdateStatus)
31//
32// ## Personal TODO List (bullet list)
33// - fill this todo list... [x](/r/moul/home$help&func=DeleteTodo&idx=0)
34// - aaa [x](/r/moul/home$help&func=DeleteTodo&idx=1)
35// - bbb [x](/r/moul/home$help&func=DeleteTodo&idx=2)
36// - ddd [x](/r/moul/home$help&func=DeleteTodo&idx=3)
37// - eee [x](/r/moul/home$help&func=DeleteTodo&idx=4)
38// - [\[new\]](/r/moul/home$help&func=AddTodo)
39// ## Personal TODO List (table)
40// | ID | Item | Links |
41// | --- | --- | --- |
42// | #0 | fill this todo list... | [\[del\]](/r/moul/home$help&func=DeleteTodo&idx=0) |
43// | #1 | aaa | [\[del\]](/r/moul/home$help&func=DeleteTodo&idx=1) |
44// | #2 | bbb | [\[del\]](/r/moul/home$help&func=DeleteTodo&idx=2) |
45// | #3 | ddd | [\[del\]](/r/moul/home$help&func=DeleteTodo&idx=3) |
46// | #4 | eee | [\[del\]](/r/moul/home$help&func=DeleteTodo&idx=4) |
47// ## SVG Example
48// this feature may not work with the current gnoweb version and/or configuration.
49//
50// <svg xmlns="http://www.w3.org/2000/svg" width="500" height="500"><rect x="50" y="50" width="100" height="100" fill="red" /><circle cx="50" cy="50" r="100" fill="red" /><text x="100" y="100" fill="magenta">hello world!</text></svg>
51//
52// ## Debug
53// this feature may not work with the current gnoweb version and/or configuration.
54//
55// [toggle debug](/r/moul/home:)
56//
57// <details><summary>debug</summary>
58//
59// ### Logs
60// - hello world!
61// ### Metadata
62// | Key | Value |
63// | --- | --- |
64// | `std.CurrentRealm().PkgPath()` | gno.land/r/moul/home |
65// | `std.CurrentRealm().Addr()` | g1h8h57ntxadcze3f703skymfzdwa6t3ugf0nq3z |
66// | `std.PrevRealm().PkgPath()` |  |
67// | `std.PrevRealm().Addr()` | g1manfred47kzduec920z88wfr64ylksmdcedlf5 |
68// | `std.GetHeight()` | 123 |
69// | `time.Now().Format(time.RFC3339)` | 2009-02-13T23:31:30Z |
70//
71// </details>
72//