Skip to content

Commit 9efbb2f

Browse files
committed
Update themes format for OSG and Pelican
1 parent 2c9f9b1 commit 9efbb2f

9 files changed

Lines changed: 157 additions & 118 deletions

File tree

src/themes/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export {theme as pelicanTheme} from './pelican';
2-
export {theme as osgTheme} from './osg';
1+
export {default as pelicanTheme} from './pelican';
2+
export {default as osgTheme} from './osg';
33
export {default as chtcTheme} from './chtc';

src/themes/osg.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/themes/osg/fonts.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Poppins} from "next/font/google";
2+
3+
const poppins = Poppins({
4+
subsets: ['latin'], style: ['normal'], weight: ['300', '400', '600'], display: 'swap'
5+
})
6+
7+
const fonts = [poppins]
8+
9+
export { poppins, fonts }

src/themes/osg/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export {default} from './theme';
2+
3+
export {fonts} from './fonts';

src/themes/osg/theme.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
'use client'
2+
3+
import {createTheme, responsiveFontSizes} from "@mui/material";
4+
import Link from "next/link";
5+
6+
import { poppins } from "./fonts";
7+
8+
const theme = responsiveFontSizes(
9+
createTheme({
10+
palette: {
11+
primary: {
12+
main: "#f6a32a"
13+
},
14+
secondary: {
15+
main: "rgb(17 24 39)"
16+
}
17+
},
18+
typography: {
19+
h1: {
20+
fontFamily: poppins.style.fontFamily,
21+
fontWeight: 500
22+
},
23+
h2: {
24+
fontFamily: poppins.style.fontFamily,
25+
fontWeight: 500,
26+
},
27+
h3: {
28+
fontFamily: poppins.style.fontFamily,
29+
fontWeight: 500,
30+
},
31+
h4: {
32+
fontFamily: poppins.style.fontFamily,
33+
fontWeight: 700,
34+
},
35+
h5: {
36+
fontFamily: poppins.style.fontFamily,
37+
fontWeight: 700,
38+
},
39+
h6: {
40+
fontFamily: poppins.style.fontFamily,
41+
fontWeight: 700,
42+
},
43+
body1: {
44+
fontSize: "1.2rem",
45+
paddingBottom: "1rem",
46+
},
47+
fontFamily: [
48+
"Helvetica Neue",
49+
"Helvetica",
50+
"Arial",
51+
"Lucida Grande",
52+
"sans-serif"
53+
].join(",")
54+
},
55+
components: {
56+
MuiLink: {
57+
defaultProps: {
58+
component: Link
59+
}
60+
}
61+
},
62+
}),
63+
{factor: 2}
64+
)
65+
66+
export default theme;

src/themes/pelican.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

src/themes/pelican/fonts.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {Poppins} from "next/font/google";
2+
3+
const poppins = Poppins({
4+
subsets: ['latin'], style: ['normal'], weight: ['300', '400', '600'], display: 'swap'
5+
})
6+
7+
const fonts = [poppins]
8+
9+
export { poppins, fonts }

src/themes/pelican/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export {default} from './theme';
2+
3+
export {fonts} from './fonts';

src/themes/pelican/theme.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
'use client'
2+
3+
import {createTheme, responsiveFontSizes} from "@mui/material";
4+
import Link from "next/link";
5+
6+
import { poppins } from "./fonts";
7+
8+
const theme = responsiveFontSizes(
9+
createTheme({
10+
palette: {
11+
primary: {
12+
dark: "#002b54",
13+
main: "#0885ff",
14+
light: "#CFE4FF"
15+
}
16+
},
17+
typography: {
18+
h1: {
19+
fontFamily: poppins.style.fontFamily,
20+
fontWeight: 500
21+
},
22+
h2: {
23+
fontFamily: poppins.style.fontFamily,
24+
fontWeight: 500,
25+
},
26+
h3: {
27+
fontFamily: poppins.style.fontFamily,
28+
fontWeight: 500,
29+
},
30+
h4: {
31+
fontFamily: poppins.style.fontFamily,
32+
fontWeight: 700,
33+
},
34+
h5: {
35+
fontFamily: poppins.style.fontFamily,
36+
fontWeight: 700,
37+
},
38+
h6: {
39+
fontFamily: poppins.style.fontFamily,
40+
fontWeight: 700,
41+
},
42+
body1: {
43+
fontSize: "1.2rem",
44+
paddingBottom: "1rem",
45+
},
46+
fontFamily: [
47+
"Helvetica Neue",
48+
"Helvetica",
49+
"Arial",
50+
"Lucida Grande",
51+
"sans-serif"
52+
].join(",")
53+
},
54+
components: {
55+
MuiLink: {
56+
defaultProps: {
57+
component: Link
58+
}
59+
}
60+
},
61+
}),
62+
{factor: 2}
63+
)
64+
65+
export default theme;

0 commit comments

Comments
 (0)