-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(examples): add source code view doc, add
r/
README (#3163)
<!-- please provide a detailed description of the changes made in this pull request. --> ## Description Related to #3084 Adds a realm that teaches the user about the source code viewer in `gnoweb`. It also adds a `r/` root README. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests </details> --------- Co-authored-by: Morgan <[email protected]>
- Loading branch information
Showing
7 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# `r/` | ||
|
||
This directory primarily contains realms. It further branches out into namespaces: | ||
- `demo` - realms meant to demonstrate Gno functionality | ||
- `docs` - realms meant to teach about specific packages and concepts | ||
- `gnoland` - official gno.land realms | ||
- `gov` - governance realms | ||
- `sys` - system realms | ||
- `x` - experimental realms | ||
- `*` - can include personal namespaces, such as `manfred`, `leon`, etc. |
2 changes: 1 addition & 1 deletion
2
examples/gno.land/r/docs/add/add.gno → examples/gno.land/r/docs/adder/adder.gno
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package add | ||
package adder | ||
|
||
import ( | ||
"strconv" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
examples/gno.land/r/docs/add/gno.mod → examples/gno.land/r/docs/adder/gno.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module gno.land/r/docs/add | ||
module gno.land/r/docs/adder | ||
|
||
require gno.land/p/moul/txlink v0.0.0-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module gno.land/r/docs/source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package source | ||
|
||
// Welcome to the source code of this realm! | ||
|
||
func Render(_ string) string { | ||
return `# Viewing source code | ||
gno.land makes it easy to view the source code of any pure | ||
package or realm, by using ABCI queries. | ||
gno.land's web frontend, ` + "`gnoweb`, " + ` makes this easy by | ||
providing a intuitive UI that fetches the source of the | ||
realm, that you can inspect anywhere by simply clicking | ||
on the [source] button. | ||
Check it out in the top right corner! | ||
` | ||
} |