Move signed_* files to views/shared/menu and add new logged in and profile icons

This commit is contained in:
luisramos0
2019-05-23 15:17:23 +01:00
parent 12282ad906
commit 15360971b0
8 changed files with 32 additions and 15 deletions

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="none" fill-rule="evenodd">
<path d="M0 0h16v16H0z"/>
<path fill="#F4704C" d="M13.85 5.928h-1.234v-1.54c0-2.338-2.026-4.234-4.525-4.234-2.5 0-4.526 1.896-4.526 4.235v1.54H2.33c-.682 0-1.235.516-1.235 1.154v7.7c0 .637.553 1.154 1.235 1.154h11.52c.681 0 1.234-.517 1.234-1.154v-7.7c0-.638-.553-1.155-1.234-1.155zM4.8 4.388c0-1.7 1.473-3.08 3.29-3.08 1.818 0 3.292 1.38 3.292 3.08v1.54H4.799v-1.54z"/>
<path fill="#FFF" d="M8.296 13.23c1.243 0 2.25-.942 2.25-2.105 0-1.162-1.007-2.105-2.25-2.105-1.242 0-2.25.943-2.25 2.105.003 1.162 1.009 2.103 2.25 2.106zm0-3.211c.654 0 1.183.495 1.183 1.106 0 .612-.53 1.107-1.183 1.107s-1.183-.495-1.183-1.107c0-.61.53-1.106 1.183-1.106z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 812 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
<defs>
<path id="a" d="M15 15.2a.79.79 0 0 1-.778.8H1.778A.79.79 0 0 1 1 15.2v-2.4c0-2.21 1.741-4 3.889-4h6.222c2.148 0 3.889 1.79 3.889 4v2.4zM8 8C5.852 8 4.111 6.21 4.111 4S5.852 0 8 0c2.148 0 3.889 1.79 3.889 4S10.148 8 8 8z"/>
</defs>
<use fill="#F4704C" fill-rule="nonzero" xlink:href="#a"/>
</svg>

After

Width:  |  Height:  |  Size: 451 B

View File

@@ -28,9 +28,9 @@
%li
%a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l)
- if spree_current_user.nil?
= render 'shared/signed_out'
= render 'shared/menu/signed_out'
- else
= render 'shared/signed_in'
= render 'shared/menu/signed_in'
%li.current_hub{"ng-controller" => "CurrentHubCtrl", "ng-show" => "CurrentHub.hub.id", "ng-cloak" => true}
%a{href: main_app.shop_path}
%em

View File

@@ -39,6 +39,6 @@
%a{href: "?locale=#{l.to_s}" }= t('language_name', locale: l)
%li
- if spree_current_user.nil?
= render 'shared/signed_out'
= render 'shared/menu/signed_out'
- else
= render 'shared/signed_in_offcanvas'
= render 'shared/menu/signed_in_offcanvas'

View File

@@ -5,15 +5,17 @@
= t 'label_notices'
%li.user-menu.has-dropdown.not-click
%a{href: "#"}
%i.ofn-i_022-cog
%a{href: "#"}
%img{ src: "/assets/menu/icn-profile.svg" }
%span
= t '.profile'
%ul.dropdown
- if admin_user? or enterprise_user?
%li
%a{href: spree.admin_path, target:'_blank'}
%a{href: spree.admin_path, target:'_blank'}
%i.ofn-i_021-tools
= t 'label_administration'
@@ -22,8 +24,8 @@
%i.ofn-i_015-user
= t 'label_account'
= "(" + spree_current_user.email + ")"
%li
%a{title: t('label_logout'), href:'/logout' }
%a{title: t('label_logout'), href:'/logout' }
%i.ofn-i_018-unlocked
= t 'label_logout'

View File

@@ -7,7 +7,7 @@
- if admin_user? or enterprise_user?
%li
%a{href: spree.admin_path, target:'_blank'}
%a{href: spree.admin_path, target:'_blank'}
%i.ofn-i_021-tools
= t 'label_admin'
@@ -17,6 +17,6 @@
= t 'label_account'
%li
%a{title: t('label_logout'), href:'/logout' }
%a{title: t('label_logout'), href:'/logout' }
%i.ofn-i_018-unlocked
= t 'label_logout'

View File

@@ -1,5 +1,5 @@
%li#login-link
%a{"auth" => "login"}
%i.ofn-i_017-locked
%img{ src: "/assets/menu/icn-login.svg" }
%span
= t 'label_login'

View File

@@ -1115,6 +1115,8 @@ en:
cart:
checkout: "Checkout now"
already_ordered_products: "Already ordered in this order cycle"
signed_in:
profile: "Profile"
register_call:
selling_on_ofn: "Interested in getting on the Open Food Network?"
register: "Register here"