mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 16:46:30 +02:00
refactor: extract frontpage to template (#3130)
Also introduce usage of Response object
This commit is contained in:
62
templates/frontpage.html.php
Normal file
62
templates/frontpage.html.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<script src="static/rss-bridge.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', rssbridge_toggle_bridge);
|
||||
document.addEventListener('DOMContentLoaded', rssbridge_list_search);
|
||||
</script>
|
||||
|
||||
<?php if (Debug::isEnabled()): ?>
|
||||
<?php if (!Debug::isSecure()): ?>
|
||||
<section class="critical-warning">
|
||||
Warning : Debug mode is active from any location,
|
||||
make sure only you can access RSS-Bridge.
|
||||
</section>
|
||||
<?php else: ?>
|
||||
<section class="warning">
|
||||
Warning : Debug mode is active from your IP address,
|
||||
your requests will bypass the cache.
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<section class="searchbar">
|
||||
<h3>Search</h3>
|
||||
<input
|
||||
type="text"
|
||||
name="searchfield"
|
||||
id="searchfield"
|
||||
placeholder="Insert URL or bridge name"
|
||||
onchange="rssbridge_list_search()"
|
||||
onkeyup="rssbridge_list_search()"
|
||||
value=""
|
||||
>
|
||||
</section>
|
||||
|
||||
<?= raw($bridges) ?>
|
||||
|
||||
<section class="footer">
|
||||
<a href="https://github.com/rss-bridge/rss-bridge">RSS-Bridge ~ Public Domain</a><br>
|
||||
<p class="version"><?= e(Configuration::getVersion()) ?></p>
|
||||
|
||||
<?= $active_bridges ?>/<?= $total_bridges ?> active bridges.<br>
|
||||
|
||||
<?php if ($active_bridges !== $total_bridges): ?>
|
||||
<?php if ($show_inactive): ?>
|
||||
<a href="?show_inactive=0">
|
||||
<button class="small">Hide inactive bridges</button>
|
||||
</a>
|
||||
<br>
|
||||
<?php else: ?>
|
||||
<a href="?show_inactive=1">
|
||||
<button class="small">Show inactive bridges</button>
|
||||
</a>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($admin_email): ?>
|
||||
<span>
|
||||
You may email the administrator of this RSS-Bridge instance at
|
||||
<a href="mailto:<?= e($admin_email) ?>"><?= e($admin_email) ?></a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</section>
|
Reference in New Issue
Block a user