diff --git a/frontend/src/jsMain/kotlin/ru/posidata/views/main/AnswerCard.kt b/frontend/src/jsMain/kotlin/ru/posidata/views/main/AnswerCard.kt index d681fd2..01cb1a4 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/views/main/AnswerCard.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/views/main/AnswerCard.kt @@ -36,7 +36,7 @@ val answerCard = FC { props -> style = jso { display = "inline".unsafeCast() } - +"${pokemon.getName()} - это " + +"${pokemon.getName()} - is from " } h2 { style = jso { @@ -44,7 +44,7 @@ val answerCard = FC { props -> color = "yellow".unsafeCast() display = "inline".unsafeCast() } - +(if (pokemon.type == BIG_DATA) "из БигДаты!" else "Pokémon!") + +(if (pokemon.type == BIG_DATA) "BigData!" else "Pokémon!") } } } @@ -94,12 +94,12 @@ val answerCard = FC { props -> className = ClassName("btn btn-outline-info") if (props.counter < props.answers.size) { - +"Следующий вопрос" + +"Next question" onClick = { props.setSelection(QUESTION) } } else { - +"Результаты" + +"Your results" onClick = { props.setSelection(RESULTS) } diff --git a/frontend/src/jsMain/kotlin/ru/posidata/views/main/QuestionCard.kt b/frontend/src/jsMain/kotlin/ru/posidata/views/main/QuestionCard.kt index 3b432c2..195f9db 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/views/main/QuestionCard.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/views/main/QuestionCard.kt @@ -151,7 +151,7 @@ val questionCard = FC { props -> display = "inline".unsafeCast() color = "rgb(0, 206, 224)".unsafeCast() } - +" или " + +" or " } h1 { onClick = { diff --git a/frontend/src/jsMain/kotlin/ru/posidata/views/main/ResultCard.kt b/frontend/src/jsMain/kotlin/ru/posidata/views/main/ResultCard.kt index 618df6c..732e396 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/views/main/ResultCard.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/views/main/ResultCard.kt @@ -26,7 +26,7 @@ import web.cssom.* val resultCard = FC { props -> val correctAnswers = props.answers.count { it == CORRECT } - var (loading, setLoading) = useState(true) + val (loading, setLoading) = useState(true) val updateRound = useDeferredRequest { if (props.tgUser != null) { @@ -66,13 +66,15 @@ val resultCard = FC { props -> h1 { className = ClassName("text-center") style = jso { + fontSize = 50.unsafeCast() color = "yellow".unsafeCast() display = "inline".unsafeCast() } +"$correctAnswers" } - h2 { + h1 { style = jso { + fontSize = 35.unsafeCast() color = "white".unsafeCast() display = "inline".unsafeCast() } @@ -121,7 +123,7 @@ val resultCard = FC { props -> props.setUniqueRandom(listOf()) updateRound() } - +"Еще раз!" + +"Once more!" } } div { diff --git a/frontend/src/jsMain/kotlin/ru/posidata/views/main/Welcome.kt b/frontend/src/jsMain/kotlin/ru/posidata/views/main/Welcome.kt index f98ed24..8a54203 100644 --- a/frontend/src/jsMain/kotlin/ru/posidata/views/main/Welcome.kt +++ b/frontend/src/jsMain/kotlin/ru/posidata/views/main/Welcome.kt @@ -38,6 +38,7 @@ val welcomeCard = FC { props -> response.ok -> { props.setUser(response.decodeFromJsonString()) } + else -> window.alert("Failed to authorize you with telegram") } } @@ -75,7 +76,7 @@ val welcomeCard = FC { props -> h6 { className = ClassName("mt-3 mb-3 text-start") - +("A humorous test of 12 questions, made over a couple of nights to show just how large a zoo of names " + + +("A humorous test of 12 questions, made over a couple of nights to illustrate how large a zoo of names " + "has formed in the Big Data world. The original idea was born " ) a { @@ -101,14 +102,14 @@ val welcomeCard = FC { props -> +"GitHub" } - +". ${if (props.tgUser == null) "Чтобы участвовать в розыгрыше и рейтинге - залогинься:" else ""}" + +". ${if (props.tgUser == null) "If you wish to share your results - you can register with Telegram using the button below:" else ""}" } if (props.tgUser == null) { TLoginButton { botName = "PosiDataBot" - buttonSize = "large" + buttonSize = "small" redirectUrl = null cornerRadius = 15.0 requestAccess = "write" @@ -135,17 +136,28 @@ val welcomeCard = FC { props -> style = jso { color = "yellow".unsafeCast() } - +"Привет, ${props.tgUser?.username}! Теперь ты участвуешь в розыгрыше на SmartData. Если захочешь просто поиграть - обнови страницу." + +"Hello, ${props.tgUser?.username}! Now your results are being recorded, if you don't want this - just refresh the page." + } + } + + img { + className = + ClassName("mt-1 mb-2") + src = "img/pokemon-vs-data.jpeg" + style = jso { + width = "100%".unsafeCast() + borderRadius = "2px 2px 2px 2px".unsafeCast() + boxShadow = "10px 10px 20px rgba(0, 0, 0, 0.5)".unsafeCast() } } img { className = - ClassName("animate__animated animate__shakeX mt-1 border border-info border-5 img-glow3 mb-3") - src = "img/pokemonVSBigData.jpeg" + ClassName("animate__animated animate__shakeX border border-info border-4 img-glow3 mb-3") + src = if (props.tgUser == null) "img/lets-start.png" else "img/lets-start-registered.png" style = jso { width = "100%".unsafeCast() - borderRadius = "20px 20px 20px 20px".unsafeCast() + borderRadius = "15px 15px 15px 15px".unsafeCast() boxShadow = "10px 10px 20px rgba(0, 0, 0, 0.5)".unsafeCast() cursor = "pointer".unsafeCast() } diff --git a/frontend/src/jsMain/resources/img/Lets_start.png b/frontend/src/jsMain/resources/img/Lets_start.png deleted file mode 100644 index b6bc8ed..0000000 Binary files a/frontend/src/jsMain/resources/img/Lets_start.png and /dev/null differ diff --git a/frontend/src/jsMain/resources/img/bigdata/DORIS-min.png b/frontend/src/jsMain/resources/img/bigdata/DORIS-min.png new file mode 100644 index 0000000..4a19052 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/DORIS-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/DRUID-min.png b/frontend/src/jsMain/resources/img/bigdata/DRUID-min.png new file mode 100644 index 0000000..95f1c4e Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/DRUID-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/KUDU-min.png b/frontend/src/jsMain/resources/img/bigdata/KUDU-min.png new file mode 100644 index 0000000..97a0332 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/KUDU-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/KUDU.png b/frontend/src/jsMain/resources/img/bigdata/KUDU.png new file mode 100644 index 0000000..97a0332 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/KUDU.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/LANCE-min.png b/frontend/src/jsMain/resources/img/bigdata/LANCE-min.png new file mode 100644 index 0000000..d51bbb1 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/LANCE-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/LUIGI-min.png b/frontend/src/jsMain/resources/img/bigdata/LUIGI-min.png new file mode 100644 index 0000000..1bfad75 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/LUIGI-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/MILVUS-min.png b/frontend/src/jsMain/resources/img/bigdata/MILVUS-min.png new file mode 100644 index 0000000..3037695 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/MILVUS-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/NIMBLE-min.png b/frontend/src/jsMain/resources/img/bigdata/NIMBLE-min.png new file mode 100644 index 0000000..bb181af Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/NIMBLE-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/PAIMON-min.png b/frontend/src/jsMain/resources/img/bigdata/PAIMON-min.png new file mode 100644 index 0000000..e2d3190 Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/PAIMON-min.png differ diff --git a/frontend/src/jsMain/resources/img/bigdata/WEAVIATE-min.png b/frontend/src/jsMain/resources/img/bigdata/WEAVIATE-min.png new file mode 100644 index 0000000..b305f9e Binary files /dev/null and b/frontend/src/jsMain/resources/img/bigdata/WEAVIATE-min.png differ diff --git a/frontend/src/jsMain/resources/img/lets-start-registered.png b/frontend/src/jsMain/resources/img/lets-start-registered.png new file mode 100644 index 0000000..605a4f0 Binary files /dev/null and b/frontend/src/jsMain/resources/img/lets-start-registered.png differ diff --git a/frontend/src/jsMain/resources/img/lets-start.png b/frontend/src/jsMain/resources/img/lets-start.png new file mode 100644 index 0000000..68b4576 Binary files /dev/null and b/frontend/src/jsMain/resources/img/lets-start.png differ diff --git a/frontend/src/jsMain/resources/img/pokemon-vs-data.jpeg b/frontend/src/jsMain/resources/img/pokemon-vs-data.jpeg new file mode 100644 index 0000000..4c49ab2 Binary files /dev/null and b/frontend/src/jsMain/resources/img/pokemon-vs-data.jpeg differ diff --git a/frontend/src/jsMain/resources/img/pokemonVSBigData.jpeg b/frontend/src/jsMain/resources/img/pokemonVSBigData.jpeg deleted file mode 100644 index 034b75c..0000000 Binary files a/frontend/src/jsMain/resources/img/pokemonVSBigData.jpeg and /dev/null differ