add index page with instructions to be displayed on mirrors

* This has a very rudimentary language selector for the Chinese version. I
  think this can be improved using only CSS.  One idea is to use the :lang
  selector and then URLs with the language code in the fragemnt, e.g. `#zh`
  or `#de`.  Then there could be a row of languages, each clickable to a
  link that adds the language to the fragment.

* Removing `/repo` means that this will no longer ignore a symlink or file
  called `repo` in the root of this project.  I couldn't find a way to keep
  that and still have functional exceptions for the index files.
This commit is contained in:
Hans-Christoph Steiner 2024-10-18 10:31:38 +02:00
parent a8786d4610
commit b1748053d4
4 changed files with 240 additions and 2 deletions

8
.gitignore vendored
View File

@ -1,7 +1,6 @@
/config.yml
/unsigned/
/repo/
/repo
/repo/*
/archive/
/binary_transparency/
/logs/
@ -25,3 +24,8 @@
# used in fdroidserver's ./jenkins-test
keystore.jks
keystore.p12
# the instructions page to be displayed on mirrors
!/repo/index.css
!/repo/index.html
!/repo/index.png

View File

@ -15,6 +15,9 @@ fdroid-icon.png
.gitignore
.gitlab-ci.yml
.gitlab/
repo/index.css
repo/index.html
repo/index.png
[Merge Request Required] @fdroid

143
repo/index.css Normal file

File diff suppressed because one or more lines are too long

88
repo/index.html Normal file
View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="canonical" href='https://f-droid.org/repo/'/>
<title>mirror of f-droid.org</title>
</head>
<body>
<div id="site-wrapper" class="container">
<div class="row">
<div class="col-12" lang="en">
<h1 class="main-heading">mirror of f-droid.org</h1>
<p>This is a mirror of the <tt>f-droid.org</tt> collection of free software. You can add it to your F-Droid client by clicking on: <a href="?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB">this link</a></p>
<p>If you do not already have the F-Droid client app for Android, you can download it directly from <a href="https://f-droid.org">https://f-droid.org</a>.</p>
<details>
<summary><i>Click here if https://f-droid.org is not working</i></summary>
<p>https://f-droid.org is the official download location for first time installers, and should always be the first one you try. If you are not able to reach that website, then there are other options. You will need to be very careful that you are using a source that you already trust. Bad actors could try to lead you to other sources with fake and potentially malicious versions of the F-Droid client.</p>
<details>
<summary><i>Yes, I really need alternate sources to download from.</i></summary>
<ul>
<li><a href="https://gitlab.com/fdroid/fdroidclient/-/releases/">https://gitlab.com/fdroid/fdroidclient/-/releases/</a></li>
<li><a href="https://github.com/f-droid/fdroidclient/releases/">https://github.com/f-droid/fdroidclient/releases/</a></li>
<li><a href="https://cloudflare.f-droid.org/">https://cloudflare.f-droid.org/</a></li>
</ul>
<details>
<summary><i>Still no luck, any other sources?</i></summary>
<p>You can download the latest version directly from this mirror:
<a href="../archive/org.fdroid.fdroid_1019052.apk">org.fdroid.fdroid_1019052.apk</a>
</p>
<p>If you know how to verify a PGP signature, you can download it from here:
<a href="../archive/org.fdroid.fdroid_1019052.apk">org.fdroid.fdroid_1019052.apk.asc</a>
</p>
</details>
</details>
</details>
</div>
<hr>
<details class="col-12" lang="zh">
<summary>点击此处查看中文</summary>
<h1 class="main-heading">f-droid.org 的镜像</h1>
<p>这是 <tt>f-droid.org</tt> 免费软件集合的镜像。您可以点击<a href="?fingerprint=43238D512C1E5EB2D6569F4A3AFBF5523418B82E0A3ED1552770ABB9A9C9CCAB">此链接</a>将其添加到您的 F-Droid 客户端。</p>
如果你尚未安装 F-Droid 客户端,你可以直接从 <a href="https://f-droid.org">https://f-droid.org</a> 下载。
<details>
<summary>我无法访问 <tt>f-droid.org</tt></summary>
<p>对于首次安装的用户,<tt>f-droid.org</tt> 是官方下载地址,也应当始终是你的首选。如果你无法访问此网站,那么下方有其他选项。你将需要格外谨慎,确保使用你信任的来源。恶意行为者可能会将你带到有伪造及潜在恶意的 F-Droid 客户端。</p>
<details>
<summary>是的,我真的需要从其他来源下载。</summary>
<p>这些替代来源由 F-Droid 团队提供,请验证它们正确:</p>
<ul>
<li><a href="https://cloudflare.f-droid.org/">https://cloudflare.f-droid.org/</a></li>
<li><a href="https://gitlab.com/fdroid/fdroidclient/-/releases/">https://gitlab.com/fdroid/fdroidclient/-/releases/</a></li>
<li><a href="https://github.com/f-droid/fdroidclient/releases/">https://github.com/f-droid/fdroidclient/releases/</a></li>
</ul>
<details>
<summary>还是不走运,还有其他来源吗?</summary>
<p>
你可以直接从此镜像下载最新版本:
<a href="../archive/org.fdroid.fdroid_1019052.apk">org.fdroid.fdroid_1019052.apk</a>
</p>
<p>
如果你知道怎样验证 PGP 签名,你可以从这里下载它:
<a href="../archive/org.fdroid.fdroid_1019052.apk.asc">org.fdroid.fdroid_1019052.apk.asc</a>
</p>
</details>
</details>
</details>
</div>
</div>
<footer id="site-footer" class="container">
<div class="row">
<div class="col-12">
<i>&copy; 2020-2024 F-Droid Contributors</i>
</div>
</div>
</footer>
</body>
</html>