-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
89 additions
and
5 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
window.i18n = | ||
'.modal-title': 'Una vez a la semana, recibe lo último.' | ||
'.modal-body p': '<strong>Política de Privacidad:</strong> No spam ni publicidad. Desunscríbete en cualquier momento.' | ||
'fieldEmail': 'Tu correo electrónico' | ||
'.poweredby': ' © 2016. Todos los derechos reservados. Construido con <a href="https://github.com/Kikobeats/bloggy" target="_blank">Bloggy</a> bajo <a href="https://ghost.org/" target="_blank">Ghost</a>.' | ||
'.modal-body .button-add.wide': 'Subscribirse' | ||
'.subscribe-banner': '¿Te gustaría recibir el contenido en tu correo mensualmente? <a class="button" data-toggle="modal" data-target="#blogsubscribe">Subscríbete</a>', | ||
'.read-more': 'Leer Más' | ||
'.newer-posts': '← Publicaciones recientes' | ||
'.older-posts': 'Publicaciones antiguas →' | ||
'.page-number': 'Página % de $' | ||
'a.post-meta': '← Volver a la Portada' | ||
'.prefix-date': 'el' | ||
'footer .button-add.large.wide': 'Subscríbete y recíbelo semalmente en tu correo' | ||
'.read-next-story .post:before': 'Leer siguiente publicación' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
$ -> | ||
selectors = [ | ||
# newsletter modal | ||
'.subscribe-banner' | ||
'.modal-title' | ||
'.modal-body p' | ||
'.modal-body .button-add.wide' | ||
# default view | ||
'.read-more' | ||
'.older-posts' | ||
'.newer-posts' | ||
'.poweredby' | ||
# post view | ||
'footer .button-add.large.wide' | ||
'a.post-meta' | ||
'.prefix-date' | ||
] | ||
|
||
for selector in selectors when i18n[selector] | ||
$(selector).html(i18n[selector]) | ||
|
||
# inline css | ||
|
||
css_selector = '.read-next-story .post:before' | ||
property = "<style>.read-next-story .post:before{ content: '#{i18n[css_selector]}' }</style>" | ||
$('head').append(property) | ||
|
||
# pagination | ||
|
||
selector = '.page-number' | ||
pageNumber = $(selector).html().split(' ') | ||
pageNumberi18n = i18n[selector].split(' ') | ||
pageNumber[n] = pageNumberi18n[n] for n in [0, 2] | ||
$(selector).html(pageNumber.join(' ')) | ||
|
||
# forms | ||
|
||
selector = 'fieldEmail' | ||
window[selector].placeholder = i18n[selector] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters