[ADDITION] Xmas header

Xmas theme will be applied from 15 December to 15 January

Themes supports xmas modifications too, just put your "xmas.css" file in the same folder as "styles.css" there
This commit is contained in:
veselcraft 2020-12-28 17:39:55 -05:00
parent 84ff656d32
commit 2f76cbf7e2
11 changed files with 19 additions and 1 deletions

View file

@ -147,6 +147,7 @@ abstract class OpenVKPresenter extends SimplePresenter
$this->user->id = $this->user->identity->getId(); $this->user->id = $this->user->identity->getId();
$this->template->thisUser = $this->user->identity; $this->template->thisUser = $this->user->identity;
$this->template->userTainted = $user->isTainted(); $this->template->userTainted = $user->isTainted();
$this->template->isXmas = intval(date('d')) >= 15 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false;
if($this->user->identity->isBanned() && !$this->banTolerant) { if($this->user->identity->isBanned() && !$this->banTolerant) {
header("HTTP/1.1 403 Forbidden"); header("HTTP/1.1 403 Forbidden");

View file

@ -17,12 +17,21 @@
{if $theme->inheritDefault()} {if $theme->inheritDefault()}
{css "css/style.css"} {css "css/style.css"}
{css "css/dialog.css"} {css "css/dialog.css"}
{if $isXmas}
{css "css/xmas.css"}
{/if}
{/if} {/if}
<link rel="stylesheet" href="/themepack/{$theme->getId()}/{$theme->getVersion()}/stylesheet/styles.css" /> <link rel="stylesheet" href="/themepack/{$theme->getId()}/{$theme->getVersion()}/stylesheet/styles.css" />
{if $isXmas}
<link rel="stylesheet" href="/themepack/{$theme->getId()}/{$theme->getVersion()}/stylesheet/xmas.css" />
{/if}
{else} {else}
{css "css/style.css"} {css "css/style.css"}
{css "css/dialog.css"} {css "css/dialog.css"}
{if $isXmas}
{css "css/xmas.css"}
{/if}
{/if} {/if}
{if $thisUser->getStyleAvatar() == 1} {if $thisUser->getStyleAvatar() == 1}
@ -34,6 +43,9 @@
{else} {else}
{css "css/style.css"} {css "css/style.css"}
{css "css/dialog.css"} {css "css/dialog.css"}
{if $isXmas}
{css "css/xmas.css"}
{/if}
{/ifset} {/ifset}
{ifset headIncludes}{include headIncludes}{/ifset} {ifset headIncludes}{include headIncludes}{/ifset}

View file

@ -4,7 +4,7 @@
</div> </div>
<div> <div>
<div class="content_subtitle"> <div class="content_subtitle">
{l18n_number("wall", $count)} {tr("wall", $count)}
<div style="float: right;"> <div style="float: right;">
<a onclick="show_write_textarea()">{_'write'}</a> <a onclick="show_write_textarea()">{_'write'}</a>
</div> </div>

5
Web/static/css/xmas.css Normal file
View file

@ -0,0 +1,5 @@
/* mxas header */
.page_header {
background: url('../img/xheader.png');
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

BIN
Web/static/img/xheader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB