mirror of
https://github.com/thangisme/notes.git
synced 2024-12-21 20:46:24 -05:00
Create condition for no search and add config/css
This commit is contained in:
parent
45eea0efb6
commit
d11e332dc6
@ -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":
|
||||
|
@ -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">
|
||||
|
@ -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 %}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -155,7 +155,9 @@ function initSearch() {
|
||||
|
||||
function ready(){
|
||||
toggleNav();
|
||||
initSearch();
|
||||
if (typeof lunr !== 'undefined') {
|
||||
initSearch();
|
||||
}
|
||||
}
|
||||
|
||||
// in case the document is already rendered
|
||||
|
Loading…
Reference in New Issue
Block a user