hugo-saasify-theme/layouts/partials/components/subscribe-form.html
2024-11-20 23:09:07 +11:00

33 lines
1.3 KiB
HTML

<div class="bg-primary-50 p-6 rounded-lg">
<h3 class="text-lg font-bold text-gray-900 mb-2">{{ .title | default "Subscribe to Newsletter" }}</h3>
<p class="text-sm text-gray-600 mb-4">{{ .description | default "Get the latest posts delivered right to your inbox." }}</p>
<form action="{{ .action | default "#" }}" method="POST" class="space-y-3">
{{ with .hidden }}
{{ range $name, $value := . }}
<input type="hidden" name="{{ $name }}" value="{{ $value }}">
{{ end }}
{{ end }}
<div>
<input
type="email"
name="{{ .emailName | default "email" }}"
placeholder="{{ .placeholder | default "Enter your email" }}"
required
class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"
>
</div>
<button
type="submit"
class="w-full px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors duration-200"
>
{{ .buttonText | default "Subscribe" }}
</button>
{{ with .disclaimer }}
<p class="text-xs text-gray-500 mt-2">{{ . }}</p>
{{ end }}
</form>
</div>