diff --git a/docs/floodgate/setup/fabric.mdx b/docs/floodgate/setup/fabric.mdx index 5e39173..eebaea2 100644 --- a/docs/floodgate/setup/fabric.mdx +++ b/docs/floodgate/setup/fabric.mdx @@ -1,6 +1,3 @@ - -## Floodgate-Fabric setup - 1. Download Floodgate-Fabric from the [modrinth page](https://modrinth.com/mod/floodgate). 2. Place the Floodgate-Fabric.jar in the `mods` folder, and restart the server. **You also need [FabricAPI](https://modrinth.com/mod/fabric-api) installed.** 3. Change `auth-type` in Geyser's config to `floodgate`. diff --git a/docs/floodgate/setup/paper-spigot.mdx b/docs/floodgate/setup/paper-spigot.mdx index b720245..b1c4b5e 100644 --- a/docs/floodgate/setup/paper-spigot.mdx +++ b/docs/floodgate/setup/paper-spigot.mdx @@ -1,5 +1,3 @@ -## Floodgate-Spigot setup - 1. Download Floodgate-Spigot from the [download page](https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot). 2. Place the Floodgate-Spigot.jar in the `plugins` folder, and restart the server. 3. Change `auth-type` in Geyser's config to `floodgate`. diff --git a/docs/floodgate/setup/proxy-servers.mdx b/docs/floodgate/setup/proxy-servers.mdx index 9278b8e..5c6170c 100644 --- a/docs/floodgate/setup/proxy-servers.mdx +++ b/docs/floodgate/setup/proxy-servers.mdx @@ -1,5 +1,3 @@ -## Floodgate setup on a BungeeCord/Velocity proxy - :::info You only need to install Floodgate on the BungeeCord or Velocity proxy server, unless you want to use the Floodgate API on the backend servers. Additionally, it will display Bedrock edition skins properly. diff --git a/docs/floodgate/setup/standalone.mdx b/docs/floodgate/setup/standalone.mdx index f7148f3..7aa847f 100644 --- a/docs/floodgate/setup/standalone.mdx +++ b/docs/floodgate/setup/standalone.mdx @@ -1,5 +1,3 @@ -## Floodgate setup with Geyser-Standalone - :::info To be able to use Floodgate authentication, you need to be able to install Floodgate on the Java server you are connecting to. ::: diff --git a/docs/geyser/setup/provider/fabric.mdx b/docs/geyser/setup/provider/fabric.mdx index 1ffa33f..9e53751 100644 --- a/docs/geyser/setup/provider/fabric.mdx +++ b/docs/geyser/setup/provider/fabric.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Fabric setup with server hosting provider - :::caution Geyser-Fabric runs **only** on a Fabric server. To use Geyser on an older Fabric server, you can use Geyser on a BungeeCord/Velocity proxy, or Geyser Standalone instead. diff --git a/docs/geyser/setup/provider/paper-spigot.mdx b/docs/geyser/setup/provider/paper-spigot.mdx index e9695b6..844d6c9 100644 --- a/docs/geyser/setup/provider/paper-spigot.mdx +++ b/docs/geyser/setup/provider/paper-spigot.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Paper / Spigot setup with server hosting provider - :::info If your server is not running , you will need to install ViaVersion. See also our FAQ article on supported versions. diff --git a/docs/geyser/setup/provider/proxy-servers.mdx b/docs/geyser/setup/provider/proxy-servers.mdx index 6fba25b..c53b592 100644 --- a/docs/geyser/setup/provider/proxy-servers.mdx +++ b/docs/geyser/setup/provider/proxy-servers.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Proxy setup with server hosting provider - :::info - Install Geyser **only** on the proxy server! You can install Floodgate on all servers for better skin support & network-wide Floodgate API availability for other plugins. diff --git a/docs/geyser/setup/self/fabric.mdx b/docs/geyser/setup/self/fabric.mdx index b1648ec..501433e 100644 --- a/docs/geyser/setup/self/fabric.mdx +++ b/docs/geyser/setup/self/fabric.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Fabric setup - self-hosting - :::caution Geyser-Fabric runs **only** on a Fabric server. To use Geyser on an older Fabric server, you can use Geyser on a BungeeCord/Velocity proxy, or Geyser Standalone instead. diff --git a/docs/geyser/setup/self/paper-spigot.mdx b/docs/geyser/setup/self/paper-spigot.mdx index e848a17..c645c63 100644 --- a/docs/geyser/setup/self/paper-spigot.mdx +++ b/docs/geyser/setup/self/paper-spigot.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Paper / Spigot setup - self-hosting - :::info If your server is not running , you will need to install ViaVersion. See also our FAQ article on supported versions. diff --git a/docs/geyser/setup/self/proxy-servers.mdx b/docs/geyser/setup/self/proxy-servers.mdx index 549be15..b58282d 100644 --- a/docs/geyser/setup/self/proxy-servers.mdx +++ b/docs/geyser/setup/self/proxy-servers.mdx @@ -1,7 +1,5 @@ import { Versions } from '../../../../src/components/Versions' -## Proxy setup - self-hosting - :::info - Install Geyser **only** on the proxy server! You can install Floodgate on all servers for better skin support & network-wide Floodgate API availability for other plugins. - All servers on the network must accept Java clients, as Geyser imitates one. diff --git a/docs/geyser/setup/self/standalone.mdx b/docs/geyser/setup/self/standalone.mdx index c513744..161a57c 100644 --- a/docs/geyser/setup/self/standalone.mdx +++ b/docs/geyser/setup/self/standalone.mdx @@ -1,5 +1,3 @@ -## Geyser-Standalone Setup - :::info You need to have Java 17 or higher installed to run Geyser. To run Geyser Standalone on Android, see the bottom of this page. ::: diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 3e98018..b06e8c7 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -3,7 +3,7 @@ import type { Config } from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { - title: 'GeyserMC Wiki', + title: 'GeyserMC', tagline: 'Meowing strictly prohibited', favicon: 'img/favicon.ico', @@ -54,34 +54,52 @@ const config: Config = { // Replace with your project's social card image: 'img/docusaurus-social-card.jpg', navbar: { - title: 'GeyserWiki', + title: 'GeyserMC', logo: { alt: 'GeyserMC logo', src: 'img/apple-touch-icon.png', }, items: [ { - type: 'docSidebar', - sidebarId: 'geyserSidebar', - position: 'left', - label: 'Geyser', + type: 'dropdown', + label: 'Wiki', + position: 'right', + to: 'geyser/setup', + items: [ + { + type: 'doc', + docId: 'geyser/setup', + label: 'Geyser', + }, + { + type: 'doc', + docId: 'floodgate/setup', + label: 'Floodgate', + }, + { + type: 'doc', + docId: 'other/geyseroptionalpack', + label: 'Other', + }, + ] }, { - type: 'docSidebar', - sidebarId: 'floodgateSidebar', - position: 'left', - label: 'Floodgate', - }, - { - type: 'docSidebar', - sidebarId: 'otherSidebar', - position: 'left', - label: 'Other', + to: 'download', + 'aria-label': 'Download', + position: 'right', + className: 'header-download-link' }, { href: 'https://github.com/GeyserMC/Geyser', - label: 'GitHub', + 'aria-label': 'GitHub', position: 'right', + className: 'header-github-link' + }, + { + href: 'https://discord.gg/geysermc', + 'aria-label': 'Discord', + position: 'right', + className: 'header-discord-link' }, ], }, diff --git a/package.json b/package.json index 996113c..e0fdfee 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,11 @@ "dependencies": { "@docusaurus/core": "3.0.0", "@docusaurus/preset-classic": "3.0.0", + "@fortawesome/fontawesome-svg-core": "^6.5.1", + "@fortawesome/free-brands-svg-icons": "^6.5.1", + "@fortawesome/free-regular-svg-icons": "^6.5.1", + "@fortawesome/free-solid-svg-icons": "^6.5.1", + "@fortawesome/react-fontawesome": "^0.2.0", "@mdx-js/react": "^3.0.0", "clsx": "^1.2.1", "prism-react-renderer": "^2.1.0", @@ -45,4 +50,4 @@ "engines": { "node": ">=18.0" } -} \ No newline at end of file +} diff --git a/src/components/Columns.tsx b/src/components/Columns.tsx new file mode 100644 index 0000000..9a92d39 --- /dev/null +++ b/src/components/Columns.tsx @@ -0,0 +1,18 @@ +import React from 'react'; + +export const Columns = ({ children }) => { + return
{children}
; +}; + +interface ColumnProps { + width?: number; + children: React.ReactNode; +} + +export const Column: React.FC = ({ children, width = 1 }) => { + const style = { + flex: `${width} 1 0%`, + }; + + return
{children}
; +}; \ No newline at end of file diff --git a/src/components/DownloadButton.tsx b/src/components/DownloadButton.tsx new file mode 100644 index 0000000..d1783ca --- /dev/null +++ b/src/components/DownloadButton.tsx @@ -0,0 +1,44 @@ +import { faFileArrowDown } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import React, { useState, useEffect } from 'react'; + +export const APIDownloadButton = ({ projectId, platformId, header }) => { + const [buildInfo, setBuildInfo] = useState({ buildNumber: '', versionString: '', date: '' }); + + useEffect(() => { + const fetchBuildInfo = async () => { + try { + const response = await fetch(`https://download.geysermc.org/v2/projects/${projectId}/versions/latest/builds/latest`); + if (!response.ok) { + throw new Error('Network response was not ok'); + } + const data = await response.json(); + const { build, version } = data; + + const response2 = await fetch(`https://download.geysermc.org/v2/projects/${projectId}/versions/${version}/builds/${build}`); + if (!response2.ok) { + throw new Error('Network response was not ok'); + } + const data2 = await response2.json(); + const { time } = data2; + + const formattedDate = new Date(time).toLocaleDateString(); + + setBuildInfo({ buildNumber: build, versionString: version, date: formattedDate }); + } catch (error) { + console.error('Failed to fetch build info:', error); + } + }; + + fetchBuildInfo(); + }, [projectId]); + + return ( + +
+ {header}
+ #{buildInfo.buildNumber} ยท {buildInfo.date} +
+
+ ); +}; \ No newline at end of file diff --git a/src/components/HeroBanner/index.tsx b/src/components/HeroBanner/index.tsx new file mode 100644 index 0000000..87c7ae8 --- /dev/null +++ b/src/components/HeroBanner/index.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import styles from './styles.module.css'; + +const HeroBanner = ({ title, subheading, backgroundImage }) => { + return ( +
+
+

{title}

+

{subheading}

+
+
+ ); +}; + +export default HeroBanner; \ No newline at end of file diff --git a/src/components/HeroBanner/styles.module.css b/src/components/HeroBanner/styles.module.css new file mode 100644 index 0000000..39fbc68 --- /dev/null +++ b/src/components/HeroBanner/styles.module.css @@ -0,0 +1,45 @@ + +.heroBanner { + width: 100%; + background-size: cover; + background-position: center; + display: flex; + align-items: center; + justify-content: flex-start; + height: 300px; + position: relative; +} + +.textSection { + position: relative; + z-index: 1; + padding: 15px; +} + +.textSection::after { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: var(--ifm-background-color); + z-index: -1; + transform-origin: top right; + transform: skewX(-16deg); + overflow: hidden; + width: 110%; +} + +[data-theme='light'] .textSection::after { + background: #fff; +} + +.heroBanner h1 { + font-size: 2.5em; +} + +.heroBanner p { + font-size: 1.2em; + line-height: 1em; +} \ No newline at end of file diff --git a/src/css/custom.css b/src/css/custom.css index ddddd86..ad967d6 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -31,11 +31,95 @@ --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } +.header-discord-link::before { + content: ''; + width: 32px; + height: 26px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url('data:image/svg+xml,'); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + +.header-discord-link:hover::before { + background-color: var(--ifm-navbar-link-hover-color); +} + +.header-download-link::before { + content: ''; + width: 24px; + height: 24px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url('data:image/svg+xml,'); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + +.header-download-link:hover::before { + background-color: var(--ifm-navbar-link-hover-color); +} + +.header-github-link::before { + content: ''; + width: 24px; + height: 24px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E"); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + +.header-github-link:hover::before { + background-color: var(--ifm-navbar-link-hover-color); +} + .answer { overflow: hidden; transition: height 0.3s ease-out; } +.columns { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 20px; +} + +.column { + flex: 1; + box-sizing: border-box; + overflow:hidden; +} + +@media (max-width: 600px) { + .column { + flex-basis: 100% !important; + max-width: 100%; + } +} + +.download-button { + width: 100%; + outline: 3px solid var(--ifm-tabs-color-active); + outline-offset: -3px; + border: 0; + border-radius: var(--ifm-global-radius); + text-align: center; + font-size: 18px; + transition: background-color 0.5s ease, color 0.5s ease; + padding-top: 10px; + padding-bottom: 10px; + margin-bottom: 10px; + + &:hover { + background-color: var(--ifm-color-primary); + color: #fff; + } +} + .host-select select { font-family: inherit; padding: 11px; @@ -98,6 +182,18 @@ font-size: 18px; } +.tabs { + flex-wrap: wrap; + border-bottom-color: var(--ifm-horizontal-line-color); + border-bottom-width: 3px; + border-bottom-style: solid; +} + +.tabs-host-type { + flex-wrap: nowrap; + border-bottom-style: none; +} + .tabs-host-type .tabs__item { line-height: 16px; margin-right: 4px; diff --git a/src/pages/download/index.mdx b/src/pages/download/index.mdx new file mode 100644 index 0000000..aeec445 --- /dev/null +++ b/src/pages/download/index.mdx @@ -0,0 +1,90 @@ +--- +title: Download +description: Choose which platform to download Geyser or Floodgate for. +hide_table_of_contents: true +--- + +import Admonition from '@theme/Admonition'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +import HeroBanner from '@site/src/components/HeroBanner'; +import HeroBackground from '@site/static/img/site/split-background.png'; + +import PaperSpigot from '@site/docs/geyser/setup/provider/paper-spigot.mdx'; + +import PaperSpigotSelf from '@site/docs/geyser/setup/self/paper-spigot.mdx'; + +import FloodgatePaperSpigot from '@site/docs/floodgate/setup/paper-spigot.mdx'; + +import PlatformIcon from '@site/src/components/PlatformIcon'; +import PaperSpigotIcon from '@site/static/img/icons/paper.png'; +import VelocityIcon from '@site/static/img/icons/velocity.png'; +import WaterfallBungeeCordIcon from '@site/static/img/icons/waterfall.svg'; +import FabricIcon from '@site/static/img/icons/fabric.png'; +import StandaloneIcon from '@site/static/img/icons/geyser.png'; + +import { Columns, Column } from '@site/src/components/Columns'; +import { ProviderSelector } from '@site/src/components/Provider'; +import { APIDownloadButton } from '@site/src/components/DownloadButton'; + + + + + } default> + + + + ## Geyser Installation Instructions + + Geyser allows Bedrock players to join your server, but also requires Floodgate if you wish to allow them to join with their Bedrock account. + + + + 1. Download Geyser using the download button. + 2. Place Geyser in the plugins folder. + 3. Start up your server and Geyser should be installed. + + Keep in mind that there may be additional steps involved, such as portforwarding. Please see the detailed setup options for more information. + + + + + + + + + + + + + + ## Floodgate Installation Instructions + + By using our Floodgate plugin, you can allow Xbox Live authenticated Bedrock clients to securely join your online-mode server without a Java Edition account. + + + + + Floodgate uses global linking by default, which allows Bedrock players to link and join as their Java ccount by connecting it to our global linking server. You can disable this or enable local linking in the Floodgate config. More info is available on the [wiki](/floodgate/linking). + + + + + }> + Velocity + + }> + Waterfall Bungee + + }> + Fabric + + }> + Standalone + + \ No newline at end of file diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx new file mode 100644 index 0000000..4fd9eb2 --- /dev/null +++ b/src/theme/MDXComponents.tsx @@ -0,0 +1,12 @@ +import MDXComponents from '@theme-original/MDXComponents'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { library } from '@fortawesome/fontawesome-svg-core'; +import { fab } from '@fortawesome/free-brands-svg-icons'; +import { fas } from '@fortawesome/free-solid-svg-icons'; + +library.add(fab, fas); + +export default { + ...MDXComponents, + Icon: FontAwesomeIcon, +}; \ No newline at end of file diff --git a/static/img/icons/waterfall.svg b/static/img/icons/waterfall.svg new file mode 100644 index 0000000..2997793 --- /dev/null +++ b/static/img/icons/waterfall.svg @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/site/split-background.png b/static/img/site/split-background.png new file mode 100644 index 0000000..2c968ff Binary files /dev/null and b/static/img/site/split-background.png differ