From d0bb53e41ad8babed83944bff602a7aadcdd8e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Thu, 21 Nov 2024 18:06:55 +0100 Subject: [PATCH] =?UTF-8?q?=E2=84=B9=EF=B8=8F=20=20css=20based=20translati?= =?UTF-8?q?on=20on=20mirror=20index=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a CSS only language picker for the mirror index page of the repo. --- repo/index.css | 26 ++++++++++++++++++++++++++ repo/index.html | 21 ++++++++++----------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/repo/index.css b/repo/index.css index a7c0667584..a7e1c785e8 100644 --- a/repo/index.css +++ b/repo/index.css @@ -141,3 +141,29 @@ pre.code code { display: table-cell; font-size: 8; } + +/* css based translations + * + * SPDX-FileCopyrightText: 2020 Michael Pöhn + * SPDX-License-Identifier: MIT + */ + +.translated { + display: none; +} + +#radio-en:checked ~ .lang-en { + display: block !important; +} + +#radio-zh:checked ~ .lang-zh { + display: block !important; +} + +#radio-en:checked ~ .u-en { + text-decoration: underline; +} + +#radio-zh:checked ~ .u-zh { + text-decoration: underline; +} diff --git a/repo/index.html b/repo/index.html index c9d3b96804..606ecde553 100644 --- a/repo/index.html +++ b/repo/index.html @@ -10,13 +10,16 @@
-
+ + + + + + +

mirror of f-droid.org

-

This is a mirror of the f-droid.org collection of free software. You can add it to your F-Droid client by clicking on: this link

-

If you do not already have the F-Droid client app for Android, you can download it directly from https://f-droid.org.

-
Click here if https://f-droid.org is not working

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.

@@ -40,15 +43,10 @@
-
- -
- 点击此处查看中文 +

f-droid.org 的镜像

-

这是 f-droid.org 免费软件集合的镜像。您可以点击此链接将其添加到您的 F-Droid 客户端。

- - 如果你尚未安装 F-Droid 客户端,你可以直接从 https://f-droid.org 下载。 +

如果你尚未安装 F-Droid 客户端,你可以直接从 https://f-droid.org 下载。

我无法访问 f-droid.org

对于首次安装的用户,f-droid.org 是官方下载地址,也应当始终是你的首选。如果你无法访问此网站,那么下方有其他选项。你将需要格外谨慎,确保使用你信任的来源。恶意行为者可能会将你带到有伪造及潜在恶意的 F-Droid 客户端。

@@ -74,6 +72,7 @@
+