Titles changed

This commit is contained in:
Kakabay 2022-12-20 12:58:48 +05:00
parent 0471f3b81f
commit 9b23b7b237
8 changed files with 91 additions and 50 deletions

View File

@ -0,0 +1,31 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_46)">
<rect width="100" height="100" rx="50" fill="white"/>
<path d="M44.5 19.5C43.3418 16.4115 34.1667 5.16667 30.5 1.5L14 13C15.5 13.6667 20.7 16.7 21.5 17.5C22.5 18.5 25.5 22.5 28 26.5C30 29.7 30.8333 34.8333 31 37C31.3333 40.5 33.1 47.6 37.5 48C41.9 48.4 45.5 43.5 46.5 40.5C47.5 37.5 46.9 35.5 46.5 29.5C46 22 46 23.5 44.5 19.5Z" fill="#595977"/>
<path d="M81.5229 45.5C84.6114 44.3418 95.8563 35.1667 99.5229 31.5L88.0229 15C87.3563 16.5 84.3229 21.7 83.5229 22.5C82.5229 23.5 78.5229 26.5 74.5229 29C71.3229 31 66.1896 31.8333 64.0229 32C60.5229 32.3333 53.4229 34.1 53.0229 38.5C52.6229 42.9 57.5229 46.5 60.5229 47.5C63.5229 48.5 65.5229 47.9 71.5229 47.5C79.0229 47 77.5229 47 81.5229 45.5Z" fill="#595977"/>
<path d="M54.9252 81.9248C56.1242 84.9976 65.4476 96.1199 69.1626 99.7377L85.5087 88.02C84 87.3732 78.7603 84.4091 77.9497 83.6198C76.9366 82.6331 73.8838 78.6732 71.331 74.7067C69.2888 71.5335 68.3875 66.4117 68.1921 64.2474C67.8124 60.7521 65.9518 53.6762 61.5469 53.3345C57.142 52.9929 53.6072 57.9402 52.6471 60.9531C51.6869 63.9661 52.3134 65.958 52.7929 71.9522C53.3922 79.4449 53.3724 77.945 54.9252 81.9248Z" fill="#595977"/>
<path d="M18.0916 56.7521C15.0549 58.0399 4.20837 67.6827 0.700161 71.5013L12.8881 87.4998C13.4907 85.973 16.3013 80.6493 17.0667 79.8161C18.0235 78.7747 21.8929 75.6081 25.7836 72.9411C28.8961 70.8074 33.9895 69.7576 36.1472 69.4994C39.63 69.0182 46.6488 66.9527 46.8623 62.5397C47.0757 58.1267 42.0277 54.7373 38.9881 53.8652C35.9485 52.993 33.9757 53.6771 27.998 54.3307C20.5258 55.1476 22.0245 55.0841 18.0916 56.7521Z" fill="#595977"/>
<path d="M43.7578 11.4L44.2714 0.0333333H34L43.7578 11.4Z" fill="#595977"/>
<path d="M61.7327 23.2833C56.8024 29.07 52.3173 29.8278 50.9478 30C50.9478 30 47.8663 16.5667 47.8663 13.9833C47.8663 11.4 47.3528 -1 47.3528 -1H59.6784C62.4174 3.82222 66.6629 17.4967 61.7327 23.2833Z" fill="#595977"/>
<path d="M64.375 6.7253C63.275 5.49434 63 2.62209 63 1.33984C64.375 1.08339 67.2626 0.724358 67.8126 1.33984C68.5001 2.10919 67.1251 6.7253 66.4376 7.49465C65.7501 8.264 65.7501 8.264 64.375 6.7253Z" fill="#595977"/>
<path d="M5.9074 36.9C4.85229 37.78 2.39036 38 1.29129 38C1.07148 36.9 0.763735 34.5899 1.29129 34.1499C1.95073 33.5999 5.9074 34.6999 6.56684 35.2499C7.22628 35.7999 7.22628 35.7999 5.9074 36.9Z" fill="#595977"/>
<path d="M94.4826 64.1803C95.4624 63.6146 97.3172 63.9046 98.1221 64.1203C98.0243 65.1293 97.7061 67.2182 97.2162 67.501C96.6039 67.8546 93.9649 66.1122 93.6114 65.4998C93.2578 64.8874 93.2578 64.8874 94.4826 64.1803Z" fill="#595977"/>
<path d="M37.1025 95.1066C37.3557 96.2681 36.5031 98.1448 36.0452 98.938C35.0876 98.5966 33.1407 97.7687 33.0141 97.188C32.8559 96.4621 35.3705 94.1066 36.0783 93.8807C36.786 93.6548 36.786 93.6548 37.1025 95.1066Z" fill="#595977"/>
<path d="M50.5 40L54.2282 45.7718L60 49.5L54.2282 53.2282L50.5 59L46.7718 53.2282L41 49.5L46.7718 45.7718L50.5 40Z" fill="#595977"/>
<path d="M90 44.5L101 45L101 35L90 44.5Z" fill="#595977"/>
<path d="M56.5 91L56 102L66 102L56.5 91Z" fill="#595977"/>
<path d="M10 57.5L-1 57L-1 67L10 57.5Z" fill="#595977"/>
<path d="M39.2075 78.5C44.0075 72.9 48.3742 72.1667 49.7075 72C49.7075 72 52.5 85 52.7075 87.5C52.915 90 53.2075 102 53.2075 102L41.2075 102C38.5409 97.3333 34.4075 84.1 39.2075 78.5Z" fill="#595977"/>
<path d="M76.5 62C70.9 57.2 70.1667 52.8333 70 51.5C70 51.5 80.5 49 85.5 48.5C90.5 48 100 48 100 48L100 60C95.3333 62.6667 82.1 66.8 76.5 62Z" fill="#595977"/>
<path d="M23.5 40.2074C29.1 45.0074 29.8333 49.3741 30 50.7074C30 50.7074 17 53.7074 14.5 53.7074C12 53.7074 0 54.2074 0 54.2074L1.43099e-07 42.2074C4.66667 39.5407 17.9 35.4074 23.5 40.2074Z" fill="#595977"/>
<path d="M16.0476 88.2463C16.8458 81.4702 30.3484 75.2587 37 73C31.5123 78.6468 33.0092 84.2936 33.0092 92.199C33.0092 98.4105 30.1822 99.1634 29.517 98.9752C24.6946 98.2223 15.2494 95.0224 16.0476 88.2463Z" fill="#595977"/>
<path d="M85.6599 84.9524C79.1444 84.1542 73.1718 70.6516 71 64C76.4296 69.4877 81.8592 67.9908 89.4606 67.9908C95.4332 67.9909 96.1571 70.8178 95.9761 71.483C95.2522 76.3054 92.1754 85.7506 85.6599 84.9524Z" fill="#595977"/>
<path d="M84.4918 15.3372C83.4686 22.0053 69.7377 27.6902 63.0002 29.6991C68.6837 24.3038 67.3706 18.6747 67.6316 10.8642C68.089 4.29897 70.6934 4.07806 71.3536 4.28629C76.1594 5.19157 85.5151 8.66916 84.4918 15.3372Z" fill="#595977"/>
<path d="M12.518 16.2585C18.5298 16.9647 24.2404 30.4105 26.3443 37.0451C21.259 31.6237 16.283 33.2019 9.28389 33.3112C4.00098 33.5 3.07374 30.5744 3.22997 29.9052C3.82108 25.062 6.50625 15.5523 12.518 16.2585Z" fill="#595977"/>
</g>
<defs>
<clipPath id="clip0_1_46">
<rect width="100" height="100" rx="50" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@ -1,6 +1,6 @@
.hero {
height: 60rem;
background: url("../images/hero-remake.png");
background: url('../images/hero-remake.png');
background-repeat: no-repeat;
background-size: cover;
background-position: bottom;

View File

@ -5,7 +5,7 @@ import { ReactComponent as File } from '../assets/icons/file.svg';
const DocumentLink = ({ title, link }) => {
return (
<a href={link} target={'_blank'} download className="document-link">
<a href={link} download className="document-link">
<div className="document-img">
<File />
</div>

View File

@ -9,7 +9,18 @@ const Footer = ({ lang }) => {
<div className="footer-top">
<div className="container">
<div className="footer-top-wrapper">
<SectionTitle title="Контакты" />
<SectionTitle
title={`
${
lang === 'ru'
? 'Контакты'
: lang === 'tm'
? 'Salgymyz'
: lang === 'en'
? 'Contacts'
: null
}`}
/>
<div className="footer-top-content">
<div className="footer-top-item">
<h3 className="footer-top-item-title">

View File

@ -1,5 +1,5 @@
// Modules
import { Line } from "react-chartjs-2";
import { Line } from 'react-chartjs-2';
import {
Chart as ChartJS,
LineElement,
@ -7,18 +7,12 @@ import {
LinearScale,
PointElement,
Tooltip,
} from "chart.js";
import { Api } from "../helpers/api";
import { useState, useEffect } from "react";
import { parseDate } from "../helpers/functions";
} from 'chart.js';
import { Api } from '../helpers/api';
import { useState, useEffect } from 'react';
import { parseDate } from '../helpers/functions';
ChartJS.register(
LineElement,
PointElement,
LinearScale,
Tooltip,
CategoryScale
);
ChartJS.register(LineElement, PointElement, LinearScale, Tooltip, CategoryScale);
const LineChart = ({ activeRow, tabIndex }) => {
const [dataLineChart, setDataLineChart] = useState();
@ -28,7 +22,7 @@ const LineChart = ({ activeRow, tabIndex }) => {
const LineChartData = new Api(
`http://tmex.gov.tm:8765/api/categories/${tabIndex}/tradings`,
dataLineChart,
setDataLineChart
setDataLineChart,
).get();
}
}, [tabIndex]);
@ -37,10 +31,8 @@ const LineChart = ({ activeRow, tabIndex }) => {
const data = {
labels: dataLineChart
? dataLineChart.data[activeRow].all_prices.map((price) =>
parseDate(price.date)
)
: [""],
? dataLineChart.data[activeRow].all_prices.map((price) => parseDate(price.date))
: [''],
datasets: [
{
@ -49,13 +41,13 @@ const LineChart = ({ activeRow, tabIndex }) => {
if (index <= 9) {
return price.price;
} else {
return "";
return '';
}
})
: [""],
borderColor: "#4b8dff",
: [''],
borderColor: '#4b8dff',
pointBorderWidth: 2,
pointBackgroundColor: "#4b8dff",
pointBackgroundColor: '#4b8dff',
tension: 0.1,
animation: {
@ -64,11 +56,7 @@ const LineChart = ({ activeRow, tabIndex }) => {
},
delay: (context) => {
let delay = 0;
if (
context.type === "data" &&
context.mode === "default" &&
!delayed
) {
if (context.type === 'data' && context.mode === 'default' && !delayed) {
delay = context.dataIndex * 100 + context.datasetIndex * 100;
}
return delay;

View File

@ -169,7 +169,12 @@ const Home = ({ lang, setPostId }) => {
<section className="news">
<div className="container">
<div className="news-wrapper">
<SectionTitle title="Новости" />
<SectionTitle
title={`
${
lang === 'ru' ? 'Новости' : lang === 'tm' ? 'Habarlar' : lang === 'en' ? 'News' : null
}`}
/>
<div className="news-post-wrapper">
{
newsData

View File

@ -1,22 +1,21 @@
import React from "react";
import { useParams } from "react-router-dom";
import { useEffect, useRef } from "react";
import { Api } from "../helpers/api";
import { dateReverse } from "../helpers/functions";
import React from 'react';
import { useParams } from 'react-router-dom';
import { useEffect, useRef } from 'react';
import { Api } from '../helpers/api';
import { dateReverse } from '../helpers/functions';
// Images
// import postPageImg from "../assets/images/post-img.png";
import LatestNew from "../components/LatestNew";
import LatestNew from '../components/LatestNew';
import SectionTitle from '../components/SectionTitle';
const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => {
const { id } = useParams();
const isFirstLoad = useRef(true);
useEffect(() => {
if (!postsData) {
const NewsPageApi = new Api(
"http://tmex.gov.tm:8765/api/news",
postsData,
setPostsData
).get({ "X-localization": lang });
const NewsPageApi = new Api('http://tmex.gov.tm:8765/api/news', postsData, setPostsData).get({
'X-localization': lang,
});
}
}, [postsData]);
@ -25,11 +24,9 @@ const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => {
isFirstLoad.current = false;
return;
}
const NewsPageApi = new Api(
"http://tmex.gov.tm:8765/api/news",
postsData,
setPostsData
).get({ "X-localization": lang });
const NewsPageApi = new Api('http://tmex.gov.tm:8765/api/news', postsData, setPostsData).get({
'X-localization': lang,
});
}, [lang]);
return (
@ -57,7 +54,16 @@ const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => {
</main>
<aside>
<div className="post-page-latest-wrapper">
<h2 className="post-page-latest-title">Последние новости</h2>
<h2 className="post-page-latest-title">
{lang === 'ru'
? 'Последние новости'
: lang === 'tm'
? 'Soňky habarlar'
: lang === 'en'
? 'The latest news'
: null}
</h2>
<div className="post-page-latest-news">
{postsData
? postsData.data.map((post, index) => {
@ -68,9 +74,9 @@ const NewsPostPage = ({ lang, setPostId, postsData, setPostsData }) => {
setPostId={setPostId}
id={post.id}
date={dateReverse(post.date)
.split(" ")[0]
.replace("-", ".")
.replace("-", ".")}
.split(' ')[0]
.replace('-', '.')
.replace('-', '.')}
/>
) : null;
})