- {subjects.map((subject, jndex) =>
- data.filter(
- (el) =>
- parseInt(el.class_num) === class_num &&
- el.predmet_type === subject
- ).length ? (
-
-
{subject}
-
-
- {data
- .filter(
- (el) =>
- parseInt(el.class_num) ===
- class_num &&
- el.predmet_type === subject
- )
- .map((el, kndex) => (
-
- ))}
-
-
-
- handleShowMore(
- subject,
- class_num
+ {classes.length ? (
+ classes.map((class_num, index) => (
+
+
{class_num} класс
+ {subjects.map((subject, jndex) =>
+ data.filter(
+ (el) =>
+ parseInt(el.class_num) === class_num &&
+ el.predmet_type === subject
+ ).length ? (
+
+
{subject}
+
+
+ {data
+ .filter(
+ (el) =>
+ parseInt(
+ el.class_num
+ ) === class_num &&
+ el.predmet_type ===
+ subject
)
- }
- to={'/list'}
- >
- Больше →
-
+ .map((el, kndex) => (
+
+ ))}
+
+
+
+ handleShowMore(
+ subject,
+ class_num
+ )
+ }
+ to={'/list'}
+ >
+ Больше →
+
+
-
- ) : (
- ''
- )
- )}
+ ) : (
+ ''
+ )
+ )}
-
-
- ))}
+
+
+ ))
+ ) : (
+
+ )}
);
};
diff --git a/src/Home/main.css b/src/Home/main.css
index c1b779d..4e3d607 100644
--- a/src/Home/main.css
+++ b/src/Home/main.css
@@ -7,6 +7,7 @@
padding-top: calc(20px + 2vh);
margin-top: -20px;
position: relative;
+ overflow: visible;
}
.subjectContainer {
@@ -69,11 +70,11 @@
}
.classContainer:nth-child(odd) .showMore {
- background: linear-gradient(to right, rgba(244, 244, 244, 0) 25%, rgb(244, 244, 244) 70%);
+ background: linear-gradient( to right, rgba(244, 244, 244, 0) 25%, rgb(244, 244, 244) 70%);
}
.classContainer:nth-child(even) .showMore {
- background: linear-gradient(to right, rgba(255, 255, 255, 0) 25%, rgb(255, 255, 255) 70%);
+ background: linear-gradient( to right, rgba(255, 255, 255, 0) 25%, rgb(255, 255, 255) 70%);
}
@@ -84,4 +85,14 @@
.showMore a {
color: rgb(54, 54, 69);
text-decoration: none;
+}
+
+@media (orientation: landscape) {
+ .classContainer {
+ padding-left: 20vw;
+ padding-right: 20vw;
+ }
+ .classContainer .curve {
+ left: 2vh;
+ }
}
\ No newline at end of file
diff --git a/src/Logotype/index.tsx b/src/Logotype/index.tsx
new file mode 100644
index 0000000..18e7bfa
--- /dev/null
+++ b/src/Logotype/index.tsx
@@ -0,0 +1,26 @@
+import React, { Dispatch, SetStateAction } from 'react';
+import { Link } from 'react-router-dom';
+
+import { emptyQuery } from '../Navbar/utils';
+import { IFilterQuery } from '../types';
+import LogoImage from './logo.png';
+import './main.css'
+
+const Logotype = ({
+ setSearchQuery
+}: {
+ setSearchQuery: Dispatch
>;
+}) => {
+ return (
+ {
+ emptyQuery(setSearchQuery);
+ }}
+ >
+
+
+ );
+};
+
+export default Logotype;
diff --git a/src/Navbar/logo.png b/src/Logotype/logo.png
similarity index 100%
rename from src/Navbar/logo.png
rename to src/Logotype/logo.png
diff --git a/src/Logotype/main.css b/src/Logotype/main.css
new file mode 100644
index 0000000..ddd7c95
--- /dev/null
+++ b/src/Logotype/main.css
@@ -0,0 +1,21 @@
+#logo {
+ height: 6vh;
+ width: 6vh;
+ background-color: white;
+ border-radius: 100%;
+ padding: 1vh;
+ box-sizing: border-box;
+}
+
+#loadingLogo #logo {
+ height: calc(75vw - 2vh);
+ width: calc(75vw - 2vh);
+ padding: 0;
+}
+
+@media (orientation: landscape) {
+ #loadingLogo #logo {
+ width: 48vh;
+ height: 48vh;
+ }
+}
\ No newline at end of file
diff --git a/src/Navbar/index.tsx b/src/Navbar/index.tsx
index 7703e1f..4e44cc4 100644
--- a/src/Navbar/index.tsx
+++ b/src/Navbar/index.tsx
@@ -7,16 +7,13 @@ import React, {
useState
} from 'react';
import { motion } from 'framer-motion';
-import { Link } from 'react-router-dom';
import './main.css';
-
-import LogoImage from './logo.png';
import FilterIcon from './filter.svg';
import SearchIcon from './search.svg';
import { IFilterQuery } from '../types';
-import { emptyQuery } from './utils';
import { useFocus } from '../utils';
+import Logotype from '../Logotype';
const Navbar = ({
setSearchQuery,
@@ -42,7 +39,6 @@ const Navbar = ({
useEffect(() => {
if (formRef.current) {
for (const [key, value] of Object.entries(query)) {
- console.log(key, value);
if (formRef.current.elements.namedItem(key)) {
(formRef.current.elements.namedItem(
key
@@ -143,14 +139,7 @@ const Navbar = ({
animate={filtersCollapsed ? 'closed' : 'open'}
>