added a custom css config for summary content
This commit is contained in:
parent
093471cda7
commit
40b44c0ac9
|
@ -54,6 +54,13 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="kagi_custom_css"><?php echo _t('ext.kagiSummarizer.configure.kagi_custom_css'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input type="text" name="kagi_custom_css" id="kagi_custom_css" value="<?php echo $kagi_custom_css; ?>">
|
||||
<p><small><?php echo _t('ext.kagiSummarizer.configure.kagi_custom_css_help'); ?></small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-actions">
|
||||
<div class="group-controls">
|
||||
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
|
||||
|
|
|
@ -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 {
|
|||
. '<a class="btn" href="' . $url_key_moments . '">'
|
||||
. _t('ext.kagiSummarizer.ui.key_moments_button') . '</a>'
|
||||
. '<p class="kagi-status hidden alert"></p>'
|
||||
. '<blockquote class="kagi-content hidden"></blockquote></div>'
|
||||
. '<blockquote class="kagi-content hidden" style="' . $custom_css
|
||||
. '"></blockquote></div>'
|
||||
. $entry->content());
|
||||
return $entry;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ return array(
|
|||
'kagi_token' => 'Kagi Token',
|
||||
'kagi_token_help' => 'Copy and paste the "Session Link" from your <a href="https://kagi.com/settings?p=user_details" target="_blank">Kagi Account</a> 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',
|
||||
|
|
Loading…
Reference in New Issue