From 40b44c0ac93a6e18e6da0a87453c1f812a73162a Mon Sep 17 00:00:00 2001 From: Rudis Muiznieks Date: Wed, 25 Sep 2024 14:24:23 -0500 Subject: [PATCH] added a custom css config for summary content --- configure.phtml | 7 +++++++ extension.php | 5 ++++- i18n/en/ext.php | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.phtml b/configure.phtml index 883bd76..47cd57f 100644 --- a/configure.phtml +++ b/configure.phtml @@ -54,6 +54,13 @@ +
+ +
+ +

+
+
diff --git a/extension.php b/extension.php index 3179e24..f7f98af 100644 --- a/extension.php +++ b/extension.php @@ -20,11 +20,13 @@ class KagiSummarizerExtension extends Minz_Extension { } FreshRSS_Context::$user_conf->kagi_token = $kagi_token; FreshRSS_Context::$user_conf->kagi_language = Minz_Request::param('kagi_language', ''); + FreshRSS_Context::$user_conf->kagi_custom_css = Minz_Request::param('kagi_custom_css', ''); FreshRSS_Context::$user_conf->save(); } } public function addSummarizeButton(FreshRSS_Entry $entry): FreshRSS_Entry { + $custom_css = FreshRSS_Context::$user_conf->kagi_custom_css; $this->registerTranslates(); $url_summary = Minz_Url::display(array( 'c' => 'kagiSummarizer', @@ -46,7 +48,8 @@ class KagiSummarizerExtension extends Minz_Extension { . '' . _t('ext.kagiSummarizer.ui.key_moments_button') . '' . '' - . '
' + . '
' . $entry->content()); return $entry; } diff --git a/i18n/en/ext.php b/i18n/en/ext.php index b701df8..c71cc1f 100644 --- a/i18n/en/ext.php +++ b/i18n/en/ext.php @@ -6,6 +6,8 @@ return array( 'kagi_token' => 'Kagi Token', 'kagi_token_help' => 'Copy and paste the "Session Link" from your Kagi Account settings.', 'kagi_language' => 'Output Language', + 'kagi_custom_css' => 'Custom CSS', + 'kagi_custom_css_help' => 'Applied to the summary container element.', 'lang' => array( 'default' => 'Default', 'bg' => 'Bulgarian',