Global: Instance name in header bar

This commit is contained in:
veselcraft 2021-12-01 16:19:37 +03:00
parent a4c88d3d8a
commit a36fe7b0e8
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E
4 changed files with 23 additions and 4 deletions

View file

@ -1,11 +1,13 @@
{var instance_name = OPENVK_ROOT_CONF['openvk']['appearance']['name']}
<html n:if="!isset($parentModule) || substr($parentModule, 0, 21) === 'libchandler:absolute.'">
<head>
<title>
{ifset title}{include title} - {/ifset}OpenVK
{ifset title}{include title} - {/ifset}{$instance_name}
</title>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/assets/packages/static/openvk/img/icon.ico" />
<meta name="application-name" content="OpenVK" />
<meta name="application-name" content="{$instance_name}" />
<meta n:ifset="$csrfToken" name="csrf" value="{$csrfToken}" />
{script "js/node_modules/jquery/dist/jquery.min.js"}
{script "js/node_modules/umbrellajs/umbrella.min.js"}
@ -81,8 +83,8 @@
<div class="layout">
<div id="xhead" class="dm"></div>
<div class="page_header">
<a href="/" class="home_button" title="OpenVK">openvk</a>
<div class="page_header {if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME}page_custom_header{/if}">
<a href="/" class="home_button {if $instance_name != OPENVK_DEFAULT_INSTANCE_NAME}home_button_custom{/if}" title="{$instance_name}">{$instance_name}</a>
<div n:if="isset($thisUser) ? !$thisUser->isBanned() : true" class="header_navigation">
{ifset $thisUser}
<div class="link">

View file

@ -48,6 +48,10 @@ a {
background: url('../img/header.png');
}
.page_custom_header {
background: url('../img/header_custom.png');
}
#page_act {
border-bottom: 1px solid #d5dde6;
padding: 2px 10px 5px 10px;
@ -63,6 +67,18 @@ a {
height: 42px;
}
.home_button_custom {
width: 175px;
text-indent: 58px;
line-height: 41px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
font-weight: bold;
color: white;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.header_navigation {
text-align: center;
line-height: 20px;

BIN
Web/static/img/header_custom.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

@ -228,6 +228,7 @@ return (function() {
$ver = "Build 15";
define("nullptr", NULL);
define("OPENVK_DEFAULT_INSTANCE_NAME", "OpenVK", false);
define("OPENVK_VERSION", "Altair Preview ($ver)", false);
define("OPENVK_DEFAULT_PER_PAGE", 10, false);
define("__OPENVK_ERROR_CLOCK_IN_FUTURE", "Server clock error: FK1200-DTF", false);