Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/r/pierre115/home/gnomod.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module = "gno.land/r/pierre115/home"
gno = "0.9"
86 changes: 86 additions & 0 deletions packages/r/pierre115/home/home.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package home

import (
"chain/runtime"
"strings"

"gno.land/p/moul/md"
"gno.land/p/nt/ownable"
)

var (
OwnableAddress = ownable.NewWithAddress("g1e7r5eglptfejknps3xv2kxv6pc8wvd3wwtw6tg")

Picture = "![png](https://i.imgflip.com/a6o5jb.jpg)"

projects = []string{
"[Gnovisu](/r/pierre115/gnovisu) - Lib Svg for Data Visualisation.",
}

links = []string{
"[Github](https://github.com/gnolang/hackerspace/issues?q=sort:updated-desc+author:divisio74) - As part of the Epitech student program, I’ll be sharing my progress and insights over the next four months.",
"[Linkedin](https://www.linkedin.com/in/pierre-baud-/) - Feel free to connect with me on LinkedIn!",
}
)

func IsAuthorized(addr address) bool {
return addr == OwnableAddress.Owner()
}

func Render(_ string) string {
content := md.H1("Pierre115's Home") + md.H2("About Me") + modtext + Picture + renderProjects() + renderLinks()
return strings.ReplaceAll(content, "^", "")
}

func renderProjects() string {
var content string
content += "\n\n## Projects\n\n"
content += md.BulletList(projects)
return content
}

func renderLinks() string {
var content string
content += "\n\n## Links\n\n"
content += md.BulletList(links)
return content
}

func AddProjects(_ realm, name, url, desc string) {
if !IsAuthorized(runtime.PreviousRealm().Address()) {
panic("unauthorized")
}
entry := md.Link(name, url) + " - " + desc
projects = append(projects, entry)
}

func AddLinks(_ realm, name, url, desc string) {
if !IsAuthorized(runtime.PreviousRealm().Address()) {
panic("unauthorized")
}
entry := md.Link(name, url) + " - " + desc
links = append(links, entry)
}

func UpdatePicture(_ realm, name, url string) {
if !IsAuthorized(runtime.PreviousRealm().Address()) {
panic("unauthorized")
}
entry := md.Image(name, url)
Picture = entry
}

func UpdateIntro(_ realm, newText string) {
if !IsAuthorized(runtime.PreviousRealm().Address()) {
panic("unauthorized")
}
modtext = newText
}

var modtext = md.H3(`
I'm Pierre Baud, a second-year student at Epitech Lyon. Before diving into tech, I spent five years in business school, specializing in AI management and Finance where I developed a strong foundation in strategy and innovation.

Today, I’m passionate about software development and eager to bridge the gap between business and technology. I enjoy working with languages like Go, C/C++, and Python, and I’m currently exploring the blockchain ecosystem through hands-on projects.

I'm also very interested in dynamic NFTs and their potential to help artists through new forms of creative expression and ownership !
`)
Loading