docs(marketing): improve section data model and section rendering

This commit is contained in:
Prad Nukala
2024-10-24 16:11:30 -04:00
parent c8657022a2
commit f14f6ff536
9 changed files with 97 additions and 1007 deletions
@@ -2,6 +2,10 @@ package sections
import models "github.com/onsonr/sonr/internal/orm/marketing"
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// architecture is the (4th) home page architecture section
var arch = &models.Architecture{
Heading: "Onchain Security with Offchain Privacy",
@@ -28,6 +32,11 @@ var arch = &models.Architecture{
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Architecture is the (4th) home page architecture section
templ Architecture() {
<!-- Features #2 -->
<section>
@@ -2,6 +2,10 @@ package sections
import models "github.com/onsonr/sonr/internal/orm/marketing"
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
var cta = &models.CallToAction{
Logo: &models.Image{
Src: "https://cdn.sonr.id/logo-zinc.svg",
@@ -20,6 +24,9 @@ var cta = &models.CallToAction{
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
templ CallToAction() {
<section>
<div class="py-12 md:py-20">
@@ -6,6 +6,10 @@ import (
"github.com/onsonr/sonr/pkg/nebula/global/ui"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// hero is the (1st) home page hero section
var hero = &models.Hero{
TitleFirst: "Simplified",
@@ -27,6 +31,9 @@ var hero = &models.Hero{
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
templ Hero() {
<!-- Hero -->
<section class="relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10">
@@ -5,6 +5,10 @@ import (
models "github.com/onsonr/sonr/internal/orm/marketing"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// highlights is the (2nd) home page highlights section
var highlights = &models.Highlights{
Heading: "The Internet Rebuilt for You",
@@ -33,6 +37,9 @@ var highlights = &models.Highlights{
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
templ Highlights() {
<!-- Features -->
<section class="relative bg-zinc-50">
@@ -1,5 +1,14 @@
package sections
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Lowlights is the (4th) home page lowlights section
templ Lowlights() {
<section class="bg-zinc-800">
<div class="py-12 md:py-20">
+1
View File
@@ -0,0 +1 @@
# Workers