Search Apps Documentation Source Content File Folder Download Copy Actions Download

render.gno

1.36 Kb · 44 lines
 1package cla
 2
 3import (
 4	"gno.land/p/moul/helplink"
 5	"gno.land/p/moul/md"
 6	"gno.land/p/moul/mdtable"
 7	"gno.land/p/nt/ufmt/v0"
 8)
 9
10func Render(path string) string {
11	out := md.H1("Contributor License Agreement (CLA)")
12
13	out += md.Paragraph("A Contributor License Agreement (CLA) must be signed before deploying packages.")
14	out += md.Paragraph(
15		"The Agreement governs Contributions uploaded, published, or made available " +
16			"for execution on the Gno.land blockchain network, and the " +
17			"related software and repositories used to publish such Contributions.",
18	)
19
20	if requiredHash == "" {
21		out += md.HorizontalRule()
22		out += md.H2("Status")
23		out += md.Paragraph(md.Bold("CLA enforcement is currently DISABLED."))
24		out += md.Paragraph("All package deployments are allowed.")
25		return out
26	}
27
28	out += md.HorizontalRule()
29	out += md.H2("Status")
30	out += md.Paragraph(md.Bold("CLA enforcement is ENABLED"))
31
32	if claURL != "" {
33		out += md.Paragraph("You can read the full agreement here: " + md.Link(claURL, claURL))
34	}
35
36	table := mdtable.Table{Headers: []string{"", ""}}
37	table.Append([]string{md.Bold("Required Hash"), md.InlineCode(requiredHash)})
38	table.Append([]string{md.Bold("Signers"), ufmt.Sprintf("%d contributor(s)", signatures.Size())})
39	out += table.String()
40
41	out += md.H3("Actions")
42	out += md.Paragraph(helplink.Func("Sign CLA", "Sign", "hash", requiredHash))
43	return out
44}