From eb9cabb75d2669a483eaa3b781db186233aaa9fd Mon Sep 17 00:00:00 2001
From: quiniapiezoelectricity
<73748843+quiniapiezoelectricity@users.noreply.github.com>
Date: Mon, 12 May 2025 21:36:55 +0800
Subject: [PATCH] fix(route/theinitium): fix footer (#19086)
---
lib/routes/theinitium/app.ts | 5 +++--
lib/routes/theinitium/templates/description.art | 3 ---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts
index 6a4c7a68f6..74c3c2f45b 100644
--- a/lib/routes/theinitium/app.ts
+++ b/lib/routes/theinitium/app.ts
@@ -101,6 +101,7 @@ async function fetchAppPage(url: URL) {
});
const article = $('.pp-article__body');
article.find('.block-related-articles').remove();
+ article.find('.copyright').wrapInner('').wrapInner('');
article.find('figure.wp-block-pullquote').children().unwrap();
article.find('div.block-explanation-note').wrapInner('
');
article.find('div.wp-block-tcc-author-note').wrapInner('').after('
');
@@ -110,7 +111,6 @@ async function fetchAppPage(url: URL) {
coverImage: $('.pp-media__image').attr('src'),
coverCaption: $('.pp-media__caption').html(),
article: article.html(),
- copyright: $('.copyright').html(),
});
}
@@ -119,6 +119,8 @@ async function fetchWebPage(url: URL) {
const $ = load(response.data);
const article = $('.entry-content');
article.find('.block-related-articles').remove();
+ article.find('.cta-subscription').remove();
+ article.find('.entry-copyright').wrapInner('').wrapInner('');
article.find('figure.wp-block-pullquote').children().unwrap();
article.find('div.block-explanation-note').wrapInner('');
article.find('div.wp-block-tcc-author-note').wrapInner('').after('
');
@@ -128,7 +130,6 @@ async function fetchWebPage(url: URL) {
coverImage: $('.wp-post-image').attr('src'),
coverCaption: $('.image-caption').html(),
article: article.html(),
- copyright: $('.entry-copyright').html(),
});
}
diff --git a/lib/routes/theinitium/templates/description.art b/lib/routes/theinitium/templates/description.art
index 6a7a902eac..a2e8b345c4 100644
--- a/lib/routes/theinitium/templates/description.art
+++ b/lib/routes/theinitium/templates/description.art
@@ -11,7 +11,4 @@
{{ /if }}
{{ if article }}
{{@ article }}
-{{ /if }}
-{{ if copyright }}
- {{@ copyright }}
{{ /if }}
\ No newline at end of file