From 79ea3258f15409f7264ee881b764c5e0700b3a55 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 8 Aug 2015 10:26:13 -0700 Subject: [PATCH 1/2] Added GitHub link to community page. --- .../images/pages/community/logo_github.png | Bin 0 -> 11252 bytes app/locale/en.coffee | 1 + app/styles/community.sass | 3 +-- app/templates/community-view.jade | 3 +++ 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/pages/community/logo_github.png diff --git a/app/assets/images/pages/community/logo_github.png b/app/assets/images/pages/community/logo_github.png new file mode 100644 index 0000000000000000000000000000000000000000..a7c81809f69d3fa7755047cbb30674b5ad804515 GIT binary patch literal 11252 zcmZvCb9g4twsq{xJ2575TGfB; z?g)8VAR-(#90&*qqJ+4J;@?^1?~sCl`g@-cB{cgxfjTJyg+OX&aZdhjVC}^}fR&Dgj)8~|j(~uG$I;l7OHoAZKkk2b zyhP^C&h}jN^lol$bZ*Rac8+HBjGUaD^bAb&OiZ+Y5wuPow$29bw6;#f{|@qBaYRg< zj2tcOoh|Ha3I2&|U})#!%u7V{Pon?6{!^!o{eLI2b@~shzx?Rk4eaR|=@{t$e@@O8 zrvFpk|Kat|lYhJYi`BoA@%)vBOW4uGz}e1G+0M?IPw*e@2qbI_%uEzb42(T^=>KoT z|5VEJPe?8~M+=j`T>oLj$H+tf|JeS6=b`_H?*B&r-`f7m`d3^&xWAeH>!A4HDCuT+ zK|m-6B}4?3-9cx(VY5|LUcR0-y|$lnd`uogK%t;9(UFh@mBr2=`nVUx5 zKORJ>sijD#7WE2CRQV|+w7&~OGH$qqnxq@JhHgA%xOF|f_s#j3>61u(d?RmYJvgjkjr^mT)vcxJ}T0az-vP5M!?LeAG&q@RN0vCBnFJ=%T#k%%MMk?rv}$J#M_0J79Gu=RwJG5?#2)xMwKOFWn0644AY|!5;FH*F!a% zxuzX6odXt0GS;OT+j9)*cpCM1(P26jY}nEKvjLFK1sJV%DiG?%hXLgogJLn{{+Y0` z8qAz!iJJLz67YL#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Sv4q><5)%)d0Vcv1Mool&< z@91Io{+!0vRJMe)fb^O%o#c3euIQVjG{HaJhpM9dB#$-{nC1F>H`e>Nv7r5GR^cTi$ECLIyVx00n Pzv4=W%8Jwq=?DHVd%LHZ literal 0 HcmV?d00001 diff --git a/app/locale/en.coffee b/app/locale/en.coffee index f894dacbb..32f9a96aa 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -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_suffix: "and help CodeCombat players get the most out of their playtime." 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_discource: "Join the discussion on our Discourse forum" social_facebook: "Like CodeCombat on Facebook" diff --git a/app/styles/community.sass b/app/styles/community.sass index 825c1c33b..c0956f79e 100644 --- a/app/styles/community.sass +++ b/app/styles/community.sass @@ -16,8 +16,7 @@ .logo-row padding-top: 10px - width: 80% - margin: 0 auto + text-align: center .logo-row img height: 50px diff --git a/app/templates/community-view.jade b/app/templates/community-view.jade index b13039bc2..b48e1514f 100644 --- a/app/templates/community-view.jade +++ b/app/templates/community-view.jade @@ -47,6 +47,9 @@ block content .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") img(src="/images/pages/community/logo_sett.png", data-i18n="[data-content]community.social_blog" data-content="Read the CodeCombat blog on Sett") From b8da7f547ffeefee5b9f83e4b5fd48462f8eed7a Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 8 Aug 2015 11:28:39 -0700 Subject: [PATCH 2/2] More fixes for geoip stuff. --- server_setup.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_setup.coffee b/server_setup.coffee index 9c3283acf..5a5f2dcea 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -84,7 +84,7 @@ setupChinaRedirectMiddleware = (app) -> speaksChinese = firstLanguage and firstLanguage.indexOf('zh') isnt -1 unless config.tokyo 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) 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}")