!!! 5 %html{ lang: "en", prefix: "og: https://ogp.me/ns#" } -# The sign in and sign up dialogs need the islands bundle on every page a -# visitor can see, and a page that already asked for it must not load it twice. - unless member_signed_in? || content_for(:scripts).to_s.include?('react_islands') - content_for :scripts do = javascript_include_tag 'react_islands', defer: true = yield :scripts = render "layouts/head" %body.d-flex.flex-column.vh-100 = query_diet_widget if Rails.env.development? .visually-hidden= link_to t(".skip"), "#skipnav" = render "layouts/header" -# anchor tag for accessibility link to skip the navigation menu %a{ name: 'skipnav' } .container #maincontainer - if content_for?(:breadcrumbs) %nav{ "aria-label" => "breadcrumb" } %ol.breadcrumb %li.breadcrumb-item= link_to 'Home', root_path = yield(:breadcrumbs) - if content_for?(:buttonbar) = yield(:buttonbar) - if content_for?(:subtitle) %small= yield(:subtitle) = render "shared/flash_messages", flash: flash %main= yield -# Every "add photo" link opens its dialog over the page (see PhotoDialog), and -# every sign in and sign up link its own (see AuthDialog). - if member_signed_in? = react_component 'PhotoDialog', photo_dialog_props = react_component 'RecordDialog', { plantings_url: planting_picker_path(format: :json) } - else = react_component 'AuthDialog', auth_dialog_props %footer.page-footer.font-small.bg-dark.pt-4.mt-auto= render "layouts/footer" / Javascripts \================================================== / Placed at the end of the document so the pages load faster = javascript_include_tag "application" != Rails.application.config.analytics_code