Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/assets/stylesheets/stylesheet.scss3
-rw-r--r--layouts/docsearch.html15
-rw-r--r--layouts/header.html10
3 files changed, 21 insertions, 7 deletions
diff --git a/content/assets/stylesheets/stylesheet.scss b/content/assets/stylesheets/stylesheet.scss
index ef4227b9..6fd5e36c 100644
--- a/content/assets/stylesheets/stylesheet.scss
+++ b/content/assets/stylesheets/stylesheet.scss
@@ -464,7 +464,6 @@ li {
li {
display: inline-block;
- line-height: 20px;
margin: 0 10px;
}
@@ -507,10 +506,8 @@ li {
.docsearch-mobile {
display: none;
width: 100%;
- box-sizing: border-box;
outline: 0;
margin-top: 12px;
- margin-left: 10px;
@media all and (max-width: $mobile-width) {
display: block;
diff --git a/layouts/docsearch.html b/layouts/docsearch.html
index 72da891d..3b449fe3 100644
--- a/layouts/docsearch.html
+++ b/layouts/docsearch.html
@@ -16,4 +16,19 @@ var search = docsearch({
'autoselect': false
}
});
+var mobileSearch = docsearch({
+ apiKey: 'ce1690e1421303458a1fcbea0cc4a927',
+ indexName: 'gitlab',
+ inputSelector: '.docsearch-mobile',
+ algoliaOptions: {
+ // Filter by tags as described in https://github.com/algolia/docsearch-configs/blob/master/configs/gitlab.json
+ 'filters': "tags:gitlab OR tags:omnibus OR tags:runner",
+ // Number of results shown in the search dropdown
+ 'hitsPerPage': 10
+ },
+ debug: false, // Set debug to true if you want to inspect the dropdown
+ autocompleteOptions: {
+ 'autoselect': false
+ }
+});
</script>
diff --git a/layouts/header.html b/layouts/header.html
index af6252d8..57d45c51 100644
--- a/layouts/header.html
+++ b/layouts/header.html
@@ -17,10 +17,12 @@
</a>
<ul class="nav">
<% unless @item.identifier.to_s.split('/')[1] == 'search' %>
- <form id="search-form" action="/search/" method="get">
- <input type="text" name="q" class="docsearch docsearch-mobile" placeholder="Search" required/>
- <input type="submit" style="visibility: hidden; position:absolute;" />
- </form>
+ <li class="nav-item">
+ <form id="mobile-search-form" action="/mobileSearch/" method="get">
+ <input type="text" name="q" class="docsearch docsearch-mobile" placeholder="Search" required/>
+ <input type="submit" style="visibility: hidden; position:absolute;" />
+ </form>
+ </li>
<% end %>
<% if ENV['NANOC_ENV'] == 'production' %>
<% @config[:products].each do |name, product| %>