more features
Some checks failed
CI/CD Pipeline / Lint (pull_request) Has been cancelled
CI/CD Pipeline / Test (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build Docker Image (pull_request) Has been cancelled
CI/CD Pipeline / Create Release (pull_request) Has been cancelled
Some checks failed
CI/CD Pipeline / Lint (pull_request) Has been cancelled
CI/CD Pipeline / Test (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (pull_request) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (pull_request) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (pull_request) Has been cancelled
CI/CD Pipeline / Build Docker Image (pull_request) Has been cancelled
CI/CD Pipeline / Create Release (pull_request) Has been cancelled
This commit is contained in:
@@ -46,9 +46,32 @@ func RenderUserPage(cfg *config.Config) string {
|
||||
var sb strings.Builder
|
||||
fmt.Fprintf(&sb, "Name: %s\n", cfg.Name)
|
||||
fmt.Fprintf(&sb, "Bio: %s\n", cfg.Bio)
|
||||
sb.WriteString("Links:\n")
|
||||
for _, link := range cfg.Links {
|
||||
fmt.Fprintf(&sb, "- %s (%s)\n", link.Title, link.URL)
|
||||
|
||||
sb.WriteString("\nContent Blocks:\n")
|
||||
for i, block := range cfg.Content {
|
||||
fmt.Fprintf(&sb, "\nBlock %d (type: %s):\n", i+1, block.Type)
|
||||
|
||||
for collectionName, items := range block.Collections {
|
||||
fmt.Fprintf(&sb, " Collection '%s':\n", collectionName)
|
||||
for _, item := range items {
|
||||
if item.Title != "" {
|
||||
fmt.Fprintf(&sb, " - %s", item.Title)
|
||||
}
|
||||
if item.URL != "" {
|
||||
fmt.Fprintf(&sb, " (url: %s)", item.URL)
|
||||
}
|
||||
if item.CopyText != "" {
|
||||
fmt.Fprintf(&sb, " (copy: %s)", item.CopyText)
|
||||
}
|
||||
if item.Text != "" {
|
||||
fmt.Fprintf(&sb, " (text: %s)", item.Text)
|
||||
}
|
||||
if item.Icon != "" {
|
||||
fmt.Fprintf(&sb, " [%s]", item.Icon)
|
||||
}
|
||||
sb.WriteString("\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user