Merge branch 'develop' into feature/markdown-styling

This commit is contained in:
Daniel Weissmall 2022-10-21 14:44:09 +03:00
commit 00deb05850
5 changed files with 45 additions and 22 deletions

View File

@ -62,10 +62,19 @@
},
"articlePage": {
"abstract": "Abstract",
"keywords": "Keywords"
"keywords": "Keywords",
"interactionButtons":{
"abstract": "Abstract",
"readFile": "Read File",
"download" : "Download",
"share" : "Share",
"cite" : "Cite",
"copied": "Copied"
}
},
"navbar": {
"createNew": "Create New",
"createNew": "Create New",
"about": {
"navTitle": "About",
"aboutProject": "About Scipaper",
@ -73,15 +82,15 @@
"help": "Help"
},
"library": {
"navTitle": "My library",
"navTitle": "My library",
"publications": "Publications",
"favorites": "Favorites",
"collections": "Collections",
"recentViewed": "History"
},
"auth": {
"signIn": "Sign In",
"signUp": "Sign Up"
"signIn": "Sign In",
"signUp": "Sign Up"
}
},
"footer": {
@ -123,6 +132,17 @@
"title": "Search results",
"totalResults":"Total results",
"nothingFound": "Nothing found"
},
"filters": {
"authors":"Authors",
"publicationsType": "Publications Type",
"content":"Content",
"publisher":"Publisher",
"publicationTopic":"Publication Topic",
"appliedFitlers":"Applied Fitlers",
"clearAll":"Clear All",
"enterAuthorsName":"Enter Author Name",
"showAll":"Show All"
}
}

View File

@ -73,15 +73,15 @@
}
},
"navbar": {
"createNew": "Создать статью",
"createNew": "Создать статью",
"about": {
"navTitle": "О проекте",
"navTitle": "О проекте",
"aboutProject": "О Scipaper",
"contacts": "Контакты",
"help": "Помощь"
},
"library": {
"navTitle": "Моя библиотека",
"navTitle": "Моя библиотека",
"publications": "Публикации",
"favorites": "Избранное",
"collections": "Коллекции",

View File

@ -13,7 +13,7 @@ type Props = {
} & Omit<React.ComponentPropsWithoutRef<"div">, "">;
function CategoryCard({ count, title, iconChild, className, ...props }: Props) {
const [t, i18next] = useTranslation()
const [t, i18next] = useTranslation();
const iconChildStyle =
"h-7 fill-gray-500 stroke-gray-500 group-focus:fill-blue-600 group-active:fill-blue-600 group-focus:stroke-blue-600 group-active:stroke-blue-600";
@ -43,7 +43,8 @@ function CategoryCard({ count, title, iconChild, className, ...props }: Props) {
fontWeightVariant="normal"
className="text-xs text-gray-500 group-active:text-blue-600 group-focus:text-blue-600"
>
{count} {t("mainPage.article", {count: count}).toString()}
{count}{" "}
{t("mainPage.article_many", { count: count }).toString()}
</Typography>
</div>
</div>

View File

@ -7,7 +7,6 @@ import { useDebounce } from "./functions/debounce";
import { IProduct } from "./IProdutct";
import { useTranslation } from "react-i18next";
type Props = {
className?: string;
};
@ -28,8 +27,7 @@ export default function Fiter({ className }: Props) {
};
const debounced = useDebounce(query);
const [t, i18next] = useTranslation()
const [t, i18next] = useTranslation();
async function fetchProducts() {
const response = await axios.get(
@ -99,13 +97,13 @@ export default function Fiter({ className }: Props) {
/>
</Disclosure>
<Disclosure caption={t("filters.publicationsType")}>
<p>контент...</p>
<p>{t("filters.content")}</p>
</Disclosure>
<Disclosure caption={t("filters.publisher")}>
<p>контент...</p>
<p>{t("filters.content")}</p>
</Disclosure>
<Disclosure caption={t("filters.publicationTopic")}>
<p>контент...</p>
<p>{t("filters.content")}</p>
</Disclosure>
</div>
</div>

View File

@ -2,16 +2,14 @@
/* Imports */
/* -------------------------------------------------------------------------- */
import React from "react";
import {t as nextT} from "i18next";
import { t as nextT } from "i18next";
import { useTranslation } from "react-i18next";
import { SearchBar } from "../../search/SearchBar";
import { formatNumber } from "core/helpers";
export default function MainSection() {
const { t, i18n } = useTranslation();
const amountArticles = 4202020
const amountArticles = 4202020;
return (
<section className="bg-main bg-center bg-cover bg-origin-border bg-no-repeat min-h-[100vh] py-32 px-2 sm:px-6 md:px-6 lg:px-0 items-center flex justify-center ">
@ -21,8 +19,14 @@ export default function MainSection() {
</div>
<div className="flex flex-row items-center justify-center space-x-3 pt-2">
<div className=" text-2xl text-gray-400">{t("mainPage.search")}</div>
<div className=" text-3xl text-blue-500">{formatNumber(amountArticles)}</div>
<div className=" text-2xl text-gray-400">{nextT("mainPage.article", {count: amountArticles}).toString()}</div>
<div className=" text-3xl text-blue-500">
{formatNumber(amountArticles)}
</div>
<div className=" text-2xl text-gray-400">
{nextT("mainPage.article_many", {
count: amountArticles,
}).toString()}
</div>
</div>
<div className="max-w-xl m-auto pt-16 ">
<SearchBar />