initnal
This commit is contained in:
@@ -0,0 +1,688 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>btcli - 命令行翻译工具</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
background: linear-gradient(135deg, #fff8e1, #ffecb3, #ffcc80); /* 暖色渐变:米色到浅黄到橙色 */
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 可拖动的小球容器 */
|
||||
.draggable-ball {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 20px;
|
||||
transform: translateY(-50%);
|
||||
z-index: 10000;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.draggable-ball:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.draggable-ball-canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* 导航栏样式 - 暖色调 */
|
||||
header {
|
||||
background-color: #ff8f00; /* 深橙色 */
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-links li {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
text-decoration: none;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: 500;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.nav-links a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 主要内容区域 */
|
||||
main {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
/* 英雄区域 - 暖色调 */
|
||||
.hero {
|
||||
background: linear-gradient(135deg, #ff8f00, #ff6f00); /* 橙色渐变 */
|
||||
color: white;
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 1.2rem;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 按钮链接样式 */
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
margin: 2rem 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.external-link-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.75rem 1.5rem;
|
||||
background-color: #ff8f00; /* 橙色背景 */
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.3s;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.external-link-btn:hover {
|
||||
background-color: #e65100; /* 深橙色背景 */
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* 功能特色区域 */
|
||||
.features {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.features h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 3rem;
|
||||
color: #ff8f00; /* 橙色标题 */
|
||||
}
|
||||
|
||||
.feature-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background-color: #ffecb3; /* 暖黄色背景 */
|
||||
padding: 2rem;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
box-shadow: 0 5px 15px rgba(255, 143, 0, 0.1); /* 橙色阴影 */
|
||||
transition: transform 0.3s;
|
||||
border: 1px solid rgba(255, 143, 0, 0.2); /* 橙色边框 */
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 15px 30px rgba(255, 143, 0, 0.2); /* 更明显的橙色阴影 */
|
||||
}
|
||||
|
||||
.feature-card h3 {
|
||||
color: #ff8f00; /* 橙色标题 */
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.feature-card p {
|
||||
color: #5d4037; /* 棕色文字 */
|
||||
}
|
||||
|
||||
/* Gitee 小部件样式 - 暖色调 */
|
||||
.osc_pro_color {color: #5d4037 !important;}
|
||||
.osc_panel_color {background-color: #ffecb3 !important;}
|
||||
.osc_background_color {background-color: #fff8e1 !important;}
|
||||
.osc_border_color {border-color: #ffca28 !important;}
|
||||
.osc_desc_color {color: #5d4037 !important;}
|
||||
.osc_link_color * {color: #ff8f00 !important;}
|
||||
|
||||
/* 安装说明区域 */
|
||||
.installation {
|
||||
padding: 3rem 0;
|
||||
background-color: #fff3e0; /* 暖橘色背景 */
|
||||
}
|
||||
|
||||
.installation h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
color: #ff8f00; /* 橙色标题 */
|
||||
}
|
||||
|
||||
.install-steps {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.step {
|
||||
margin-bottom: 2rem;
|
||||
background: white;
|
||||
padding: 1.5rem;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 3px 10px rgba(255, 143, 0, 0.1);
|
||||
border-left: 4px solid #ff8f00; /* 橙色左边框 */
|
||||
}
|
||||
|
||||
.step h3 {
|
||||
margin-bottom: 1rem;
|
||||
color: #ff8f00;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
padding: 1rem;
|
||||
border-radius: 5px;
|
||||
overflow-x: auto;
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* 使用示例区域 */
|
||||
.usage {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.usage h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
color: #ff8f00; /* 橙色标题 */
|
||||
}
|
||||
|
||||
.usage-examples {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 0 2rem;
|
||||
}
|
||||
|
||||
.example {
|
||||
margin-bottom: 2rem;
|
||||
background: #ffecb3; /* 暖黄色背景 */
|
||||
padding: 1.5rem;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 3px 10px rgba(255, 143, 0, 0.1);
|
||||
}
|
||||
|
||||
.example h3 {
|
||||
margin-bottom: 0.8rem;
|
||||
color: #ff8f00;
|
||||
}
|
||||
|
||||
/* 关于区域 */
|
||||
.about {
|
||||
padding: 5rem 0;
|
||||
background-color: #ffecb3; /* 暖黄色背景 */
|
||||
}
|
||||
|
||||
.about h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
color: #ff8f00; /* 橙色标题 */
|
||||
}
|
||||
|
||||
.about p {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.1rem;
|
||||
text-align: center;
|
||||
color: #5d4037; /* 棕色文字 */
|
||||
}
|
||||
|
||||
/* 页脚 - 暖色调 */
|
||||
footer {
|
||||
background-color: #ff8f00; /* 橙色页脚 */
|
||||
color: white;
|
||||
padding: 3rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer p {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
.nav-links {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.feature-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
nav {
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- 可拖动的带颜文字小球 -->
|
||||
<div class="draggable-ball">
|
||||
<canvas id="draggableBall" class="draggable-ball-canvas"></canvas>
|
||||
</div>
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
<div class="logo">btcli</div>
|
||||
<ul class="nav-links">
|
||||
<li><a href="#home">首页</a></li>
|
||||
<li><a href="#features">特性</a></li>
|
||||
<li><a href="#installation">安装</a></li>
|
||||
<li><a href="#usage">使用</a></li>
|
||||
<li><a href="#about">关于</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section id="home" class="hero">
|
||||
<div class="container">
|
||||
<h1>btcli</h1>
|
||||
<p>一款在线命令行翻译工具,支持中文及其他语言,配备TUI界面</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 按钮链接区域 -->
|
||||
<div class="container button-container">
|
||||
<a href="https://gitee.com/Ironbayberry/btcli" target="_blank" class="external-link-btn">
|
||||
<img src="https://gitee.com/favicon.ico" alt="Gitee Icon" class="btn-icon">
|
||||
Gitee
|
||||
</a>
|
||||
<a href="https://crates.io/crates/btcli" target="_blank" class="external-link-btn">
|
||||
<img src="https://crates.io/favicon.ico" alt="Crates.io Icon" class="btn-icon">
|
||||
Crates.io
|
||||
</a>
|
||||
<a href="https://swe-iss.rth1.xyz/softwares/btcli/docs" target="_blank" class="external-link-btn">
|
||||
<img src="https://rust-lang.org/static/images/favicon.svg" alt="Rust Icon" class="btn-icon">
|
||||
Rust docs
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<section id="features" class="features">
|
||||
<div class="container">
|
||||
<h2>功能特性</h2>
|
||||
<div class="feature-grid">
|
||||
<div class="feature-card">
|
||||
<h3>命令行界面 (CLI)</h3>
|
||||
<p>支持丰富的命令行参数,可直接在终端中快速翻译,无需打开图形界面,提高工作效率</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>支持 -s/--source 指定源语言</li>
|
||||
<li>支持 -t/--target 指定目标语言</li>
|
||||
<li>支持 -h/--help 查看帮助信息</li>
|
||||
<li>支持 -v/--version 查看版本信息</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>文本用户界面 (TUI)</h3>
|
||||
<p>直观的文本用户界面,提供友好的交互体验,支持多窗口操作和实时翻译</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>支持多语言配置</li>
|
||||
<li>支持设置页面</li>
|
||||
<li>支持快捷键操作</li>
|
||||
<li>支持剪贴板功能</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>多语言支持</h3>
|
||||
<p>支持中文、英文及多种国际语言之间的互译,覆盖全球主要语系</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>自动检测源语言</li>
|
||||
<li>支持主流语种翻译</li>
|
||||
<li>持续添加新语言</li>
|
||||
<li>高质量翻译引擎</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>纯CLI模式</h3>
|
||||
<p>支持纯命令行操作,适合脚本集成和自动化任务,可无缝集成到各类工作流中</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>无头模式运行</li>
|
||||
<li>支持管道输入</li>
|
||||
<li>支持批处理操作</li>
|
||||
<li>适合CI/CD集成</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>安全可靠</h3>
|
||||
<p>采用百度翻译API,保障翻译质量和数据安全,本地配置文件加密存储</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>API密钥本地存储</li>
|
||||
<li>HTTPS加密传输</li>
|
||||
<li>无数据记录</li>
|
||||
<li>开源可验证</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="feature-card">
|
||||
<h3>跨平台支持</h3>
|
||||
<p>基于Rust开发,支持Windows、macOS、Linux等多种操作系统</p>
|
||||
<ul style="text-align: left; margin-top: 10px;">
|
||||
<li>Windows x86_64</li>
|
||||
<li>Linux x86_64</li>
|
||||
<li>macOS Intel/Apple Silicon</li>
|
||||
<li>ARM架构支持</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="installation" class="installation">
|
||||
<div class="container">
|
||||
<h2>安装</h2>
|
||||
<div class="install-steps">
|
||||
<div class="step">
|
||||
<h3>通过Cargo安装</h3>
|
||||
<pre><code>cargo install btcli</code></pre>
|
||||
</div>
|
||||
<div class="step">
|
||||
<h3>从源码构建</h3>
|
||||
<pre><code>git clone https://gitee.com/Ironbayberry/btcli.git
|
||||
cd btcli
|
||||
cargo build --release</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="usage" class="usage">
|
||||
<div class="container">
|
||||
<h2>使用方法</h2>
|
||||
<div class="usage-examples">
|
||||
<div class="example">
|
||||
<h3>基础翻译</h3>
|
||||
<pre><code>btcli "Hello, world!"</code></pre>
|
||||
</div>
|
||||
<div class="example">
|
||||
<h3>指定语言</h3>
|
||||
<pre><code>btcli -s en -t zh "Hello, world!"
|
||||
(默认会保存到设置)</code></pre>
|
||||
</div>
|
||||
<div class="example">
|
||||
<h3>启动TUI界面</h3>
|
||||
<pre><code>btcli</code></pre>
|
||||
</div>
|
||||
<div class="example">
|
||||
<h3>显示帮助</h3>
|
||||
<pre><code>btcli --help</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="about" class="about">
|
||||
<div class="container">
|
||||
<h2>关于项目</h2>
|
||||
<p>btcli是一个开源的命令行翻译工具,专为中文和其他语言的翻译而设计。项目采用Rust语言编写,注重性能和安全性。</p>
|
||||
<p>作者: S.A. (@snoware)</p>
|
||||
<p>许可证: MPL-2.0</p>
|
||||
<p>项目主页: <a href="https://gitee.com/Ironbayberry/btcli" style="color: #ff8f00; text-decoration: underline;" target="_blank">https://gitee.com/Ironbayberry/btcli</a></p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Gitee 仓库小部件 -->
|
||||
<div class="container">
|
||||
<div id="osc-gitee-widget-tag"></div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>© 2026 S.A. (@snoware). 使用 MPL-2.0 许可证发布.</p>
|
||||
<p>项目主页: <a href="https://swe-iss.rth1.xyz/softwares/btcli" style="color: white; text-decoration: underline;" target="_blank">https://swe-iss.rth1.xyz/softwares/btcli</a></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
// Gitee 仓库小部件
|
||||
(function() {
|
||||
var origin = 'https://gitee.com';
|
||||
var widgetUrl = origin + '/Ironbayberry/btcli/widget_preview';
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.async = true;
|
||||
script.src = widgetUrl;
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
// 绘制可拖动的带颜文字小球
|
||||
const canvas = document.getElementById('draggableBall');
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// 设置canvas尺寸
|
||||
canvas.width = 40;
|
||||
canvas.height = 40;
|
||||
|
||||
// 绘制小球
|
||||
function drawBall() {
|
||||
// 清除画布
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
// 绘制小球背景
|
||||
const centerX = canvas.width / 2;
|
||||
const centerY = canvas.height / 2;
|
||||
const radius = 15;
|
||||
|
||||
// 创建渐变效果
|
||||
const gradient = ctx.createRadialGradient(
|
||||
centerX - 5, centerY - 5, 1,
|
||||
centerX, centerY, radius
|
||||
);
|
||||
gradient.addColorStop(0, '#ffeb3b'); // 黄色
|
||||
gradient.addColorStop(1, '#ff9800'); // 橙色
|
||||
|
||||
// 绘制圆球
|
||||
ctx.beginPath();
|
||||
ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);
|
||||
ctx.fillStyle = gradient;
|
||||
ctx.fill();
|
||||
|
||||
// 添加边框
|
||||
ctx.strokeStyle = '#e65100';
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke();
|
||||
|
||||
// 绘制颜文字 "(¬‿¬)"
|
||||
ctx.font = 'bold 12px Arial';
|
||||
ctx.fillStyle = '#333';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.fillText('(¬‿¬)', centerX, centerY + 2);
|
||||
}
|
||||
|
||||
// 调用绘制函数
|
||||
drawBall();
|
||||
|
||||
// 拖动功能
|
||||
let isDragging = false;
|
||||
let offsetX, offsetY;
|
||||
|
||||
canvas.parentElement.addEventListener('mousedown', startDrag);
|
||||
document.addEventListener('mousemove', drag);
|
||||
document.addEventListener('mouseup', stopDrag);
|
||||
|
||||
// 触摸设备支持
|
||||
canvas.parentElement.addEventListener('touchstart', touchStart);
|
||||
document.addEventListener('touchmove', touchMove);
|
||||
document.addEventListener('touchend', touchEnd);
|
||||
|
||||
function startDrag(e) {
|
||||
e.preventDefault();
|
||||
isDragging = true;
|
||||
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
offsetX = e.clientX - rect.left;
|
||||
offsetY = e.clientY - rect.top;
|
||||
}
|
||||
|
||||
function drag(e) {
|
||||
if (!isDragging) return;
|
||||
|
||||
const x = e.clientX - offsetX;
|
||||
const y = e.clientY - offsetY;
|
||||
|
||||
// 更新小球位置
|
||||
canvas.parentElement.style.left = `${x}px`;
|
||||
canvas.parentElement.style.top = `${y}px`;
|
||||
canvas.parentElement.style.transform = 'none'; // 取消初始的transform
|
||||
}
|
||||
|
||||
function stopDrag() {
|
||||
isDragging = false;
|
||||
}
|
||||
|
||||
// 触摸事件处理
|
||||
function touchStart(e) {
|
||||
const touch = e.touches[0];
|
||||
const mouseEvent = new MouseEvent('mousedown', {
|
||||
clientX: touch.clientX,
|
||||
clientY: touch.clientY
|
||||
});
|
||||
canvas.dispatchEvent(mouseEvent);
|
||||
}
|
||||
|
||||
function touchMove(e) {
|
||||
const touch = e.touches[0];
|
||||
const mouseEvent = new MouseEvent('mousemove', {
|
||||
clientX: touch.clientX,
|
||||
clientY: touch.clientY
|
||||
});
|
||||
document.dispatchEvent(mouseEvent);
|
||||
}
|
||||
|
||||
function touchEnd() {
|
||||
const mouseEvent = new MouseEvent('mouseup', {});
|
||||
document.dispatchEvent(mouseEvent);
|
||||
}
|
||||
|
||||
// 平滑滚动效果
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const targetId = this.getAttribute('href');
|
||||
if (targetId === '#') return;
|
||||
|
||||
const targetElement = document.querySelector(targetId);
|
||||
if (targetElement) {
|
||||
window.scrollTo({
|
||||
top: targetElement.offsetTop - 80, // 减去导航栏高度
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 导航栏高亮当前部分
|
||||
window.addEventListener('scroll', () => {
|
||||
const sections = document.querySelectorAll('section');
|
||||
const navLinks = document.querySelectorAll('.nav-links a');
|
||||
|
||||
let current = '';
|
||||
|
||||
sections.forEach(section => {
|
||||
const sectionTop = section.offsetTop;
|
||||
const sectionHeight = section.clientHeight;
|
||||
|
||||
if (pageYOffset >= (sectionTop - 100)) {
|
||||
current = section.getAttribute('id');
|
||||
}
|
||||
});
|
||||
|
||||
navLinks.forEach(link => {
|
||||
link.classList.remove('active');
|
||||
if (link.getAttribute('href') === `#${current}`) {
|
||||
link.classList.add('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 页面加载完成后执行
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('btcli 详情页面已加载');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,438 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>S.A. - 我的作品</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
background: linear-gradient(135deg, #e1f5fe, #f3e5f5);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
/* 导航栏样式 */
|
||||
header {
|
||||
background-color: #009688; /* 青色主色调 */
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-links {
|
||||
display: flex;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-links li {
|
||||
margin-left: 2rem;
|
||||
}
|
||||
|
||||
.nav-links a {
|
||||
text-decoration: none;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-weight: 500;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.nav-links a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 主要内容区域 */
|
||||
main {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
/* 英雄区域 */
|
||||
.hero {
|
||||
background: linear-gradient(135deg, #009688, #2196F3); /* 青蓝渐变 */
|
||||
color: white;
|
||||
padding: 4rem 0;
|
||||
text-align: center;
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.hero p {
|
||||
font-size: 1.2rem;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 项目区域 */
|
||||
.projects {
|
||||
padding: 2rem 0;
|
||||
}
|
||||
|
||||
.projects h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 3rem;
|
||||
color: #009688; /* 青色标题 */
|
||||
}
|
||||
|
||||
.project-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.project-card {
|
||||
background-color: #E0F7FA; /* 青色透明背景 */
|
||||
padding: 2rem;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||
transition: transform 0.3s;
|
||||
border: 1px solid rgba(0, 150, 136, 0.2); /* 青色边框 */
|
||||
}
|
||||
|
||||
.project-card:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 15px 30px rgba(0, 150, 136, 0.2); /* 青色阴影 */
|
||||
}
|
||||
|
||||
.project-card h3 {
|
||||
color: #009688; /* 青色标题 */
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.project-card h3 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.project-card h3 a:hover {
|
||||
color: #2196F3; /* 蓝色悬停效果 */
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.project-card .description {
|
||||
margin-bottom: 1rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.project-card .tags {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-block;
|
||||
background-color: #009688; /* 青色标签 */
|
||||
color: white;
|
||||
padding: 0.3rem 0.8rem;
|
||||
border-radius: 20px;
|
||||
font-size: 0.8rem;
|
||||
margin: 0.2rem;
|
||||
}
|
||||
|
||||
.project-card .links {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.project-card .links a {
|
||||
display: inline-block;
|
||||
margin: 0 0.5rem;
|
||||
padding: 0.5rem 1rem;
|
||||
background-color: #009688; /* 青色按钮 */
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.project-card .links a:hover {
|
||||
background-color: #2196F3; /* 蓝色悬停 */
|
||||
}
|
||||
|
||||
/* 关于区域 */
|
||||
.about {
|
||||
padding: 5rem 0;
|
||||
background-color: #E1F5FE; /* 淡青背景 */
|
||||
}
|
||||
|
||||
.about h2 {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2rem;
|
||||
color: #009688; /* 青色标题 */
|
||||
}
|
||||
|
||||
.about p {
|
||||
margin-bottom: 1rem;
|
||||
font-size: 1.1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 页脚 */
|
||||
footer {
|
||||
background-color: #009688; /* 青色页脚 */
|
||||
color: white;
|
||||
padding: 3rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer p {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 768px) {
|
||||
.nav-links {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.hero {
|
||||
padding: 3rem 0;
|
||||
}
|
||||
|
||||
.project-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
nav {
|
||||
flex-direction: column;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<link rel="icon" href="../favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<div class="logo">S.A. - 我的作品</div>
|
||||
<ul class="nav-links">
|
||||
<li><a href="/">首页</a></li>
|
||||
<li><a href="#projects">项目</a></li>
|
||||
<li><a href="#about">关于</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section id="home" class="hero">
|
||||
<div class="container">
|
||||
<h1>S.A. - 我的作品</h1>
|
||||
<p>欢迎来到 S.A. 的开源项目展示页面</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="projects" class="projects">
|
||||
<div class="container">
|
||||
<h2>我的作品</h2>
|
||||
<div id="projects-container" class="project-grid">
|
||||
<!-- 项目将通过JavaScript动态加载 -->
|
||||
</div>
|
||||
</div>
|
||||
</section>-->
|
||||
|
||||
<section id="about" class="about">
|
||||
<div class="container">
|
||||
<h2>关于</h2>
|
||||
<p>这里展示了 S.A. (@snoware) 的个人作品集。所有项目都采用了现代化的技术栈。</p>
|
||||
<p>欢迎访问我的 <a href="https://gitee.com/Ironbayberry/" target="_blank" style="color: #009688; text-decoration: underline;">Gitee 个人主页</a> 查看更多项目。</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>© 2026 S.A. (@snoware). All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
// 用于存储项目数据
|
||||
let projectsData = [];
|
||||
|
||||
// 加载 TOML 文件并渲染项目
|
||||
async function loadProjects() {
|
||||
try {
|
||||
// 从同目录下的 projects.txt 文件加载数据
|
||||
const response = await fetch('projects.txt');
|
||||
if (!response.ok) {
|
||||
throw new Error(`无法加载项目数据: ${response.status} ${response.statusText}`);
|
||||
}
|
||||
|
||||
const tomlText = await response.text();
|
||||
|
||||
// 简单的 TOML 解析器(由于不能引入外部库,我们使用简化的解析方法)
|
||||
parseToml(tomlText);
|
||||
renderProjects();
|
||||
} catch (error) {
|
||||
console.error('加载项目数据时出错:', error);
|
||||
const container = document.getElementById('projects-container');
|
||||
container.innerHTML = `<p class="error">加载项目失败: ${error.message}</p>`;
|
||||
}
|
||||
}
|
||||
|
||||
// 简化的 TOML 解析器
|
||||
function parseToml(tomlText) {
|
||||
// 将 TOML 文本转换为 JavaScript 对象
|
||||
const lines = tomlText.split('\n');
|
||||
let currentProject = null;
|
||||
projectsData = [];
|
||||
|
||||
for (const line of lines) {
|
||||
const trimmedLine = line.trim();
|
||||
|
||||
// 检测项目开始 [[projects]]
|
||||
if (trimmedLine.startsWith('[[projects]]')) {
|
||||
currentProject = {};
|
||||
projectsData.push(currentProject);
|
||||
} else if (currentProject && trimmedLine.includes('=')) {
|
||||
const [key, value] = trimmedLine.split('=');
|
||||
const cleanKey = key.trim();
|
||||
let cleanValue = value.trim();
|
||||
|
||||
// 处理字符串值(去除引号)
|
||||
if (cleanValue.startsWith('"') && cleanValue.endsWith('"')) {
|
||||
cleanValue = cleanValue.substring(1, cleanValue.length - 1);
|
||||
}
|
||||
// 处理数组值
|
||||
else if (cleanValue.startsWith('[') && cleanValue.endsWith(']')) {
|
||||
cleanValue = cleanValue.substring(1, cleanValue.length - 1)
|
||||
.split(',')
|
||||
.map(item => item.trim().replace(/"/g, ''));
|
||||
}
|
||||
|
||||
currentProject[cleanKey] = cleanValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 渲染项目到页面
|
||||
function renderProjects() {
|
||||
const container = document.getElementById('projects-container');
|
||||
|
||||
if (!projectsData || projectsData.length === 0) {
|
||||
container.innerHTML = '<p>暂无项目数据</p>';
|
||||
return;
|
||||
}
|
||||
|
||||
// 生成项目卡片HTML
|
||||
const projectsHTML = projectsData.map(project => {
|
||||
// 处理URL中的模板变量
|
||||
const processedDemoUrl = project.demo_url ? project.demo_url.replace(/\{\$rthSuffix\}/g, '') : null;
|
||||
const processedRepoUrl = project.repo_url ? project.repo_url.replace(/\{\$rthSuffix\}/g, '') : null;
|
||||
const processedDocUrl = project.doc_url ? project.doc_url.replace(/\{\$rthSuffix\}/g, '') : null;
|
||||
|
||||
return `
|
||||
<div class="project-card">
|
||||
<h3><a href="${processedDemoUrl || processedRepoUrl || '#'}" target="_blank">${project.name || '未知项目'}</a></h3>
|
||||
<p class="description">${project.description || '暂无描述'}</p>
|
||||
<div class="tags">
|
||||
${(project.tags || []).map(tag => `<span class="tag">${tag}</span>`).join('')}
|
||||
</div>
|
||||
<div class="links">
|
||||
${processedRepoUrl ? `<a href="${processedRepoUrl}" target="_blank">代码仓库</a>` : ''}
|
||||
${processedDemoUrl ? `<a href="${processedDemoUrl}" target="_blank">演示</a>` : ''}
|
||||
${processedDocUrl ? `<a href="${processedDocUrl}" target="_blank">文档</a>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
`}).join('');
|
||||
|
||||
container.innerHTML = projectsHTML;
|
||||
}
|
||||
|
||||
// 平滑滚动效果
|
||||
function setupSmoothScrolling() {
|
||||
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
||||
anchor.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const targetId = this.getAttribute('href');
|
||||
if (targetId === '#') return;
|
||||
|
||||
const targetElement = document.querySelector(targetId);
|
||||
if (targetElement) {
|
||||
window.scrollTo({
|
||||
top: targetElement.offsetTop - 80, // 减去导航栏高度
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 导航栏高亮当前部分
|
||||
function setupActiveNavigation() {
|
||||
window.addEventListener('scroll', () => {
|
||||
const sections = document.querySelectorAll('section');
|
||||
const navLinks = document.querySelectorAll('.nav-links a');
|
||||
|
||||
let current = '';
|
||||
|
||||
sections.forEach(section => {
|
||||
const sectionTop = section.offsetTop;
|
||||
const sectionHeight = section.clientHeight;
|
||||
|
||||
if (pageYOffset >= (sectionTop - 100)) {
|
||||
current = section.getAttribute('id');
|
||||
}
|
||||
});
|
||||
|
||||
navLinks.forEach(link => {
|
||||
link.classList.remove('active');
|
||||
if (link.getAttribute('href') === `#${current}`) {
|
||||
link.classList.add('active');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 页面加载完成后执行
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
loadProjects(); // 加载项目数据
|
||||
setupSmoothScrolling(); // 设置平滑滚动
|
||||
setupActiveNavigation(); // 设置导航高亮
|
||||
|
||||
console.log('S.A. 作品集页面已加载');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,371 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Mint Runtime - 安全的 Lua 运行时</title>
|
||||
<script src='https://gitee.com/snoware/mint/widget_preview' async defer></script>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
background: linear-gradient(135deg, #00bcd4 0%, #26a69a 100%);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.logo-container {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.logo-container svg {
|
||||
max-width: 200px;
|
||||
height: auto;
|
||||
filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 20px;
|
||||
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.5rem;
|
||||
opacity: 0.95;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.features {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
gap: 30px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.feature-card {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 30px;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.feature-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
.feature-card h3 {
|
||||
color: #0097a7;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.feature-card p {
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.cta-section {
|
||||
text-align: center;
|
||||
margin-top: 60px;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 15px 40px;
|
||||
background: white;
|
||||
color: #0097a7;
|
||||
text-decoration: none;
|
||||
border-radius: 30px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
margin: 10px;
|
||||
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 8px 20px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: #00bcd4;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,0.7);
|
||||
z-index: 1000;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal.show {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 40px;
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
||||
position: relative;
|
||||
animation: modalSlideIn 0.3s ease-out;
|
||||
}
|
||||
|
||||
@keyframes modalSlideIn {
|
||||
from {
|
||||
transform: translateY(-50px);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 20px;
|
||||
font-size: 28px;
|
||||
cursor: pointer;
|
||||
color: #999;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
color: #0097a7;
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
color: #666;
|
||||
line-height: 1.8;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.download-info {
|
||||
background: #f5f5f5;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
border-left: 4px solid #00bcd4;
|
||||
}
|
||||
|
||||
.download-link {
|
||||
color: #00bcd4;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.download-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.password-info {
|
||||
margin-top: 15px;
|
||||
padding: 10px;
|
||||
background: #fff3cd;
|
||||
border-radius: 5px;
|
||||
color: #856404;
|
||||
}
|
||||
|
||||
.gitee-widget-container {
|
||||
margin-bottom: 60px;
|
||||
padding: 30px 20px;
|
||||
text-align: center;
|
||||
background: rgba(46, 47, 41, 0.95);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#osc-gitee-widget-tag {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.osc_pro_color {color: #eae9d7 !important;}
|
||||
.osc_panel_color {background-color: #2e2f29 !important;}
|
||||
.osc_background_color {background-color: #272822 !important;}
|
||||
.osc_border_color {border-color: #484a45 !important;}
|
||||
.osc_desc_color {color: #eae9d7 !important;}
|
||||
.osc_link_color * {color: #747571 !important;}
|
||||
|
||||
footer {
|
||||
text-align: center;
|
||||
padding: 40px 20px;
|
||||
color: white;
|
||||
opacity: 0.8;
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.links {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.links a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
margin: 0 15px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.links a:hover {
|
||||
opacity: 1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<div class="logo-container">
|
||||
<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg">
|
||||
<style>
|
||||
:root {
|
||||
--line-color: #ffffff;
|
||||
--line-width: 0.6;
|
||||
--scale: 10;
|
||||
}
|
||||
</style>
|
||||
<g transform="scale(var(--scale))">
|
||||
<path d="M0,0.1 H10" stroke="var(--line-color)" stroke-width="var(--line-width)" fill="none" />
|
||||
<path d="M0,2 H3" stroke="var(--line-color)" stroke-width="var(--line-width)" fill="none" />
|
||||
<path d="M0,4 H3 L4,2 L6,6 L7,4 H10" stroke="var(--line-color)" stroke-width="var(--line-width)" fill="none" />
|
||||
<path d="M7,6 H10" stroke="var(--line-color)" stroke-width="var(--line-width)" fill="none" />
|
||||
<path d="M0,7.9 H10" stroke="var(--line-color)" stroke-width="var(--line-width)" fill="none" />
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<h1>🍃 Mint Runtime</h1>
|
||||
<p class="subtitle">安全特性驱动的 Lua 运行时环境</p>
|
||||
<p style="font-size: 1.2rem; margin-top: 20px; font-weight: bold; letter-spacing: 3px;">开放 · 平等 · 共享</p>
|
||||
</header>
|
||||
|
||||
<!-- Gitee 仓库预览部件 -->
|
||||
<div class="gitee-widget-container">
|
||||
<div id="osc-gitee-widget-tag"></div>
|
||||
</div>
|
||||
|
||||
<div class="features">
|
||||
<div class="feature-card">
|
||||
<h3>🔒 安全保障</h3>
|
||||
<p>提供强大的安全隔离机制,支持字节码限制、环境修改防护、深度外部调用钩子等多层次安全特性,确保代码执行的安全性。</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-card">
|
||||
<h3>⚡ 高性能</h3>
|
||||
<p>基于 Rust 构建,结合 Lua 5.5 的高性能引擎,通过 LTO 链接时优化和代码生成单元优化,提供卓越的执行效率。</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-card">
|
||||
<h3>🌍 国际化支持</h3>
|
||||
<p>内置 i10n 国际化框架,支持多语言日志和输出翻译,让全球开发者都能轻松使用。</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-card">
|
||||
<h3>📦 易于集成</h3>
|
||||
<p>简洁的 API 设计,完善的文档支持,可快速集成到您的项目中。支持 Cargo 包管理,一键安装使用。</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-card">
|
||||
<h3>🛠️ 灵活配置</h3>
|
||||
<p>支持 RON 配置文件格式,可自定义运行时行为、安全策略、日志级别等参数,满足各种使用场景。</p>
|
||||
</div>
|
||||
|
||||
<div class="feature-card">
|
||||
<h3>📊 动态加载</h3>
|
||||
<p>支持模块动态加载和日志速率限制,提供更细粒度的控制和资源管理能力。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cta-section">
|
||||
<button onclick="openDownloadModal()" class="btn btn-primary">⬇️ 下载软件</button>
|
||||
<a href="https://docs.rs/mintrt" class="btn">📖 查看文档</a>
|
||||
<a href="https://gitee.com/snoware/mint" class="btn">⭐ Gitee 源码</a>
|
||||
</div>
|
||||
|
||||
<!-- 下载对话框 -->
|
||||
<div id="downloadModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<span class="modal-close" onclick="closeDownloadModal()">×</span>
|
||||
<h2 class="modal-title">⬇️ 下载 Mint Runtime</h2>
|
||||
<div class="modal-body">
|
||||
<div class="download-info">
|
||||
<p><strong>下载地址:</strong></p>
|
||||
<p><a href="https://snowcloud.lanzoum.com/b0zkqeipe" target="_blank" class="download-link">https://snowcloud.lanzoum.com/b0zkqeipe</a></p>
|
||||
|
||||
<div class="password-info">
|
||||
<strong>🔐 提取码:</strong><code style="font-size: 1.2em; background: white; padding: 5px 10px; border-radius: 3px; margin-left: 10px;">guc5</code>
|
||||
<p style="margin-top: 8px; font-size: 0.9em;">(部分作品)</p>
|
||||
</div>
|
||||
</div>
|
||||
<p style="margin-top: 20px; color: #666; font-size: 0.9em;">💡 提示:如果链接无法访问,请通过 Gitee 仓库获取最新版本。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>© 2026 Mint Runtime. Licensed under MPL-2.0 OR Commercial</p>
|
||||
<div class="links">
|
||||
<a href="https://docs.rs/mintrt">API 文档</a>
|
||||
<a href="https://gitee.com/snoware/mint/issues">问题反馈</a>
|
||||
<a href="https://gitee.com/snoware/mint">贡献代码</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
function openDownloadModal() {
|
||||
document.getElementById('downloadModal').classList.add('show');
|
||||
}
|
||||
|
||||
function closeDownloadModal() {
|
||||
document.getElementById('downloadModal').classList.remove('show');
|
||||
}
|
||||
|
||||
// 点击模态框外部关闭
|
||||
window.onclick = function(event) {
|
||||
const modal = document.getElementById('downloadModal');
|
||||
if (event.target === modal) {
|
||||
closeDownloadModal();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
[[projects]]
|
||||
name = "MineSentinel"
|
||||
description = "Minecraft 服务器智能守护进程,TCP 端口检测 + 崩溃自动重启 + 防循环冷却期"
|
||||
repo_url = "https://gitee.com/snoware/minesentinel"
|
||||
demo_url = "https://swe-iss.rth1.xyz/softwares/minesentinel"
|
||||
doc_url = "https://gitee.com/snoware/minesentinel/blob/master/DEPLOY.md"
|
||||
tags = ["Ruby", "Minecraft", "Server", "Monitoring", "Daemon", "SNOWARE"]
|
||||
|
||||
[[projects]]
|
||||
name = "btcli"
|
||||
description = "一款在线命令行翻译工具,支持中文及其他语言,配备TUI界面"
|
||||
repo_url = "https://gitee.com/ironbayberry/btcli"
|
||||
demo_url = "https://swe-iss.rth1.xyz/softwares/btcli"
|
||||
doc_url = "https://docs.rs/btcli"
|
||||
tags = ["Rust", "CLI", "Translation", "TUI", "SASWE"]
|
||||
|
||||
[[projects]]
|
||||
name = "Reverberation"
|
||||
description = "Story teller, it's more lightweight than nano and more convenient to use than echo."
|
||||
repo_url = "https://gitee.com/ironbayberry/reverberation"
|
||||
demo_url = "https://swe-iss.rth1.xyz/softwares/reverberation"
|
||||
doc_url = "https://docs.rs/reverberation"
|
||||
tags = ["CLI", "Chinese", "open-source", "SASWE", "Rust"]
|
||||
|
||||
[[projects]]
|
||||
name = "Mint Runtime"
|
||||
description = "Security-featured runtime for Lua with i18n support, bytecode verification, and fine-grained access control."
|
||||
repo_url = "https://gitee.com/snoware/mint"
|
||||
demo_url = "https://swe-iss.rth1.xyz/softwares/mint"
|
||||
doc_url = "https://docs.rs/mintrt"
|
||||
tags = ["CLI", "Chinese", "open-source", "SASWE", "Rust", "Lua", "Runtime", "Security", "i18n"]
|
||||
@@ -0,0 +1,226 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Reverberation - 轻量级文本阅读器</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
||||
color: #333;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #2c3e50;
|
||||
font-size: 2.5em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
font-size: 1.2em;
|
||||
color: #7f8c8d;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
padding: 25px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #3498db;
|
||||
border-bottom: 2px solid #eee;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.usage {
|
||||
background-color: #f8f9fa;
|
||||
border-left: 4px solid #3498db;
|
||||
padding: 15px;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.author {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
color: #7f8c8d;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.license {
|
||||
background-color: #e8f4fd;
|
||||
border-radius: 5px;
|
||||
padding: 15px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 20px 0;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.button {
|
||||
background-color: #3498db;
|
||||
color: white;
|
||||
padding: 12px 16px;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
font-weight: bold;
|
||||
transition: background-color 0.3s;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
.widget-section {
|
||||
text-align: center;
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.osc_pro_color {color: #4183c4 !important;}
|
||||
.osc_panel_color {background-color: #ffffff !important;}
|
||||
.osc_background_color {background-color: #ffffff !important;}
|
||||
.osc_border_color {border-color: #e3e9ed !important;}
|
||||
.osc_desc_color {color: #666666 !important;}
|
||||
.osc_link_color * {color: #9b9b9b !important;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>Reverberation</h1>
|
||||
<div class="tagline">轻量级文本阅读器,比nano更轻便,比echo更实用</div>
|
||||
</header>
|
||||
|
||||
<div class="widget-section">
|
||||
<script src='https://gitee.com/ironbayberry/reverberation/widget_preview' async defer></script>
|
||||
<div id="osc-gitee-widget-tag"></div>
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<a href="https://gitee.com/ironbayberry/reverberation" target="_blank" class="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 22.5c-5.799 0-10.5-4.701-10.5-10.5S6.201 1.5 12 1.5 22.5 6.201 22.5 12 17.799 22.5 12 22.5z"/>
|
||||
<circle cx="7.5" cy="12" r="1.5"/>
|
||||
<circle cx="12" cy="12" r="1.5"/>
|
||||
<circle cx="16.5" cy="12" r="1.5"/>
|
||||
</svg>
|
||||
Gitee
|
||||
</a>
|
||||
<a href="https://crates.io/crates/reverberation" target="_blank" class="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 22.5c-5.799 0-10.5-4.701-10.5-10.5S6.201 1.5 12 1.5 22.5 6.201 22.5 12 17.799 22.5 12 22.5z"/>
|
||||
<path d="M16.5 8.25H7.5c-.828 0-1.5.672-1.5 1.5v4.5c0 .828.672 1.5 1.5 1.5h9c.828 0 1.5-.672 1.5-1.5v-4.5c0-.828-.672-1.5-1.5-1.5zM8.25 12.75h6v1.5h-6v-1.5z"/>
|
||||
</svg>
|
||||
Crates.io
|
||||
</a>
|
||||
<a href="https://docs.rs/reverberation" target="_blank" class="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 22.5c-5.799 0-10.5-4.701-10.5-10.5S6.201 1.5 12 1.5 22.5 6.201 22.5 12 17.799 22.5 12 22.5z"/>
|
||||
<path d="M12 4.5c-4.136 0-7.5 3.364-7.5 7.5s3.364 7.5 7.5 7.5 7.5-3.364 7.5-7.5-3.364-7.5-7.5-7.5zm0 13.5c-3.308 0-6-2.692-6-6s2.692-6 6-6 6 2.692 6 6-2.692 6-6 6z"/>
|
||||
<path d="M12 7.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"/>
|
||||
</svg>
|
||||
Docs.rs
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<div class="card">
|
||||
<h2>项目简介</h2>
|
||||
<p>Reverberation 是一款轻量级的命令行工具,可以逐字显示文本内容,并带有可配置的延迟时间。它设计简洁,易于使用,适合展示文本内容或逐步阅读文本。</p>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>功能特性</h2>
|
||||
<ul>
|
||||
<li>逐字显示文本内容</li>
|
||||
<li>可配置字符显示间隔时间</li>
|
||||
<li>轻量级设计,资源占用少</li>
|
||||
<li>简单易用的命令行界面</li>
|
||||
<li>支持任意文本文件格式</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>使用方法</h2>
|
||||
<p>在命令行中运行以下命令:</p>
|
||||
<div class="usage">
|
||||
reverberation <filename> <delay_ms>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li><strong>filename</strong>: 要逐字显示的文本文件</li>
|
||||
<li><strong>delay_ms</strong>: 每个字符之间的延迟时间(毫秒)</li>
|
||||
</ul>
|
||||
|
||||
<p>获取帮助信息:</p>
|
||||
<div class="usage">
|
||||
reverberation --help
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>构建方法</h2>
|
||||
<p>使用 Cargo 构建发布版本:</p>
|
||||
<div class="usage">
|
||||
cargo build --release
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>安装方法</h2>
|
||||
<p>使用 Cargo 一键安装:</p>
|
||||
<div class="usage">
|
||||
cargo install reverberation
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card license">
|
||||
<h2>许可证</h2>
|
||||
<p>此项目采用 Mozilla Public License Version 2.0 许可证。</p>
|
||||
<p>完整的许可证文本可在项目根目录下的 LICENSE 文件中找到。</p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="author">
|
||||
Designed by S.A. | (C) SNOWARE 2026
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user