jekyll-theme-centos 0.1.1 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{LICENSE.txt → LICENSE} +5 -5
- data/_includes/{centos-footer.html → footer.html} +5 -5
- data/_includes/{centos-head.html → head.html} +0 -0
- data/_includes/header.html +11 -0
- data/_includes/header/blog.html +23 -0
- data/_includes/header/home.html +13 -0
- data/_includes/header/page.html +10 -0
- data/_includes/header/post.html +22 -0
- data/_includes/{centos-content → home}/around.html +1 -1
- data/_includes/home/news.html +14 -0
- data/_includes/{centos-content → home}/sponsors.html +2 -2
- data/_includes/{centos-nav.html → nav.html} +2 -1
- data/_includes/page/alert-danger.html +4 -0
- data/_includes/page/alert-info.html +4 -0
- data/_includes/page/alert-success.html +4 -0
- data/_includes/page/alert-warning.html +4 -0
- data/_includes/page/breadcrumbs.html +11 -0
- data/_includes/{centos-content/download/table-body-doc.html → page/download-body-doc.html} +0 -0
- data/_includes/{centos-content/download/table-body-eol.html → page/download-body-eol.html} +0 -0
- data/_includes/{centos-content/download/table-body.html → page/download-body.html} +0 -0
- data/_includes/page/download-cards.html +13 -0
- data/_includes/{centos-content/download/table-footer.html → page/download-footer.html} +0 -0
- data/_includes/{centos-content/download/table-header-doc.html → page/download-header-doc.html} +0 -0
- data/_includes/{centos-content/download/table-header-eol.html → page/download-header-eol.html} +0 -0
- data/_includes/{centos-content/download/table-header.html → page/download-header.html} +0 -0
- data/_includes/page/download-linux.html +20 -0
- data/_includes/page/download-linux/7-doc.html +5 -0
- data/_includes/page/download-linux/7-eol.html +5 -0
- data/_includes/page/download-linux/7.html +5 -0
- data/_includes/page/download-linux/8-doc.html +5 -0
- data/_includes/page/download-linux/8-eol.html +5 -0
- data/_includes/page/download-linux/8.html +5 -0
- data/_includes/{centos-content/download/stream.html → page/download-stream.html} +4 -4
- data/_includes/page/download-stream/8-doc.html +5 -0
- data/_includes/page/download-stream/8-eol.html +5 -0
- data/_includes/page/download-stream/8.html +5 -0
- data/_includes/page/figure.html +1 -0
- data/_includes/page/search.html +62 -0
- data/_includes/{centos-content → page}/toc.html +4 -2
- data/_includes/{centos-content → page}/video.html +1 -1
- data/_layouts/aside.html +16 -0
- data/_layouts/blog.html +50 -0
- data/_layouts/default.html +4 -4
- data/_layouts/{centos-content/download-mirror.html → download-mirror.html} +10 -7
- data/_layouts/download.html +25 -0
- data/_layouts/{centos-home.html → home.html} +9 -8
- data/_layouts/page.html +9 -1
- data/_layouts/post.html +19 -1
- data/_layouts/search.html +12 -0
- data/_layouts/{centos-content/sponsors.html → sponsors.html} +2 -2
- data/_sass/centos/_footer.scss +6 -6
- data/_sass/centos/_header.scss +32 -7
- data/_sass/centos/_mixins.scss +5 -4
- data/_sass/centos/_page.scss +242 -0
- data/_sass/centos/_variables.scss +13 -12
- data/_sass/centos/centos.scss +2 -2
- data/_sass/centos/mixins/{_footer-link.scss → _link-dark.scss} +1 -1
- data/_sass/centos/mixins/_page-card.scss +14 -0
- data/_sass/centos/mixins/_page-heading.scss +28 -0
- data/_sass/centos/mixins/_page-lists.scss +15 -0
- data/_sass/centos/mixins/{_content-toc.scss → _page-toc.scss} +9 -4
- data/assets/img/{centos-logo-white.png → logo.png} +0 -0
- data/assets/img/{centos-motif.png → motif.png} +0 -0
- data/assets/js/jquery.rss.js +1 -11
- data/assets/js/lunr.min.js +6 -0
- data/assets/js/moment.min.js +2 -7
- metadata +64 -59
- data/_includes/centos-content/1col.html +0 -11
- data/_includes/centos-content/2col.html +0 -15
- data/_includes/centos-content/admonition/caution.html +0 -4
- data/_includes/centos-content/admonition/idea.html +0 -4
- data/_includes/centos-content/admonition/note.html +0 -4
- data/_includes/centos-content/admonition/warning.html +0 -4
- data/_includes/centos-content/breadcrumbs.html +0 -11
- data/_includes/centos-content/download/stream-8-doc.html +0 -5
- data/_includes/centos-content/download/stream-8-eol.html +0 -5
- data/_includes/centos-content/download/stream-8.html +0 -5
- data/_includes/centos-content/figure.html +0 -4
- data/_includes/centos-content/news.html +0 -15
- data/_includes/centos-header.html +0 -7
- data/_includes/centos-header/home.html +0 -15
- data/_includes/centos-header/page.html +0 -12
- data/_includes/centos-styleguide.md +0 -243
- data/_layouts/centos-content/1col.html +0 -9
- data/_layouts/centos-content/2col.html +0 -9
- data/_layouts/centos-content/download.html +0 -18
- data/_sass/centos/_content.scss +0 -101
- data/_sass/centos/content/_1col.scss +0 -32
- data/_sass/centos/content/_2col.scss +0 -44
- data/_sass/centos/content/_download.scss +0 -17
- data/_sass/centos/content/_sponsors.scss +0 -9
- data/_sass/centos/header/_home.scss +0 -4
- data/_sass/centos/header/_page.scss +0 -4
- data/_sass/centos/mixins/_content-card.scss +0 -13
- data/_sass/centos/mixins/_content-heading.scss +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 246f569021a11558ca187b566e4a1483a5eaef12fdb7cebafaf71ac9a9491ad8
|
4
|
+
data.tar.gz: 0ed9eac80a7d7d43140d172b6726abbb00bb959828ea5b7ebdf8e94eb5837c4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71dc8cecbe9a9f829da2118c5f09e3978df66f49610c0bea02409b755fc870f8c5e184636e975b4ce110fae53a48aa844a994849bd14f2051defacb5fd1f5203
|
7
|
+
data.tar.gz: 180a83eefdef6f5b713f0da9296160ba53e49ee3f49580e9796d7a748bb3496b5ddcdc7988c6c5fa65761487e9770653ce1c121670c0f40cf3a2692b839c69d0
|
data/{LICENSE.txt → LICENSE}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
MIT License
|
2
2
|
|
3
3
|
Copyright (c) 2020 Alain Reguera Delgado
|
4
4
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
10
10
|
furnished to do so, subject to the following conditions:
|
11
11
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
14
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<footer class="
|
1
|
+
<footer class="footer">
|
2
2
|
<div class="container">
|
3
3
|
<div class="row justify-content-center">
|
4
|
-
<section class="
|
4
|
+
<section class="about">
|
5
5
|
<h4>About</h4>
|
6
6
|
<ul>
|
7
7
|
<li><a href="/about">About CentOS</a></li>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<li><a href="/about/governance">Governance</a></li>
|
12
12
|
</ul>
|
13
13
|
</section>
|
14
|
-
<section class="
|
14
|
+
<section class="community">
|
15
15
|
<h4>Community</h4>
|
16
16
|
<ul>
|
17
17
|
<li><a href="https://wiki.centos.org/Contribute">Contribute</a></li>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<li><a href="https://bugs.centos.org/">Submit Bug</a></li>
|
24
24
|
</ul>
|
25
25
|
</section>
|
26
|
-
<section class="
|
26
|
+
<section class="project">
|
27
27
|
<h4>The CentOS Project</h4>
|
28
28
|
<p class="lead">Community-driven free software effort focused on delivering a robust open source ecosystem around a Linux platform.</p>
|
29
29
|
<div class="lead social">
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<a href="https://www.reddit.com/r/CentOS/"><i class="fab fa-reddit"></i></a>
|
35
35
|
</div>
|
36
36
|
</section>
|
37
|
-
<section class="
|
37
|
+
<section class="copyright">
|
38
38
|
<p>Copyright © 2020 The CentOS Project | <a href="/legal">Legal</a> | <a href="/legal/privacy">Privacy</a> | <a href="https://git.centos.org/centos/centos.org">Site Source</a></p>
|
39
39
|
</section>
|
40
40
|
</div>
|
File without changes
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<header class="header">
|
2
|
+
{% if page.layout == "home" %}
|
3
|
+
{% include header/home.html %}
|
4
|
+
{% elsif page.layout == "blog" %}
|
5
|
+
{% include header/blog.html %}
|
6
|
+
{% elsif page.layout == "blog-post" %}
|
7
|
+
{% include header/post.html %}
|
8
|
+
{% else %}
|
9
|
+
{% include header/page.html %}
|
10
|
+
{% endif %}
|
11
|
+
</header>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{% if paginator.previous_page_path %}
|
2
|
+
<a href="{{ paginator.previous_page_path }}"><span class="paginator"><i class="fas fa-arrow-left"></i></span></a>
|
3
|
+
{% else %}
|
4
|
+
<span class="paginator disabled"><i class="fas fa-arrow-left"></i></span>
|
5
|
+
{% endif %}
|
6
|
+
|
7
|
+
<section class="title">
|
8
|
+
<div class="row">
|
9
|
+
<div class="col">
|
10
|
+
<header>
|
11
|
+
<h1>{{ page.title }}</h1>
|
12
|
+
</header>
|
13
|
+
<p class="lead">{{ page.title_lead }}</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</section>
|
17
|
+
|
18
|
+
{% if paginator.next_page_path %}
|
19
|
+
<a href="{{ paginator.next_page_path }}"><span class="paginator"><i class="fas fa-arrow-right"></i></span></a>
|
20
|
+
{% else %}
|
21
|
+
<span class="paginator disabled"><i class="fas fa-arrow-right"></i></span>
|
22
|
+
{% endif %}
|
23
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="home">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-7">
|
4
|
+
<header>
|
5
|
+
<h1>{{ page.title }}</h1>
|
6
|
+
</header>
|
7
|
+
<p class="lead">{{ page.title_lead }}</p>
|
8
|
+
<p class="lead">We offer two Linux distros:</p>
|
9
|
+
<a class="btn btn-light btn-lg" role="button" href="/centos-linux"><i class="fas fa-download"></i> <strong>CentOS Linux</strong></a>
|
10
|
+
<a class="btn btn-light btn-lg" role="button" href="/centos-stream"><i class="fas fa-download"></i> <strong>CentOS Stream</strong></a>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{% if page.previous.url %}
|
2
|
+
<a href="{{ page.previous.url }}"><span class="paginator"><i class="fas fa-arrow-left"></i></span></a>
|
3
|
+
{% else %}
|
4
|
+
<span class="paginator disabled"><i class="fas fa-arrow-left"></i></span>
|
5
|
+
{% endif %}
|
6
|
+
|
7
|
+
<div class="title">
|
8
|
+
<div class="row">
|
9
|
+
<div class="col">
|
10
|
+
<header>
|
11
|
+
<h1>{{ page.title }}</h1>
|
12
|
+
</header>
|
13
|
+
<p class="lead">{{ page.title_lead }}</p>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
{% if page.next.url %}
|
19
|
+
<a href="{{ page.next.url }}"><span class="paginator"><i class="fas fa-arrow-right"></i></span></a>
|
20
|
+
{% else %}
|
21
|
+
<span class="paginator disabled"><i class="fas fa-arrow-right"></i></span>
|
22
|
+
{% endif %}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<section class="news">
|
2
|
+
<header>
|
3
|
+
<h2><i class="fas fa-calendar-alt"></i> News and events</h2>
|
4
|
+
</header>
|
5
|
+
|
6
|
+
<div class="card">
|
7
|
+
<ul class="card-body">
|
8
|
+
{% for i in site.posts limit:5 %}
|
9
|
+
<a href="{{ i.url }}"><li class="card-title">{{ i.title }}</li></a>
|
10
|
+
{% endfor %}
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
</section>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<section class="
|
1
|
+
<section class="sponsors carousel">
|
2
2
|
<header>
|
3
3
|
<h2><i class="fas fa-award"></i> Sponsorship</h2>
|
4
4
|
</header>
|
5
5
|
|
6
6
|
<p>CentOS would not be possible without the support of our sponsors. We would like to thank the following product/service for being a CentOS sponsor:</p>
|
7
7
|
|
8
|
-
<div class="
|
8
|
+
<div class="card">
|
9
9
|
<div class="carousel slide carousel-fade" data-ride="carousel" id="carousel-1">
|
10
10
|
<div class="carousel-inner" role="listbox">
|
11
11
|
{% for sponsor in site.sponsors %}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
|
2
2
|
<div class="container">
|
3
|
-
<a href="/"><img src="/assets/img/
|
3
|
+
<a class="navbar-brand" href="/"><img src="/assets/img/logo.png" height="32" alt="{{ site.title }}"></a>
|
4
4
|
<button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
|
5
5
|
<div class="collapse navbar-collapse" id="navcol-1">
|
6
6
|
<ul class="nav navbar-nav ml-auto">
|
@@ -22,6 +22,7 @@
|
|
22
22
|
<li class="nav-item dropdown"><a class="dropdown-toggle nav-link" data-toggle="dropdown" aria-expanded="false" href="#"><i class="fas fa-book"></i> Documentation</a>
|
23
23
|
<div class="dropdown-menu" role="menu"><a class="dropdown-item" role="presentation" href="https://wiki.centos.org/">Wiki</a><a class="dropdown-item" role="presentation" href="https://docs.centos.org/">Manuals</a><a class="dropdown-item" role="presentation" href="/keys">GPG Key Info</a></div>
|
24
24
|
</li>
|
25
|
+
<li class="nav-item" role="presentation"><a class="nav-link" href="/search/"><i class="fas fa-search"></i> Search</a></li>
|
25
26
|
<li class="nav-item" role="presentation"><a class="nav-link" href="http://wiki.centos.org/Documentation?action=show&redirect=GettingHelp"><i class="fas fa-life-ring"></i> Help</a></li>
|
26
27
|
</ul>
|
27
28
|
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<ol class="breadcrumb">
|
2
|
+
{% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
|
3
|
+
<li class="breadcrumb-item"><a href="/">Home</a></li>
|
4
|
+
{% for crumb in crumbs offset: 1 %}
|
5
|
+
{% if forloop.last %}
|
6
|
+
<li class="breadcrumb-item">{{ page.title }}</li>
|
7
|
+
{% else %}
|
8
|
+
<li class="breadcrumb-item"><a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a></li>
|
9
|
+
{% endif %}
|
10
|
+
{% endfor %}
|
11
|
+
</ol>
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<section class="card">
|
2
|
+
<header>
|
3
|
+
<h2>CentOS Linux</h2>
|
4
|
+
</header>
|
5
|
+
{% include page/download-linux.html %}
|
6
|
+
</section>
|
7
|
+
|
8
|
+
<section class="card">
|
9
|
+
<header>
|
10
|
+
<h2>CentOS Stream</h2>
|
11
|
+
</header>
|
12
|
+
{% include page/download-stream.html %}
|
13
|
+
</section>
|
File without changes
|
data/_includes/{centos-content/download/table-header-doc.html → page/download-header-doc.html}
RENAMED
File without changes
|
data/_includes/{centos-content/download/table-header-eol.html → page/download-header-eol.html}
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<ul class="nav nav-tabs">
|
2
|
+
<li class="nav-item"><a class="nav-link active" role="tab" data-toggle="tab" href="#tab-linux-8">8</a></li>
|
3
|
+
<li class="nav-item"><a class="nav-link" role="tab" data-toggle="tab" href="#tab-linux-7">7</a></li>
|
4
|
+
</ul>
|
5
|
+
|
6
|
+
<div class="tab-content">
|
7
|
+
|
8
|
+
<div class="tab-pane active" role="tabpanel" id="tab-linux-8">
|
9
|
+
{% include page/download-linux/8.html %}
|
10
|
+
{% include page/download-linux/8-doc.html %}
|
11
|
+
{% include page/download-linux/8-eol.html %}
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="tab-pane" role="tabpanel" id="tab-linux-7">
|
15
|
+
{% include page/download-linux/7.html %}
|
16
|
+
{% include page/download-linux/7-doc.html %}
|
17
|
+
{% include page/download-linux/7-eol.html %}
|
18
|
+
</div>
|
19
|
+
|
20
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<section class="
|
1
|
+
<section class="content-download-stream">
|
2
2
|
<ul class="nav nav-tabs">
|
3
3
|
<li class="nav-item"><a class="nav-link active" role="tab" data-toggle="tab" href="#tab-stream-8">Latest</a></li>
|
4
4
|
</ul>
|
@@ -6,9 +6,9 @@
|
|
6
6
|
<div class="tab-content">
|
7
7
|
|
8
8
|
<div class="tab-pane active" role="tabpanel" id="tab-stream-8">
|
9
|
-
{% include
|
10
|
-
{% include
|
11
|
-
{% include
|
9
|
+
{% include page/download-stream/8.html %}
|
10
|
+
{% include page/download-stream/8-doc.html %}
|
11
|
+
{% include page/download-stream/8-eol.html %}
|
12
12
|
</div>
|
13
13
|
|
14
14
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<img class="figure-img img-fluid" src="{{ include.src }}" alt="{{ include.alt }}">
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<script src="/assets/js/lunr.min.js"></script>
|
2
|
+
|
3
|
+
<script>
|
4
|
+
{% assign counter = 0 %}
|
5
|
+
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' %}{% else %}{
|
6
|
+
"id": {{ counter }},
|
7
|
+
"url": "{{ site.url }}{{ page.url }}",
|
8
|
+
"title": "{{ page.title }}",
|
9
|
+
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
|
10
|
+
}, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
|
11
|
+
"id": {{ counter }},
|
12
|
+
"url": "{{ site.url }}{{ page.url }}",
|
13
|
+
"title": "{{ page.title }}",
|
14
|
+
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
|
15
|
+
}, {% endfor %}{% for page in site.posts %}{
|
16
|
+
"id": {{ counter }},
|
17
|
+
"url": "{{ site.url }}{{ page.url }}",
|
18
|
+
"title": "{{ page.title }}",
|
19
|
+
"body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
|
20
|
+
}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}];
|
21
|
+
|
22
|
+
var idx = lunr(function () {
|
23
|
+
this.ref('id')
|
24
|
+
this.field('title')
|
25
|
+
this.field('body')
|
26
|
+
|
27
|
+
documents.forEach(function (doc) {
|
28
|
+
this.add(doc)
|
29
|
+
}, this)
|
30
|
+
});
|
31
|
+
function lunr_search(term) {
|
32
|
+
document.getElementById('lunrsearchresults').innerHTML = '<ul></ul>';
|
33
|
+
if(term) {
|
34
|
+
document.getElementById('lunrsearchresults').innerHTML = "<h2>Search results for '" + term + "'</h2>" + document.getElementById('lunrsearchresults').innerHTML;
|
35
|
+
//put results on the screen.
|
36
|
+
var results = idx.search(term);
|
37
|
+
if(results.length>0){
|
38
|
+
//console.log(idx.search(term));
|
39
|
+
//if results
|
40
|
+
for (var i = 0; i < results.length; i++) {
|
41
|
+
// more statements
|
42
|
+
var ref = results[i]['ref'];
|
43
|
+
var url = documents[ref]['url'];
|
44
|
+
var title = documents[ref]['title'];
|
45
|
+
var body = documents[ref]['body'].substring(0,160)+'...';
|
46
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span></a><br/><span class='body'>"+ body +"</span><br/><span class='url'>"+ url +"</span></li>";
|
47
|
+
}
|
48
|
+
} else {
|
49
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>No results found...</li>";
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return false;
|
53
|
+
}
|
54
|
+
</script>
|
55
|
+
|
56
|
+
<form onSubmit="return lunr_search(document.getElementById('lunrsearch').value);">
|
57
|
+
<p><input type="text" class="form-control" id="lunrsearch" name="q" maxlength="255" value="" placeholder="Search via Lunr.js" autofocus /></p>
|
58
|
+
</form>
|
59
|
+
|
60
|
+
<div id="lunrsearchresults">
|
61
|
+
<ul></ul>
|
62
|
+
</div>
|