From c6dc8b2908697856a001188bf64b6cf0684ff8a2 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Fri, 28 May 2021 16:28:21 +0200 Subject: [PATCH] add patron link after each blog post for lichess-org/strategy#90 --- app/views/blog/show.scala | 3 ++- modules/i18n/src/main/I18nKeys.scala | 3 ++- modules/mailer/src/main/AutomaticEmail.scala | 3 ++- translation/source/site.xml | 6 +++--- ui/site/css/_blog.scss | 5 +++++ 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/views/blog/show.scala b/app/views/blog/show.scala index 424a901660..e565352fb5 100644 --- a/app/views/blog/show.scala +++ b/app/views/blog/show.scala @@ -52,7 +52,8 @@ object show { "Discuss this blog post in the forum" ) } else p("This is a preview."), - views.html.base.bits.connectLinks + views.html.base.bits.connectLinks, + p(cls := "patron-info")(a(href := routes.Plan.index)(trans.lichessPatronInfo())) ) ) ) diff --git a/modules/i18n/src/main/I18nKeys.scala b/modules/i18n/src/main/I18nKeys.scala index b75b1a31cc..9aac3b746f 100644 --- a/modules/i18n/src/main/I18nKeys.scala +++ b/modules/i18n/src/main/I18nKeys.scala @@ -708,7 +708,8 @@ val `refundXpointsTimeControlY` = new I18nKey("refundXpointsTimeControlY") val `timeAlmostUp` = new I18nKey("timeAlmostUp") val `clickToRevealEmailAddress` = new I18nKey("clickToRevealEmailAddress") val `download` = new I18nKey("download") -val `signupWelcomeMessage` = new I18nKey("signupWelcomeMessage") +val `welcome` = new I18nKey("welcome") +val `lichessPatronInfo` = new I18nKey("lichessPatronInfo") val `opponentLeftCounter` = new I18nKey("opponentLeftCounter") val `mateInXHalfMoves` = new I18nKey("mateInXHalfMoves") val `nextCaptureOrPawnMoveInXHalfMoves` = new I18nKey("nextCaptureOrPawnMoveInXHalfMoves") diff --git a/modules/mailer/src/main/AutomaticEmail.scala b/modules/mailer/src/main/AutomaticEmail.scala index 2b4282343c..398608cc6e 100644 --- a/modules/mailer/src/main/AutomaticEmail.scala +++ b/modules/mailer/src/main/AutomaticEmail.scala @@ -38,7 +38,8 @@ The Lichess team""" def welcomePM(user: User): Funit = fuccess { alsoSendAsPrivateMessage(user) { implicit lang => - lila.i18n.I18nKeys.signupWelcomeMessage.txt() + import lila.i18n.I18nKeys._ + s"""${welcome.txt()}\n${lichessPatronInfo.txt()}""" }.unit } diff --git a/translation/source/site.xml b/translation/source/site.xml index 8f72bc0dd0..1bde1a2e18 100644 --- a/translation/source/site.xml +++ b/translation/source/site.xml @@ -865,7 +865,7 @@ computer analysis, game chat and shareable URL. Time is almost up! [Click to reveal email address] Download - Welcome! -Lichess is a charity, and entirely free/libre open source software. -All operating costs, development, and content are funded solely by user donations - known as Patrons https://lichess.org/patron. + Welcome! + Lichess is a charity, and entirely free/libre open source software. +All operating costs, development and content are funded solely by user donations. diff --git a/ui/site/css/_blog.scss b/ui/site/css/_blog.scss index 9be7bd5616..61bdec6e7e 100644 --- a/ui/site/css/_blog.scss +++ b/ui/site/css/_blog.scss @@ -208,6 +208,11 @@ font-size: 0.85em; } } + + .patron-info { + margin-top: 2em; + font-size: 0.85em; + } } }