Jump to content

mobile search onipsfocus themes


Recommended Posts

hi every one

if you open ipsfocus themes with your mobile and touch search Icon it opens by pop up.

try this: https://ipsfocus.net/themes/

can someone help me to do this?



Edited by LoveHate
Link to comment
Share on other sites

Найти шаблон includeJS в конец вставить:

<script type="text/javascript">
	if (matchMedia) {
		var focus_pageWidth = window.matchMedia( "(min-width: 980px)" );
	function WidthChange(focus_pageWidth) {
		if (focus_pageWidth.matches) {
		} else {
  	// Toggle class
	$('[data-class]').on( "click", function(event) { event.preventDefault(); var classContent = $(this).attr('data-class'); var classModifiers = classContent.split(' '); var className = classModifiers[0]; var modifyClass = classModifiers[1]; if (classModifiers[2]){ var targetElement = classModifiers[2]; } else { var targetElement = 'html'; } if (modifyClass === 'add'){ $(targetElement).addClass(className); } else if (modifyClass === 'remove'){ $(targetElement).removeClass(className); } else { $(targetElement).toggleClass(className); } });

Найти шаблон custom.css в конец вставить:

/* Mobile search */
.focus-mobile-search {
    padding-top: 70px;
    background: rgba(31,33,37,0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 6000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
.focus-mobile-search__close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border-radius: 4px;
.focus-mobile-search #elSearch {
    display: block !important;
.display--focus-mobile-search .focus-mobile-search {
    display: flex;

Найти в шаблоне mobileNavBar:

<li class='ipsJS_show'>
	<a href='{url="app=core&module=search&controller=search" seoTemplate="search"}'><i class='fa fa-search'></i></a>

Заменить на:

<li class='ipsJS_show'>
	<a href='{url="app=core&module=search&controller=search" seoTemplate="search"}' data-class='display--focus-mobile-search'><i class='fa fa-search'></i></a>

В конец шаблона mobileNavBar после тега </ul> добавить:

<div class='focus-mobile-search'>
	<div class='focus-mobile-search__close' data-class='display--focus-mobile-search'><i class="fa fa-times" aria-hidden="true"></i></div>

Now ... give me your money! 😀

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Ваша ссылка была автоматически строена.   Отображать как обычную ссылку

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...