login/out for mobile menu
This commit is contained in:
parent
175a89cfb4
commit
105f0c09b1
@ -21,6 +21,15 @@
|
|||||||
%li
|
%li
|
||||||
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
%a.w-full.h-full.block.tracking-wide.text-xl.p-2.rounded-lg.hover:bg-cyan-200{ :href => link , :title => text}
|
||||||
= text
|
= text
|
||||||
|
-if(current_member)
|
||||||
|
= form_tag( main_app.destroy_member_session_path , {method: :delete ,class: "text-center"}) do
|
||||||
|
%button.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
|
||||||
|
-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"}
|
||||||
|
Login
|
||||||
:javascript
|
:javascript
|
||||||
var drop_hidden = true;
|
var drop_hidden = true;
|
||||||
function menu_on() {
|
function menu_on() {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
= simple_form_for @member do |f|
|
= simple_form_for @member do |f|
|
||||||
|
|
||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
.column{class: "w-11/12 md:w-10/12 lg:w-8/12 xl:w-6/12"}
|
.column{class: "w-11/12 md:w-10/12"}
|
||||||
.grid.grid-cols-1.md:grid-cols-2.mx-20.gap-10
|
.grid.grid-cols-1.md:grid-cols-2.mx-20.gap-10
|
||||||
= render "merged/form/editor" , object: @member , field: :bio, form: f
|
= render "merged/form/editor" , object: @member , field: :bio, form: f
|
||||||
.info.mr-8
|
.info.mr-8
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%script{:src => "https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"}
|
%script{:src => "https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"}
|
||||||
%script{:src => "https://cdn.jsdelivr.net/npm/marked/marked.min.js"}
|
%script{:src => "https://cdn.jsdelivr.net/npm/marked/marked.min.js"}
|
||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
.column{class: "w-10/12 md:w-8/12 lg:w-5/12 xl:w-4/12"}
|
.column{class: "w-10/12 md:w-8/12 lg:w-7/12 xl:w-6/12"}
|
||||||
.text-2xl.font-bold.my-4
|
.text-2xl.font-bold.my-4
|
||||||
Edit Story
|
Edit Story
|
||||||
= render 'form'
|
= render 'form'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
%script{:src => "https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"}
|
%script{:src => "https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"}
|
||||||
%script{:src => "https://cdn.jsdelivr.net/npm/marked/marked.min.js"}
|
%script{:src => "https://cdn.jsdelivr.net/npm/marked/marked.min.js"}
|
||||||
.flex.justify-center
|
.flex.justify-center
|
||||||
.column{class: "w-10/12 md:w-8/12 lg:w-5/12 xl:w-4/12"}
|
.column{class: "w-10/12 md:w-8/12 lg:w-7/12 xl:w-6/12"}
|
||||||
.text-2xl.font-bold.my-4
|
.text-2xl.font-bold.my-4
|
||||||
New Story
|
New Story
|
||||||
= render 'form'
|
= render 'form'
|
||||||
|
Loading…
Reference in New Issue
Block a user