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

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>по следам анонимного деда мороза</title>
<title>First, let's grab some beer</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" />
@ -16,15 +16,21 @@
<div class="wrap-contact100">
<form id="q-form" class="contact100-form" validate-form>
<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>
<div class="wrap-input100 validate-input" data-validate="Нужно имя">
<input class="input100" type="text" name="name" placeholder="твое имя">
<div class="wrap-input100 validate-input" data-validate="gimme your name">
<input class="input100" type="text" name="name" placeholder="your name">
</div>
<div class="wrap-input100 validate-input" data-validate="Нужен ключ">
<input class="input100" type="text" name="answer" placeholder="ключ посылки RM...">
<div class="wrap-input100 validate-input" data-validate="gimme me an answer">
<input class="input100" type="text" name="answer" placeholder="answer">
</div>
<div class="container-contact100-form-btn">
@ -32,7 +38,7 @@
<div class="contact100-form-bgbtn"></div>
<button class="contact100-form-btn" onclick="return tryAnswer(this)">
<span>
проверим
check
</span>
</button>
</div>

@ -42,7 +42,7 @@ import '../css/util.css';
a.removeClass("hidden");
if (!approval.length) {
return msg.text("ну что-то сломалось 😅");
return msg.text("something bad happend 😅");
}
msg.empty();
@ -56,11 +56,11 @@ import '../css/util.css';
var notpass = function () {
bt.attr("disabled", false);
bg.css("background", "");
txt.text("хм, давай еще 🧐");
txt.text("nope, try again 🧐");
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', {
method: 'POST',

@ -135,14 +135,14 @@ func (a *Api) checkScore(ctx *routing.Context) (err error) {
if int64(zz[0].Score) > score.Score {
resp.Msg = []string{
`ух, хорошая игра, но нужно стараться еще!`,
`what a game! but try harder next time`,
}
} else {
resp.Msg = []string{
`поздравляю с победой`,
`следующий уровень ищи здесь:`,
`congratulations! you are the winner!`,
`to enter the next level use:`,
`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()

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>по следам анонимного деда мороза</title>
<title>Second, grab more beer</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/icons/favicon.ico" />
@ -16,11 +16,10 @@
<div class="wrap-contact100">
<form id="q-form" class="contact100-form" validate-form>
<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>
<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>
</div>
@ -29,7 +28,7 @@
<div class="contact100-form-bgbtn"></div>
<button class="contact100-form-btn" onclick="return playGame(this)">
<span>
поехали
let's go
</span>
</button>
</div>

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

Loading…
Cancel
Save