mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-30 21:30:14 +02:00
feat: use bridge description and short name in search (#2952)
* refactor: search.js * feat: use bridge description and short name in search * fix bug in previous merge commit Also reformat string from tabs to spaces
This commit is contained in:
@@ -58,12 +58,19 @@ final class BridgeCard
|
||||
];
|
||||
}
|
||||
|
||||
$shortName = $bridge->getShortName();
|
||||
$card = <<<CARD
|
||||
<section id="bridge-{$bridgeClassName}" data-ref="{$name}">
|
||||
<h2><a href="{$uri}">{$name}</a></h2>
|
||||
<p class="description">{$description}</p>
|
||||
<input type="checkbox" class="showmore-box" id="showmore-{$bridgeClassName}" />
|
||||
<label class="showmore" for="showmore-{$bridgeClassName}">Show more</label>
|
||||
<section
|
||||
class="bridge-card"
|
||||
id="bridge-{$bridgeClassName}"
|
||||
data-ref="{$name}"
|
||||
data-short-name="$shortName"
|
||||
>
|
||||
|
||||
<h2><a href="{$uri}">{$name}</a></h2>
|
||||
<p class="description">{$description}</p>
|
||||
<input type="checkbox" class="showmore-box" id="showmore-{$bridgeClassName}" />
|
||||
<label class="showmore" for="showmore-{$bridgeClassName}">Show more</label>
|
||||
CARD;
|
||||
|
||||
// If we don't have any parameter for the bridge, we print a generic form to load it.
|
||||
@@ -116,9 +123,9 @@ CARD;
|
||||
private static function getFormHeader($bridgeClassName, $isHttps = false, $parameterName = '')
|
||||
{
|
||||
$form = <<<EOD
|
||||
<form method="GET" action="?">
|
||||
<input type="hidden" name="action" value="display" />
|
||||
<input type="hidden" name="bridge" value="{$bridgeClassName}" />
|
||||
<form method="GET" action="?">
|
||||
<input type="hidden" name="action" value="display" />
|
||||
<input type="hidden" name="bridge" value="{$bridgeClassName}" />
|
||||
EOD;
|
||||
|
||||
if (!empty($parameterName)) {
|
||||
|
Reference in New Issue
Block a user