mirror of
https://github.com/Oreolek/ifhub-skin.git
synced 2024-06-16 23:20:49 +03:00
Задача #3 - спрятать поиск под кнопку
This commit is contained in:
parent
c9dc9757a9
commit
3479f4e698
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
9
components/search/search-form.main.tpl
Normal file
9
components/search/search-form.main.tpl
Normal 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>
|
|
@ -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' ]
|
||||
]}
|
||||
|
|
Loading…
Reference in a new issue