minimember arranging

This commit is contained in:
Torsten 2022-12-22 16:27:05 +02:00
parent cdb1637bb0
commit ed918880fb
5 changed files with 89 additions and 57 deletions

View File

@ -11,12 +11,30 @@
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do = link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
= image_tag("fb" , class: "h-10 rounded-md") = image_tag("fb" , class: "h-10 rounded-md")
%li %li
- if member_signed_in? - unless member_signed_in?
.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none
=link_to current_member.email , main_app.member_path(current_member)
- else
%a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => main_app.member_session_path, :title => "Log in or Sign up"} %a.inline-flex.items-center.justify-center.h-12.px-6.font-medium.tracking-wide.text-white.transition.duration-200.rounded-lg.shadow-md.bg-green-800.hover:bg-blue-800.focus:shadow-outline.focus:outline-none{"aria-label" => "Sign up", :href => main_app.member_session_path, :title => "Log in or Sign up"}
Login Login
- else
.inline-flex.items-stretch.rounded-md.border
.rounded-l-md.px-4.py-2.text-sm.text-gray-600.hover:bg-cyan-100.hover:text-gray-900
=link_to current_member.email , main_app.member_path(current_member)
.relative
%button.inline-flex.h-full.items-center.justify-center.rounded-r-md.border-l.border-gray-100.px-2.text-gray-600.hover:bg-cyan-400{:type => "button" , onclick: "dropdown();" }
%span.sr-only Menu
%svg.h-4.w-4{:fill => "currentColor", :viewbox => "0 0 20 20", :xmlns => "http://www.w3.org/2000/svg"}
%path{"clip-rule" => "evenodd", :d => "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", "fill-rule" => "evenodd"}
#menu-dropdown.hidden.absolute.right-0.z-10.mt-4.w-36.origin-top-right.rounded-md.border.border-gray-100.bg-white.shadow-lg{:role => "menu"}
.p-2
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => "#", :role => "menuitem"}
Forum
%a.block.rounded-lg.px-4.py-2.text-sm.text-gray-500.hover:bg-gray-50.hover:text-gray-700{:href => "#", :role => "menuitem"}
Profile
%form{:action => "#", :method => "POST"}
%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
.lg:hidden.flex.items-center.justify-between .lg:hidden.flex.items-center.justify-between
.mr-20 .mr-20
= link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do = link_to "https://www.facebook.com/hubfeenix" , :target => "_blank" do
@ -44,6 +62,7 @@
%li %li
%a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => link.capitalize}= link.capitalize %a.font-medium.tracking-wide.text-xl{ :href => "/#{link}" , :title => link.capitalize}= link.capitalize
:javascript :javascript
var drop_hidden = true;
function menu_on() { function menu_on() {
var x = document.getElementById("mobile-menu"); var x = document.getElementById("mobile-menu");
x.style.display = "block"; x.style.display = "block";
@ -52,3 +71,14 @@
var x = document.getElementById("mobile-menu"); var x = document.getElementById("mobile-menu");
x.style.display = "none"; x.style.display = "none";
} }
function dropdown(){
var x = document.getElementById("menu-dropdown");
if( drop_hidden == true){
x.style.display = "block";
drop_hidden = false ;
} else {
x.style.display = "none";
drop_hidden = true ;
}
}

View File

@ -1,3 +1,4 @@
.flex.flex-col
= form_for @member do |f| = form_for @member do |f|
- if @member.errors.any? - if @member.errors.any?
#error_explanation #error_explanation

View File

@ -1,7 +1,8 @@
.flex.justify-center
.flex.flex-col
%h1 Editing member %h1 Editing member
= render 'form' = render 'form'
= link_to 'Show', @member = link_to 'Show', @member
\|
= link_to 'Back', members_path = link_to 'Back', members_path

View File

@ -1,3 +1,5 @@
.flex.justify-center
%h1 Listing members %h1 Listing members
%table %table

View File

@ -1,5 +1,5 @@
%p#notice= notice .flex.justify-center
.flex.flex-col
%p %p
%b Name: %b Name:
= @member.name = @member.name
@ -8,9 +8,7 @@
= @member.public = @member.public
= link_to 'Edit', edit_member_path(@member) = link_to 'Edit', edit_member_path(@member)
\|
= link_to 'Back', members_path = link_to 'Back', members_path
\|
= form_tag( destroy_member_session_path , {method: :delete } ) do = form_tag( destroy_member_session_path , {method: :delete } ) do
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit} %button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400{type: :submit}
Sign out Sign out