mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-01 18:39:40 +05:00
ADD New Pre-Commit hooks and Formatting code
This commit is contained in:
parent
5c9c3e67fa
commit
9e75a0783c
26 changed files with 4163 additions and 105 deletions
3
frontend/.eslintrc.json
Normal file
3
frontend/.eslintrc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "next/core-web-vitals"
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
export const API_URL = "http://anix.test.local/api";
|
||||
export const API_URL = "/api";
|
||||
|
||||
export const endpoints = {
|
||||
index: {
|
||||
last: `${API_URL}/index/last`,
|
||||
ongoing: `${API_URL}/index/ongoing`,
|
||||
announce: `${API_URL}/index/announce`,
|
||||
finished: `${API_URL}/index/finished`,
|
||||
},
|
||||
search: `${API_URL}/search`
|
||||
};
|
||||
index: {
|
||||
last: `${API_URL}/index/last`,
|
||||
ongoing: `${API_URL}/index/ongoing`,
|
||||
announce: `${API_URL}/index/announce`,
|
||||
finished: `${API_URL}/index/finished`,
|
||||
},
|
||||
search: `${API_URL}/search`,
|
||||
};
|
||||
|
|
|
@ -3,7 +3,8 @@ import { ReleaseCard } from "@/app/components/ReleaseCard/ReleaseCard";
|
|||
export const CardList = (props) => {
|
||||
return props.data.map((item) => {
|
||||
return (
|
||||
<ReleaseCard key={item.id}
|
||||
<ReleaseCard
|
||||
key={item.id}
|
||||
id={item.id}
|
||||
title={item.title_ru}
|
||||
poster={item.image}
|
||||
|
|
|
@ -20,37 +20,40 @@ export const ColorPicker = (props) => {
|
|||
const [mode, setMode] = useState(ui("mode"));
|
||||
|
||||
return (
|
||||
<dialog className="active left round bottom small" style={{blockSize: "unset"}}>
|
||||
<h5>Выбор темы</h5>
|
||||
<div className="grid center-align">
|
||||
{colors.map((item) => {
|
||||
return (
|
||||
<button
|
||||
key={item.color}
|
||||
className={`circle border small ${item.color} s2`}
|
||||
onClick={() => props.theme(item.hex)}
|
||||
></button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<div className="medium-divider"></div>
|
||||
<nav>
|
||||
<button
|
||||
className={`circle small transparent`}
|
||||
onClick={() => {
|
||||
props.mode();
|
||||
setMode(ui("mode"));
|
||||
}}
|
||||
>
|
||||
{mode == "light" ? <i>dark_mode</i> : <i>light_mode</i>}
|
||||
</button>
|
||||
<button
|
||||
className={`circle small transparent `}
|
||||
onClick={() => props.setColorPicker(!props.colorPicker)}
|
||||
>
|
||||
<i>close</i>
|
||||
</button>
|
||||
</nav>
|
||||
</dialog>
|
||||
<dialog
|
||||
className="active left round bottom small"
|
||||
style={{ blockSize: "unset" }}
|
||||
>
|
||||
<h5>Выбор темы</h5>
|
||||
<div className="grid center-align">
|
||||
{colors.map((item) => {
|
||||
return (
|
||||
<button
|
||||
key={item.color}
|
||||
className={`circle border small ${item.color} s2`}
|
||||
onClick={() => props.theme(item.hex)}
|
||||
></button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<div className="medium-divider"></div>
|
||||
<nav>
|
||||
<button
|
||||
className={`circle small transparent`}
|
||||
onClick={() => {
|
||||
props.mode();
|
||||
setMode(ui("mode"));
|
||||
}}
|
||||
>
|
||||
{mode == "light" ? <i>dark_mode</i> : <i>light_mode</i>}
|
||||
</button>
|
||||
<button
|
||||
className={`circle small transparent `}
|
||||
onClick={() => props.setColorPicker(!props.colorPicker)}
|
||||
>
|
||||
<i>close</i>
|
||||
</button>
|
||||
</nav>
|
||||
</dialog>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
.radiquum-pink{
|
||||
background-color: #ffc8ff !important;
|
||||
.radiquum-pink {
|
||||
background-color: #ffc8ff !important;
|
||||
}
|
||||
.fuxigen-blue{
|
||||
background-color: #0087c7 !important;
|
||||
.fuxigen-blue {
|
||||
background-color: #0087c7 !important;
|
||||
}
|
||||
.anixart-red {
|
||||
background-color: #e54040 !important;
|
||||
}
|
||||
.anixart-red{
|
||||
background-color: #e54040 !important;
|
||||
}
|
|
@ -4,12 +4,10 @@ import Link from "next/link";
|
|||
|
||||
export const LogInNeeded = (props) => {
|
||||
return (
|
||||
<div className="absolute padding error center middle round">
|
||||
<i className="extra">no_accounts</i>
|
||||
<h5>Требуется авторизация</h5>
|
||||
<p>
|
||||
Для доступа к этой вкладке требуется авторизация в аккаунте anixart
|
||||
</p>
|
||||
</div>
|
||||
<div className="absolute padding error center middle round">
|
||||
<i className="extra">no_accounts</i>
|
||||
<h5>Требуется авторизация</h5>
|
||||
<p>Для доступа к этой вкладке требуется авторизация в аккаунте anixart</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -60,7 +60,6 @@ export const NavigationRail = (props) => {
|
|||
>
|
||||
<i>palette</i>
|
||||
</button>
|
||||
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -5,11 +5,18 @@ import Link from "next/link";
|
|||
export const ReleaseCard = (props) => {
|
||||
return (
|
||||
<Link href={`/release/${props.id}`} className="s3">
|
||||
<article className="no-padding round fill" style={{width: 284, height: 508}}>
|
||||
<article
|
||||
className="no-padding round fill"
|
||||
style={{ width: 284, height: 508 }}
|
||||
>
|
||||
<img className="responsive large top-round" src={props.poster} />
|
||||
<div className="padding">
|
||||
<h6>{`${props.title.substring(0, 36)}${[...props.title].length > 36 ? "..." : ""}`}</h6>
|
||||
<p>{`${props.description}${[...props.description].length > 160 ? "..." : ""}`}</p>
|
||||
<h6>{`${props.title.substring(0, 36)}${
|
||||
[...props.title].length > 36 ? "..." : ""
|
||||
}`}</h6>
|
||||
<p>{`${props.description}${
|
||||
[...props.description].length > 160 ? "..." : ""
|
||||
}`}</p>
|
||||
</div>
|
||||
</article>
|
||||
</Link>
|
||||
|
|
|
@ -17,8 +17,10 @@ body {
|
|||
}
|
||||
} */
|
||||
|
||||
body, nav.left, main{
|
||||
transition: background .2s;
|
||||
body,
|
||||
nav.left,
|
||||
main {
|
||||
transition: background 0.2s;
|
||||
transform-origin: left;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import "./globals.css";
|
||||
import {App} from "@/app/App"
|
||||
import { App } from "@/app/App";
|
||||
|
||||
export const metadata = {
|
||||
title: "AniX",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export default () => {
|
||||
return (<p>login page</p>)
|
||||
}
|
||||
return <p>login page</p>;
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ export default function Home() {
|
|||
|
||||
return params.toString();
|
||||
},
|
||||
[searchParams]
|
||||
[searchParams],
|
||||
);
|
||||
|
||||
// set list on initial page load
|
||||
|
|
|
@ -32,7 +32,7 @@ export default function Search() {
|
|||
|
||||
return params.toString();
|
||||
},
|
||||
[searchParams]
|
||||
[searchParams],
|
||||
);
|
||||
|
||||
async function fetchData(query, page = 0) {
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "**/.next/**", "**/_next/**", "**/dist/**"]
|
||||
}
|
||||
|
|
3963
frontend/package-lock.json
generated
3963
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "frontend",
|
||||
"type": "module",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -17,6 +18,7 @@
|
|||
"zustand": "^4.5.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-next": "14.2.2",
|
||||
"postcss": "^8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
},
|
||||
plugins: [],
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue