Skip to content

Commit

Permalink
move todo list tutorial into main content area; add draft widgets cat…
Browse files Browse the repository at this point in the history
…egory page
  • Loading branch information
kkoreilly committed Dec 17, 2024
1 parent 4cf513f commit b5a7fbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
This tutorial shows how to make a todo list app using Cogent Core. You should read the [basics](../basics) section if you haven't yet before starting this.
+++
Categories = ["Tutorials"]
+++

This [[tutorials|tutorial]] shows how to make a **todo list** app using Cogent Core.

We will represent todo list items using an `item` struct type:

Expand All @@ -9,7 +13,7 @@ type item struct {
}
```

We can create a slice of these items and then represent them with a [[doc:core.Table]] widget:
We can create a slice of these items and then represent them with a [[table]] widget:

```Go
type item struct {
Expand All @@ -20,7 +24,7 @@ items := []item{{Task: "Code"}, {Task: "Eat"}}
core.NewTable(b).SetSlice(&items)
```

We can add a button for adding a new todo list item:
We can add a [[button]] for adding a new todo list item:

```Go
type item struct {
Expand Down
1 change: 1 addition & 0 deletions docs/content/widgets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**Widgets** contains a list of all [[widget]] types.

0 comments on commit b5a7fbb

Please sign in to comment.