This is an automated email from the ASF dual-hosted git repository.
gaoxihui pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ozhera-site.git
The following commit(s) were added to refs/heads/main by this push:
new 86924d3 feat: add download page (#35)
86924d3 is described below
commit 86924d3782e6cb8998d8112023379a5603eac54c
Author: renqingfu1 <[email protected]>
AuthorDate: Thu Mar 27 19:00:15 2025 +0800
feat: add download page (#35)
---
.vitepress/configs/en/nav.mts | 5 +
.vitepress/configs/zh/nav.mts | 5 +
.vitepress/theme/components/DownloadPage.vue | 195 +++++++++++++++++++++++++++
.vitepress/theme/components/VersionList.vue | 107 +++++++++++++++
.vitepress/theme/index.ts | 4 +
src/en/download/index.md | 43 ++++++
src/zh/download/index.md | 43 ++++++
7 files changed, 402 insertions(+)
diff --git a/.vitepress/configs/en/nav.mts b/.vitepress/configs/en/nav.mts
index 22d8b55..08a2cb5 100644
--- a/.vitepress/configs/en/nav.mts
+++ b/.vitepress/configs/en/nav.mts
@@ -36,6 +36,11 @@ export default [
}
]
},
+ {
+ text: 'Download',
+ activeMatch: `^/en/download/`,
+ link: '/en/download/'
+ },
{
text: 'ASF',
activeMatch: "^/info/",
diff --git a/.vitepress/configs/zh/nav.mts b/.vitepress/configs/zh/nav.mts
index a5f06b6..ccf14d2 100644
--- a/.vitepress/configs/zh/nav.mts
+++ b/.vitepress/configs/zh/nav.mts
@@ -48,6 +48,11 @@ export default [
}
]
},
+ {
+ text: '下载',
+ activeMatch: `^/zh/download/`,
+ link: '/zh/download/'
+ },
{
text: 'ASF',
activeMatch: "^/info/",
diff --git a/.vitepress/theme/components/DownloadPage.vue
b/.vitepress/theme/components/DownloadPage.vue
new file mode 100644
index 0000000..99b69a0
--- /dev/null
+++ b/.vitepress/theme/components/DownloadPage.vue
@@ -0,0 +1,195 @@
+<template>
+ <div class="download-page">
+ <div class="download-content">
+ <div class="version-card">
+ <h2>{{ $frontmatter.latestVersion }}</h2>
+ <div class="version-info">
+ <div class="version-number">v{{ $frontmatter.downloads[0].version
}}</div>
+ <div class="release-date">{{ $frontmatter.releaseDate }}: {{
$frontmatter.downloads[0].date.split('T')[0] }}</div>
+ </div>
+
+ <div class="download-options">
+ <div class="download-option">
+ <h3>{{ $frontmatter.sourcePackage }}</h3>
+ <div class="download-links">
+ <a :href="$frontmatter.downloads[0].source.url"
class="primary-link">
+ {{ $frontmatter.downloadSource }}
+ </a>
+ <div class="secondary-links">
+ <a :href="$frontmatter.downloads[0].source.asc">{{
$frontmatter.signature }}</a>
+ <a :href="$frontmatter.downloads[0].source.sha512">SHA512</a>
+ </div>
+ </div>
+ </div>
+
+ <div class="download-option">
+ <h3>{{ $frontmatter.binaryPackage }}</h3>
+ <div class="download-links">
+ <a :href="$frontmatter.downloads[0].binary.url"
class="primary-link">
+ {{ $frontmatter.downloadBinary }}
+ </a>
+ <div class="secondary-links">
+ <a :href="$frontmatter.downloads[0].binary.asc">{{
$frontmatter.signature }}</a>
+ <a :href="$frontmatter.downloads[0].binary.sha512">SHA512</a>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="release-notes">
+ <a :href="$frontmatter.downloads[0].releaseNotes"
class="release-notes-link">
+ {{ $frontmatter.viewReleaseNotes }}
+ </a>
+ </div>
+ </div>
+
+ <div class="verification-info">
+ <h2>{{ $frontmatter.verifyDownloads }}</h2>
+ <p>{{ $frontmatter.verifyDescription }} <a
href="https://downloads.apache.org/incubator/ozhera/KEYS">KEYS</a> {{
$frontmatter.verifyDescription2 }}</p>
+ <p>{{ $frontmatter.verifyInstructions }}<a
href="https://www.apache.org/dyn/closer.cgi#verify">{{
$frontmatter.verifyInstructionsPage }}</a></p>
+ </div>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { useData } from 'vitepress'
+const { frontmatter } = useData()
+</script>
+
+<style scoped>
+.download-page {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 0;
+}
+
+h2 {
+ border-top: none;
+ margin: 0;
+ padding: 0;
+}
+
+.download-content {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+}
+
+.version-card {
+ background: var(--vp-c-bg-soft);
+ border-radius: 12px;
+ padding: 1.5rem;
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
+}
+
+.version-info {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ margin: 0.5rem 0;
+}
+
+.version-number {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: var(--vp-c-brand);
+}
+
+.release-date {
+ color: var(--vp-c-text-2);
+}
+
+.download-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 1.5rem;
+ margin: 1rem 0;
+}
+
+.download-option {
+ background: var(--vp-c-bg);
+ padding: 1rem;
+ border-radius: 8px;
+ border: 1px solid var(--vp-c-divider);
+}
+
+.download-option h3 {
+ margin-bottom: 1rem;
+}
+
+.download-links {
+ display: flex;
+ flex-direction: column;
+ gap: 0.5rem;
+}
+
+.primary-link {
+ display: inline-block;
+ background: var(--vp-c-brand-soft);
+ color: var(--vp-c-brand);
+ padding: 0.5rem 1rem;
+ border-radius: 4px;
+ text-decoration: none;
+ text-align: center;
+ transition: all 0.2s;
+}
+
+.primary-link:hover {
+ background: var(--vp-c-brand);
+ color: var(--vp-c-white);
+}
+
+.secondary-links {
+ display: flex;
+ gap: 1rem;
+ justify-content: center;
+}
+
+.secondary-links a {
+ color: var(--vp-c-brand);
+ text-decoration: none;
+}
+
+.secondary-links a:hover {
+ text-decoration: underline;
+}
+
+.release-notes {
+ text-align: center;
+ margin-top: 1rem;
+}
+
+.release-notes-link {
+ color: var(--vp-c-brand);
+ text-decoration: none;
+}
+
+.release-notes-link:hover {
+ text-decoration: underline;
+}
+
+.verification-info {
+ background: var(--vp-c-bg-soft);
+ padding: 1.5rem;
+ border-radius: 12px;
+}
+
+.verification-info h2 {
+ margin-bottom: 0.5rem;
+}
+
+.verification-info p {
+ margin-bottom: 0.5rem;
+ color: var(--vp-c-text-2);
+}
+
+.verification-info a {
+ color: var(--vp-c-brand);
+ text-decoration: none;
+}
+
+.verification-info a:hover {
+ text-decoration: underline;
+}
+</style>
\ No newline at end of file
diff --git a/.vitepress/theme/components/VersionList.vue
b/.vitepress/theme/components/VersionList.vue
new file mode 100644
index 0000000..3159cde
--- /dev/null
+++ b/.vitepress/theme/components/VersionList.vue
@@ -0,0 +1,107 @@
+<template>
+ <div class="version-list">
+ <div class="version-table">
+ <table>
+ <thead>
+ <tr>
+ <th>{{ $frontmatter.version }}</th>
+ <th>{{ $frontmatter.releaseDate }}</th>
+ <th>{{ $frontmatter.sourcePackage }}</th>
+ <th>{{ $frontmatter.binaryPackage }}</th>
+ <th>{{ $frontmatter.releaseNotes }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr v-for="download in $frontmatter.downloads"
:key="download.version">
+ <td>v{{ download.version }}</td>
+ <td>{{ download.date.split('T')[0] }}</td>
+ <td>
+ <a :href="download.source.url">{{ $frontmatter.sourcePackage
}}</a>
+ (<a :href="download.source.asc">{{ $frontmatter.signature }}</a>
|
+ <a :href="download.source.sha512">SHA512</a>)
+ </td>
+ <td>
+ <a :href="download.binary.url">{{ $frontmatter.binaryPackage
}}</a>
+ (<a :href="download.binary.asc">{{ $frontmatter.signature }}</a>
|
+ <a :href="download.binary.sha512">SHA512</a>)
+ </td>
+ <td>
+ <a :href="download.releaseNotes">{{
$frontmatter.viewReleaseNotes }}</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+</template>
+
+<script setup>
+import { useData } from 'vitepress'
+const { frontmatter } = useData()
+</script>
+
+<style scoped>
+.version-list {
+ margin-top: 0rem;
+ background: var(--vp-c-bg);
+ border-radius: 0px;
+}
+
+.version-list h2 {
+ margin-bottom: 0rem;
+}
+
+.version-table {
+ overflow-x: auto;
+ margin: 0;
+}
+
+.version-table table {
+ width: 100%;
+ border-collapse: collapse;
+ white-space: nowrap;
+ margin: 0;
+}
+
+.version-table th,
+.version-table td {
+ padding: 0.75rem;
+ text-align: left;
+ border-bottom: 1px solid var(--vp-c-divider);
+ white-space: nowrap;
+}
+
+.version-table th {
+ font-weight: 600;
+ color: var(--vp-c-text-1);
+ position: sticky;
+ top: 0;
+ background: var(--vp-c-bg-soft);
+ z-index: 1;
+}
+
+.version-table td {
+ color: var(--vp-c-text-2);
+}
+
+.version-table a {
+ color: var(--vp-c-brand);
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.version-table a:hover {
+ text-decoration: underline;
+}
+
+@media (max-width: 768px) {
+ .version-table {
+ font-size: 0.9rem;
+ }
+
+ .version-table th,
+ .version-table td {
+ padding: 0.5rem;
+ }
+}
+</style>
\ No newline at end of file
diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts
index 3671b1b..23d85e7 100644
--- a/.vitepress/theme/index.ts
+++ b/.vitepress/theme/index.ts
@@ -3,6 +3,8 @@ import { h } from 'vue'
import DefaultTheme from 'vitepress/theme'
import Layout from './Layout.vue'
import './styles/index.css'
+import DownloadPage from './components/DownloadPage.vue'
+import VersionList from './components/VersionList.vue'
export default {
extends: DefaultTheme,
@@ -13,5 +15,7 @@ export default {
},
enhanceApp({ app, router, siteData }) {
// app.component('VPHome', HomeHero);
+ app.component('DownloadPage', DownloadPage)
+ app.component('VersionList', VersionList)
}
}
diff --git a/src/en/download/index.md b/src/en/download/index.md
new file mode 100644
index 0000000..c76a2c7
--- /dev/null
+++ b/src/en/download/index.md
@@ -0,0 +1,43 @@
+---
+layout: doc
+title: Download
+description: Download the latest version of Apache OzHera(Incubating),
including source and binary packages. For security, please verify downloads
using signatures and hash values.
+latestVersion: Latest Release
+releaseDate: Release Date
+sourcePackage: Source Package
+binaryPackage: Binary Package
+downloadSource: Download Source
+downloadBinary: Download Binary
+releaseNotes: Release Notes
+signature: ASC
+viewReleaseNotes: View Release Notes
+verifyDownloads: Verify Downloads
+verifyDescription: "To ensure the authenticity and security of your download,
please use the project's"
+verifyDescription2: "and corresponding hashes (sha512) and signatures to
verify the release."
+verifyInstructions: "For verification instructions, please refer to:"
+verifyInstructionsPage: Verify Instructions page
+allVersions: All Versions
+version: Version
+downloads:
+ - version: 2.2.5-incubating
+ date: 2024-03-26
+ source:
+ url:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz
+ asc:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz.asc
+ sha512:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz.sha512
+ binary:
+ url:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz
+ asc:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz.asc
+ sha512:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz.sha512
+ releaseNotes: https://github.com/apache/ozhera/releases
+---
+
+# Download
+
+Download the latest version of Apache OzHera(Incubating), including source and
binary packages. For security, please verify downloads using signatures and
hash values.
+
+<DownloadPage />
+
+## All Versions
+
+<VersionList />
diff --git a/src/zh/download/index.md b/src/zh/download/index.md
new file mode 100644
index 0000000..c98b125
--- /dev/null
+++ b/src/zh/download/index.md
@@ -0,0 +1,43 @@
+---
+layout: doc
+title: 下载
+description: 下载 Apache OzHera(Incubating)
的最新版本,包括源码包和二进制包。为了保障下载安全,请使用签名和哈希值进行验证。
+latestVersion: 最新版本
+releaseDate: 发布日期
+sourcePackage: 源码包
+binaryPackage: 二进制包
+downloadSource: 下载源码包
+downloadBinary: 下载二进制包
+releaseNotes: 说明
+signature: 签名
+viewReleaseNotes: 查看发布说明
+verifyDownloads: 验证下载
+verifyDescription: "为了保障您下载的版本内容是真实且安全的,请使用随本项目发布的"
+verifyDescription2: "和相应的哈希值(sha512)、签名验证发布版本。"
+verifyInstructions: "验证方法可参考:"
+verifyInstructionsPage: 验证说明页面
+allVersions: 所有版本
+version: 版本
+downloads:
+ - version: 2.2.5-incubating
+ date: 2024-03-26
+ source:
+ url:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz
+ asc:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz.asc
+ sha512:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-src.tar.gz.sha512
+ binary:
+ url:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz
+ asc:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz.asc
+ sha512:
https://downloads.apache.org/incubator/ozhera/2.2.5-incubating/apache-ozhera-2.2.5-incubating-bin.tar.gz.sha512
+ releaseNotes: https://github.com/apache/ozhera/releases
+---
+
+# 下载
+
+下载 Apache OzHera(Incubating) 的最新版本,包括源码包和二进制包。为了保障下载安全,请使用签名和哈希值进行验证。
+
+<DownloadPage />
+
+## 所有版本
+
+<VersionList />
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]