first upload working (wip)

This commit is contained in:
2022-11-24 22:28:56 +02:00
parent 43a759cec4
commit b853a1201b
5 changed files with 46 additions and 2 deletions

View File

@ -1,3 +1,7 @@
%section
%a.inline-block.rounded.border.border-indigo-600.bg-indigo-600.px-12.py-3.text-sm.font-medium.text-white.hover:bg-transparent.hover:text-indigo-600.focus:outline-none.focus:ring.active:text-indigo-500{:href => new_cms_image_path}
Add Image
.grid.grid-cols-6.gap-4.m-8
-@files.each do |file|
.relative.block.border.border-gray-100
@ -9,7 +13,7 @@
.p-6
%strong.inline-block.bg-yellow-400.px-3.py-1.text-xs.font-medium
New
%h3.mt-4.text-lg.font-bold= file
%h3.mt-4.text-lg.font-bold= file.split(".").first
%p.mt-2.text-sm.text-gray-700 $14.99
%button.mt-4.block.w-full.rounded-sm.bg-yellow-500.p-4.text-sm.font-medium{:type => "button"}
Add to Cart

View File

@ -0,0 +1,4 @@
= form_tag({action: :create}, multipart: true) do
= text_field_tag 'filename'
= file_field_tag 'image_file'
= submit_tag 'Submit'