mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 23:51:41 +00:00
feat: establecer los metadatos para cambiar el idioma #12925
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
aaa4608cf7
commit
9aa99e2754
2 changed files with 9 additions and 1 deletions
7
app/views/layouts/_link_rel_alternate.haml
Normal file
7
app/views/layouts/_link_rel_alternate.haml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
- unless current_usuarie
|
||||||
|
- params.permit!
|
||||||
|
- I18n.available_locales.each do |locale|
|
||||||
|
- url = url_for(**params.to_h.merge(change_locale_to: locale), only_path: false)
|
||||||
|
- if locale == I18n.default_locale
|
||||||
|
%link{ rel: 'alternate', hreflang: 'x-default', href: url }
|
||||||
|
%link{ rel: 'alternate', hreflang: locale, href: url }
|
|
@ -4,7 +4,7 @@
|
||||||
%meta{ charset: 'UTF-8' }/
|
%meta{ charset: 'UTF-8' }/
|
||||||
%meta{ content: 'text/html; charset=UTF-8',
|
%meta{ content: 'text/html; charset=UTF-8',
|
||||||
'http-equiv': 'Content-Type' }/
|
'http-equiv': 'Content-Type' }/
|
||||||
%meta{ name: 'color-scheme', content: 'light dark' }/
|
%meta{ name: 'color-scheme', content: 'light' }/
|
||||||
%meta{ name: 'viewport',
|
%meta{ name: 'viewport',
|
||||||
content: 'width=device-width, initial-scale=1.0' }/
|
content: 'width=device-width, initial-scale=1.0' }/
|
||||||
%meta{ name: 'referrer', content: 'same-origin' }/
|
%meta{ name: 'referrer', content: 'same-origin' }/
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
|
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
|
||||||
= stylesheet_pack_tag 'application', 'data-turbolinks-track': 'reload'
|
= stylesheet_pack_tag 'application', 'data-turbolinks-track': 'reload'
|
||||||
= favicon_link_tag 'sutty_cuadrada.png', rel: 'apple-touch-icon', type: 'image/png'
|
= favicon_link_tag 'sutty_cuadrada.png', rel: 'apple-touch-icon', type: 'image/png'
|
||||||
|
= render 'layouts/link_rel_alternate'
|
||||||
|
|
||||||
%body{ class: yield(:body) }
|
%body{ class: yield(:body) }
|
||||||
.container-fluid#sutty
|
.container-fluid#sutty
|
||||||
|
|
Loading…
Reference in a new issue