Skip to content

Commit b579ee2

Browse files
committed
add mdx support for docs
1 parent ec99fea commit b579ee2

37 files changed

+2230
-2182
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": ["next", "next/core-web-vitals"]
2+
"extends": ["next", "next/core-web-vitals"],
3+
"rules": {
4+
"react/display-name": "off"
5+
}
36
}

components/banner.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import styles from "./banner.module.less";
2-
import SplashImage from "../assets/splash.png";
3-
import Image from "next/image"
1+
import styles from "./banner.module.scss";
2+
// import SplashImage from "../assets/splash.png";
3+
// import Image from "next/image"
44
import { useMedia } from "react-use";
55
import classNames from "classnames";
66
export function Banner() {
@@ -10,7 +10,8 @@ export function Banner() {
1010
return (
1111
<div className={styles.root}>
1212
<div className={classNames(styles.content,large && styles.large,med&&styles.medium,small&&styles.small)}>
13-
<Image src={SplashImage} alt={"splash"}></Image>
13+
{/* <Image src={SplashImage} alt={"splash"} width={globalThis && globalThis.window && globalThis.window?.innerWidth||100}></Image> */}
14+
<div className={styles.image}></div>
1415
<div className={styles.gradient}></div>
1516
</div>
1617
</div>

components/banner.module.less

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

components/banner.module.scss

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.root {
2+
display: flex;
3+
justify-content: center;
4+
z-index: -1;
5+
position: absolute;
6+
width: 100%;
7+
overflow-x: hidden;
8+
> .content {
9+
position: relative;
10+
width:100vw;
11+
overflow-x: hidden;
12+
> .gradient {
13+
background: linear-gradient(
14+
180deg,
15+
#333333 0%,
16+
rgba(255, 255, 255, 0) 100%
17+
);
18+
position: absolute;
19+
top: 0;
20+
left: 0;
21+
width: 100%;
22+
height: 100%;
23+
}
24+
>.image{
25+
background-image: url("/splash.png");
26+
background-size: cover;
27+
width: 100vw;
28+
height: 100vh;
29+
}
30+
}
31+
}

components/footer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import classNames from "classnames";
22
import { useContext, useState } from "react";
3-
import styles from "./footer.module.less";
3+
import styles from "./footer.module.scss";
44
import { DiscordSocial, GithubSocial, PatreonSocial } from "./social";
55
import { ThemeContext } from "./theme-select";
66
import { navItems } from "../data/links";
@@ -24,7 +24,7 @@ export function Footer({ minimal }) {
2424
</div>
2525
<div className={styles.notice}>
2626
<p>
27-
Niether this website nor the animated-java project is affiliated
27+
Neither this website nor the animated-java project is affiliated
2828
with Mojang Studios or Minecraft.
2929
</p>
3030
</div>
File renamed without changes.

components/header.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import { useContext, useState } from "react";
2-
import styles from "./header.module.less";
2+
import styles from "./header.module.scss";
33
import { ThemeContext, ThemeSelectToggle } from "./theme-select";
44
import { Logo } from "./logo";
55
import classnames from "classnames";
66
import Link from "next/link";
77
import { Sidebar } from "./sidebar";
88
import { useMedia } from "react-use";
99
import { navItems } from "../data/links";
10-
export const Header = ({pageHint=""}) => {
10+
export const Header = ({ pageHint = "" }) => {
1111
const { theme } = useContext(ThemeContext);
12-
const collapsed = useMedia("(max-width:700px)",false);
12+
const collapsed = useMedia("(max-width:700px)", false);
1313
return (
1414
<div className={classnames(styles.root, styles[theme])}>
1515
<div className={styles.title}>
16-
<Logo size={1}></Logo>
17-
<h1 className={styles.text}>
18-
Animated <strong>Java</strong>
19-
</h1>
16+
<Link href={"/"}>
17+
<a className={styles.titleLink}>
18+
<Logo size={1}></Logo>
19+
<h1 className={styles.text}>
20+
Animated <strong>Java</strong>
21+
</h1>
22+
</a>
23+
</Link>
2024
</div>
2125
<div className={styles.rightHand}>
2226
{!collapsed && (

components/header.module.less

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

components/header.module.scss

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
.root {
2+
transition: 0.2s;
3+
transition-property: background-color color;
4+
box-shadow: 0px 1px 0px 1px rgba(0, 0, 0, 0.1);
5+
display: flex;
6+
justify-content: space-between;
7+
height: 56px;
8+
&.dark {
9+
background-color: #333333;
10+
color: #fff;
11+
}
12+
&.light {
13+
background-color: #ffffff;
14+
color: #000;
15+
}
16+
> .title {
17+
display: flex;
18+
flex-direction: column;
19+
justify-content: center;
20+
> .titleLink {
21+
// pointer-events: none;
22+
display: flex;
23+
align-items: center;
24+
> .text {
25+
font-family: Roboto;
26+
font-style: normal;
27+
font-weight: 300;
28+
font-size: 18px;
29+
line-height: 21px;
30+
margin-top: 0px;
31+
margin-bottom: 0px;
32+
height: min-content;
33+
}
34+
}
35+
}
36+
> .rightHand {
37+
display: flex;
38+
> .theme {
39+
height: 100%;
40+
display: flex;
41+
align-items: center;
42+
margin-right: 22px;
43+
padding-left: 22px;
44+
}
45+
> .sidebar {
46+
height: 100%;
47+
display: flex;
48+
align-items: center;
49+
margin-right: 12px;
50+
}
51+
> .nav {
52+
display: flex;
53+
flex-direction: row;
54+
> .navItem {
55+
> .text {
56+
display: flex;
57+
align-items: center;
58+
height: 100%;
59+
> a > h2 {
60+
font-family: Roboto;
61+
font-style: normal;
62+
font-weight: 500;
63+
font-size: 17px;
64+
line-height: 20px;
65+
margin-bottom: 14px;
66+
}
67+
}
68+
69+
margin-right: 16px;
70+
margin-left: 16px;
71+
display: flex;
72+
flex-direction: column;
73+
align-items: center;
74+
text-align: center;
75+
color: #666666;
76+
&.selected {
77+
color: #2f80ed;
78+
border-bottom: 2px solid #2f80ed;
79+
> .text {
80+
> a > h2 {
81+
margin-bottom: 12px;
82+
}
83+
}
84+
}
85+
}
86+
}
87+
}
88+
}
89+
90+
.menu {
91+
&.dark {
92+
color: #f0f0f0;
93+
}
94+
&.light {
95+
color: #666666;
96+
}
97+
> .navItem {
98+
min-width: 219px;
99+
padding-left: 26px;
100+
padding-top: 7px;
101+
padding-bottom: 6px;
102+
&.selected {
103+
padding-left: 22px;
104+
border-left: 4px solid #2f80ed;
105+
color: #2f80ed;
106+
}
107+
&:hover {
108+
background-color: rgba(0, 0, 0, 0.1);
109+
}
110+
> .text {
111+
> a {
112+
> h2 {
113+
margin: 0;
114+
font-family: Roboto;
115+
font-style: normal;
116+
font-weight: 500;
117+
font-size: 18px;
118+
line-height: 21px;
119+
}
120+
}
121+
}
122+
}
123+
}

components/logo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styles from "./logo.module.less";
1+
import styles from "./logo.module.scss";
22
import Image from "next/image";
33
import logoImage from "../assets/gif/animated_java_armor_stand_running_right.gif";
44
const aspectRatio = 24.43 / 14.5;
File renamed without changes.

0 commit comments

Comments
 (0)