mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
Оптимизация облака тегов
This commit is contained in:
parent
b6fc97152d
commit
2faec74eef
|
@ -102,24 +102,6 @@
|
|||
.user-list-avatar li img { margin-bottom: 2px; display: block; }
|
||||
|
||||
|
||||
/**
|
||||
* Облако тегов
|
||||
*/
|
||||
.tag-cloud { width: 100%; }
|
||||
.tag-cloud li { display: inline; margin-right: 5px; line-height: 22px; }
|
||||
.tag-cloud li a { text-decoration: none; }
|
||||
.tag-cloud li .tag-size-1 { font-size: 12px; }
|
||||
.tag-cloud li .tag-size-2 { font-size: 12px; }
|
||||
.tag-cloud li .tag-size-3 { font-size: 14px; }
|
||||
.tag-cloud li .tag-size-4 { font-size: 14px; }
|
||||
.tag-cloud li .tag-size-5 { font-size: 18px; }
|
||||
.tag-cloud li .tag-size-6 { font-size: 18px; }
|
||||
.tag-cloud li .tag-size-7 { font-size: 20px; }
|
||||
.tag-cloud li .tag-size-8 { font-size: 20px; }
|
||||
.tag-cloud li .tag-size-9 { font-size: 22px; }
|
||||
.tag-cloud li .tag-size-10 { font-size: 22px; }
|
||||
|
||||
|
||||
/**
|
||||
* Accordion
|
||||
*/
|
||||
|
@ -204,11 +186,32 @@
|
|||
|
||||
|
||||
/**
|
||||
* Теги
|
||||
* Список тегов
|
||||
*/
|
||||
.tag-list { margin: 0 0 25px; color: #888; }
|
||||
.tag-list-item { display: inline; }
|
||||
.tag-list-item a { white-space: nowrap; }
|
||||
.tag-list { margin: 0 0 25px; color: #888; }
|
||||
.tag-list-item { display: inline; }
|
||||
.tag-list-item a { white-space: nowrap; }
|
||||
.tag-list-item-edit { margin-left: 20px; }
|
||||
.tag-list-item-tag.tag-list-item-tag-personal a { color: #3CA023; }
|
||||
.tag-list-item-tag.tag-list-item-tag-personal a:hover { color: #f00; }
|
||||
|
||||
.tag-list-item-tag.tag-list-item-tag-personal a { color: #3CA023; }
|
||||
.tag-list-item-tag.tag-list-item-tag-personal a:hover { color: #f00; }
|
||||
|
||||
|
||||
/**
|
||||
* Облако тегов
|
||||
*/
|
||||
.tag-cloud { width: 100%; }
|
||||
|
||||
.tag-cloud-item { display: inline; margin-right: 5px; line-height: 22px; }
|
||||
.tag-cloud-item a { text-decoration: none; }
|
||||
|
||||
.tag-size-1 { font-size: 12px; }
|
||||
.tag-size-2 { font-size: 12px; }
|
||||
.tag-size-3 { font-size: 14px; }
|
||||
.tag-size-4 { font-size: 14px; }
|
||||
.tag-size-5 { font-size: 18px; }
|
||||
.tag-size-6 { font-size: 18px; }
|
||||
.tag-size-7 { font-size: 20px; }
|
||||
.tag-size-8 { font-size: 20px; }
|
||||
.tag-size-9 { font-size: 22px; }
|
||||
.tag-size-10 { font-size: 22px; }
|
|
@ -25,28 +25,12 @@
|
|||
|
||||
<div data-type="tab-panes">
|
||||
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-all" style="display: block">
|
||||
{if $aTags}
|
||||
<ul class="tag-cloud word-wrap">
|
||||
{foreach $aTags as $oTag}
|
||||
<li><a class="tag-size-{$oTag->getSize()}" href="{router page='tag'}{$oTag->getText()|escape:'url'}/">{$oTag->getText()|escape:'html'}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
{include file='alert.tpl' mAlerts=$aLang.block_tags_empty sAlertStyle='info'}
|
||||
{/if}
|
||||
{include file='tag_cloud.tpl' aTags=$aTags sTagsUrl='{router page=\'tag\'}{$oTag->getText()|escape:\'url\'}/'}
|
||||
</div>
|
||||
|
||||
{if $oUserCurrent}
|
||||
<div class="tab-pane" data-type="tab-pane" id="js-tab-pane-my">
|
||||
{if $aTagsUser}
|
||||
<ul class="tag-cloud word-wrap">
|
||||
{foreach $aTagsUser as $oTag}
|
||||
<li><a class="tag-size-{$oTag->getSize()}" href="{router page='tag'}{$oTag->getText()|escape:'url'}/">{$oTag->getText()|escape:'html'}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
{include file='alert.tpl' mAlerts=$aLang.block_tags_empty sAlertStyle='info'}
|
||||
{/if}
|
||||
{include file='tag_cloud.tpl' aTags=$aTagsUser sTagsUrl='{router page=\'tag\'}{$oTag->getText()|escape:\'url\'}/'}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -9,13 +9,8 @@
|
|||
{block name='block_title'}{$aLang.block_city_tags}{/block}
|
||||
|
||||
{block name='block_content'}
|
||||
{if $aCityList && count($aCityList) > 0}
|
||||
<ul class="tag-cloud word-wrap">
|
||||
{foreach $aCityList as $oCity}
|
||||
<li><a class="tag-size-{$oCity->getSize()}" href="{router page='people'}city/{$oCity->getId()}/">{$oCity->getName()|escape:'html'}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
No cities {* Language *}
|
||||
{/if}
|
||||
{include file='tag_cloud.tpl'
|
||||
aTags = $aCityList
|
||||
sTagsUrl = '{router page=\'people\'}city/{$oTag->getId()}/'
|
||||
sTagsText = '{$oTag->getName()|escape}'}
|
||||
{/block}
|
|
@ -9,11 +9,8 @@
|
|||
{block name='block_title'}{$aLang.block_country_tags}{/block}
|
||||
|
||||
{block name='block_content'}
|
||||
{if $aCountryList && count($aCountryList) > 0}
|
||||
<ul class="tag-cloud word-wrap">
|
||||
{foreach $aCountryList as $oCountry}
|
||||
<li><a class="tag-size-{$oCountry->getSize()}" href="{router page='people'}country/{$oCountry->getId()}/">{$oCountry->getName()|escape:'html'}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
{include file='tag_cloud.tpl'
|
||||
aTags = $aCountryList
|
||||
sTagsUrl = '{router page=\'people\'}country/{$oTag->getId()}/'
|
||||
sTagsText = '{$oTag->getName()|escape}'}
|
||||
{/block}
|
27
application/frontend/skin/developer/tag_cloud.tpl
Normal file
27
application/frontend/skin/developer/tag_cloud.tpl
Normal file
|
@ -0,0 +1,27 @@
|
|||
{**
|
||||
* Облако тегов
|
||||
*
|
||||
* @param array $aTags Массив с тегами
|
||||
* @param string $sTagsUrl Код для получения ссылки тега
|
||||
* @param string $sTagsText Код для получения названия тега
|
||||
*
|
||||
* @styles css/common.css
|
||||
*}
|
||||
|
||||
{if $aTags}
|
||||
<ul class="tag-cloud word-wrap">
|
||||
{foreach $aTags as $oTag}
|
||||
<li class="tag-cloud-item">
|
||||
<a class="tag-size-{$oTag->getSize()}" href="{eval var=$sTagsUrl}">
|
||||
{if $sTagsText}
|
||||
{eval var=$sTagsText}
|
||||
{else}
|
||||
{$oTag->getText()|escape}
|
||||
{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
{include file='alert.tpl' mAlerts=$aLang.block_tags_empty sAlertStyle='empty'}
|
||||
{/if}
|
Loading…
Reference in a new issue