新增在线演示

home
PJ568 1 year ago
parent 4110462774
commit f01c613d8c

@ -1,98 +1,106 @@
name: HomeBuildCI
on:
push:
branches:
- '**'
- '!gh-pages'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
# Check
- uses: actions/checkout@v4
with:
ref: home
submodules: recursive
- run: |
echo '创建 temp/'
mkdir /home/runner/temp
echo '复制 ./* 到 /home/runner/temp/*'
cp -v -u -r ./* /home/runner/temp/
echo '检查 temp/'
ls /home/runner/temp/
# Run merge home and gh-pages
- uses: actions/checkout@v4
with:
ref: gh-pages
- run: |
echo '如果存在则删除 ./css'
if [ -d "./css/" ];then
rm -r ./css/
else
echo "文件夹不存在。"
fi;
echo '复制 /home/runner/temp/css/ 到 ./css/'
cp -v -u -r /home/runner/temp/css/ ./css/
- run: |
echo '如果存在则删除 ./js'
if [ -d "./js/" ];then
rm -r ./js/
else
echo "文件夹不存在。"
fi;
echo '复制 /home/runner/temp/js/ 到 ./js/'
cp -v -u -r /home/runner/temp/js/ ./js/
- run: |
echo '如果存在则删除 ./footer.html'
if [ ! -f "./footer.html" ];then
echo "文件不存在"
else
rm -d ./footer.html
fi
echo '复制 /home/runner/temp/footer.html 到 ./footer.html'
cp -v -u -r /home/runner/temp/footer.html ./footer.html
- run: |
echo '如果存在则删除 ./index.html'
if [ ! -f "./index.html" ];then
echo "文件不存在"
else
rm -d ./index.html
fi
echo '复制 /home/runner/temp/index.html 到 ./index.html'
cp -v -u -r /home/runner/temp/index.html ./index.html
- run: |
echo '如果存在则删除 ./404.html'
if [ ! -f "./404.html" ];then
echo "文件不存在"
else
rm -d ./404.html
fi
echo '复制 /home/runner/temp/404.html 到 ./404.html'
cp -v -u -r /home/runner/temp/404.html ./404.html
- name: Generate the sitemap
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
base-url-path: https://Calc.pj568.eu.org/
- name: Output sitemap stats
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
# Deploy
- uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: . # The folder the action should deploy.
- name: Ping Google
run: curl https://www.google.com/ping?sitemap=https://Calc.pj568.eu.org/sitemap.xml
name: HomeBuildCI
on:
push:
branches:
- '**'
- '!gh-pages'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pull-requests: write # To create a PR from that branch
steps:
# Check
- uses: actions/checkout@v4
with:
ref: home
submodules: recursive
- run: |
echo '创建 temp/'
mkdir /home/runner/temp
echo '复制 ./* 到 /home/runner/temp/*'
cp -v -u -r ./* /home/runner/temp/
echo '检查 temp/'
ls /home/runner/temp/
# Run merge home and gh-pages
- uses: actions/checkout@v4
with:
ref: gh-pages
- run: |
echo '如果存在则删除 ./css'
if [ -d "./css/" ];then
rm -r ./css/
else
echo "文件夹不存在。"
fi;
echo '复制 /home/runner/temp/css/ 到 ./css/'
cp -v -u -r /home/runner/temp/css/ ./css/
- run: |
echo '如果存在则删除 ./js'
if [ -d "./js/" ];then
rm -r ./js/
else
echo "文件夹不存在。"
fi;
echo '复制 /home/runner/temp/js/ 到 ./js/'
cp -v -u -r /home/runner/temp/js/ ./js/
- run: |
echo '如果存在则删除 ./footer.html'
if [ ! -f "./footer.html" ];then
echo "文件不存在"
else
rm -d ./footer.html
fi
echo '复制 /home/runner/temp/footer.html 到 ./footer.html'
cp -v -u -r /home/runner/temp/footer.html ./footer.html
- run: |
echo '如果存在则删除 ./index.html'
if [ ! -f "./index.html" ];then
echo "文件不存在"
else
rm -d ./index.html
fi
echo '复制 /home/runner/temp/index.html 到 ./index.html'
cp -v -u -r /home/runner/temp/index.html ./index.html
- run: |
echo '如果存在则删除 ./404.html'
if [ ! -f "./404.html" ];then
echo "文件不存在"
else
rm -d ./404.html
fi
echo '复制 /home/runner/temp/404.html 到 ./404.html'
cp -v -u -r /home/runner/temp/404.html ./404.html
- name: 获取发行版
run: |
mkdir ./Web
/usr/bin/wget -nv https://gitee.com/PJ-568/568_Calc/releases/download/v0.0.0.3/Web.zip -O ./Web.zip
unzip -o ./Web.zip -d ./Web
ls ./Web
rm ./Web.zip
- name: Generate the sitemap
id: sitemap
uses: cicirello/generate-sitemap@v1
with:
base-url-path: https://Calc.pj568.eu.org/
- name: Output sitemap stats
run: |
echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}"
echo "url-count = ${{ steps.sitemap.outputs.url-count }}"
echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}"
# Deploy
- uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: . # The folder the action should deploy.
- name: Ping Google
run: curl https://www.google.com/ping?sitemap=https://Calc.pj568.eu.org/sitemap.xml

@ -1,63 +1,66 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name='description' content='568_Calc 是一个简单的多平台支持的计算器。'>
<meta http-equiv='content-language' content='zh-Hans-CN'>
<link rel="stylesheet" href="css/loading.css">
<script src="js/loading.js"></script>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/translate.css">
<script src="//res.zvo.cn/translate/translate.js"></script>
<title class="notTranslate">568_Calc</title>
<link rel="icon" href="assets/favicon.svg">
<link rel="stylesheet" href="css/hack/dist/hack.css">
<link rel="stylesheet" href="css/hack/dist/standard.css">
<script src="js/include.js"></script>
<script src="js/giscus.js"></script>
</head>
<body class="standard">
<div id="loading">
<div id="Calc-loading_bg">
<img alt="正在加载" class="Calc-loader" src="css/loading.svg"/>
</div>
</div>
<div class="main container">
<a href="//github.com/PJ-568/568_Calc" target="_blank" class="github-corner"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#795548; color:#101010; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<a href="/"><p align="center"><img alt="568_Calc" src="assets/favicon.svg" width="40%" style="max-width:256px"/></p></a>
<h1 class="notTranslate">568_Calc</h1>
<p>568_Calc 是一个简单的多平台支持的计算器。</p>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc'" class="btn btn-warning btn-ghost">在 Github 上查看</button>
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc'" class="btn btn-success btn-ghost">在 Gitee 上查看</button>
<!-- <h2>应用程序</h2>
<p>点击可下载对应应用程序。</p>
<div class="btn-group">
<button onclick="window.location.href='//github.com/PJ-568/568_Calc/releases/download/v0.0.0.0/568_Calc_x64.msi'" class="btn btn-success btn-ghost notTranslate">Windows x86_64 .msi</button>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc/releases/download/v0.0.0.0/568_Calc.dmg'" class="btn btn-success btn-ghost notTranslate">MacOS .dmg</button>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc/releases/download/v0.0.0.0/568_Calc_x86_64.AppImage'" class="btn btn-success btn-ghost notTranslate">Linux x86_64 .AppImage</button>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc/releases/download/v0.0.0.0/568_Calc_x86_64.deb'" class="btn btn-success btn-ghost notTranslate">Linux x86_64 .deb</button>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc/releases/download/v0.0.0.0/568_Calc_First_Release.apk'" class="btn btn-success btn-ghost">安卓 .apk</button>
</div> -->
<h2>贡献者</h2>
<p>感谢所有提供贡献的人!</p>
<a href="//github.com/PJ-568/568_Calc/graphs/contributors" target="_blank"><img alt="贡献者的头像图片" src="//contrib.rocks/image?repo=PJ-568/568_Calc" loading="lazy"/></a>
<h2>讨论区</h2>
<p>请留下您的宝贵建议。</p>
<div id="giscus-container"></div>
<br/>
<div class="alert alert-info">项目将持续推进,期待<a onclick="startLoading()" href="//Github.com/PJ-568/568_Calc">您的贡献</a></div>
<br/>
<div class="btn-group">
<button onclick="window.location.href='#'" class="btn btn-success btn-ghost">返回页顶</button>
</div>
<br/>
<include src="footer.html"></include>
</div>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name='description' content='568_Calc 是一个简单的多平台支持的计算器。'>
<meta http-equiv='content-language' content='zh-Hans-CN'>
<link rel="stylesheet" href="css/loading.css">
<script src="js/loading.js"></script>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/translate.css">
<script src="//res.zvo.cn/translate/translate.js"></script>
<title class="notTranslate">568_Calc</title>
<link rel="icon" href="assets/favicon.svg">
<link rel="stylesheet" href="css/hack/dist/hack.css">
<link rel="stylesheet" href="css/hack/dist/standard.css">
<script src="js/include.js"></script>
<script src="js/giscus.js"></script>
</head>
<body class="standard">
<div id="loading">
<div id="Calc-loading_bg">
<img alt="正在加载" class="Calc-loader" src="css/loading.svg"/>
</div>
</div>
<div class="main container">
<a href="//github.com/PJ-568/568_Calc" target="_blank" class="github-corner"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#795548; color:#101010; position: absolute; top: 0; border: 0; right: 0;"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<a href="/"><p align="center"><img alt="568_Calc" src="assets/favicon.svg" width="40%" style="max-width:256px"/></p></a>
<h1 class="notTranslate">568_Calc</h1>
<p>568_Calc 是一个简单的多平台支持的计算器。</p>
<button onclick="window.location.href='//github.com/PJ-568/568_Calc'" class="btn btn-warning btn-ghost">在 Github 上查看</button>
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc'" class="btn btn-success btn-ghost">在 Gitee 上查看</button>
<br/>
<br/>
<iframe src="./Web/index.html" title="体验网页版" class="page" loading="lazy" style="height: 500px"></iframe>
<h2>应用程序</h2>
<p>点击可下载对应应用程序。</p>
<div class="btn-group">
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc/releases/download/v0.0.0.3/Web.zip'" class="btn btn-success btn-ghost notTranslate">网页版</button>
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc/releases/download/v0.0.0.3/Windows.Desktop.x86_64.zip'" class="btn btn-success btn-ghost notTranslate">Windows</button>
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc/releases/download/v0.0.0.3/Android.zip'" class="btn btn-success btn-ghost notTranslate">安卓</button>
<button onclick="window.location.href='//gitee.com/PJ-568/568_Calc/releases/download/v0.0.0.3/LinuxX11.x86_64.zip'" class="btn btn-success btn-ghost notTranslate">Linux x11</button>
</div>
<h2>贡献者</h2>
<p>感谢所有提供贡献的人!</p>
<a href="//gitee.com/PJ-568/568_Calc/graphs/contributors" target="_blank"><img alt="贡献者的头像图片" src="//contrib.rocks/image?repo=PJ-568/568_Calc" loading="lazy"/></a>
<h2>讨论区</h2>
<p>请留下您的宝贵建议。</p>
<div id="giscus-container"></div>
<br/>
<div class="alert alert-info">项目将持续推进,期待<a onclick="startLoading()" href="//Github.com/PJ-568/568_Calc">您的贡献</a></div>
<br/>
<div class="btn-group">
<button onclick="window.location.href='#'" class="btn btn-success btn-ghost">返回页顶</button>
</div>
<br/>
<include src="footer.html"></include>
</div>
</body>
</html>
Loading…
Cancel
Save