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

feat: system alert message (#3139)

This commit is contained in:
Dag 2022-11-15 00:32:04 +01:00 committed by GitHub
parent 95c199c2eb
commit 001427243c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 14 deletions

View File

@ -12,6 +12,9 @@
; timezone = "UTC" (default)
timezone = "UTC"
; Display a system message to users.
message = ""
[http]
timeout = 60
useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0"

View File

@ -17,6 +17,7 @@ function render(string $template, array $context = []): string
if ($template === 'base.html.php') {
throw new \Exception('Do not render base.html.php into itself');
}
$context['system_message'] = Configuration::getConfig('system', 'message');
$context['page'] = render_template($template, $context);
return render_template('base.html.php', $context);
}

View File

@ -69,13 +69,7 @@ header {
margin-top: 40px;
padding: 15px;
color: #1182DB;
}
header > div.logo {
background-image: url(logo_600px.png);
width: 599px;
height: 177px;
margin: auto;
text-align: center;
}
section.warning {
@ -349,6 +343,15 @@ button {
width: 200px;
}
.alert {
margin-bottom: 15px;
color: white;
font-weight: bold;
background-color: rgb(33, 150, 243);
padding: 15px;
border-radius: 4px;
}
@media screen and (max-width: 767px) {
.container {
width: 100%;
@ -359,12 +362,6 @@ button {
margin-bottom: 5px;
}
header > div.logo {
background-image: url(logo_300px.png);
width: 300px;
height: 89px;
}
button {
display: inline-block;
width: 40%;

View File

@ -12,9 +12,17 @@
<body>
<div class="container">
<header>
<div class="logo"></div>
<a href="./">
<img width="400" src="static/logo_600px.png">
</a>
</header>
<?php if ($system_message): ?>
<div class="alert">
<?= raw($system_message) ?>
</div>
<?php endif; ?>
<?= raw($page) ?>
</div>
</body>

View File

@ -23,6 +23,13 @@
<body>
<div class="container">
<header>
<a href="./">
<img width="400" src="static/logo_600px.png">
</a>
</header>
<h1 class="pagetitle">
<a href="<?= e($uri) ?>" target="_blank"><?= e($title) ?></a>
</h1>