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

View file

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

View file

@ -1,11 +1,8 @@
@import 'src/styles/variables'; @import 'src/styles/variables';
.quiz_answer { .quiz_answer {
--temp-width: 160px;
--temp-small: calc(var(--temp-width) - 32px);
position: relative; position: relative;
width: var(--temp-width); width: 160px;
padding-bottom: var(--space-m); padding-bottom: var(--space-m);
cursor: pointer; cursor: pointer;
@ -26,7 +23,7 @@
} }
&_small { &_small {
width: var(--temp-small); width: 128px;
} }
&_icon { &_icon {
@ -105,7 +102,7 @@
padding: var(--space-s) var(--space-l); padding: var(--space-s) var(--space-l);
& .quiz_answer { & .quiz_answer {
width: var(--temp-small); width: 128px;
animation-delay: 1s; animation-delay: 1s;
animation-duration: 2s; animation-duration: 2s;
@ -119,7 +116,6 @@
} }
} }
@keyframes quiz_answer { @keyframes quiz_answer {
from { from {
top: 0; top: 0;
@ -133,3 +129,21 @@
opacity: 0.3; 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; 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)', backgroundImage: 'url(./assets/games/races/greenTop.png)',
}} }}
/> />
<div className={style.races}> <div className={`${style.races} scroll_x`}>
{lines} <div style={{ minWidth: '900px' }}>
{lines}
</div>
</div> </div>
<div <div
className={style.races_green} className={style.races_green}

View file

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

View file

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

View file

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

View file

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

View file

@ -53,3 +53,18 @@
.swimming_pool_track + .swimming_pool_track .swimming_pool_track_line { .swimming_pool_track + .swimming_pool_track .swimming_pool_track_line {
border-top: 4px dashed red; 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 localization from 'ts/helpers/Localization';
import dataGripStore from 'ts/store/DataGrip'; import dataGripStore from 'ts/store/DataGrip';
import viewNameStore, { ViewNameEnum } from 'ts/store/ViewName';
import confirm from 'ts/components/ModalWindow/store/Confirm'; import confirm from 'ts/components/ModalWindow/store/Confirm';
import Button from './Button'; import Button from './Button';
@ -47,8 +48,9 @@ function getMenu(navigate: Function): any[] {
confirm.open({ confirm.open({
title: 'Вы уверены что хотите выйти?', title: 'Вы уверены что хотите выйти?',
}).then(() => { }).then(() => {
dataGripStore.asyncSetCommits([]); dataGripStore.exit();
navigate('/'); navigate('/');
viewNameStore.toggle(ViewNameEnum.WELCOME);
}); });
}, },
}, },

View file

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

View file

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

View file

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