forked from OpenNeo/impress
Emi Matchu
6dd8e585a3
We add a new `use_responsive_design` helper, for pages to opt into this
new CSS—mostly just because like… it's *worse* to apply these styles
for pages that don't expect it 😅
And then, I fix up a couple things on the item page (including in the
general items layout) to match!
I'm doing this because the species face picker layout is going to want
some responsive awareness, and I want to be doing that from the start!
86 lines
3 KiB
Text
86 lines
3 KiB
Text
!!! 5
|
|
%html
|
|
%head
|
|
%meta{charset: 'utf-8'}
|
|
%title
|
|
- if content_for? :title
|
|
= yield :title
|
|
|
|
|
- if content_for? :title_category
|
|
= yield :title_category
|
|
- else
|
|
#{t 'app_name'}: #{t '.title_tagline'}
|
|
%link{href: image_path('favicon.png'), rel: 'icon'}
|
|
= yield :stylesheets
|
|
= stylesheet_link_tag "application"
|
|
- if use_responsive_design?
|
|
%meta{name: "viewport", content: "width=device-width, initial-scale=1"}
|
|
= yield :meta
|
|
= open_graph_tags
|
|
= csrf_meta_tag
|
|
= impress_2020_meta_tags
|
|
= signed_in_meta_tag
|
|
- if user_signed_in?
|
|
= current_user_id_meta_tag
|
|
= javascript_include_tag 'application', defer: true
|
|
= yield :javascripts
|
|
= yield :head
|
|
= render 'analytics'
|
|
%body{:class => body_class}
|
|
#container
|
|
= yield :before_title
|
|
= render 'announcement'
|
|
- if content_for?(:title) && show_title_header?
|
|
%h1#title= yield :title
|
|
= yield :before_flashes
|
|
= flashes
|
|
|
|
- if content_for? :content
|
|
= yield(:content)
|
|
- else
|
|
= yield
|
|
|
|
- if home_link?
|
|
%a#home-link{:href => root_path}
|
|
%span= t 'app_name'
|
|
|
|
#userbar
|
|
- if user_signed_in?
|
|
%span
|
|
= t '.userbar.greeting', :user_name => current_user.name
|
|
= userbar_contributions_summary(current_user)
|
|
= link_to t('.userbar.items'), user_closet_hangers_path(current_user), :id => 'userbar-items-link'
|
|
= link_to t('.userbar.outfits'), current_user_outfits_path
|
|
= link_to t('.userbar.settings'), edit_auth_user_path
|
|
= button_to t('.userbar.logout'), destroy_auth_user_session_path, method: :delete,
|
|
params: {return_to: request.fullpath}
|
|
- else
|
|
= link_to auth_user_sign_in_path_with_return_to,
|
|
id: 'userbar-log-in', "data-turbo-prefetch": false do
|
|
%span= t('.userbar.login')
|
|
|
|
#footer
|
|
= form_tag choose_locale_path, :id => 'locale-form' do
|
|
= hidden_field_tag 'return_to', request.fullpath
|
|
= select_tag 'locale', options_for_select(locale_options, locale)
|
|
%noscript= submit_tag 'Go'
|
|
|
|
%ul
|
|
%li= link_to t('.footer.source_code'), 'https://code.openneo.net/OpenNeo/impress'
|
|
%li.terms{"data-updated-recently": terms_updated_recently }
|
|
= link_to t('.footer.terms', date: terms_updated_timestamp),
|
|
terms_path
|
|
%li= link_to t('.footer.about_neopass'), about_neopass_path
|
|
|
|
%div
|
|
#{t('.footer.contact')}:
|
|
%ul
|
|
%li= mail_to contact_email, t('.footer.email')
|
|
|
|
%p= t '.footer.copyright', :year => Date.today.year
|
|
|
|
-# For scripts that expect to get to just execute once every time the page
|
|
-# loads. For future JS, it would be advisable to write it such that it's
|
|
-# okay for Turbo to run it once at the start of the page, then listen to
|
|
-# `turbo:load` events or use inline scripts to actually _do_ things.
|
|
= yield :javascripts_body
|