Added hreflang alternate urls

This commit is contained in:
Godwin
2016-06-17 19:18:18 -07:00
parent 2ee8849153
commit 70fd4ccef8
6 changed files with 35 additions and 20 deletions
+12 -9
View File
@@ -10,6 +10,8 @@
= stylesheets
%link{ href: asset_path('favicon.ico'), rel: 'shortcut icon', type: 'image/x-icon' }
%link{ href: asset_path('favicon.ico'), rel: 'icon', type: 'image/x-icon' }
- @alt_lang_urls.each do |locale, url|
%link{ rel: :alternate, hreflang: locale, href: url }
-#%link{ href: asset_path('apple-touch-icon.png'), rel: 'apple-touch-icon' }
-#%link{ href: asset_path('apple-touch-icon-72x72.png'), rel: 'apple-touch-icon', sizes: '72x72' }
-#%link{ href: asset_path('apple-touch-icon-114x114.png'), rel: 'apple-touch-icon', sizes: '114x114' }
@@ -38,15 +40,16 @@
= yield
#footer
%footer= render 'shared/footer'
#content-overlay
#overlay
.dlg#confirmation-dlg
.dlg-content
%h2.title=_'modals.confirm'
.dlg-inner
%p.message=''
%a.button.confirm=_'modals.yes_button'
%button.delete=_'modals.no_button'
- if @confirmation_dlg.present?
#content-overlay
#overlay
.dlg#confirmation-dlg
.dlg-content
%h2.title=_'modals.confirm'
.dlg-inner
%p.message=''
%a.button.confirm=_'modals.yes_button'
%button.delete=_'modals.no_button'
= yield :footer_scripts if content_for?(:footer_scripts)
- add_inline_script :main
+5 -6
View File
@@ -10,12 +10,11 @@
%a{href: 'https://github.com/bikebike/BikeBike', target: :_blank}
=_'links.footer.text.Help_contribute'
%ul.locales
-I18n.backend.enabled_locales.each do |locale|
- if locale.to_s != I18n.locale.to_s # don't show the current locale
%li
- locale_translation = _("languages.#{locale}", locale: locale)
%a{href: url_for_locale(locale)}
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale
- @alt_lang_urls.each do |locale, url|
%li
- locale_translation = _("languages.#{locale}", locale: locale)
%a{href: url, lang: locale}
=_'translate.content.change_locale', "Read in #{locale_translation}", vars: {language: locale_translation}, locale: locale if locale != I18n.locale.to_s
.copy
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
=link_to :humans_txt, {title: title} do
+3 -3
View File
@@ -33,11 +33,11 @@
=(link_to (_'actions.workshops.Approve'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'approve'), :class => [:button, :modify])
=(link_to (_'actions.workshops.Deny'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'deny'), :class => [:button, :delete])
- elsif workshop.can_remove?(current_user, u)
=(link_to (_'actions.workshops.Make_Owner'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), :class => [:button, :modify], data: {confirmation: CGI::escapeHTML(_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name})}) unless f.role.to_sym == :creator || !workshop.creator?(current_user)
=(link_to (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete], data: {confirmation: CGI::escapeHTML(_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name})})
=(link_with_confirmation (_'actions.workshops.Make_Owner'), (_'modals.workshops.facilitators.confirm_transfer_ownership', vars: { user_name: u.name}),approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'switch_ownership'), :class => [:button, :modify]) unless f.role.to_sym == :creator || !workshop.creator?(current_user)
=(link_with_confirmation (_"actions.workshops.#{is_this_user ? 'Leave' : 'Remove'}"), (_"modals.workshops.facilitators.confirm_remove#{is_this_user ? '_self' : ''}", vars: { user_name: u.name}), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
- if is_this_user && workshop.requested_collaborator?(current_user)
.details
=(link_to (_'actions.workshops.Cancel_Request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete], data: {confirmation: CGI::escapeHTML(_'modals.workshops.facilitators.confirm_cancel_request')})
=(link_with_confirmation (_'actions.workshops.Cancel_Request'), (_'modals.workshops.facilitators.confirm_cancel_request'), approve_facilitate_workshop_request_path(workshop.conference.slug, workshop.id, f.user_id, 'remove'), :class => [:button, :delete])
- unless preview.present?
=(link_to (_'actions.workshops.Facilitate'), facilitate_workshop_path(workshop.conference.slug, workshop.id), :class => [:button, workshop.needs_facilitators ? :accented : :subdued]) unless workshop.facilitator?(current_user)
- if is_facilitator