|
1 | 1 | --- |
2 | 2 | slug: changelog |
3 | 3 | --- |
| 4 | +<Card |
| 5 | + title={<div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem', cursor: 'pointer' }} onClick={() => document.querySelector('input[type="email"]').focus()}>Get the (almost) daily changelog</div>} |
| 6 | + icon="envelope" |
| 7 | + iconType="solid" |
| 8 | +> |
| 9 | + <form |
| 10 | + method="POST" |
| 11 | + action="https://customerioforms.com/forms/submit_action?site_id=TBD&form_id=TBD&success_url=https://docs.vapi.ai/changelog" |
| 12 | + className="subscribe-form" |
| 13 | + style={{margin: '1rem 0'}} |
| 14 | + onSubmit={(e) => { |
| 15 | + const emailInput = document.getElementById('email_input'); |
| 16 | + const emailValue = emailInput.value; |
| 17 | + const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; |
| 18 | + if (!emailPattern.test(emailValue)) { |
| 19 | + e.preventDefault(); |
| 20 | + alert('Please enter a valid email address.'); |
| 21 | + } |
| 22 | + }} |
| 23 | + > |
| 24 | + <div className="flex gap-2" style={{ paddingLeft: '0.5rem' }}> |
| 25 | + <label htmlFor="email_input" style={{ display: 'none' }}>E-mail address</label> |
| 26 | + <input |
| 27 | + id="email_input" |
| 28 | + type="email" |
| 29 | + name="email" |
| 30 | + placeholder="Enter your email" |
| 31 | + required |
| 32 | + style={{ |
| 33 | + border: '1px solid #e2e8f0', |
| 34 | + borderRadius: '0.375rem', |
| 35 | + padding: '0.5rem 1rem', |
| 36 | + width: '100%', |
| 37 | + fontSize: '0.875rem', |
| 38 | + outline: 'none', |
| 39 | + transition: 'border-color 0.2s ease-in-out', |
| 40 | + ':focus': { |
| 41 | + borderColor: '#4f46e5', |
| 42 | + boxShadow: '0 0 0 1px #4f46e5' |
| 43 | + }, |
| 44 | + '@media (prefers-color-scheme: dark)': { |
| 45 | + backgroundColor: '#1f2937', |
| 46 | + borderColor: '#374151', |
| 47 | + color: '#f3f4f6', |
| 48 | + ':focus': { |
| 49 | + borderColor: '#6366f1', |
| 50 | + boxShadow: '0 0 0 1px #6366f1' |
| 51 | + } |
| 52 | + } |
| 53 | + }} |
| 54 | + /> |
| 55 | + <button |
| 56 | + type="submit" |
| 57 | + style={{ |
| 58 | + backgroundColor: '#37aa9d', // Match the theme color |
| 59 | + color: 'white', |
| 60 | + fontWeight: 500, |
| 61 | + padding: '0.5rem 1rem', |
| 62 | + borderRadius: '0.375rem', |
| 63 | + border: 'none', |
| 64 | + cursor: 'pointer', |
| 65 | + transition: 'all 0.2s ease-in-out', |
| 66 | + ':hover': { |
| 67 | + backgroundColor: '#2e8b7d', // Slightly darker shade for hover |
| 68 | + transform: 'translateY(-1px)' |
| 69 | + }, |
| 70 | + ':active': { |
| 71 | + transform: 'translateY(0)' |
| 72 | + }, |
| 73 | + '@media (prefers-color-scheme: dark)': { |
| 74 | + backgroundColor: '#94ffd2', // Match the dark theme color |
| 75 | + ':hover': { |
| 76 | + backgroundColor: '#7cd9b0' // Slightly darker shade for hover in dark mode |
| 77 | + } |
| 78 | + } |
| 79 | + }} |
| 80 | + > |
| 81 | + Submit |
| 82 | + </button> |
| 83 | + </div> |
| 84 | + </form> |
| 85 | +</Card> |
0 commit comments