1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-01 06:10:22 +02:00

refactor/fix: css organization and error rendering (#3117)

* fix: php notice

* refactor/feat: merge HtmlFormat.css into style.css

Also improve ux of error rendering.

* fix: center-align footer text
This commit is contained in:
Dag
2022-10-29 10:46:37 +02:00
committed by GitHub
parent 1b45a53402
commit 23f8c81646
15 changed files with 445 additions and 568 deletions

View File

@@ -163,14 +163,15 @@ class DisplayAction implements ActionInterface
// Create "new" error message every 24 hours
$request['_error_time'] = urlencode((int)(time() / 86400));
// todo: I don't think this _error_time in the title is useful. It's confusing.
$itemTitle = sprintf('Bridge returned error %s! (%s)', $e->getCode(), $request['_error_time']);
$item->setTitle($itemTitle);
$item->setURI(get_current_url());
$item->setTimestamp(time());
// todo: consider giving more helpful error messages
$content = render_template(__DIR__ . '/../templates/bridge-error.html.php', [
'message' => create_sane_exception_message($e),
'trace' => trace_from_exception($e),
'error' => render_template(__DIR__ . '/../templates/error.html.php', ['e' => $e]),
'searchUrl' => self::createGithubSearchUrl($bridge),
'issueUrl' => self::createGithubIssueUrl($bridge, $e, create_sane_exception_message($e)),
'maintainer' => $bridge->getMaintainer(),

View File

@@ -35,6 +35,7 @@ final class FrontpageAction implements ActionInterface
</script>
</head>
<body onload="rssbridge_list_search()">
<div class="container">
EOD;
}
@@ -146,6 +147,7 @@ EOD;
{$inactive}
{$admininfo}
</section>
</div>
</body></html>
EOD;
}