Skip to content

Commit 56e366c

Browse files
stackdumpclaude
andcommitted
Tighten hero, add API quick-start section
Remove 80vh min-height from hero. Add curl examples showing poll creation, ZK vote casting, and results retrieval. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 14c9441 commit 56e366c

2 files changed

Lines changed: 62 additions & 3 deletions

File tree

public/bitwrap.css

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,46 @@ body {
6565

6666
/* Hero */
6767
.hero {
68-
min-height: 80vh;
6968
display: flex;
7069
align-items: center;
7170
justify-content: center;
72-
padding: 120px 32px 80px;
71+
padding: 120px 32px 64px;
7372
background: radial-gradient(ellipse at 50% 30%, rgba(0,255,163,0.05) 0%, transparent 70%);
7473
}
7574

75+
/* Quick-start code block */
76+
.quickstart {
77+
max-width: 720px;
78+
margin: 0 auto;
79+
text-align: left;
80+
}
81+
82+
.quickstart-label {
83+
font-family: var(--mono);
84+
font-size: 0.75rem;
85+
color: var(--text-muted);
86+
margin-bottom: 8px;
87+
text-transform: uppercase;
88+
letter-spacing: 0.08em;
89+
}
90+
91+
.quickstart pre {
92+
background: var(--bg-card);
93+
border: 1px solid var(--border);
94+
border-radius: var(--radius);
95+
padding: 20px 24px;
96+
overflow-x: auto;
97+
font-family: var(--mono);
98+
font-size: 0.85rem;
99+
line-height: 1.7;
100+
color: var(--text);
101+
margin: 0;
102+
}
103+
104+
.quickstart pre .comment { color: #555; }
105+
.quickstart pre .string { color: var(--accent); }
106+
.quickstart pre .flag { color: #888; }
107+
76108
.hero-content {
77109
text-align: center;
78110
max-width: 700px;

public/index.html

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,38 @@ <h1>Anonymous On-Chain Voting</h1>
2626
<p>Create polls where every vote is backed by a ZK proof. No one sees how you voted. Everyone can verify the result is correct. Deploy to any EVM chain.</p>
2727
<div class="hero-buttons">
2828
<a class="btn-primary" href="/poll">Create a Poll</a>
29-
<a class="btn-secondary" href="#how-it-works">How It Works</a>
29+
<a class="btn-secondary" href="#quick-start">Quick Start</a>
3030
</div>
3131
</div>
3232
</section>
3333

34+
<section class="section" id="quick-start">
35+
<h2>Quick Start</h2>
36+
<p class="section-sub">Three API calls. Create a poll, cast a ZK-proven vote, read the results.</p>
37+
<div class="quickstart">
38+
<div class="quickstart-label">Create a poll</div>
39+
<pre><span class="flag">curl</span> <span class="flag">-X POST</span> https://api.bitwrap.io/api/polls <span class="flag">\
40+
-H</span> <span class="string">"Content-Type: application/json"</span> <span class="flag">\
41+
-d</span> <span class="string">'{"title":"Board Vote","choices":["Approve","Reject","Abstain"],"duration":"24h"}'</span>
42+
43+
<span class="comment"># → {"id":"p_8f3a...","status":"active","choices":3}</span></pre>
44+
</div>
45+
<div class="quickstart" style="margin-top: 20px;">
46+
<div class="quickstart-label">Cast a vote with ZK proof</div>
47+
<pre><span class="flag">curl</span> <span class="flag">-X POST</span> https://api.bitwrap.io/api/polls/p_8f3a.../vote <span class="flag">\
48+
-H</span> <span class="string">"Content-Type: application/json"</span> <span class="flag">\
49+
-d</span> <span class="string">'{"choice":0,"secret":"voter-entropy","nullifier":"unique-id"}'</span>
50+
51+
<span class="comment"># → {"nullifier":"0x4b2c...","proof":{"a":...,"b":...,"c":...},"verified":true}</span></pre>
52+
</div>
53+
<div class="quickstart" style="margin-top: 20px;">
54+
<div class="quickstart-label">Get results</div>
55+
<pre><span class="flag">curl</span> https://api.bitwrap.io/api/polls/p_8f3a.../results
56+
57+
<span class="comment"># → {"tally":[12,7,3],"total":22,"choices":["Approve","Reject","Abstain"]}</span></pre>
58+
</div>
59+
</section>
60+
3461
<section class="section" id="how-it-works">
3562
<h2>Vote &rarr; Prove &rarr; Tally</h2>
3663
<p class="section-sub">Voter privacy and result integrity in one protocol.</p>

0 commit comments

Comments
 (0)