translate it

main
Nikita Tokarchuk 2 years ago
parent deb4027400
commit 927428bd87
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 6
      task1-backend/lib/api.go
  2. 22
      task1/index.html
  3. 6
      task1/js/main.js
  4. 8
      task2-backend/lib/api.go
  5. 9
      task2/index.html
  6. 4
      task2/js/main.js

@ -111,7 +111,7 @@ func (a *Api) checkAnswer(ctx *routing.Context) (err error) {
claims := &jwtgo.StandardClaims{ claims := &jwtgo.StandardClaims{
Id: id.String(), Id: id.String(),
Subject: answer.Name, Subject: answer.Name,
Issuer: "Anonymous Moroz Grandfather", Issuer: "a quest",
IssuedAt: now.Unix(), IssuedAt: now.Unix(),
} }
@ -125,8 +125,8 @@ func (a *Api) checkAnswer(ctx *routing.Context) (err error) {
ctx.Response.Header.Set("Content-Type", "application/json") ctx.Response.Header.Set("Content-Type", "application/json")
_, err = ctx.WriteString(fmt.Sprintf(` _, err = ctx.WriteString(fmt.Sprintf(`
["переход на следующий уровень ищи в альтернативном имени безопасного узла", ["to find the next level check the subject alternative name",
"используй ключ чтобы открыть следующий уровень", "and use there this key to continue",
"%s"] "%s"]
`, jwt)) `, jwt))
if err != nil { if err != nil {

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>по следам анонимного деда мороза</title> <title>First, let's grab some beer</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" /> <link rel="icon" type="image/png" href="images/icons/favicon.ico" />
@ -16,15 +16,21 @@
<div class="wrap-contact100"> <div class="wrap-contact100">
<form id="q-form" class="contact100-form" validate-form> <form id="q-form" class="contact100-form" validate-form>
<span class="contact100-form-title"> <span class="contact100-form-title">
иди по следу анонимного деда мороза и найди свой последний подарок! всего здесь тебя ждут три уровня. и да, <hr/>
будь внимателен с именем, удачи! One of the earliest signs of a "beer boom" is a lack of beer. The trend started during Prohibition, when prices started getting higher. People were not interested in beer. The people who didn't wanted to buy alcohol didn't care at all. They wanted better quality things, and not getting high.
<hr/>
The text above doesn't make sense. What is the author trying to say?
<hr/>
Just have some fun and
<br>
<b>be careful with a name.</b>
</span> </span>
<div class="wrap-input100 validate-input" data-validate="Нужно имя"> <div class="wrap-input100 validate-input" data-validate="gimme your name">
<input class="input100" type="text" name="name" placeholder="твое имя"> <input class="input100" type="text" name="name" placeholder="your name">
</div> </div>
<div class="wrap-input100 validate-input" data-validate="Нужен ключ"> <div class="wrap-input100 validate-input" data-validate="gimme me an answer">
<input class="input100" type="text" name="answer" placeholder="ключ посылки RM..."> <input class="input100" type="text" name="answer" placeholder="answer">
</div> </div>
<div class="container-contact100-form-btn"> <div class="container-contact100-form-btn">
@ -32,7 +38,7 @@
<div class="contact100-form-bgbtn"></div> <div class="contact100-form-bgbtn"></div>
<button class="contact100-form-btn" onclick="return tryAnswer(this)"> <button class="contact100-form-btn" onclick="return tryAnswer(this)">
<span> <span>
проверим check
</span> </span>
</button> </button>
</div> </div>

@ -42,7 +42,7 @@ import '../css/util.css';
a.removeClass("hidden"); a.removeClass("hidden");
if (!approval.length) { if (!approval.length) {
return msg.text("ну что-то сломалось 😅"); return msg.text("something bad happend 😅");
} }
msg.empty(); msg.empty();
@ -56,11 +56,11 @@ import '../css/util.css';
var notpass = function () { var notpass = function () {
bt.attr("disabled", false); bt.attr("disabled", false);
bg.css("background", ""); bg.css("background", "");
txt.text("хм, давай еще 🧐"); txt.text("nope, try again 🧐");
setTimeout((bt.addClass("animated shake"), function () { bt.removeClass("animated shake") }), 1000); setTimeout((bt.addClass("animated shake"), function () { bt.removeClass("animated shake") }), 1000);
} }
var rocking = setInterval((txt.text("хм 🚀"), function () { txt.text(txt.text() + "🚀") }), 50); var rocking = setInterval((txt.text("hmm 🚀"), function () { txt.text(txt.text() + "🚀") }), 50);
fetch('/answer/check', { fetch('/answer/check', {
method: 'POST', method: 'POST',

@ -135,14 +135,14 @@ func (a *Api) checkScore(ctx *routing.Context) (err error) {
if int64(zz[0].Score) > score.Score { if int64(zz[0].Score) > score.Score {
resp.Msg = []string{ resp.Msg = []string{
`ух, хорошая игра, но нужно стараться еще!`, `what a game! but try harder next time`,
} }
} else { } else {
resp.Msg = []string{ resp.Msg = []string{
`поздравляю с победой`, `congratulations! you are the winner!`,
`следующий уровень ищи здесь:`, `to enter the next level use:`,
`nc 1451e73305328869824eda4c81a75cb5.mehrweg.ga 31337`, `nc 1451e73305328869824eda4c81a75cb5.mehrweg.ga 31337`,
`отправь туда ключ чтобы открыть`, `send your existing key to the server to let the next level run`,
} }
_, err = a.Redis.SAdd(a.WinnersKey, claims.Id).Result() _, err = a.Redis.SAdd(a.WinnersKey, claims.Id).Result()

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>по следам анонимного деда мороза</title> <title>Second, grab more beer</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" /> <link rel="icon" type="image/png" href="images/icons/favicon.ico" />
@ -16,11 +16,10 @@
<div class="wrap-contact100"> <div class="wrap-contact100">
<form id="q-form" class="contact100-form" validate-form> <form id="q-form" class="contact100-form" validate-form>
<span class="contact100-form-title"> <span class="contact100-form-title">
предлагаю поиграть, простая игра пинг-понг, вводи ключ и понеслась! первому месту в рейтинге открывается let's play a bit, this is just a simple ping-pong game. should be easy to win, right? just put your key to begin.
скрытое знание.
</span> </span>
<div class="wrap-input100 validate-input" data-validate="Нужен ключ"> <div class="wrap-input100 validate-input" data-validate="gimme your key">
<input class="input100" type="text" name="key" required> <input class="input100" type="text" name="key" required>
</div> </div>
@ -29,7 +28,7 @@
<div class="contact100-form-bgbtn"></div> <div class="contact100-form-bgbtn"></div>
<button class="contact100-form-btn" onclick="return playGame(this)"> <button class="contact100-form-btn" onclick="return playGame(this)">
<span> <span>
поехали let's go
</span> </span>
</button> </button>
</div> </div>

@ -400,7 +400,7 @@ window.cancelRequestAnimFrame = (function () {
ctx.font = "20px Roboto, sans-serif"; ctx.font = "20px Roboto, sans-serif";
ctx.textAlign = "center"; ctx.textAlign = "center";
ctx.textBaseline = "middle"; ctx.textBaseline = "middle";
ctx.fillText("Сохраняю результат...", W / 2, H / 2 + 25); ctx.fillText("Saving...", W / 2, H / 2 + 25);
var key = sessionStorage.getItem("key"); var key = sessionStorage.getItem("key");
@ -412,7 +412,7 @@ window.cancelRequestAnimFrame = (function () {
.catch(function () { }) .catch(function () { })
.then(function (approval) { .then(function (approval) {
if (!approval) { if (!approval) {
ctx.fillText("Не удалось сохранить с этим ключом", W / 2, H / 2 + 65); ctx.fillText("Cannot save with this key", W / 2, H / 2 + 65);
return return
} }

Loading…
Cancel
Save