Skip to content

Commit

Permalink
feature: download section
Browse files Browse the repository at this point in the history
  • Loading branch information
Purple-CSGO committed Jan 3, 2024
1 parent 044fe54 commit e81bd5f
Show file tree
Hide file tree
Showing 9 changed files with 301 additions and 366 deletions.
20 changes: 10 additions & 10 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"hash": "e61d5c90",
"configHash": "69705975",
"lockfileHash": "0846cf80",
"browserHash": "e72bd335",
"hash": "db87c876",
"configHash": "bf1b0a70",
"lockfileHash": "77362f85",
"browserHash": "0bf2b7b2",
"optimized": {
"vue": {
"src": "../../../../node_modules/.pnpm/[email protected][email protected]/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "bab3136d",
"fileHash": "84b5e234",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/.pnpm/@[email protected]/node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "17d86968",
"fileHash": "68769f71",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../../node_modules/.pnpm/@[email protected].0_focus[email protected]_vue@3.3.12/node_modules/@vueuse/integrations/useFocusTrap.mjs",
"src": "../../../../node_modules/.pnpm/@[email protected].1_focus[email protected]_vue@3.4.3/node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "aeeb1531",
"fileHash": "e96e58ed",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "68d92411",
"fileHash": "7c17d765",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../../node_modules/.pnpm/[email protected]/node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "e0cabf86",
"fileHash": "bae0a3ff",
"needsInterop": false
}
},
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default defineConfig({
{ text: "FAQ", link: "/faq/" },
{ text: "Blog", link: "/blog/" },
{ text: "Releases", link: "/releases/" },
{ text: "Download", link: "/" }, // TODO: link to download #
{ text: "Download", link: "/#download" },
],

// @ts-ignore
Expand Down Expand Up @@ -136,7 +136,7 @@ export default defineConfig({
{ text: "常见问题", link: "/zh-hans/faq/" },
{ text: "博客", link: "/zh-hans/blog/" },
{ text: "发布", link: "/zh-hans/releases/" },
{ text: "下载", link: "/zh-hans/" }, // TODO: link to download #
{ text: "下载", link: "/zh-hans/#download" },
],
},
},
Expand Down
34 changes: 18 additions & 16 deletions docs/commands/AfxHookSource/mirv_deathmsg.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ title: mirv_deathmsg
This command allows to filter death notifications and to control the death notification display time.

