also remove all button_classes usage

This commit is contained in:
2023-01-21 19:42:46 +02:00
parent 15dd0bb557
commit 6852883273
9 changed files with 28 additions and 45 deletions

View File

@ -23,7 +23,7 @@
.flex.items-center.gap-16
= link_to merged.changes_index_path do
%button.my-3{class: last_change_class}= last_change_text
%button.my-3.button{class: last_change_class}= last_change_text
= form_tag( main_app.destroy_member_session_path , {method: :delete } ) do
%button.flex.w-full.items-center.gap-2.rounded-lg.px-4.py-2.text-sm.text-blue-700.hover:bg-red-50{:role => "menuitem", :type => "submit"}

View File

@ -37,8 +37,8 @@
%button.button.change.mt-4{type: :submit} Move
.basis-80
= link_to(merged.images_path(card_id: card.id)) do
-if card.image
-if card.image
= link_to(merged.images_path(card_id: card.id)) do
%h3.mt-4.text-lg.font-bold Image #{card.image.name}
.flex.align-center.justify-between.mb-4
.text-lg.font-bold.mt-2.mx-2
@ -46,14 +46,17 @@
%strong.inline-block.rounded.bg-slate-200.px-3.py-1.text-md.font-medium
= card.image.aspect_ratio
= image_for( card , "mb-4")
= link_to Change Image" , merged.images_path(card_id: card.id) )
.flex.gap-3
= link_to merged.images_path(card_id: card.id) do
%button.button.action Change Image
= link_to merged.image_path(card.image.id) do
%button.button.change Edit Image
= link_to merged.card_set_image_path( card.id , image: "")
= link_to merged.card_set_image_path( card.id , image: "") do
%button.button.remove Remove image
-else
%h3.mt-4.text-lg.font-bold No image
%button.my-3.bg-cyan-200{class: button_classes} Add Image
-else
%h3.mt-4.text-lg.font-bold No image
= link_to(merged.images_path(card_id: card.id)) do
%button.button.my-3.change Add Image
.basis-72.grow
%label.block
%h4.text-lg.font-bold Texts

View File

@ -10,7 +10,7 @@
= form_tag( merged.image_scale_path(image_id: image.id) ) do
%input{ hidden: true , id: :scale_id , name: :scale , "v-bind:value": "scale" }
%button.my-3.bg-cyan-200{class: button_classes} Scale {{scale}} %
%button.my-3.button.change Scale {{scale}} %
%div.mt-2
%b.pr-2 Ratio
@ -22,7 +22,7 @@
%input{ hidden: true , id: :height_id , name: :size_y , "v-bind:value": "size_y" }
%input{ hidden: true , id: :off_x_id , name: :off_x , "v-bind:value": "off_x" }
%input{ hidden: true , id: :off_y_id , name: :off_y , "v-bind:value": "off_y" }
%button.my-3.bg-cyan-200{class: button_classes } Crop
%button.my-3.button.change Crop
%div.mt-2.ml-32
%b.pr-2 Fix ratio to

View File

@ -2,8 +2,8 @@
.text-xl.font-bold.text-gray-900
= text_for_index
= link_to( "New Image" , merged.new_image_path(new_link_params) , class: button_classes + " bg-green-200")
= link_to(merged.new_image_path(new_link_params) ) do
.button.action New Image
- if Rails.env.development?
= javascript_include_tag "merged/vue.js"
-else

View File

@ -2,8 +2,8 @@
.text-xl.font-bold.text-gray-900
Image: #{@image.name}
%button.mx-40.hover:bg-cyan-200{class: button_classes }
=link_to "Copy" , merged.image_copy_path(@image.id)
=link_to merged.image_copy_path(@image.id) do
%button.mx-40.button.change Copy
- if Rails.env.development?
= javascript_include_tag "merged/vue.js"
@ -27,7 +27,7 @@
= text_field_tag( "name" , @image.name, class: "rounded border-gray-200 text-sm shadow-sm")
.font-bold.mt-3.mx-4 Tags:
= text_field_tag( "tags" , @image.tags, class: "rounded border-gray-200 text-sm shadow-sm")
%button.bg-cyan-200.mx-4{class: button_classes } Update
%button.mx-4.button.change Update

View File

@ -4,7 +4,8 @@
= link_to @page.name , merged.page_path(@page)
.text-xl.text-gray-900
=link_to "View live" , "/#{@page.name}" , target: @page.name
= link_to( "New Section" , merged.new_page_section_path(@page.id) , class: button_classes + " bg-cyan-200")
= link_to( merged.new_page_section_path(@page.id) ) do
%button.button.change New Section
-@page.sections.each do |section |
.flex.gap-10.mt-2.pt-4.pb-2.border-2.bg-neutral-50.border-slate-400{ id: "section_#{section.id}"}