5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 14:16:22 +00:00
panel/app/views/layouts/_breadcrumb.haml
f 131a207d4a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Merge branch 'issue-10449' into panel.sutty.nl
2023-04-25 13:18:28 -03:00

35 lines
1.3 KiB
Text

%nav.navbar.flex-md-nowrap.px-0
%a.navbar-brand.order-0{ href: '/' }
= inline_svg_tag 'sutty.svg', class: 'black', aria: true,
title: t('svg.sutty.title'), desc: t('svg.sutty.desc')
- if breadcrumbs?
%nav.flex-grow-1.order-2.order-md-1{ aria: { label: t('.title') } }
%ol.breadcrumb.m-0.flex-wrap
- breadcrumb_trail do |crumb|
%li.breadcrumb-item{ class: crumb.current? ? 'active' : '' }
- if crumb.current?
%span.line-clamp-1{ aria: { current: 'page' } }= crumb.name
- else
= link_to crumb.name, crumb.url, class: 'line-clamp-1'
%ul.navbar-nav.order-1.order-md-2
- if @current_usuarie || current_usuarie
- if @site&.tienda?
%li.nav-item
= link_to t('.tienda'), @site.tienda_url,
role: 'button', class: 'btn'
%li.nav-item
= link_to t('.contact_us'), t('.contact_us_href'),
class: 'btn', rel: 'me', target: '_blank'
%li.nav-item
= link_to t('.logout'), main_app.destroy_usuarie_session_path,
method: :delete, role: 'button', class: 'btn'
- else
- params.permit!
- I18n.available_locales.each do |locale|
- next if locale == I18n.locale
%li.nav-item
= link_to t("switch_locale.#{locale}"), params.to_h.merge(change_locale_to: locale)