Skip to content

Commit

Permalink
[spalenque] - #14198 *fix search widget styles on mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
santipalenque committed Jul 6, 2018
1 parent ff4d667 commit 0e1c3d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 2 additions & 0 deletions sample._ss_environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@
define('OPENSTACK_RESOURCE_API_BASE_URL', '');
define('SUMMIT_CALENDAR_SYNC_ERROR_EMAIL_FROM', '');

define('SEARCH_WIDGET_BASE_URL', '');

global $_FILE_TO_URL_MAPPING;
$_FILE_TO_URL_MAPPING[''] = '';

6 changes: 4 additions & 2 deletions themes/openstack/templates/Layout/Includes/Navigation.ss
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
<div class="search-icon show"><i class="fa fa-search"></i> <span class="header-search-text">Search</span></div>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<% include OpenstackSearchWidget %>

<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<div class="search-container tiny">
<% include OpenstackSearchWidget %>
<div class="openstack-search-bar" style="width: 100%; margin: 9px 0 0 10px;" data-baseUrl="{$getEnv('SEARCH_WIDGET_BASE_URL')}" data-context="www-openstack"></div>
</div>
<ul class="nav navbar-nav navbar-main show">
<li>
<% include SwiftypeCustomSearchMobile %>
<div class="openstack-search-bar" style="width: 100%; margin: 9px 0 0 10px;" data-baseUrl="{$getEnv('SEARCH_WIDGET_BASE_URL')}" data-context="www-openstack"></div>
</li>

<% include Navigation_menu %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@

<div id="openstack-search-bar"
style="width: 100%; margin: 9px 0 0 10px;"
data-baseUrl="search.openstack.org"
data-context="www-openstack">

</div>


<script>
(function (window, document) {
var loader = function () {
var script = document.createElement("script"), tag = document.getElementsByTagName("script")[0];
script.src = "https://search.openstack.org/widget/embed.min.js";
script.src = "https://{$getEnv('SEARCH_WIDGET_BASE_URL')}/widget/embed.min.js";
tag.parentNode.insertBefore(script, tag);
};
window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
Expand Down

0 comments on commit 0e1c3d1

Please sign in to comment.