Skip to content

Commit

Permalink
Docs: Use global const for version and use badges
Browse files Browse the repository at this point in the history
  • Loading branch information
rtxa committed Oct 18, 2024
1 parent b0852ec commit be16dd9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions website/src/_constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const AGMODX_VERSION = '2.6.1';
10 changes: 6 additions & 4 deletions website/src/pages/downloads.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
title: Downloads
hide_table_of_contents: true

---

import { AGMODX_VERSION } from '@site/src/_constants';

# Downloads

## ☰ Binaries

The **Full Package** comes with everything the mod requires to run (Metamod and AMXX already included).

<a class="button button--block button--outline button--primary button--lg" href="https://github.com/rtxa/agmodx/releases/download/2.6.1/agmodx-2.6.1-full-windows.zip"><InlineIcon icon="mingcute:windows-fill" /> Windows - Full Package</a>
<a class="button button--block button--outline button--primary button--lg" href="https://github.com/rtxa/agmodx/releases/download/2.6.1/agmodx-2.6.1-full-linux.zip"><InlineIcon icon="mingcute:linux-fill" /> Linux - Full Package</a>
<a class="button button--block button--outline button--primary button--lg" href={`https://github.com/rtxa/agmodx/releases/download/${AGMODX_VERSION}/agmodx-${AGMODX_VERSION}-full-windows.zip`}><InlineIcon icon="mingcute:windows-fill" /> Windows - Full Package</a>
<a class="button button--block button--outline button--primary button--lg" href={`https://github.com/rtxa/agmodx/releases/download/${AGMODX_VERSION}/agmodx-${AGMODX_VERSION}-full-linux.zip`}><InlineIcon icon="mingcute:linux-fill" /> Linux - Full Package</a>

<p class="text--center">Latest version: **2.6.1**[All releases](https://github.com/rtxa/agmodx/releases)[Changelog](/changelog)</p>
<p class="text--center">Latest version: **{AGMODX_VERSION}**[All releases](https://github.com/rtxa/agmodx/releases)[Changelog](/changelog)</p>

## ☰ Requirements

Expand Down
13 changes: 12 additions & 1 deletion website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Heading from '@theme/Heading';
import styles from './index.module.css';
import { Icon, InlineIcon } from '@iconify/react';
import IconExternalLink from "@theme/Icon/ExternalLink";
import { AGMODX_VERSION } from '@site/src/_constants';

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
Expand All @@ -26,7 +27,17 @@ function HomepageHeader() {
<InlineIcon icon="lucide:file-text" height="1.5rem" style={{ verticalAlign: 'text-bottom' }} /> Read the docs
</Link>
</div>
Latest version: <b>2.6.1</b><Link style={{ color: '#5a98fe' }} to='/changelog'>What's new?</Link>
<div>
<span class="badge badge--info" style={{ fontSize: '80%', margin: '0.5rem', userSelect: 'text' }}>
🚀 Latest version: {AGMODX_VERSION}
</span>
<Link
className={clsx("button button--sm button--warning")}
style={{ padding: "var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)", lineHeight: "1.0", fontSize: "80%", margin: '0.5rem', color: 'var(--ifm-color-gray-900)' }}
to="/changelog">
💫 What's new?
</Link>
</div>
</div>
</header>
);
Expand Down

0 comments on commit be16dd9

Please sign in to comment.