mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 16:46:30 +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:
@@ -1,6 +1,4 @@
|
||||
<section>
|
||||
<h1>
|
||||
Please authenticate in order to access this instance
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<h1>
|
||||
Please authenticate in order to access this instance
|
||||
</h1>
|
||||
|
@@ -8,11 +8,15 @@
|
||||
<link href="static/style.css" rel="stylesheet">
|
||||
<link rel="icon" type="image/png" href="static/favicon.png">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="logo"></div>
|
||||
</header>
|
||||
|
||||
<?= raw($page) ?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<div class="logo"></div>
|
||||
</header>
|
||||
|
||||
<?= raw($page) ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@@ -1,38 +1,14 @@
|
||||
<section>
|
||||
<p class="exception-message">
|
||||
<?= e($message) ?>
|
||||
</p>
|
||||
|
||||
<?php foreach ($trace as $i => $frame) : ?>
|
||||
#<?= $i ?> <?= e(frame_to_call_point($frame)) ?>
|
||||
<br>
|
||||
<?php endforeach; ?>
|
||||
<?= raw($error) ?>
|
||||
|
||||
<br>
|
||||
<a href="<?= raw($searchUrl) ?>" title="Opens GitHub to search for similar issues">
|
||||
<button>Find similar bugs</button>
|
||||
</a>
|
||||
|
||||
<p>
|
||||
Query string: <?= e(urldecode($_SERVER['QUERY_STRING']) ?? '') ?>
|
||||
</p>
|
||||
<p>
|
||||
Version: <?= raw(Configuration::getVersion()) ?>
|
||||
</p>
|
||||
<p>
|
||||
OS: <?= raw(PHP_OS_FAMILY) ?>
|
||||
</p>
|
||||
<p>
|
||||
PHP version: <?= raw(PHP_VERSION ?: 'Unknown') ?>
|
||||
</p>
|
||||
|
||||
<a href="<?= raw($searchUrl) ?>" title="Opens GitHub to search for similar issues">
|
||||
<button>Find similar bugs</button>
|
||||
</a>
|
||||
|
||||
<a href="<?= raw($issueUrl) ?>" title="After clicking this button you can review the issue before submitting it">
|
||||
<button>Create GitHub Issue</button>
|
||||
</a>
|
||||
|
||||
<p class="maintainer">
|
||||
<?= e($maintainer) ?>
|
||||
</p>
|
||||
</section>
|
||||
<a href="<?= raw($issueUrl) ?>" title="After clicking this button you can review the issue before submitting it">
|
||||
<button>Create GitHub Issue</button>
|
||||
</a>
|
||||
|
||||
<p class="maintainer">
|
||||
<?= e($maintainer) ?>
|
||||
</p>
|
@@ -1,14 +1,36 @@
|
||||
<div style="width: 60%; margin: 30px auto">
|
||||
<div class="error">
|
||||
|
||||
<h1>Something went wrong</h1>
|
||||
<h1>Application Error</h1>
|
||||
|
||||
<p>
|
||||
<?= e($message) ?>
|
||||
</p>
|
||||
<p>The application could not run because of the following error:</p>
|
||||
|
||||
<h2>Stacktrace</h2>
|
||||
<h2>Details</h2>
|
||||
|
||||
<?php foreach ($trace as $i => $frame) : ?>
|
||||
<div style="margin-bottom: 15px">
|
||||
<div>
|
||||
<strong>Type:</strong> <?= e(get_class($e)) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Code:</strong> <?= e($e->getCode()) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Message:</strong> <?= e($e->getMessage()) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>File:</strong> <?= e(trim_path_prefix($e->getFile())) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Line:</strong> <?= e($e->getLine()) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Trace</h2>
|
||||
|
||||
<?php foreach (trace_from_exception($e) as $i => $frame) : ?>
|
||||
<code>
|
||||
#<?= $i ?> <?= e(frame_to_call_point($frame)) ?>
|
||||
</code>
|
||||
@@ -19,17 +41,24 @@
|
||||
|
||||
<h2>Context</h2>
|
||||
|
||||
<p>
|
||||
Query string: <?= e(urldecode($_SERVER['QUERY_STRING'] ?? '')) ?>
|
||||
</p>
|
||||
<p>
|
||||
Version: <?= raw(Configuration::getVersion()) ?>
|
||||
</p>
|
||||
<p>
|
||||
OS: <?= raw(PHP_OS_FAMILY) ?>
|
||||
</p>
|
||||
<p>
|
||||
PHP version: <?= raw(PHP_VERSION ?: 'Unknown') ?>
|
||||
</p>
|
||||
<div>
|
||||
<strong>Query:</strong> <?= e(urldecode($_SERVER['QUERY_STRING'] ?? '')) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>Version:</strong> <?= raw(Configuration::getVersion()) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>OS:</strong> <?= raw(PHP_OS_FAMILY) ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<strong>PHP:</strong> <?= raw(PHP_VERSION ?: 'Unknown') ?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<a href="/">Go back</a>
|
||||
</div>
|
||||
|
||||
|
@@ -1,10 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="<?= $charset ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/ >
|
||||
<meta name="description" content="RSS-Bridge" />
|
||||
<title><?= e($title) ?></title>
|
||||
<link href="static/HtmlFormat.css" rel="stylesheet">
|
||||
<link href="static/style.css" rel="stylesheet">
|
||||
<link rel="icon" type="image/png" href="static/favicon.png">
|
||||
|
||||
<?php foreach ($linkTags as $link): ?>
|
||||
@@ -18,73 +19,74 @@
|
||||
|
||||
<meta name="robots" content="noindex, follow">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 class="pagetitle">
|
||||
<a href="<?= e($uri) ?>" target="_blank">
|
||||
<?= e($title) ?>
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<div class="buttons">
|
||||
<a href="./#bridge-<?= $_GET['bridge'] ?>">
|
||||
<button class="backbutton">← back to rss-bridge</button>
|
||||
</a>
|
||||
<div class="container">
|
||||
<h1 class="pagetitle">
|
||||
<a href="<?= e($uri) ?>" target="_blank"><?= e($title) ?></a>
|
||||
</h1>
|
||||
|
||||
<?php foreach ($buttons as $button): ?>
|
||||
<a href="<?= $button['href'] ?>">
|
||||
<button class="rss-feed"><?= $button['value'] ?></button>
|
||||
<div class="buttons">
|
||||
<a href="./#bridge-<?= $_GET['bridge'] ?>">
|
||||
<button class="backbutton">← back to rss-bridge</button>
|
||||
</a>
|
||||
|
||||
<?php foreach ($buttons as $button): ?>
|
||||
<a href="<?= $button['href'] ?>">
|
||||
<button class="rss-feed"><?= $button['value'] ?></button>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?php foreach ($items as $item): ?>
|
||||
<section class="feeditem">
|
||||
<h2>
|
||||
<a
|
||||
class="itemtitle"
|
||||
href="<?= e($item['url']) ?>"
|
||||
><?= strip_tags($item['title']) ?></a>
|
||||
</h2>
|
||||
|
||||
<?php if ($item['timestamp']): ?>
|
||||
<time datetime="<?= date('Y-m-d H:i:s', $item['timestamp']) ?>">
|
||||
<?= date('Y-m-d H:i:s', $item['timestamp']) ?>
|
||||
</time>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($item['author']): ?>
|
||||
<br/>
|
||||
<p class="author">by: <?= e($item['author']) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="content">
|
||||
<?= sanitize_html($item['content']) ?>
|
||||
</div>
|
||||
|
||||
<?php if ($item['enclosures']): ?>
|
||||
<div class="attachments">
|
||||
<p>Attachments:</p>
|
||||
<?php foreach ($item['enclosures'] as $enclosure): ?>
|
||||
<li class="enclosure">
|
||||
<a href="<?= e($enclosure) ?>" rel="noopener noreferrer nofollow">
|
||||
<?= e(substr($enclosure, strrpos($enclosure, '/') + 1)) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($item['categories']): ?>
|
||||
<div class="categories">
|
||||
<p>Categories:</p>
|
||||
<?php foreach ($item['categories'] as $category): ?>
|
||||
<li class="category"><?= e($category) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php foreach ($items as $item): ?>
|
||||
<section class="feeditem">
|
||||
<h2>
|
||||
<a
|
||||
class="itemtitle"
|
||||
href="<?= e($item['url']) ?>"
|
||||
><?= strip_tags($item['title']) ?></a>
|
||||
</h2>
|
||||
|
||||
<?php if ($item['timestamp']): ?>
|
||||
<time datetime="<?= date('Y-m-d H:i:s', $item['timestamp']) ?>">
|
||||
<?= date('Y-m-d H:i:s', $item['timestamp']) ?>
|
||||
</time>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($item['author']): ?>
|
||||
<br/>
|
||||
<p class="author">by: <?= e($item['author']) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="content">
|
||||
<?= sanitize_html($item['content']) ?>
|
||||
</div>
|
||||
|
||||
<?php if ($item['enclosures']): ?>
|
||||
<div class="attachments">
|
||||
<p>Attachments:</p>
|
||||
<?php foreach ($item['enclosures'] as $enclosure): ?>
|
||||
<li class="enclosure">
|
||||
<a href="<?= e($enclosure) ?>" rel="noopener noreferrer nofollow">
|
||||
<?= e(substr($enclosure, strrpos($enclosure, '/') + 1)) ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($item['categories']): ?>
|
||||
<div class="categories">
|
||||
<p>Categories:</p>
|
||||
<?php foreach ($item['categories'] as $category): ?>
|
||||
<li class="category"><?= e($category) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user