mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-03 06:28:53 +00:00
Custom button component and WIP getting started documentation
This commit is contained in:
1 parent
9c3b63edc2
commit
818646734b
10 files changed
+97
-4
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
title: Installation
|
|
||||||
---
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
title: Getting Started
|
||||||
|
---
|
||||||
|
|
||||||
|
import IconButton from '@site/src/components/IconButton'
|
||||||
|
import { BsGithub, BsBookHalf } from 'react-icons/bs'
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
|
||||||
|
This resource is being designed with the intention of providing advanced functionality while remaining easy to use,
|
||||||
|
however it is not recommended for beginners. You must possess a basic understanding of coding and the ability to read;
|
||||||
|
otherwise you **should not** install this resource.
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Dependecies
|
||||||
|
|
||||||
|
### OxMySQL
|
||||||
|
|
||||||
|
We utilise our own resource to communicate with MySQL databases via the node-mysql2 package.
|
||||||
|
The backend is actively maintained and updated unlike the package used by mysql-async, providing improved performance, security, and features.
|
||||||
|
We provide full backwards compatibility with mysql-async and build for the current Cfx architecture.
|
||||||
|
|
||||||
|
<div style={{display: 'flex'}}>
|
||||||
|
<a href="https://www.github.com/overextended/oxmysql">
|
||||||
|
<IconButton side='left' icon={<BsGithub/>} style={{marginRight: '0.8rem'}}>GitHub</IconButton>
|
||||||
|
</a>
|
||||||
|
<a href="https://overextended.github.io/docs/oxmysql/Installation/">
|
||||||
|
<IconButton side='left' icon={<BsBookHalf/>}>Documentation</IconButton>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
+2
-1
@@ -21,7 +21,8 @@
|
|||||||
"clsx": "^1.1.1",
|
"clsx": "^1.1.1",
|
||||||
"prism-react-renderer": "^1.2.1",
|
"prism-react-renderer": "^1.2.1",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-dom": "^17.0.1"
|
"react-dom": "^17.0.1",
|
||||||
|
"react-icons": "^4.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "2.0.0-beta.16",
|
"@docusaurus/module-type-aliases": "2.0.0-beta.16",
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
icon: Element;
|
||||||
|
side: 'left' | 'right';
|
||||||
|
style?: React.CSSProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
const IconButton: React.FC<Props> = (props) => {
|
||||||
|
const iconStyles: React.CSSProperties = {
|
||||||
|
fontSize: '1.7rem',
|
||||||
|
paddingRight: props.side === 'left' && '0.6rem',
|
||||||
|
paddingLeft: props.side === 'right' && '0.6rem',
|
||||||
|
verticalAlign: 'center',
|
||||||
|
display: 'flex',
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: 'fit-content',
|
||||||
|
height: '3rem',
|
||||||
|
padding: '0.8rem',
|
||||||
|
borderRadius: '0.2rem',
|
||||||
|
verticalAlign: 'baseline',
|
||||||
|
textAlign: 'center',
|
||||||
|
...props.style,
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}
|
||||||
|
className="icon-button"
|
||||||
|
>
|
||||||
|
{props.side === 'left' && <div style={iconStyles}>{props.icon}</div>}
|
||||||
|
<div>{props.children}</div>
|
||||||
|
{props.side === 'right' && <div style={iconStyles}>{props.icon}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default IconButton;
|
||||||
@@ -55,3 +55,22 @@
|
|||||||
.navbar {
|
.navbar {
|
||||||
background-color: #1d252e;
|
background-color: #1d252e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-button {
|
||||||
|
/* background-color: var(--ifm-color-primary-darkest); */
|
||||||
|
transition: 300ms;
|
||||||
|
border: 0.12rem solid var(--ifm-color-primary-darkest);
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-button:hover {
|
||||||
|
background-color: var(--ifm-color-primary-darkest);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
a:hover,
|
||||||
|
a:focus,
|
||||||
|
a:active {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
@@ -6156,6 +6156,11 @@ react-helmet-async@*, react-helmet-async@^1.2.3:
|
|||||||
react-fast-compare "^3.2.0"
|
react-fast-compare "^3.2.0"
|
||||||
shallowequal "^1.1.0"
|
shallowequal "^1.1.0"
|
||||||
|
|
||||||
|
react-icons@^4.3.1:
|
||||||
|
version "4.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.3.1.tgz#2fa92aebbbc71f43d2db2ed1aed07361124e91ca"
|
||||||
|
integrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==
|
||||||
|
|
||||||
react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
|
||||||
version "16.13.1"
|
version "16.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||||
|
|||||||
Reference in new issue
Block a user