1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-21 21:16:25 -05:00

Create condition for no search and add config/css

This commit is contained in:
Patrick Marsceill 2018-11-16 11:46:43 -05:00
parent 45eea0efb6
commit d11e332dc6
No known key found for this signature in database
GPG Key ID: 286B93882D828F40
7 changed files with 18 additions and 8 deletions

View File

@ -21,6 +21,9 @@ baseurl: "/just-the-docs/" # the subpath of your site, e.g. /blog
permalink: pretty
exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"]
# Enable or disable the site search
search_enabled: true
# Aux links for the upper right navigation
aux_links:
"Just the Docs on GitHub":

View File

@ -4,7 +4,9 @@
<title>{{ page.title }} - {{ site.title }}</title>
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
{% if site.search_enabled != nil %}
<script type="text/javascript" src="{{ "/assets/js/vendor/lunr.min.js" | absolute_url }}"></script>
{% endif %}
<script type="text/javascript" src="{{ "/assets/js/just-the-docs.js" | absolute_url }}"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@ -16,7 +16,8 @@
</div>
<div class="main-content-wrap">
<div class="page-header">
<div class="main-content pb-0">
<div class="main-content">
{% if site.search_enabled != nil %}
<div class="search js-search">
<div class="search-input-wrap">
<input type="text" class="js-search-input search-input" placeholder="Search {{ site.title }}" aria-label="Search {{ site.title }}" autocomplete="off">
@ -24,8 +25,9 @@
</div>
<div class="js-search-results search-results-wrap"></div>
</div>
{% endif %}
{% if site.aux_links != nil %}
<ul class="list-style-none text-small mt-md-2 pb-4 pb-md-0 js-aux-nav aux-nav">
<ul class="list-style-none text-small mt-md-1 mb-md-1 pb-4 pb-md-0 js-aux-nav aux-nav">
{% for link in site.aux_links %}
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
{% endfor %}

View File

@ -79,8 +79,6 @@
@include mq(md) {
background-color: $white;
border-bottom: $border $border-color;
}
.main-content {
@ -88,8 +86,11 @@
@include mq(md) {
display: flex;
justify-content: space-between;
justify-content: flex-end;
height: 60px;
padding-top: $sp-4;
padding-bottom: $sp-4;
border-bottom: $border $border-color;
}
}
}

View File

@ -14,7 +14,7 @@
z-index: 101;
height: 60px;
padding-top: $sp-4;
box-shadow: inset 0 -1px 0 $border-color;
border-bottom: $border $border-color;
}
}

View File

@ -17,7 +17,7 @@
display: block;
padding-top: $sp-1;
padding-right: 0;
padding-bottom: $sp-4;
padding-bottom: 0;
padding-left: 0;
margin-bottom: 0;
background-color: transparent;

View File

@ -155,7 +155,9 @@ function initSearch() {
function ready(){
toggleNav();
if (typeof lunr !== 'undefined') {
initSearch();
}
}
// in case the document is already rendered