diff --git a/app/views/layouts/_nav.html.erb b/app/views/layouts/_nav.html.erb deleted file mode 100644 index 9f4ca84..0000000 --- a/app/views/layouts/_nav.html.erb +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index 6c93200..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,38 +0,0 @@ - - - - - <%= Conference.current.title %> - <%= yield :title if content_for? :title %> - - <%= stylesheet_link_tag 'application' %> - <%= stylesheet_link_tag 'http://openfest.org/wp-content/themes/thematic-openfest/style.css' %> - <%= csrf_meta_tags %> - - -
- - -
- <%= render('/shared/flash_messages') unless flash.empty? %> - <%= yield %> -
-
- <%= javascript_include_tag 'application' %> - - diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim new file mode 100644 index 0000000..98d78d1 --- /dev/null +++ b/app/views/layouts/application.html.slim @@ -0,0 +1,27 @@ +doctype html + +html + head + meta charset="utf-8" + title + = Conference.current.title + = yield :title if content_for? :title + = stylesheet_link_tag 'application' + = stylesheet_link_tag 'http://openfest.org/wp-content/themes/thematic-openfest/style.css' + = csrf_meta_tags + body + #wrapper.hfeed + header#header + #branding + #blog-title + span + = link_to 'http://openfest.org/', title: 'OpenFest', rel: 'home' do + = image_tag '//openfest.org/images/logo-header.png', alt: 'OpenFest' + h1#blog-description + = t(:of_motto) + #access + == render partial: '/shared/nav' + #main + == render(partial: '/shared/flash_messages') unless flash.empty? + == yield + = javascript_include_tag 'application' diff --git a/app/views/shared/_flash_messages b/app/views/shared/_flash_messages deleted file mode 100644 index c94abd1..0000000 --- a/app/views/shared/_flash_messages +++ /dev/null @@ -1,3 +0,0 @@ -div#flash_messages - - flash.each do |key, value| - = content_tag :div, value, class: "flash #{key}" diff --git a/app/views/shared/_nav.html.slim b/app/views/shared/_nav.html.slim new file mode 100644 index 0000000..e01e826 --- /dev/null +++ b/app/views/shared/_nav.html.slim @@ -0,0 +1,26 @@ +nav.menu + ul.sf-menu.sf-js-enabled + == content_tag :li, class: [('current_page_item' if controller_name == 'home')] do + = link_to t(:home), root_path + + - 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 == 'lectures')] do + = link_to t(:talks), lectures_path + + == content_tag :li, class: [('current_page_item' if controller_name == 'workshops')] do + = link_to t(:workshops), workshops_path + + == 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 + - if I18n.locale != :en + = link_to 'English', root_url(locale: 'en') + - elsif I18n.locale != :bg + = link_to 'Български', root_url(locale: 'bg')