diff --git a/.gitignore b/.gitignore
index cbd3e69..4888e2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@
/public/*.json
/public/*.ico
ecosystem.config.js
+/src/pages/extra-pages/pages/*/
# testing
/coverage
diff --git a/src/App.js b/src/App.js
index 358973f..c857592 100644
--- a/src/App.js
+++ b/src/App.js
@@ -11,6 +11,7 @@ import InitialLoading from './components/app/pre-screens'
import SSSPage from './pages/sss/index'
import FourOhFourPage from './components/404/404'
import EkipAlimlariPage from './pages/ekip-alimlari/index'
+import ExtraPagesList from './pages/extra-pages/index'
const IndexPage = lazy(() => import('./pages/index/index'))
const SearchPage = lazy(() => import('./pages/ara/index'))
@@ -48,6 +49,9 @@ export default function App() {
+ {ExtraPagesList.length ? ExtraPagesList.map(({ PageUrl, PageComponent }) => (
+
+ )) : ""}
diff --git a/src/components/ceviriler/components.js b/src/components/ceviriler/components.js
index 6d8a026..55de73c 100644
--- a/src/components/ceviriler/components.js
+++ b/src/components/ceviriler/components.js
@@ -67,7 +67,6 @@ const useStyles = makeStyles((theme) => ({
},
},
BackgroundImageOverlay: {
- background: theme.palette.background.default,
//eslint-disable-next-line
background: `linear-gradient(90deg, ${theme.palette.background.default} 0%, ${theme.palette.background.default} 35%, ${fade(theme.palette.background.default, 0)} 50%)`,
position: "absolute",
diff --git a/src/components/header/header.js b/src/components/header/header.js
index ada93cc..7a06e3f 100644
--- a/src/components/header/header.js
+++ b/src/components/header/header.js
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { Link, NavLink } from 'react-router-dom'
-import { useGlobal, useDispatch } from 'reactn'
+import { useGlobal, useDispatch, useEffect } from 'reactn'
import Footer from '../footer/footer'
import clsx from 'clsx'
@@ -19,6 +19,7 @@ import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import { indexPage, searchPage, faqPage, recPage, adminPage } from '../../config/front-routes'
import { fullLogo, fullLogoGif, fullLogoDark, fullLogoDarkGif } from '../../config/theming/images'
+import ExtraPagesList from '../../pages/extra-pages/index'
import SecondMenuItems from '../../config/drawer_items'
const drawerWidth = 260;
@@ -37,7 +38,7 @@ const useStyles = makeStyles(theme => ({
marginLeft: drawerWidth,
width: 0,
[theme.breakpoints.up('sm')]: {
- width: `calc(100% - ${drawerWidth}px)`,
+ width: `100%`,
}
},
menuButton: {
@@ -70,7 +71,7 @@ const useStyles = makeStyles(theme => ({
flexGrow: 1
},
logo: {
- height: "40px"
+ height: "46px"
},
ListItem: {
width: "100vw",
@@ -198,7 +199,7 @@ export default function MiniDrawer() {
const profileMenu = Boolean(anchorEl);
const [open, setOpen] = React.useState(false);
- const [menuItems] = React.useState([
+ const [menuItems, setMenuItems] = React.useState([
{
text: "Ana sayfa",
shortText: "Ana Sayfa",
@@ -217,7 +218,7 @@ export default function MiniDrawer() {
text: "Sıkça Sorulan Sorular",
shortText: "SSS",
link: faqPage,
- show: process.env.REACT_APP_SSS_PAGE === true ? true : false,
+ show: process.env.REACT_APP_SSS_PAGE === "true" ? true : false,
icon:
},
{
@@ -227,6 +228,29 @@ export default function MiniDrawer() {
icon:
EA
}
])
+
+ useEffect(() => {
+ if (ExtraPagesList.length) {
+ const newMenus = []
+
+ ExtraPagesList.map(({ PageUrl, PageTitle, PageShortTitle, PageIcon }) => {
+ newMenus.push({
+ text: PageTitle,
+ shortText: PageShortTitle ? PageShortTitle : "",
+ link: PageUrl,
+ icon: PageIcon ? PageIcon : "",
+ show: true
+ })
+ })
+
+ setMenuItems(state => [
+ ...state, ...newMenus
+ ])
+ }
+ }, [])
+
+ console.log(menuItems)
+
const [menuItems2] = React.useState(SecondMenuItems)
function handleMenu(event) {
@@ -247,8 +271,8 @@ export default function MiniDrawer() {
setShowModal(type)
}
- const handleDrawerOpen = () => {
- setOpen(true);
+ const handleDrawerState = () => {
+ setOpen(state => !state);
};
const handleDrawerClose = () => {
@@ -265,7 +289,7 @@ export default function MiniDrawer() {
- {menuItems.map((item, index) => item.show ?
+ {menuItems.map(item => item.show ?
(
@@ -285,7 +309,7 @@ export default function MiniDrawer() {
menuItems2.length ?
<>
- {menuItems2.map((item, index) => (
+ {menuItems2.map(item => (
@@ -324,17 +348,15 @@ export default function MiniDrawer() {
-
+
{
process.env.REACT_APP_HEADER_LOGO_TYPE === "gif" && fullLogoGif !== null && fullLogoDarkGif !== null ?
diff --git a/src/components/index/featured/featured.js b/src/components/index/featured/featured.js
index 0c5f8eb..9e7c0b7 100644
--- a/src/components/index/featured/featured.js
+++ b/src/components/index/featured/featured.js
@@ -63,7 +63,6 @@ const useStyles = makeStyles(theme => ({
},
LogoContainer: {
maxWidth: 400,
- maxHeight: 200,
width: "100%"
},
GenresContainer: {
diff --git a/src/components/index/latest/latestanimanga.js b/src/components/index/latest/latestanimanga.js
index 79f27e5..da6978e 100644
--- a/src/components/index/latest/latestanimanga.js
+++ b/src/components/index/latest/latestanimanga.js
@@ -121,7 +121,7 @@ const useStyles = makeStyles(theme => ({
export const LoadingDivAniManga = (key) => {
return (
-
+
)
diff --git a/src/components/index/latest/latestmangaepisode.js b/src/components/index/latest/latestmangaepisode.js
index 9317631..0bfcd36 100644
--- a/src/components/index/latest/latestmangaepisode.js
+++ b/src/components/index/latest/latestmangaepisode.js
@@ -1,7 +1,7 @@
import React from 'react'
import propTypes from 'prop-types'
import { Link } from 'react-router-dom'
-import { episodePage, mangaEpisodePage } from '../../../config/front-routes'
+import { mangaEpisodePage } from '../../../config/front-routes'
import { Grid, Typography, makeStyles } from '@material-ui/core'
import { grey } from '@material-ui/core/colors'
diff --git a/src/config/episode-link-overrides.js b/src/config/episode-link-overrides.js
index b2aab8c..601d873 100644
--- a/src/config/episode-link-overrides.js
+++ b/src/config/episode-link-overrides.js
@@ -1,7 +1,7 @@
function getParameterByName(name, url) {
if (!url) url = window.location.href;
//eslint-disable-next-line
- name = name.replace(/[\[\]]/g, '\\$&');
+ name = name.replace(/[\[\]]/g, '\\$&'); // lgtm [js/incomplete-sanitization]
var regex = new RegExp('[?&]' + name + '(=([^]*)|&|#|$)'),
results = regex.exec(url);
if (!results) return null;
diff --git a/src/config/theming/borders.js b/src/config/theming/borders.js
deleted file mode 100644
index 9f0c51f..0000000
--- a/src/config/theming/borders.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const borders = [
- ".10rem", //Index general
- ".75rem"
-]
-
-export default borders
\ No newline at end of file
diff --git a/src/config/theming/index.js b/src/config/theming/index.js
index 7874554..b811bd7 100644
--- a/src/config/theming/index.js
+++ b/src/config/theming/index.js
@@ -1,4 +1,4 @@
-import { createMuiTheme } from '@material-ui/core/styles';
+import { createMuiTheme, responsiveFontSizes } from '@material-ui/core/styles';
import merge from 'lodash-es/merge'
import darkTheme from './dark/index'
@@ -80,7 +80,15 @@ const general = {
defaultMarginMobile: "80px 12px 24px",
defaultMarginOverride: "-32px -56px -24px",
defaultMarginMobileOverride: "-24px -12px -24px",
- defaultBorderRadius: 4
+ defaultBorderRadius: 4,
+ MuiToolbar: {
+ gutters: {
+ ['@media (min-width:600px)']: {
+ paddingLeft: 29
+ }
+ }
+ }
+
},
transitions: {
duration: {
@@ -97,7 +105,7 @@ export default function getTheme(type) {
switch (type) {
case type: {
const theme = merge(general, type === "dark" ? darkTheme : lightTheme)
- return createMuiTheme(theme)
+ return responsiveFontSizes(createMuiTheme(theme))
}
default:
return false
diff --git a/src/config/theming/shadows.js b/src/config/theming/shadows.js
deleted file mode 100644
index ad831f0..0000000
--- a/src/config/theming/shadows.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const text_shadows = [
- "0px 0px 6px rgba(0, 0, 0, 1)"
-]
-
-export default { text_shadows }
\ No newline at end of file
diff --git a/src/pages/ara/index.js b/src/pages/ara/index.js
index a4910dd..15cc57e 100644
--- a/src/pages/ara/index.js
+++ b/src/pages/ara/index.js
@@ -5,13 +5,10 @@ import Metatags from '../../components/helmet/index'
import TextField from '@material-ui/core/TextField'
import InfiniteScroll from 'react-infinite-scroll-component'
import AwesomeDebouncePromise from 'awesome-debounce-promise';
-import LazyLoad from 'react-lazyload';
import axios from '../../config/axios/axios'
import { getGenresList, getFullSearchList } from '../../config/api-routes'
-import { useTheme } from '@material-ui/styles';
-
import filter from 'lodash-es/filter'
import find from 'lodash-es/find'
import slice from 'lodash-es/slice'
@@ -57,7 +54,6 @@ const searchGenresAPI = async (data, genres) => {
const searchGenresAPIDebounced = AwesomeDebouncePromise(searchGenresAPI, 500);
export default function SearchPage(props) {
- const theme = useTheme()
const classes = useStyles()
const [offset, setOffset] = useState(1)
@@ -316,7 +312,7 @@ export default function SearchPage(props) {
{genreMappedData}
:
- loadingGenre
+ loadingGenre // lgtm [js/trivial-conditional]
?
{
- handleCenteringPage(image)
+ onLoad={_ => {
+ handleCenteringPage()
}} />
{/*Eğer SSS sayfası kapatılmışsa, gelen istekleri ana sayfaya yönlendir*/}
- {process.env.REACT_APP_SSS_PAGE === true ? "" : }
+ {process.env.REACT_APP_SSS_PAGE === "true" ? "" : }