app/views/layouts/application.html.haml in trusty-cms-4.0.2 vs app/views/layouts/application.html.haml in trusty-cms-4.1.0

- old
+ new

@@ -1,9 +1,10 @@ <!DOCTYPE html> %html{html_attrs} %head - %meta{"http-equiv"=>"Content-type", :content=>"text/html;charset=utf-8"}/ + %meta{"http-equiv"=>"Content-type", :content=>"text/html;charset=utf-8"} + %meta{name: "viewport", content: "width=device-width"} %title= @page_title || default_page_title - @stylesheets.uniq.each do |stylesheet| = stylesheet_link_tag stylesheet, media: "all" @@ -27,38 +28,42 @@ = javascript_include_tag javascript = csrf_meta_tags %body{:class=>body_classes.join(" ")} - #page - #header + #page.trusty-container + %header - if logged_in? = render_region :before_nav - render_region :navigation do |navigation| #site_links = %{#{t('logged_in_as')} #{link_to h(current_user.name), edit_admin_preferences_path} &nbsp; (#{link_to t('log_out'), destroy_user_session_path, method: :get})}.html_safe &nbsp; = link_to t('view_site'), root_path, :id=>"view_site" - %ul#navigation - - nav_tabs.each do |tab| - - if tab.visible?(current_user) - %li{:class=>('current ' if current_tab?(tab)).to_s} - = link_to translate_with_default(tab.name), (tab.first.relative_url if tab.first) - #toolbar - - if @current_tab and @current_tab.size > 1 - %ul#secondary_navigation - - @current_tab.each do |sub_item| - - if sub_item.visible?(current_user) - %li= link_to sub_item.name, sub_item.relative_url, :class=>('current' if current_item?(sub_item)) - = yield :toolbar - #main + %nav + - if logged_in? + %ul.navigation + - nav_tabs.each do |tab| + - if tab.visible?(current_user) + = link_to (tab.first.relative_url if tab.first) do + %li{class: ('current ' if current_tab?(tab)).to_s} + = translate_with_default(tab.name) + - if @current_tab and @current_tab.size > 1 + .toolbar + %ul.secondary_navigation + - @current_tab.each do |sub_item| + - if sub_item.visible?(current_user) + = link_to sub_item.relative_url, class: ('current' if current_item?(sub_item)) do + %li= sub_item.name + %main + = yield :toolbar - if flash[:notice] - #notice + .notice %p= flash[:notice] - if flash[:error] - #error + .error %p= flash[:error] - #content + .content = find_and_preserve(yield) #popups = yield :popups