Skip to content

Commit

Permalink
fixed colors & added tips for adjectives
Browse files Browse the repository at this point in the history
  • Loading branch information
ru-danko committed May 9, 2024
1 parent 4f73068 commit 383f5eb
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
4 changes: 4 additions & 0 deletions src/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
--table-highlighted-cell: #BBDEFB;
--table-border-color: var(--gray-9);
--overlay-color: #000;
--tips-font-color: #122f80;
--tips-background-color: #e4f1fc;

--dark: #000;
--light: #fff;
Expand Down Expand Up @@ -49,6 +51,8 @@
--table-highlighted-cell: #1f374f;
--table-border-color: #cdcdcd;
--overlay-color: #666;
--tips-font-color: #e4f1fc;
--tips-background-color: #122f80;

--dark: #fff;
--light: #292931;
Expand Down
24 changes: 21 additions & 3 deletions src/components/Modals/DetailModal/DetailModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class DetailModalInternal extends Component<IDetailModalInternal> {
case 'gen': caseTips = 'kogo? čego?'; break;
case 'dat': caseTips = 'komu? čemu?'; break;
case 'ins': caseTips = 'kym? čim?'; break;
case 'loc': caseTips = 'kom? čem?'; break;
case 'loc': caseTips = 'o kom? o čem?'; break;
case 'voc': caseTips = 'hej!'; break;
}
const tableRow = [`${caseName}@b@${caseTips}`];
Expand Down Expand Up @@ -483,8 +483,17 @@ class DetailModalInternal extends Component<IDetailModalInternal> {

this.props.orderOfCases.forEach((caseItem) => {
if (caseItem in singular) {
let caseTips = '';
switch (caseItem) {
case 'nom': caseTips = 'kaky? kako? kaka?'; break;
case 'acc': caseTips = 'kakogo? kako? kaku?'; break;
case 'gen': caseTips = 'kakogo? kaky? kako? kaku?'; break;
case 'dat': caseTips = 'kakomu? kakoj?'; break;
case 'ins': caseTips = 'kakym? kakoju?'; break;
case 'loc': caseTips = 'kakom? kakoj?'; break;
}
const tableRow = [
`${t(`case${caseItem[0].toUpperCase()}${caseItem.slice(1)}`)}@b`,
`${t(`case${caseItem[0].toUpperCase()}${caseItem.slice(1)}`)}@b@${caseTips}`,
];
switch (caseItem) {
case 'nom':
Expand Down Expand Up @@ -523,8 +532,17 @@ class DetailModalInternal extends Component<IDetailModalInternal> {
];
this.props.orderOfCases.forEach((caseItem) => {
if (caseItem in plural) {
let caseTips = '';
switch (caseItem) {
case 'nom': caseTips = 'kaki? kake?'; break;
case 'acc': caseTips = 'kakyh? kake?'; break;
case 'gen': caseTips = 'kakyh?'; break;
case 'dat': caseTips = 'kakym?'; break;
case 'ins': caseTips = 'kakymi?'; break;
case 'loc': caseTips = 'kakyh?'; break;
}
const tableRow = [
`${t(`case${caseItem[0].toUpperCase()}${caseItem.slice(1)}`)}@b`,
`${t(`case${caseItem[0].toUpperCase()}${caseItem.slice(1)}`)}@b@${caseTips}`,
];
switch (caseItem) {
case 'nom':
Expand Down
8 changes: 4 additions & 4 deletions src/components/Tips/Tips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
&::after {
position: absolute;
border-radius: 0.25rem;
color: rgb(0, 40, 150);
background-color: rgb(236, 250, 252);
color: var(--tips-font-color);
background-color: var(--tips-background-color);
padding: 0.35rem;
white-space: nowrap;
}
Expand All @@ -13,9 +13,9 @@
content: attr(data-tips);
}
}
.tipsSymbol:after {
.tipsSymbol::after {
content: '';
font-size: smaller;
color: rgb(75, 75, 75);
color: var(--muted-text-color);
}
}
2 changes: 1 addition & 1 deletion src/components/Tips/Tips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import classNames from 'classnames';
import './Tips.scss';

interface ITipsProps {
str: string;
str: any;
tips: string;
className?: string;
}
Expand Down
12 changes: 6 additions & 6 deletions src/translations/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@
},
"caseNom": {
"en": "Nom.",
"isv": "Imen.",
"isv": "Nom.",
"ru": "Имен.",
"uk": "Наз.",
"be": "Наз.",
Expand All @@ -1592,7 +1592,7 @@
},
"caseAcc": {
"en": "Acc.",
"isv": "Vin.",
"isv": "Aku.",
"ru": "Вин.",
"uk": "Знах.",
"be": "Він.",
Expand All @@ -1607,7 +1607,7 @@
},
"caseGen": {
"en": "Gen.",
"isv": "Rod.",
"isv": "Gen.",
"ru": "Род.",
"uk": "Род.",
"be": "Родн.",
Expand All @@ -1622,7 +1622,7 @@
},
"caseLoc": {
"en": "Loc.",
"isv": "Měst.",
"isv": "Lok.",
"ru": "Пред.",
"uk": "Місц.",
"be": "Месн.",
Expand Down Expand Up @@ -1652,7 +1652,7 @@
},
"caseIns": {
"en": "Ins.",
"isv": "Tvor.",
"isv": "Ins.",
"ru": "Твор.",
"uk": "Оруд.",
"be": "Творн.",
Expand All @@ -1667,7 +1667,7 @@
},
"caseVoc": {
"en": "Voc.",
"isv": "Zvat.",
"isv": "Vok.",
"ru": "Зват.",
"uk": "Клич.",
"be": "Клічн.",
Expand Down

0 comments on commit 383f5eb

Please sign in to comment.