Made Twitter and Chat link targets in the header configurable.

This commit is contained in:
flash 2023-01-31 16:21:19 +00:00
parent af6d4aff3a
commit 18c836a457
2 changed files with 5 additions and 2 deletions

View file

@ -153,6 +153,7 @@ Template::set('globals', [
'site_description' => $cfg->getValue('site.desc', IConfig::T_STR), 'site_description' => $cfg->getValue('site.desc', IConfig::T_STR),
'site_url' => $cfg->getValue('site.url', IConfig::T_STR), 'site_url' => $cfg->getValue('site.url', IConfig::T_STR),
'site_twitter' => $cfg->getValue('social.twitter', IConfig::T_STR), 'site_twitter' => $cfg->getValue('social.twitter', IConfig::T_STR),
'site_chat' => $cfg->getValue('sockChat.chatPath.normal', IConfig::T_STR),
]); ]);
Template::addPath(MSZ_TEMPLATES); Template::addPath(MSZ_TEMPLATES);

View file

@ -50,7 +50,8 @@
}, },
{ {
'title': 'Twitter', 'title': 'Twitter',
'url': 'https://twitter.com/flashiinet', 'url': 'https://twitter.com/' ~ globals.site_twitter|default(''),
'display': globals.site_twitter is defined and globals.site_twitter is not empty,
}, },
], ],
}, },
@ -71,7 +72,8 @@
}, },
{ {
'title': 'Chat', 'title': 'Chat',
'url': 'https://chat.flashii.net', 'url': globals.site_chat|default(''),
'display': globals.site_chat is defined and globals.site_chat is not empty,
}, },
] %} ] %}