mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
c351f09a61
5 changed files with 6 additions and 3 deletions
BIN
app/assets/images/pages/community/logo_github.png
Normal file
BIN
app/assets/images/pages/community/logo_github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
|
@ -766,6 +766,7 @@
|
||||||
article_editor_prefix: "See a mistake in some of our docs? Want to make some instructions for your own creations? Check out the"
|
article_editor_prefix: "See a mistake in some of our docs? Want to make some instructions for your own creations? Check out the"
|
||||||
article_editor_suffix: "and help CodeCombat players get the most out of their playtime."
|
article_editor_suffix: "and help CodeCombat players get the most out of their playtime."
|
||||||
find_us: "Find us on these sites"
|
find_us: "Find us on these sites"
|
||||||
|
social_github: "Check out all our code on GitHub"
|
||||||
social_blog: "Read the CodeCombat blog on Sett"
|
social_blog: "Read the CodeCombat blog on Sett"
|
||||||
social_discource: "Join the discussion on our Discourse forum"
|
social_discource: "Join the discussion on our Discourse forum"
|
||||||
social_facebook: "Like CodeCombat on Facebook"
|
social_facebook: "Like CodeCombat on Facebook"
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
|
|
||||||
.logo-row
|
.logo-row
|
||||||
padding-top: 10px
|
padding-top: 10px
|
||||||
width: 80%
|
text-align: center
|
||||||
margin: 0 auto
|
|
||||||
|
|
||||||
.logo-row img
|
.logo-row img
|
||||||
height: 50px
|
height: 50px
|
||||||
|
|
|
@ -47,6 +47,9 @@ block content
|
||||||
|
|
||||||
.logo-row
|
.logo-row
|
||||||
|
|
||||||
|
a(href="https://github.com/codecombat/codecombat")
|
||||||
|
img(src="/images/pages/community/logo_github.png", data-i18n="[data-content]community.social_github" data-content="Check out all our code on GitHub")
|
||||||
|
|
||||||
a(href="http://blog.codecombat.com")
|
a(href="http://blog.codecombat.com")
|
||||||
img(src="/images/pages/community/logo_sett.png", data-i18n="[data-content]community.social_blog" data-content="Read the CodeCombat blog on Sett")
|
img(src="/images/pages/community/logo_sett.png", data-i18n="[data-content]community.social_blog" data-content="Read the CodeCombat blog on Sett")
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ setupChinaRedirectMiddleware = (app) ->
|
||||||
speaksChinese = firstLanguage and firstLanguage.indexOf('zh') isnt -1
|
speaksChinese = firstLanguage and firstLanguage.indexOf('zh') isnt -1
|
||||||
unless config.tokyo
|
unless config.tokyo
|
||||||
ip = req.headers['x-forwarded-for'] or req.connection.remoteAddress
|
ip = req.headers['x-forwarded-for'] or req.connection.remoteAddress
|
||||||
ip = ip?.split(' ')[0] # If there are two IP addresses, say because of CloudFlare, we just take the first.
|
ip = ip?.split(/,? /)[0] # If there are two IP addresses, say because of CloudFlare, we just take the first.
|
||||||
geo = geoip.lookup(ip)
|
geo = geoip.lookup(ip)
|
||||||
if speaksChinese or geo?.country is "CN"
|
if speaksChinese or geo?.country is "CN"
|
||||||
log.info("Should we redirect to Tokyo server? speaksChinese: #{speaksChinese}, firstLanguage: #{firstLanguage}, ip: #{ip}, geo: #{geo} -- so redirecting? #{geo?.country is 'CN' and speaksChinese}")
|
log.info("Should we redirect to Tokyo server? speaksChinese: #{speaksChinese}, firstLanguage: #{firstLanguage}, ip: #{ip}, geo: #{geo} -- so redirecting? #{geo?.country is 'CN' and speaksChinese}")
|
||||||
|
|
Loading…
Reference in a new issue