1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-07 11:28:21 +03:00

Шаблон Synio

This commit is contained in:
Denis Shakhov 2016-09-02 10:16:20 +07:00
parent 11618a9ff0
commit 8201e54367
22 changed files with 463 additions and 33 deletions

View file

@ -49,15 +49,15 @@
position: absolute;
top: 0;
bottom: 0;
right: 30%;
right: 25%;
background: #f1f3f5;
}
/* Контент */
.layout-content {
float: left;
width: 70%;
padding: 20px;
width: 75%;
padding: 25px;
box-sizing: border-box;
}
@ -73,7 +73,7 @@
/* Сайдбар */
.layout-sidebar {
float: left;
width: 30%;
width: 25%;
padding: 20px;
box-sizing: border-box;
}

View file

@ -0,0 +1,14 @@
/**
* Экшнбар
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
.ls-actionbar {
padding: 10px;
margin-bottom: 20px;
background: #f8fbfe;
border-radius: 5px;
}

View file

@ -16,9 +16,12 @@
/* Дата-заголовок */
.activity-date {
font: 400 18px/1.3em 'Open Sans', sans-serif;
padding: 10px 0;
border-bottom: 1px solid #E7E7E7;
color: #999;
font-size: 16px;
font-family: 'PT Sans', sans-serif;
margin-top: 50px;
padding-bottom: 5px;
border-bottom: 1px solid #eee;
}
.activity-event + .activity-date {
margin-top: 30px;
@ -28,20 +31,48 @@
* Событие
*/
.activity-event {
padding: 15px;
padding: 15px 0;
}
.activity-event + .activity-event {
border-top: 1px solid #f2f2f2;
border-top: 1px solid #e7ebed;
}
.activity-event-info {
margin-top: -3px;
margin-bottom: 5px;
font-size: 11px;
color: #b9c2c2;
}
.activity-event-info a {
color: #275ec2;
font-weight: bold;
text-decoration: underline;
}
.activity-event-info a:hover {
color: #f00;
}
.activity-event-date {
display: block;
color: #999;
margin-bottom: 4px;
color: #818189;
}
.activity-event-text {
padding: 10px 15px;
margin-top: 10px;
color: #777;
background: #fafafa;
font-size: 13px;
position: relative;
padding: 5px 10px 6px;
background: #fefef1;
color: #363636;
margin-top: 13px;
font-size: 11px;
border-radius: 3px;
-webkit-box-shadow: 0 2px 4px #e8e8c0 inset;
box-shadow: 0 2px 4px #e8e8c0 inset;
}
.activity-event-text:after {
display: block;
content: "";
position: absolute;
top: -12px;
left: 15px;
width: 0;
height: 0;
border-width: 6px;
border-color: transparent transparent #e8e8c0 transparent;
border-style: solid;
}

View file

@ -0,0 +1,94 @@
{**
* Событие
*
* @param object $event
*}
{$component = 'activity-event'}
{component_define_params params=[ 'event' ]}
{$type = $event->getEventType()}
{$target = $event->getTarget()}
{$user = $event->getUser()}
{$gender = ( $user->getProfileSex() == 'woman' ) ? 'female' : 'male'}
{**
* Вывод текста
*
* @param $text Текст
*}
{function activity_event_text text=''}
{if trim($text)}
<div class="{$component}-text ls-text">{$text}</div>
{/if}
{/function}
{* Событие *}
{capture 'event_content'}
<div class="{$component}-info">
{* Логин *}
<a href="{$user->getUserWebPath()}" class="{$component}-username">{$user->getDisplayName()}</a> ·
{* Дата *}
<time datetime="{date_format date=$event->getDateAdded() format='c' notz=1}"
data-date="{date_format date=$event->getDateAdded() format='Y-m-d' notz=1}"
class="{$component}-date"
title="{date_format date=$event->getDateAdded()}">
{date_format date=$event->getDateAdded() hours_back="12" minutes_back="60" now="60" day="day H:i" format="j F Y, H:i"}
</time>
</div>
{* Текст события *}
{if $type == 'add_topic'}
{* Добавлен топик *}
{lang "activity.events.{$type}_{$gender}" topic="<a href=\"{$target->getUrl()}\">{$target->getTitle()|escape}</a>"}
{elseif $type == 'add_comment'}
{* Добавлен комментарий *}
{lang "activity.events.{$type}_{$gender}" topic="<a href=\"{$target->getTarget()->getUrl()}#comment{$target->getId()}\">{$target->getTarget()->getTitle()|escape}</a>"}
{activity_event_text text=$target->getText()}
{elseif $type == 'add_blog'}
{* Создан блог *}
{lang "activity.events.{$type}_{$gender}" blog="<a href=\"{$target->getUrlFull()}\">{$target->getTitle()|escape}</a>"}
{elseif $type == 'vote_blog'}
{* Проголосовали за блог *}
{lang "activity.events.{$type}_{$gender}" blog="<a href=\"{$target->getUrlFull()}\">{$target->getTitle()|escape}</a>"}
{elseif $type == 'vote_topic'}
{* Проголосовали за топик *}
{lang "activity.events.{$type}_{$gender}" topic="<a href=\"{$target->getUrl()}\">{$target->getTitle()|escape}</a>"}
{elseif $type == 'vote_comment_topic'}
{* Проголосовали за комментарий *}
{lang "activity.events.{$type}_{$gender}" topic="<a href=\"{$target->getTarget()->getUrl()}#comment{$target->getId()}\">{$target->getTarget()->getTitle()|escape}</a>"}
{elseif $type == 'vote_user'}
{* Проголосовали за пользователя *}
{lang "activity.events.{$type}_{$gender}" user="<a href=\"{$target->getUserWebPath()}\">{$target->getDisplayName()}</a>"}
{elseif $type == 'join_blog'}
{* Вступили в блог *}
{lang "activity.events.{$type}_{$gender}" blog="<a href=\"{$target->getUrlFull()}\">{$target->getTitle()|escape}</a>"}
{elseif $type == 'add_friend'}
{* Добавили в друзья *}
{lang "activity.events.{$type}_{$gender}" user="<a href=\"{$target->getUserWebPath()}\">{$target->getDisplayName()}</a>"}
{elseif $type == 'add_wall'}
{* Написали на стене *}
{if $target->getWallUser()->getId() == $user->getId()}
{lang "activity.events.{$type}_self_{$gender}" url=$target->getUrlWall()}
{else}
{lang "activity.events.{$type}_{$gender}" url=$target->getUrlWall() user=$target->getWallUser()->getDisplayName()}
{/if}
{activity_event_text text=$target->getText()}
{else}
{hook run="activity_event_`$type`" event=$event}
{/if}
{/capture}
{component 'item'
element='li'
classes="{$component} {cmods name=$component mods=$type} js-activity-event"
desc=$smarty.capture.event_content
image=[
'url' => $user->getUserWebPath(),
'path' => $user->getProfileAvatarPath(48),
'alt' => $user->getDisplayName()
]}

View file

@ -77,7 +77,10 @@
.ls-avatar--has-name.ls-avatar--inline {
max-width: none;
}
.ls-avatar--has-name.ls-avatar--inline .ls-avatar-name-link {
text-decoration: underline;
color: #4a4a4a;
}
.ls-avatar--has-name.ls-avatar--inline .ls-avatar-image,
.ls-avatar--has-name.ls-avatar--inline .ls-avatar-image-link,
.ls-avatar--has-name.ls-avatar--inline .ls-avatar-name {

View file

@ -8,12 +8,16 @@
.ls-block {
overflow: hidden;
border-bottom: 1px dotted #dce1e6;
padding-bottom: 25px;
}
.ls-block + .ls-block {
margin-top: 25px;
}
.ls-block:last-child {
margin-bottom: 0;
padding-bottom: 0;
border: none;
}
.ls-block .text-help {
font-size: 11px;

View file

@ -34,6 +34,10 @@
cursor: pointer;
}
/* Actionbar */
.ls-modal .ls-actionbar {
background: #eef6ff;
}
/* Header */
.ls-modal-header {

View file

@ -11,7 +11,7 @@
overflow: hidden;
position: relative;
padding: 12px;
margin-top: 50px;
margin-top: 25px;
text-align: center;
text-decoration: none;
background-color: #B39DDB;

View file

@ -0,0 +1,27 @@
{**
* Блок сортировки
*
* @param array $items
* @param array $text
* @param string $label
* @param boolean $showLabel
*}
{$component = 'ls-sort'}
{component_define_params params=[ 'items', 'text', 'label', 'mods', 'classes', 'attributes' ]}
{foreach $items as $item}
{$items[ $item@key ][ 'attributes' ] = array_merge( $items[ $item@key ][ 'attributes' ]|default:[], [
'data-name' => 'sort_by',
'data-value' => $item[ 'name' ],
'data-order' => $item[ 'order' ]|default:'desc'
])}
{/foreach}
<div class="{$component} {$classes}">
{component 'dropdown'
text = $text|default:'...'
classes = 'js-dropdown-default'
attributes = [ 'data-lsdropdown-selectable' => 'true' ]
menu = $items}
</div>

View file

@ -33,4 +33,13 @@
width: 11px;
height: 11px;
background-image: url(icons/message-new.png);
}
.syn-icon-trash {
width: 24px;
height: 24px;
background-image: url(icons/trash.png);
transition: background .2s;
}
.syn-icon-trash:hover {
background-image: url(icons/trash-hover.png);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,37 @@
/**
* Список пользователей
*/
.user-list-add {
margin-bottom: 15px;
}
.user-list-add:last-child {
margin-bottom: 0;
}
.user-list-add-title {
font-size: 18px;
margin-bottom: 15px;
}
.user-list-add-form {
padding: 15px;
margin-bottom: 5px;
background: #f1f7fd;
background: -webkit-linear-gradient(top, #fbfdff 0%,#f1f7fd 100%);
background: -moz-linear-gradient(top, #fbfdff 0%,#f1f7fd 100%);
background: linear-gradient(top, #fbfdff 0%,#f1f7fd 100%);
border-radius: 5px;
}
.user-list-add-note {
margin-bottom: 20px;
color: #aaa;
font-size: 11px;
line-height: 14px;
}
.user-list-add .ls-blankslate {
margin-bottom: 0;
padding: 10px;
background: #fdfdfd;
color: #555;
border-radius: 5px;
font-size: 11px;
}

View file

@ -0,0 +1,24 @@
{extends 'component@user.user-list-small-item'}
{block 'user_list_small_item_options' append}
{component_define_params params=[ 'showActions', 'showRemove' ]}
{block 'user_list_add_item_options'}{/block}
{/block}
{block 'user_list_small_item_content' append}
{block 'user_list_add_item_content'}
{* Действия *}
{if $showActions}
<ul class="{$component}-actions js-user-list-small-actions">
{block 'user_list_add_item_actions'}
{if $showRemove|default:true}
<li class="js-user-list-add-user-remove" title="{$aLang.common.remove}" data-user-id="{$userId}">
{component 'syn-icon' icon='trash'}
</li>
{/if}
{/block}
</ul>
{/if}
{/block}
{/block}

View file

@ -0,0 +1,5 @@
{
"styles": {
"user-list": "css/user-list.css"
}
}

View file

@ -1,11 +1,20 @@
/**
* Фото пользователя
*/
.ls-block--user-photo {
border: none;
padding-bottom: 0;
}
.ls-block--user-photo .ls-block-content {
padding: 0;
position: relative;
}
/* Статистика */
.user-stat .ls-info-list-item-label {
width: 170px;
}
/* Статус (онлайн/оффлайн) */
.user-status {
position: absolute;
@ -90,7 +99,6 @@
}
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item a {
color: #275ec2;
text-decoration: underline;
}
.ls-nav.ls-nav--stacked.user-nav > .ls-nav-item a:hover {
color: #f00;

View file

@ -1,14 +1,38 @@
/**
* Список пользователей
*/
.user-list-small { margin-bottom: 15px; max-height: 440px; overflow: auto; }
.user-list-small:last-child { margin-bottom: 0; }
.user-list-small-item { background: #fafafa; padding: 10px 55px 10px 10px; margin-bottom: 1px; position: relative; }
.user-list-small-item:last-child { margin-bottom: 0; }
.user-list-small-item input { vertical-align: middle; }
.user-list-small-item.selected { background: #ffc; }
.user-list-small-item-actions { position: absolute; top: 50%; right: 13px; margin-top: -8px; }
.user-list-small-item-actions li { display: inline-block; cursor: pointer; opacity: .7; }
.user-list-small-item-actions li:hover { opacity: 1; }
.user-list-small {
margin-bottom: 15px;
max-height: 440px;
overflow: auto;
}
.user-list-small:last-child {
margin-bottom: 0;
}
.user-list-small-item {
background: #f8fbfe;
padding: 10px 55px 10px 10px;
margin-bottom: 1px;
position: relative;
}
.user-list-small-item:last-child {
margin-bottom: 0;
}
.user-list-small-item input {
vertical-align: middle;
}
.user-list-small-item.selected {
background: #fcfce9;
}
.user-list-small-item-actions {
position: absolute;
top: 50%;
right: 10px;
margin-top: -12px;
}
.user-list-small-item-actions li {
display: inline-block;
cursor: pointer;
}
.user-list-small-item-actions li:hover {
}

View file

@ -0,0 +1,51 @@
.user-list.ls-item-group {
border: none;
}
.user-list .ls-item {
padding: 13px 15px 13px 0;
border: none;
border-top: 1px solid #f1f3f5;
}
.user-list .ls-item:hover {
background: #f5fdff;
}
.user-list-item-username {
margin-bottom: 0;
}
.user-list-item-login {
font-size: 12px;
text-decoration: underline;
}
.user-list-item-name {
font-size: 11px;
}
.user-list-item-status {
color: #aaa;
font-size: 11px;
}
.user-list-item-status--online {
color: #8961e4;
}
.user-list-item-note {
background: #fcfce9;
padding: 5px 10px;
font-size: 11px;
margin-top: 10px;
border-radius: 3px;
}
.user-list-item-rating {
position: absolute;
top: 15px;
right: 15px;
font-size: 11px;
color: #5396b7;
}
.user-list-item-rating .syn-icon {
vertical-align: middle;
position: relative;
top: -1px;
}

View file

@ -0,0 +1,63 @@
{$component = 'user-list-item'}
{component_define_params params=[ 'user' ]}
{if $user->getUser()}
{$user = $user->getUser()}
{/if}
{* Описание *}
{capture 'content'}
{$session = $user->getSession()}
{$usernote = $user->getUserNote()}
{$isOnline = $user->isOnline()}
{* Рейтинг *}
<div class="{$component}-rating" title="{lang 'vote.rating'}">
{component 'syn-icon' icon='rating'} {$user->getRating()}
</div>
<div class="{$component}-username">
{* Логин *}
<div class="{$component}-login">
<a href="{$user->getUserWebPath()}">
{$user->getLogin()}
</a>
</div>
{* Имя *}
{if $user->getProfileName()}
<div class="{$component}-name">
{$user->getProfileName()|escape}
</div>
{/if}
</div>
{* Статус *}
<div class="{$component}-status {if $isOnline}{$component}-status--online{/if}">
{if $isOnline && $smarty.now - strtotime($session->getDateLast()) < 60*5}
{$aLang.user.status.online}
{else}
{$date = {date_format date=$session->getDateLast() hours_back="12" minutes_back="60" day_back="8" now="60*5" day="day H:i" format="j F в G:i"}|lower}
{if $user->getProfileSex() != 'woman'}
{lang 'user.status.was_online_male' date=$date}
{else}
{lang 'user.status.was_online_female' date=$date}
{/if}
{/if}
</div>
{* Заметка *}
{if $usernote}
<div class="{$component}-note">{$usernote->getText()}</div>
{/if}
{/capture}
{component 'item'
content=$smarty.capture.content
image=[
'url' => $user->getUserWebPath(),
'path' => $user->getProfileAvatarPath(64),
'alt' => $user->getLogin()
]}

View file

@ -0,0 +1,27 @@
{**
* Список пользователей
*
* @param array $users
* @param array $pagination
* @param boolean $useMore
* @param boolean $hideMore
* @param string $textEmpty
*}
{component_define_params params=[ 'users', 'pagination', 'users', 'useMore', 'hideMore', 'textEmpty' ]}
{if $users}
{* Список пользователей *}
{component 'item.group' classes='user-list js-more-users-container' items={component 'user' template='list-loop' users=$users}}
{* Кнопка подгрузки *}
{if $useMore}
{if ! $hideMore}
{component 'more' classes='js-more-search' target='.js-more-users-container' ajaxParams=[ 'next_page' => 2 ]}
{/if}
{else}
{component 'pagination' total=+$pagination.iCountPage current=+$pagination.iCurrentPage url="{$pagination.sBaseUrl}/page__page__/"}
{/if}
{else}
{component 'blankslate' text=$textEmpty|default:{lang name='user.notices.empty'}}
{/if}

View file

@ -12,10 +12,10 @@ $config['view']['grid']['type'] = 'fluid';
// Настройки резины
$config['view']['grid']['fluid_min_width'] = '320px';
$config['view']['grid']['fluid_max_width'] = '1200px';
$config['view']['grid']['fluid_max_width'] = '1100px';
// Настройки фиксированная ширина
$config['view']['grid']['fixed_width'] = '1000px';
$config['view']['grid']['fixed_width'] = '1100px';
// Показывать баннер с лого и описанием или нет
$config['view']['layout_show_banner'] = true;

View file

@ -11,5 +11,10 @@ return [
'block_recent' => [
'all' => 'Вся активность'
]
],
'user' => [
'search' => [
'title' => 'Поиск'
]
]
];