**Table of Contents**
* [Supported Games](#supported-games)
* [Script by Chet Jong](#script-by-chet-jong)
* **Examples**
* [The display time of death notices](#the-display-time-of-death-notifications)
* [How to block everything except a specific player](#how-to-block-everything-except-a-specific-player)
* [How to highlight a specific player (red border)](#how-to-highlight-red-border-a-specific-player)
* [Block everything except multiple players](#block-everything-except-specific-multiple-players)
* [Block everything except multiple players + highlight (red border)](#block-everything-except-specific-multiple-players--highlight-red-border)
* [Highlight multiple players without blocking](#highlight-red-border-only-specific-multiple-players-without-blocking)
* [Hiding icons](#hiding-icons)
* [More examples](#more-examples)
* [More options](#more-options)
* [Selection of players](#selection-of-players)
* [Match negation](#match-negation)
- [mirv\_deathmsg](#mirv_deathmsg)
- [Supported Games](#supported-games)
- [Script by Chet Jong](#script-by-chet-jong)
- [Examples](#examples)
- [The display time of death notifications](#the-display-time-of-death-notifications)
- [How to block everything except a specific player:](#how-to-block-everything-except-a-specific-player)
- [How to highlight (red border) a specific player:](#how-to-highlight-red-border-a-specific-player)
- [Block everything except specific multiple players:](#block-everything-except-specific-multiple-players)
- [Block everything except specific multiple players + highlight (red-border):](#block-everything-except-specific-multiple-players--highlight-red-border)
- [Highlight (red-border) only specific multiple players, without blocking](#highlight-red-border-only-specific-multiple-players-without-blocking)
- [Hiding icons](#hiding-icons)
- [More examples](#more-examples)
- [More options](#more-options)
- [Selection of players](#selection-of-players)
- [Match negation](#match-negation)
- [See also](#see-also)

# Supported Games

Expand All @@ -37,7 +39,7 @@ alias "localplayer_on" "mirv_deathmsg filter add attackerMatch=!xTrace block=1 l
alias "localplayer_off" "mirv_deathmsg filter clear;alias localplayer localplayer_on;echo KILLFEED: DEFAULT"
unbind h
bind "h" "localplayer"
bind "h" "localplayer"
```

# Examples
Expand Down Expand Up @@ -73,7 +75,7 @@ mirv_deathmsg filter add victimMatch=x<XUID> block=0
mirv_deathmsg filter clear
mirv_deathmsg filter add block=1
// Repeat these two for every player <XUID> you want to see:
mirv_deathmsg filter add attackerMatch=x<XUID> attackerIsLocal=1 block=0
mirv_deathmsg filter add attackerMatch=x<XUID> attackerIsLocal=1 block=0
mirv_deathmsg filter add victimMatch=x<XUID> victimIsLocal=1 block=0
```

Expand Down
78 changes: 78 additions & 0 deletions docs/components/Download.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<script setup lang="ts">
import { onMounted, ref } from "vue";
const props = defineProps({
DownloadText: {
type: String,
default: "Download",
},
latestVersionText: {
type: String,
default: "Latest Version",
},
latestReleasePageText: {
type: String,
default: "Latest Release Page",
},
DownloadZipText: {
type: String,
default: "Download .zip",
},
DownloadExeText: {
type: String,
default: "Download .exe Installer",
},
});
const version = ref("__");
onMounted(async () => {
const res = await fetch("https://api.upup.cool/get/hlae/version", {
method: "GET",
headers: {
"Content-Type": "text/plain",
},
redirect: "follow",
referrerPolicy: "no-referrer",
});
if (!res.ok) {
console.error("HTTP error", res.status);
} else {
version.value = await res.text();
}
});
</script>

<template>
<div class="flex justify-center w-full mx-auto mb-8 text-center mt-28">
<div
class="max-w-[1152px] w-full flex flex-col gap-6 justify-center items-center"
>
<h1 id="download" class="text-3xl font-semibold">{{ DownloadText }}</h1>

<div>{{ latestVersionText }}: {{ version }}</div>
<a
class="text-red-700 cursor-pointer hover:text-red-700/60"
href="https://github.com/advancedfx/advancedfx/releases/latest"
target="_blank"
>{{ latestReleasePageText }}</a
>
<section class="flex gap-4">
<a
href="https://api.upup.cool/get/hlae"
target="_blank"
class="px-4 py-2 transition bg-gray-100 border rounded cursor-pointer hover:bg-gray-200 max-w-fit"
>
{{ DownloadZipText }}
</a>
<a
href="https://api.upup.cool/get/hlae-installer"
target="_blank"
class="px-4 py-2 transition bg-gray-100 border rounded cursor-pointer hover:bg-gray-200 max-w-fit"
>
{{ DownloadExeText }}
</a>
</section>
</div>
</div>
</template>
12 changes: 9 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ features:
---

<!-- HTML Part -->
<!-- <script setup>
import Test from "./components/Test.vue"
<script setup>
import Download from "./components/Download.vue"
</script>

<Test></Test> -->
<Download
DownloadText="Download"
latestVersionText="Latest Version"
latestReleasePageText="Latest Release Page"
DownloadZipText="Download .zip"
DownloadExeText="Download .exe Installer"
/>
12 changes: 9 additions & 3 deletions docs/zh-hans/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ features:
---

<!-- HTML Part -->
<!-- <script setup>
import Test from "/components/Test.vue"
<script setup>
import Download from "../components/Download.vue"
</script>

<Test></Test> -->
<Download
DownloadText="下载"
latestVersionText="最新版本"
latestReleasePageText="最新发布页"
DownloadZipText="下载 .zip"
DownloadExeText="下载 .exe 安装器"
/>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"tailwindcss": "^3.3.7",
"typescript": "^5.2.2",
"vite": "^5.0.8",
"vitepress": "1.0.0-rc.32",
"vitepress": "1.0.0-rc.34",
"vitepress-sidebar": "^1.18.5",
"vue-tsc": "^1.8.25"
},
Expand Down
Loading

0 comments on commit e81bd5f

Please sign in to comment.