nx_connect_youth_page.nx source
↩ module page · 74 lines · 5929 B
1// nx_connect_youth_page.nx -- the CONNECT youth-rooms page, emitted ENTIRELY by composing nx_sclass_kit.
2// Proves the kit is a reusable capability: a second gorgeous page with ZERO hand-rolled CSS -- it inherits
3// the tokenized S-class shell + components, so it passes nx_brand_apply_enforced by construction.
4// Writes web_assets/lds_youth.html. license_tier: ORIGINAL expect_exit: 0
5import "nx_syscalls_x86_64.nx"
6import "nx_sclass_kit.nx"
7const K_MAGIC_262144: i64 = 262144
8
9func main() -> i64 {
10 let out: *u8 = sys_mmap(K_MAGIC_262144)
11 var o: i64 = 0
12
13 o = sk_open(out, o, "Connect for Youth — meet, play, belong" as *u8, "Connect" as *u8, 0)
14
15 o = sk_hero(out, o,
16 "★ For Latter-day Saint youth worldwide — always free, always safe" as *u8,
17 "Meet friends, play games," as *u8,
18 "belong." as *u8,
19 "A place for youth across the world to hang out, play, and make real friends who share your faith — in rooms that are safe by design, with no ads and no strangers sliding into your DMs." as *u8,
20 "Join a room" as *u8, "#join" as *u8,
21 "How we keep you safe" as *u8, "#safety" as *u8,
22 "Free forever · No ads to youth · Adults are never alone with you" as *u8)
23
24 o = sk_section_open(out, o, "rooms" as *u8, "What you can do" as *u8, "Rooms for every kind of hangout" as *u8, "Jump into a room and you are instantly with other youth — playing, talking, or planning something good." as *u8)
25 o = sk_card(out, o,
26 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"2\" y=\"7\" width=\"20\" height=\"11\" rx=\"4\"/><path d=\"M7 12h3M8.5 10.5v3\"/><circle cx=\"16.5\" cy=\"11.5\" r=\"1\"/><circle cx=\"18.5\" cy=\"14\" r=\"1\"/></svg>" as *u8,
27 "Game rooms" as *u8,
28 "Play together in real time — quick games you can pick up in seconds, with friends from your branch or the other side of the world." as *u8)
29 o = sk_card(out, o,
30 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 11.5a7.5 7.5 0 01-10.9 6.7L4 20l1.9-4.6A7.5 7.5 0 1120 11.5z\"/></svg>" as *u8,
31 "Hangout rooms" as *u8,
32 "Just talk. Chat and voice rooms to catch up, share memes, plan activities, or wind down together after a long week." as *u8)
33 o = sk_card(out, o,
34 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"9\" cy=\"8\" r=\"3.1\"/><path d=\"M3.6 19c.5-3 3-4.6 5.4-4.6S13.9 16 14.4 19\"/><circle cx=\"17\" cy=\"9\" r=\"2.3\"/><path d=\"M15.6 14.7c1.9.2 3.5 1.6 4 4.3\"/></svg>" as *u8,
35 "Activity groups" as *u8,
36 "Service projects, mission prep, scripture study, shared hobbies — find youth who care about the same things and do them together." as *u8)
37 o = sk_section_close(out, o)
38
39 o = sk_section_open(out, o, "safety" as *u8, "Safe by design" as *u8, "Rules built in, not just written down" as *u8, "Your parents can trust this place because the safety is in the software — each of these is proven with tests." as *u8)
40 o = sk_card(out, o,
41 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 3l7 2.5v5c0 4.6-3 8-7 9.5-4-1.5-7-4.9-7-9.5v-5L12 3z\"/><path d=\"M8.8 12l2.2 2.2 4.2-4.4\"/></svg>" as *u8,
42 "Two-deep, always" as *u8,
43 "An adult is never alone with youth in a room. It takes two adults present for any grown-up to be there at all — the same rule your leaders follow." as *u8)
44 o = sk_card(out, o,
45 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 11.5a7.5 7.5 0 01-10.9 6.7L4 20l1.9-4.6A7.5 7.5 0 0114.5 5.2\"/><path d=\"M4 4l16 16\"/></svg>" as *u8,
46 "No adult can DM you" as *u8,
47 "A grown-up you are not related to simply cannot send you a private message. There is no back channel — it is blocked by construction." as *u8)
48 o = sk_card(out, o,
49 "<svg width=\"26\" height=\"26\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.7\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12c2.4-4 5.8-6 9-6 1.1 0 2.1.2 3.1.6M21 12c-1 1.7-2.4 3.1-4 4.1\"/><circle cx=\"12\" cy=\"12\" r=\"2.6\"/><path d=\"M4 4l16 16\"/></svg>" as *u8,
50 "No ads, no selling you" as *u8,
51 "Youth see zero advertising and nothing about you is ever sold. You are here to make friends, not to be a product." as *u8)
52 o = sk_section_close(out, o)
53
54 o = sk_cta(out, o,
55 "Free, forever" as *u8,
56 "Your friends are one tap away." as *u8,
57 "Youth from your ward and from across the world are already here — playing, talking, and belonging. Come find them." as *u8,
58 "Create your free account" as *u8, "#top" as *u8,
59 "See how it works" as *u8, "#rooms" as *u8)
60
61 o = sk_close(out, o,
62 "A safe place for Latter-day Saint youth. Never congregation administration. Never proselytizing. Parents and leaders welcome under the two-deep rule." as *u8,
63 "Connect" as *u8)
64
65 let fd: i64 = sys_openat_wr("web_assets/lds_youth.html" as *u8, 420)
66 if fd < 0 { return 6 }
67 sys_write(fd, out, o)
68 sys_close(fd)
69 let banner: *u8 = "nx_connect_youth_page: wrote web_assets/lds_youth.html (composed from nx_sclass_kit)\n" as *u8
70 var bn: i64 = 0
71 while banner[bn] != 0 { bn = bn + 1 }
72 sys_write(1, banner, bn)
73 return 0
74}