From 61b608693b6ba7e4e7dc2e7cdab65bdec6d3a9cc Mon Sep 17 00:00:00 2001 From: David Rotermund Date: Mon, 3 Feb 2025 08:41:52 +0000 Subject: [PATCH] Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) If you want to get rid of the Forgejo-specific information on the landing page, the section below the slogan can now be removed by - creating the folder at `CustomPath/templates` (see CustomPath section in https://forgejo.org/docs/latest/admin/config-cheat-sheet/#default-configuration-non-appini-configuration) - creating a file `home_forgejo.tmpl` allows to override the Forgejo-specific section of the homepage with custom HTML. Leaving it empty will get rid of this section. Co-authored-by: fnetX Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6675 Reviewed-by: Otto Co-authored-by: David Rotermund Co-committed-by: David Rotermund --- templates/home.tmpl | 37 +------------------------------------ templates/home_forgejo.tmpl | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 36 deletions(-) create mode 100644 templates/home_forgejo.tmpl diff --git a/templates/home.tmpl b/templates/home.tmpl index a97434457d..168bfbefa6 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -11,41 +11,6 @@ -
-
-

- {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}} -

-

- {{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}} -

-
-
-

- {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}} -

-

- {{ctx.Locale.Tr "startpage.platform_desc"}} -

-
-
-
-
-

- {{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}} -

-

- {{ctx.Locale.Tr "startpage.lightweight_desc"}} -

-
-
-

- {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}} -

-

- {{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}} -

-
-
+ {{template "home_forgejo" .}} {{template "base/footer" .}} diff --git a/templates/home_forgejo.tmpl b/templates/home_forgejo.tmpl new file mode 100644 index 0000000000..d5d18c794b --- /dev/null +++ b/templates/home_forgejo.tmpl @@ -0,0 +1,36 @@ +
+
+

+ {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}} +

+

+ {{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}} +

+
+
+

+ {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}} +

+

+ {{ctx.Locale.Tr "startpage.platform_desc"}} +

+
+
+
+
+

+ {{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}} +

+

+ {{ctx.Locale.Tr "startpage.lightweight_desc"}} +

+
+
+

+ {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}} +

+

+ {{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}} +

+
+