From 14cd5e9c0d2d1724158e24dc4411f69776a610fa Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 7 Aug 2025 23:19:32 +0200 Subject: [PATCH] refactor(template): reduce the amount of code in common templates There is no need to have templates used only used in a single file be part of every single other ones. This should reduce a bit the resident memory consumption of miniflux. --- .../common/enclosure_media_controls.html | 18 --------- .../templates/common/entry_pagination.html | 19 --------- internal/template/templates/views/entry.html | 39 +++++++++++++++++++ 3 files changed, 39 insertions(+), 37 deletions(-) delete mode 100644 internal/template/templates/common/enclosure_media_controls.html delete mode 100644 internal/template/templates/common/entry_pagination.html diff --git a/internal/template/templates/common/enclosure_media_controls.html b/internal/template/templates/common/enclosure_media_controls.html deleted file mode 100644 index 3f8c1cb2..00000000 --- a/internal/template/templates/common/enclosure_media_controls.html +++ /dev/null @@ -1,18 +0,0 @@ -{{ define "enclosure_media_controls" }} -
-
-
{{ t "enclosure_media_controls.seek" }}
- - - - -
-
- -
{{ t "enclosure_media_controls.speed" }} (1.00x)
- - - -
-
-{{ end }} diff --git a/internal/template/templates/common/entry_pagination.html b/internal/template/templates/common/entry_pagination.html deleted file mode 100644 index ab63c7cc..00000000 --- a/internal/template/templates/common/entry_pagination.html +++ /dev/null @@ -1,19 +0,0 @@ -{{ define "entry_pagination" }} - -{{ end }} diff --git a/internal/template/templates/views/entry.html b/internal/template/templates/views/entry.html index e5ef1967..a1d59296 100644 --- a/internal/template/templates/views/entry.html +++ b/internal/template/templates/views/entry.html @@ -1,5 +1,44 @@ {{ define "title"}}{{ .entry.Title }}{{ end }} +{{ define "entry_pagination" }} + +{{ end }} + +{{ define "enclosure_media_controls" }} +
+
+
{{ t "enclosure_media_controls.seek" }}
+ + + + +
+
+ +
{{ t "enclosure_media_controls.speed" }} (1.00x)
+ + + +
+
+{{ end }} + {{ define "page_header"}}