Skip to content

Commit

Permalink
adjust the download block ssg rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Nov 30, 2024
1 parent 922d685 commit 1f52d36
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
10 changes: 6 additions & 4 deletions .vitepress/theme/components/AppPeer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div style="font-size: 1.25em">{{ t("joinPeer", { inviter }) }}</div>
<div class="ui grey text"
style="font-size: 0.55em; color: rgb(222 222 222); font-weight: 100; padding-top: 10px">{{
t("joinPeerDescription", { inviter, group })
t("joinPeerDescription", { inviter, group })
}}</div>
</h1>
<div class="ui horizontal inverted divider" style="margin-bottom: 40px;">{{ t("notWork") }}</div>
Expand All @@ -29,14 +29,16 @@
</div>
</div>
<div style="color: rgb(222 222 222); line-height: 1.4; font-size: 1.4rem; padding-top: 10px">{{
t("nothingWork")
}}</div>
t("nothingWork")
}}</div>
<div class="w-full flex justify-center mt-10">
<a class="ui version inverted basic label" target="_blank"
href="https://github.com/voxelum/x-minecraft-launcher/releases">{{ github.latestVersion }}</a>
</div>
<div class="flex item-center w-full justify-center mb-20 mt-10">
<component :is="componentByPlatform" />
<ClientOnly>
<component :is="componentByPlatform" />
</ClientOnly>
</div>
</div>
</div>
Expand Down
18 changes: 10 additions & 8 deletions .vitepress/theme/components/AppWelcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@
class="max-h-10 inline-block px-2 max-w-15 sm:max-w-full sm:-mt-4 -mt-2" />! -->
</p>
<p class="text-xl dark:text-[rgb(208,208,208)] font-medium mt-5 text-left lg:mr-2 mr-7">{{
t('intro.description')
}}</p>
t('intro.description')
}}</p>
<div class="w-full flex justify-center mt-10 gap-2">
<a class="ui version inverted basic label text-sm" target="_blank"
href="https://github.com/voxelum/x-minecraft-launcher/releases">
<span>{{ data.latestVersion }}</span>
</a>
</div>

<component :is="platformDownload" class="mt-10 w-full mb-5" :organized="true" />
<ClientOnly>
<component :is="platformDownload" class="mt-10 w-full mb-5" :organized="true" />
</ClientOnly>

<a class="ui link cursor-pointer self-center font-medium italic" :href="prebuildsUrl">{{
t('prebuild.entryHint') }}</a>
t('prebuild.entryHint') }}</a>

<span class="flex gap-2 items-start w-full mt-5 items-center justify-center">
<a href="https://fabricmc.net/" target="_blank">
Expand Down Expand Up @@ -95,7 +97,7 @@
</template>
</i18n-t>
<p class="text-xl dark:text-[rgb(208,208,208)] font-medium mt-5 text-left lg:mr-2 mr-7">{{
t('gameInstall.description') }}</p>
t('gameInstall.description') }}</p>
<div class="flex flex-col items-start w-full mt-3 text-gray-400">
<a href="https://bmclapidoc.bangbang93.com/" class="text-lg" target="_blank">> BMCL API</a>
</div>
Expand All @@ -119,7 +121,7 @@
</template>
</i18n-t>
<p class="text-xl dark:text-[rgb(208,208,208)] font-medium mt-5 text-left lg:mr-2 mr-7">{{
t('optimalDisk.description') }}</p>
t('optimalDisk.description') }}</p>
<div class="flex flex-col items-start w-full mt-3 text-gray-400">
<a href="https://en.wikipedia.org/wiki/Hard_link" class="text-lg" target="_blank">> Hard
link</a>
Expand Down Expand Up @@ -165,7 +167,7 @@
</template>
</i18n-t>
<p class="text-xl dark:text-[rgb(208,208,208)] font-medium mt-5 text-left lg:mr-2 mr-7">{{
t('cleanWorkspace.description') }}</p>
t('cleanWorkspace.description') }}</p>
</div>
</div>
</div>
Expand All @@ -182,7 +184,7 @@
</template>
</i18n-t>
<p class="text-xl dark:text-[rgb(208,208,208)] font-medium mt-5 text-left lg:mr-2 mr-7">{{
t('communityIntegration.description') }}</p>
t('communityIntegration.description') }}</p>
<div class="flex flex-col w-full mt-3 text-gray-400 items-start">
<a href="https://curseforge.com/minecraft/" class="text-lg" target="_blank">> Curseforge</a>
<a href="https://modrinth.com/" class="text-lg" target="_blank">> Modrinth</a>
Expand Down
3 changes: 0 additions & 3 deletions .vitepress/theme/components/PrebuildDownloads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
<div class="flex lg:flex-row flex-col gap-4">
<a :class="{ positive: platform === 'Win32', loading: fetching }"
class="ui huge inverted download labeled icon button" @click="onDownload(windowsArtifact)">
<i class="windows icon"></i>
<span>Windows</span>
</a>
<div class="ui labeled button" tabindex="0">
<a class="ui huge purple download labeled icon button w-full"
:class="{ positive: platform === 'Mac', loading: fetching }" @click="onDownload(macArtifact)">
<i class="apple icon"></i>
<span>MacOS</span>
</a>
<a class="ui basic inverted green left pointing label" :class="{ disabled: fetching }"
Expand All @@ -20,7 +18,6 @@
<div class="ui labeled button" tabindex="0">
<a :class="{ positive: platform === 'Linux', loading: fetching }"
class="ui huge orange download labeled icon button w-full" @click="onDownload(linuxArtifact)">
<i class="linux icon"></i>
<span>Linux</span>
</a>
<a class="ui basic inverted green left pointing label" :class="{ disabled: fetching }"
Expand Down
4 changes: 2 additions & 2 deletions .vitepress/theme/composables/usePlatform.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import platform from 'platform'

export function usePlatform() {
if (import.meta.env.SSR) return ''
if (import.meta.env.SSR) return undefined
switch (platform.os?.family) {
case 'Windows':
return 'Win32'
Expand All @@ -14,5 +14,5 @@ export function usePlatform() {
case 'Red Hat':
return 'Linux'
}
return 'Win32'
return undefined
}

0 comments on commit 1f52d36

Please sign in to comment.