From 172fcc06a29167d28a372ec2cf24547dcf4e2d7a Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 19 Jul 2015 23:21:54 +0300 Subject: [PATCH] OpenFest: Add a basic navigation --- .../layouts/open_fest/application.html.erb | 2 +- .../app/views/open_fest/shared/_nav.slim | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 lib/open_fest/app/views/open_fest/shared/_nav.slim diff --git a/lib/open_fest/app/views/layouts/open_fest/application.html.erb b/lib/open_fest/app/views/layouts/open_fest/application.html.erb index 162267d..ae0fccb 100644 --- a/lib/open_fest/app/views/layouts/open_fest/application.html.erb +++ b/lib/open_fest/app/views/layouts/open_fest/application.html.erb @@ -13,7 +13,7 @@ <%= csrf_meta_tags %> - + <%= render 'open_fest/shared/nav' %>
<%= yield %>
diff --git a/lib/open_fest/app/views/open_fest/shared/_nav.slim b/lib/open_fest/app/views/open_fest/shared/_nav.slim new file mode 100644 index 0000000..7f05161 --- /dev/null +++ b/lib/open_fest/app/views/open_fest/shared/_nav.slim @@ -0,0 +1,25 @@ +nav + .content.cf + = link_to 'http://www.openfest.org', class: 'logo' do + = image_tag 'img/logo.png', alt: 'OpenFest' + + div + ul.menu + li + a href="#" = t('views.navigation.submit_event') + li + a href="#" = t('views.navigation.become_a_volunteer') + li + a href="#" = t('views.navigation.become_a_sponsor') + + - unless user_signed_in? + == content_tag :li, class: [('current_page_item' if controller_name == 'sessions')] do + = link_to t(:login), new_user_session_path + - else + == content_tag :li, class: [('current_page_item' if controller_name == 'registrations')] do + = link_to t(:edit_speaker_profile), edit_user_registration_path + li + = link_to t(:logout), destroy_user_session_path, method: :delete + li + a href="#" hreflang="en" + img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAIAAAD5gJpuAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHzSURBVHjaYkxOP8IAB//+Mfz7w8Dwi4HhP5CcJb/n/7evb16/APL/gRFQDiAAw3JuAgAIBEDQ/iswEERjGzBQLEru97ll0g0+3HvqMn1SpqlqGsZMsZsIe0SICA5gt5a/AGIEarCPtFh+6N/ffwxA9OvP/7//QYwff/6fZahmePeB4dNHhi+fGb59Y4zyvHHmCEAAAW3YDzQYaJJ93a+vX79aVf58//69fvEPlpIfnz59+vDhw7t37968efP3b/SXL59OnjwIEEAsDP+YgY53b2b89++/awvLn98MDi2cVxl+/vl6mituCtBghi9f/v/48e/XL86krj9XzwEEEENy8g6gu22rfn78+NGs5Ofr16+ZC58+fvyYwX8rxOxXr169fPny+fPn1//93bJlBUAAsQADZMEBxj9/GBxb2P/9+S/R8u3vzxuyaX8ZHv3j8/YGms3w8ycQARmi2eE37t4ACCDGR4/uSkrKAS35B3TT////wADOgLOBIaXIyjBlwxKAAGKRXjCB0SOEaeu+/y9fMnz4AHQxCP348R/o+l+//sMZQBNLEvif3AcIIMZbty7Ly6t9ZmXl+fXj/38GoHH/UcGfP79//BBiYHjy9+8/oUkNAAHEwt1V/vI/KBY/QSISFqM/GBg+MzB8A6PfYC5EFiDAABqgW776MP0rAAAAAElFTkSuQmCC" title="English" alt="English"