start on forms

This commit is contained in:
2022-12-09 00:53:15 +02:00
parent c669cf5cfe
commit 658efe8e53
11 changed files with 224 additions and 17 deletions

View File

@ -0,0 +1,14 @@
.flex.flex-col.m-20{ options(section , :background , :color)}
.flex.items-center.justify-center.flex-1
.max-w-prose.px-4.py-16.mx-auto.text-center
%h1.text-4xl.font-medium= section.header
%p.mt-4.text-lg.pt-10
= markdown(section)
.flex.items-center.justify-start.bg-white
.mx-auto.w-full.max-w-4xl{class: "max-w-[50%]"}
%form.mt-10{:action => "https://api.web3forms.com/submit"}
.grid.gap-6.md:grid-cols-2
- template = "merged/view/cards/" + section.card_template
- section.cards.each do |card|
= render( template , card: card)
%button.mt-5.rounded-md.bg-cyan-700.px-10.py-2.text-white{:type => "submit"} Send

View File

@ -0,0 +1,8 @@
-if card.option("form_type") == "message"
.relative.z-0.col-span-2
%textarea.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-sm.text-gray-900.focus:border-blue-600.focus:outline-none.focus:ring-0{:class => "py-2.5", :name => "message", :placeholder => " ", :rows => "5"}
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-sm.text-gray-500.duration-300.peer-placeholder-shown:translate-y-0.peer-placeholder-shown:scale-100.peer-focus:left-0.peer-focus:-translate-y-6.peer-focus:scale-75.peer-focus:text-blue-600.peer-focus:dark:text-blue-500{:class => "origin-[0]"}= card.header
-else
.relative.z-0
%input.peer.block.w-full.appearance-none.border-0.border-b.border-gray-500.bg-transparent.px-0.text-sm.text-gray-900.focus:border-blue-600.focus:outline-none.focus:ring-0{:class => "py-2.5", :name => "email", :placeholder => " ", :type => "text"}
%label.absolute.top-3.-z-10.-translate-y-6.scale-75.transform.text-sm.text-gray-500.duration-300.peer-placeholder-shown:translate-y-0.peer-placeholder-shown:scale-100.peer-focus:left-0.peer-focus:-translate-y-6.peer-focus:scale-75.peer-focus:text-blue-600.peer-focus:dark:text-blue-500{:class => "origin-[0]"}= card.header