1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub-skin.git synced 2024-06-16 23:20:49 +03:00

Задача #3 - спрятать поиск под кнопку

This commit is contained in:
Alexander Yakovlev 2017-03-25 17:12:11 +07:00
parent c9dc9757a9
commit 3479f4e698
4 changed files with 24 additions and 1 deletions

View file

@ -66,3 +66,13 @@ ol.classic {
.spoiler-title.open:before {
background: url(../images/spoiler.icon.png) no-repeat left bottom;
}
/**
* Главный поиск в шапке сайта - показывается по клику
**/
.main-search {
display: none;
}
.no-js .main-search {
display: block;
}

View file

@ -6,6 +6,9 @@
*/
jQuery(document).ready(function($){
$(".search-icon").on('click touchstart', function(){
$(".main-search").toggle()
});
$('.spoiler-title').on('click touchstart', function(){
$(this).toggleClass('open');
$(this).parent().children('div.spoiler-body').toggle('normal');

View file

@ -0,0 +1,9 @@
{**
* Форма основного поиска (по топикам и комментариям)
*}
{component_define_params params=[ 'searchType', 'mods', 'classes', 'attributes' ]}
<div class="main-search">
{component 'search-form' name='main' action="{router page='search'}{$searchType|default:'topics'}" params=$params}
</div>

View file

@ -3,5 +3,6 @@
[ 'text' => $aLang.user.users, 'url' => {router page='people'}, 'name' => 'people' ],
[ 'text' => $aLang.activity.title, 'url' => {router page='stream'}, 'name' => 'stream' ],
[ 'text' => 'Правила ресурса', 'url' => {router page='rules'}, 'name' => 'rules' ],
[ 'text' => 'Фонд поддержки', 'url' => {router page='donate'}, 'name' => 'donate' ]
[ 'text' => 'Фонд поддержки', 'url' => {router page='donate'}, 'name' => 'donate' ],
[ 'text' => '<i class="fa fa-search fa-lg"></i>', 'classes' => 'search-icon' ]
]}