feat(components): ayu_mirage, ayu_light, nord, polar themes (#90)
This commit is contained in:
parent
dfa0419a0a
commit
7e8cda4605
7 changed files with 89 additions and 9 deletions
|
@ -4,19 +4,31 @@ import { CssBaseline } from '@material-ui/core';
|
|||
import dark_blue from 'lib/themes/dark_blue';
|
||||
import dark from 'lib/themes/dark';
|
||||
import ayu_dark from 'lib/themes/ayu_dark';
|
||||
import ayu_mirage from 'lib/themes/ayu_mirage';
|
||||
import ayu_light from 'lib/themes/ayu_light';
|
||||
import nord from 'lib/themes/nord';
|
||||
import polar from 'lib/themes/polar';
|
||||
import { useStoreSelector } from 'lib/redux/store';
|
||||
import createTheme from 'lib/themes';
|
||||
|
||||
export const themes = {
|
||||
'dark_blue': dark_blue,
|
||||
'dark': dark,
|
||||
'ayu_dark': ayu_dark
|
||||
'ayu_dark': ayu_dark,
|
||||
'ayu_mirage': ayu_mirage,
|
||||
'ayu_light': ayu_light,
|
||||
'nord': nord,
|
||||
'polar': polar
|
||||
};
|
||||
|
||||
export const friendlyThemeName = {
|
||||
'dark_blue': 'Dark Blue',
|
||||
'dark': 'Very Dark',
|
||||
'ayu_dark': 'Ayu Dark'
|
||||
'ayu_dark': 'Ayu Dark',
|
||||
'ayu_mirage': 'Ayu Mirage',
|
||||
'ayu_light': 'Ayu Light',
|
||||
'nord': 'Nord',
|
||||
'polar': 'Polar'
|
||||
};
|
||||
|
||||
export default function ZiplineTheming({ Component, pageProps }) {
|
||||
|
|
|
@ -6,12 +6,12 @@ export default createTheme({
|
|||
type: 'dark',
|
||||
primary: '#E6B450',
|
||||
secondary: '#FFEE99',
|
||||
error: '#FF3333',
|
||||
error: '#F07178',
|
||||
warning: '#F29668',
|
||||
info: '#95E6CB',
|
||||
border: '#0A0E14',
|
||||
border: '#0D1016',
|
||||
background: {
|
||||
main: '#0D1016',
|
||||
paper: '#0A0E14'
|
||||
main: '#0A0E14',
|
||||
paper: '#0D1016'
|
||||
}
|
||||
});
|
17
src/lib/themes/ayu_light.ts
Normal file
17
src/lib/themes/ayu_light.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// https://github.com/AlphaNecron/
|
||||
// https://github.com/ayu-theme/ayu-colors
|
||||
import createTheme from '.';
|
||||
|
||||
export default createTheme({
|
||||
type: 'light',
|
||||
primary: '#FF9940',
|
||||
secondary: '#E6BA7E',
|
||||
error: '#F07171',
|
||||
warning: '#ED9366',
|
||||
info: '#95E6CB',
|
||||
border: '#FFFFFF',
|
||||
background: {
|
||||
main: '#FAFAFA',
|
||||
paper: '#FFFFFF'
|
||||
}
|
||||
});
|
17
src/lib/themes/ayu_mirage.ts
Normal file
17
src/lib/themes/ayu_mirage.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// https://github.com/AlphaNecron/
|
||||
// https://github.com/ayu-theme/ayu-colors
|
||||
import createTheme from '.';
|
||||
|
||||
export default createTheme({
|
||||
type: 'dark',
|
||||
primary: '#FFCC66',
|
||||
secondary: '#FFD580',
|
||||
error: '#F28779',
|
||||
warning: '#F29E74',
|
||||
info: '#95E6CB',
|
||||
border: '#232834',
|
||||
background: {
|
||||
main: '#1F2430',
|
||||
paper: '#232834'
|
||||
}
|
||||
});
|
17
src/lib/themes/nord.ts
Normal file
17
src/lib/themes/nord.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// https://github.com/AlphaNecron/
|
||||
// https://github.com/arcticicestudio/nord
|
||||
import createTheme from '.';
|
||||
|
||||
export default createTheme({
|
||||
type: 'dark',
|
||||
primary: '#81A1C1',
|
||||
secondary: '#88C0D0',
|
||||
error: '#BF616A',
|
||||
warning: '#EBCB8B',
|
||||
info: '#5E81AC',
|
||||
border: '#3B4252',
|
||||
background: {
|
||||
main: '#2E3440',
|
||||
paper: '#3B4252'
|
||||
}
|
||||
});
|
17
src/lib/themes/polar.ts
Normal file
17
src/lib/themes/polar.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
// https://github.com/AlphaNecron/
|
||||
// https://github.com/arcticicestudio/nord
|
||||
import createTheme from '.';
|
||||
|
||||
export default createTheme({
|
||||
type: 'light',
|
||||
primary: '#81A1C1',
|
||||
secondary: '#88C0D0',
|
||||
error: '#BF616A',
|
||||
warning: '#EBCB8B',
|
||||
info: '#5E81AC',
|
||||
border: '#E5E9F0',
|
||||
background: {
|
||||
main: '#D8DEE9',
|
||||
paper: '#E5E9F0'
|
||||
}
|
||||
});
|
|
@ -20,10 +20,10 @@ async function handler(req: NextApiReq, res: NextApiRes) {
|
|||
}
|
||||
});
|
||||
|
||||
if (!user) return res.status(404).end(JSON.stringify({ message: 'not found' }));
|
||||
if (!user) return res.status(404).end(JSON.stringify({ error: 'User not found' }));
|
||||
|
||||
const valid = await checkPassword(password, user.password);
|
||||
if (!valid) return res.forbid('wrong password');
|
||||
if (!valid) return res.forbid('Wrong password');
|
||||
|
||||
res.setCookie('user', user.id, { sameSite: true, maxAge: 10000000, path: '/' });
|
||||
|
||||
|
@ -32,4 +32,4 @@ async function handler(req: NextApiReq, res: NextApiRes) {
|
|||
return res.json({ success: true });
|
||||
}
|
||||
|
||||
export default withZipline(handler);
|
||||
export default withZipline(handler);
|
||||
|
|
Loading…
Reference in a new issue