mirror of
https://github.com/daledavies/jump.git
synced 2026-01-09 08:52:11 +01:00
Discussion #78: Add option for custom greeting message
This commit is contained in:
@@ -1 +1 @@
|
||||
v1.3.2 (1681419310)
|
||||
v1.3.2 (1681425251)
|
||||
File diff suppressed because one or more lines are too long
@@ -19,7 +19,9 @@ class HomePage extends AbstractPage {
|
||||
$template = $this->mustache->loadTemplate('header');
|
||||
$greeting = null;
|
||||
if (!$this->config->parse_bool($this->config->get('showgreeting'))) {
|
||||
$greeting = $this->language->get('tags.home');
|
||||
$greeting = '#'.$this->language->get('tags.home');
|
||||
} else if ($this->config->get('customgreeting') !== ''){
|
||||
$greeting = $this->config->get('customgreeting');
|
||||
}
|
||||
$csrfsection = $this->session->getSection('csrf');
|
||||
$unsplashdata = $this->cache->load('unsplash');
|
||||
|
||||
@@ -20,6 +20,7 @@ class TagPage extends AbstractPage {
|
||||
protected function render_header(): string {
|
||||
$template = $this->mustache->loadTemplate('header');
|
||||
$this->tagname = $this->routeparams['tag'];
|
||||
$greeting = '#'.$this->tagname;
|
||||
$title = 'Tag: '.$this->tagname;
|
||||
$csrfsection = $this->session->getSection('csrf');
|
||||
$unsplashdata = $this->cache->load('unsplash');
|
||||
@@ -27,7 +28,7 @@ class TagPage extends AbstractPage {
|
||||
$checkstatus = $this->config->parse_bool($this->config->get('checkstatus', false));
|
||||
$templatecontext = [
|
||||
'csrftoken' => $csrfsection->get('token'),
|
||||
'greeting' => $this->tagname,
|
||||
'greeting' => $greeting,
|
||||
'noindex' => $this->config->parse_bool($this->config->get('noindex')),
|
||||
'title' => $title,
|
||||
'owmapikey' => !!$this->config->get('owmapikey', false),
|
||||
|
||||
@@ -39,8 +39,11 @@ return [
|
||||
'showclock' => getenv('SHOWCLOCK') ?: true,
|
||||
// 12 hour clock format?
|
||||
'ampmclock' => getenv('AMPMCLOCK') ?: false,
|
||||
// Show a friendly greeting message rather than "#home".
|
||||
// Show a friendly greeting message rather than "#home", defaults to a dynamic
|
||||
// greeting based on time of day. E.g Good Morning.
|
||||
'showgreeting' => getenv('SHOWGREETING') ?: true,
|
||||
// Custom greeting string as alternative to built-in friendy greeting.
|
||||
'customgreeting' => getenv('CUSTOMGREETING') ?: '',
|
||||
// Show the search bar, requires /search/searchengines.json etc.
|
||||
'showsearch' => getenv('SHOWSEARCH') ?: true,
|
||||
// Include the robots noindex meta tag in site header.
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<body>
|
||||
<div class="content fixed hidden {{# checkstatus}}status{{/ checkstatus}}">
|
||||
<div class="greeting">
|
||||
{{# greeting}}<span class="tagname"><span>#</span>{{greeting}}</span>{{/ greeting}}
|
||||
{{# greeting}}<span class="tagname"><span></span>{{greeting}}</span>{{/ greeting}}
|
||||
{{^ greeting}}<span class="chosen"></span>{{/ greeting}}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
<script defer src="{{{wwwurl}}}/assets/js/index.fd2874ea51dbd2dad294.min.js"></script>
|
||||
<script defer src="{{{wwwurl}}}/assets/js/index.f2468ba60142a7aa8d24.min.js"></script>
|
||||
Reference in New Issue
Block a user