From 484fa4f6e77e6ea29c66e67254536e18e8b9785e Mon Sep 17 00:00:00 2001 From: Torsten Date: Mon, 9 Jan 2023 20:47:47 +0200 Subject: [PATCH] improve layout --- app/views/layouts/_merged_header.haml | 21 -------- app/views/layouts/merged/_header.haml | 48 ++++++++++--------- app/views/merged/sections/new.haml | 2 - .../merged/sections/select_card_template.haml | 1 - 4 files changed, 25 insertions(+), 47 deletions(-) delete mode 100644 app/views/layouts/_merged_header.haml diff --git a/app/views/layouts/_merged_header.haml b/app/views/layouts/_merged_header.haml deleted file mode 100644 index ce3c504..0000000 --- a/app/views/layouts/_merged_header.haml +++ /dev/null @@ -1,21 +0,0 @@ -.flex.h-16.items-center.gap-16 - %a.ml-20{:href => "/merged/pages"} - %span.sr-only Home - =image_tag("merged/merged_logo" , class: "h-10") - - %ul.flex.items-center.gap-6.text-lg - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.pages_path} - Pages - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.images_path} - Images - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.styles_index_path} - Styles - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.changes_index_path} - Changes - = yield :merged_menu - - %button.my-3{class: last_change_class}= last_change_text diff --git a/app/views/layouts/merged/_header.haml b/app/views/layouts/merged/_header.haml index e60f58b..754e33a 100644 --- a/app/views/layouts/merged/_header.haml +++ b/app/views/layouts/merged/_header.haml @@ -1,26 +1,28 @@ -.mx-20.my-6.flex.h-16.items-center.gap-16 - %a{:href => "/merged/pages"} - %span.sr-only Home - =image_tag("merged/merged_logo" , class: "h-10") +.flex.mx-20.my-6.h-16.justify-between + .flex.items-center.gap-16 + %a{:href => "/merged/pages"} + %span.sr-only Home + =image_tag("merged/merged_logo" , class: "h-10") - %ul.flex.items-center.gap-6.text-lg - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.pages_path} - Pages - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.images_path} - Images - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.styles_index_path} - Styles - %li - %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.changes_index_path} - Changes + %ul.flex.items-center.gap-6.text-lg + %li + %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.pages_path} + Pages + %li + %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.images_path} + Images + %li + %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.styles_index_path} + Styles + %li + %a.text-gray-500.transition{:class => "hover:text-gray-500/75", :href => merged.changes_index_path} + Changes - %button.my-3{class: last_change_class}= last_change_text + .flex.items-center.gap-16 + %button.my-3{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"} - %svg.h-4.w-4{:fill => "none", :stroke => "currentColor", "stroke-width" => "2", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"} - %path{:d => "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16", "stroke-linecap" => "round", "stroke-linejoin" => "round"} - Sign out + = 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"} + %svg.h-4.w-4{:fill => "none", :stroke => "currentColor", "stroke-width" => "2", :viewbox => "0 0 24 24", :xmlns => "http://www.w3.org/2000/svg"} + %path{:d => "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16", "stroke-linecap" => "round", "stroke-linejoin" => "round"} + Sign out diff --git a/app/views/merged/sections/new.haml b/app/views/merged/sections/new.haml index 0222808..9eb9716 100644 --- a/app/views/merged/sections/new.haml +++ b/app/views/merged/sections/new.haml @@ -5,8 +5,6 @@ Branch = @git.current_branch -= render "layouts/merged_header" - %h1 New merged_section = render 'form' diff --git a/app/views/merged/sections/select_card_template.haml b/app/views/merged/sections/select_card_template.haml index d9f17bb..19b59f7 100644 --- a/app/views/merged/sections/select_card_template.haml +++ b/app/views/merged/sections/select_card_template.haml @@ -4,7 +4,6 @@ .text-xl.text-gray-900 Select Card Style for Section #{@section.index} - #{@section.header} -= render "layouts/merged_header" .grid.grid-cols-4.gap-6.m-8 - @cards.each do |style| .border.border-gray-300.rounded-lg.p-2