Compare commits

...

4 commits

Author SHA1 Message Date
bakhirev
6a75b3b0be update 2024-12-03 02:06:48 +03:00
bakhirev
10e39d967e update 2024-12-03 01:40:15 +03:00
bakhirev
734ed93a32 update 2024-12-03 00:52:26 +03:00
bakhirev
4f59f9f8fc update 2024-12-02 22:25:29 +03:00
18 changed files with 137 additions and 30 deletions
build/static
src/ts
components
pages/PageWrapper
components/footer
index.tsx
store
translations/ru

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -55,3 +55,16 @@
}
}
@media (max-width: 900px) {
.billboard {
&_box {
width: 300px;
height: 120px;
}
&_title {
font-size: var(--font-m);
height: 70px;
padding: var(--space-s);
}
}
}

View file

@ -21,7 +21,7 @@ function getTextWithLink(text: string, className?: string) {
target="_blank"
rel="noreferrer"
className={className || ''}
to={link}
to={link || ''}
>
{title}
</Link>
@ -84,14 +84,15 @@ function Description({ text, style, className }: IDescriptionProps) {
? (text || '').trim().split(/\n+/gm)
: text;
const items = paragraphs.map((paragraph) => {
const items = paragraphs.map((paragraph, index: number) => {
const prefix = paragraph.substring(0, 2);
const mainText = paragraph.substring(2);
const key = `${mainText}${index}`;
if (prefix === '- ') {
return (
<List
key={mainText}
key={key}
text={mainText}
style={style}
className={className}
@ -102,7 +103,7 @@ function Description({ text, style, className }: IDescriptionProps) {
if (prefix === '# ') {
return (
<Title
key={mainText}
key={key}
text={mainText}
style={style}
className={className}
@ -112,7 +113,7 @@ function Description({ text, style, className }: IDescriptionProps) {
return (
<SimpleText
key={mainText}
key={key}
text={paragraph}
style={style}
className={className}

View file

@ -32,3 +32,9 @@
color: var(--color-white);
}
}
@media (max-width: 900px) {
.game_banner {
height: 200px;
}
}

View file

@ -1,5 +1,7 @@
import { makeObservable, observable, action } from 'mobx';
import { t } from 'ts/helpers/Localization';
export interface IConfirmStore {
title: string;
yes: string;
@ -36,9 +38,9 @@ class ConfirmStore implements IConfirmStore {
}
open(options?: any) {
this.title = options?.title || options || 'Вы уверены что хотите удалить?';
this.yes = options?.yes || 'Да, уверен';
this.no = options?.no || 'Отмена';
this.title = options?.title || options || t('common.confirm.title');
this.yes = options?.yes || t('common.confirm.yes');
this.no = options?.no || t('common.confirm.no');
this.isOpen = true;
return new Promise((response: any, reject: any) => {
this.successCallback = response;

View file

@ -1,11 +1,8 @@
@import 'src/styles/variables';
.quiz_answer {
--temp-width: 160px;
--temp-small: calc(var(--temp-width) - 32px);
position: relative;
width: var(--temp-width);
width: 160px;
padding-bottom: var(--space-m);
cursor: pointer;
@ -26,7 +23,7 @@
}
&_small {
width: var(--temp-small);
width: 128px;
}
&_icon {
@ -105,7 +102,7 @@
padding: var(--space-s) var(--space-l);
& .quiz_answer {
width: var(--temp-small);
width: 128px;
animation-delay: 1s;
animation-duration: 2s;
@ -119,7 +116,6 @@
}
}
@keyframes quiz_answer {
from {
top: 0;
@ -133,3 +129,21 @@
opacity: 0.3;
}
}
@media (max-width: 900px) {
.quiz_answer {
width: 100px;
&_small {
width: 68px;
}
&_text {
font-size: var(--font-s);
}
}
.quiz_answer_wrapper_small .quiz_answer {
width: 68px;
}
.quiz_answer_wrapper + .quiz_answer_wrapper {
margin-left: var(--space-l);
}
}

View file

@ -153,3 +153,16 @@
background-position: -200px 0;
}
}
@media (max-width: 900px) {
.quiz {
&_title,
&_description {
width: 100%;
padding: var(--space-l) var(--space-xs);
}
&_title {
font-size: var(--font-m);
}
}
}

View file

@ -58,8 +58,10 @@ function Races({
backgroundImage: 'url(./assets/games/races/greenTop.png)',
}}
/>
<div className={style.races}>
{lines}
<div className={`${style.races} scroll_x`}>
<div style={{ minWidth: '900px' }}>
{lines}
</div>
</div>
<div
className={style.races_green}

View file

@ -28,10 +28,6 @@
background-repeat: repeat-x;
background-size: auto 100%;
background-position: top left;
&:first-child {
// border-top: var(--space-xxs) dashed var(--color-border);
}
}
&_button {
@ -39,3 +35,8 @@
}
}
@media (max-width: 900px) {
.races_track {
height: 70px;
}
}

View file

@ -25,7 +25,6 @@
animation-fill-mode: both;
}
@keyframes races_track_info {
from {
opacity: 0;
@ -34,3 +33,9 @@
opacity: 1;
}
}
@media (max-width: 900px) {
.races_track_info {
margin: 0 12%;
}
}

View file

@ -17,7 +17,16 @@
--temp-width: 20px;
--temp-height: 30px;
}
}
@media (max-width: 900px) {
.show_symbol {
--temp-width: 24.5px;
--temp-height: 33px;
}
}
.show_symbol {
font-size: var(--temp-font);
position: relative;

View file

@ -38,7 +38,11 @@ function SwimmingPool({
backgroundImage: 'url(./assets/games/swimmingPool/block2.png)',
}}
/>
{lines}
<div className="scroll_x">
<div style={{ minWidth: '900px' }}>
{lines}
</div>
</div>
<div
className={style.swimming_pool_bottom_border}
style={{

View file

@ -53,3 +53,18 @@
.swimming_pool_track + .swimming_pool_track .swimming_pool_track_line {
border-top: 4px dashed red;
}
@media (max-width: 900px) {
.swimming_pool_track {
height: 70px;
&_value {
width: 71px;
line-height: 64px;
}
&_line {
width: calc(100% - 384px);
}
}
}

View file

@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next';
import localization from 'ts/helpers/Localization';
import dataGripStore from 'ts/store/DataGrip';
import viewNameStore, { ViewNameEnum } from 'ts/store/ViewName';
import confirm from 'ts/components/ModalWindow/store/Confirm';
import Button from './Button';
@ -47,8 +48,9 @@ function getMenu(navigate: Function): any[] {
confirm.open({
title: 'Вы уверены что хотите выйти?',
}).then(() => {
dataGripStore.asyncSetCommits([]);
dataGripStore.exit();
navigate('/');
viewNameStore.toggle(ViewNameEnum.WELCOME);
});
},
},

View file

@ -20,10 +20,18 @@ interface IPageWrapper {
function MobileView({
children,
}: IPageWrapper) {
const { type, page } = useParams<any>();
const padding = type === 'team' && page === 'building'
? { padding: 0 }
: {};
return (
<>
<div className={style.page_wrapper}>
<div className={style.page_wrapper_main_mobile}>
<div
className={style.page_wrapper_main_mobile}
style={padding}
>
{children}
</div>
<HeaderWithTab/>

View file

@ -41,6 +41,7 @@ class DataGripStore {
processingDataAnalysis: action,
depersonalized: action,
updateStatistic: action,
exit: action,
});
}
@ -147,6 +148,13 @@ class DataGripStore {
this.fileGrip = fileGrip;
this.hash = Math.random();
}
exit() {
dataGrip.clear();
fileGrip.clear();
this.commits = [];
this.#updateRender();
}
}
const dataGripStore = new DataGripStore();

View file

@ -26,4 +26,8 @@ export default `
§ common.notifications.save: Изменения сохранены
§ common.notifications.setting: Настройки сохранены
§ common.fileLoader.notification: Ошибка загрузки файла $1
§ common.confirm.title: Вы уверены что хотите удалить?
§ common.confirm.yes: Да, уверен
§ common.confirm.no: Отмена
§ common.confirm.abc: abc
`;