jekyll-theme-centos 0.4.0 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 181077707ec730242e1a1d1f88c8107d7c4cda70e1fcb41913c0559f185d2fc1
4
- data.tar.gz: 86647a29137027f7849f9018db52234d2065aaebb412893ac5f3835e2cf02aca
3
+ metadata.gz: 0c8b3903dfafcdfc16621eb04c60b5318324da9f098d0fd6f98ba2e2d0755f59
4
+ data.tar.gz: 4ee8e670151a2ada4e46f958905ca29e5f85294cb39108b5f84b63cd765bd8f6
5
5
  SHA512:
6
- metadata.gz: 45b98eb5b67297e557c5622586dbf1715798f3884c38ddb445f3d720be003e46015fcf832825774b3ba89ae1ed39a74cba87126bc1c16d0240f667a2be1bd6b1
7
- data.tar.gz: a83b145893d99cadce8e07b3f1f47a44a4db30e8bf8ef206280128ba4d13768f34fb10f82071927ce346c35584eb98aebdb3778297448602565adfe01769d5e2
6
+ metadata.gz: 1cda7eb97f4ed171ffaaf9589101eed578731780994e1ed843d9e72a3321b262166002ba9a2c5ad7a2550995317118296814b66ffa6f681236f7ce897e63d712
7
+ data.tar.gz: 41721c53396948ded2cadb065c0d6fcfc8241e826d476d7fe5f945d6b6835b78b2b2c6367e045bd239e907993db4b92a7cfbabe2ca7e5731f5d22ffa2b696a81
@@ -1,6 +1,6 @@
1
1
  <tr>
2
- <td>{% if row["release_notes"] != "-" %}<a href="{{ row['release_notes'] }}">Release Notes</a>{% else %}Release Notes{% endif %}
3
- | {% if row["release_email"] != "-" %}<a href="{{ row['release_email'] }}">Release Email</a>{% else %}Release Email{% endif %}
4
- | {% if row["documentation"] != "-" %}<a href="{{ row['documentation'] }}">Documentation</a>{% else %}Documentation{% endif %}</td>
2
+ <td>{% if row["release_notes"] != "" %}<a href="{{ row['release_notes'] }}">Release Notes</a>{% else %}Release Notes{% endif %}
3
+ | {% if row["release_email"] != "" %}<a href="{{ row['release_email'] }}">Release Email</a>{% else %}Release Email{% endif %}
4
+ | {% if row["documentation"] != "" %}<a href="{{ row['documentation'] }}">Documentation</a>{% else %}Documentation{% endif %}</td>
5
5
  </tr>
6
6
 
@@ -1,4 +1,4 @@
1
1
  <tr>
2
- <td>{% if row["date"] != "-" %}{{ row['date'] }}{% endif %}
3
- {% if row["url"] != "-" %}<a href="{{ row['url'] }}"><i class="fas fa-exclamation-circle"></i></a>{% endif %}</td>
2
+ <td>{% if row["date"] != "" %}{{ row['date'] }}{% endif %}
3
+ {% if row["url"] != "" %}<a href="{{ row['url'] }}"><i class="fas fa-exclamation-circle"></i></a>{% endif %}</td>
4
4
  </tr>
@@ -1,7 +1,7 @@
1
1
  <tr>
2
2
  <td><a href="{{ row['iso'] }}"> {{ row['arch'] }}</a></td>
3
- <td>{% if row["rpm"] != "-" %}<a href="{{ row['rpm'] }}"> RPMs</a>{% else %}RPMs{% endif %}</td>
4
- <td>{% if row["cloud"] != "-" %}<a href="{{ row['cloud'] }}">Cloud</a>{% else %}Cloud{% endif %}
5
- | {% if row["containers"] != "-" %}<a href="{{ row['containers'] }}">Containers</a>{% else %}Containers{% endif %}
6
- | {% if row["vagrant"] != "-" %}<a href="{{ row['vagrant'] }}">Vagrant</a>{% else %}Vagrant{% endif %}</td>
3
+ <td>{% if row["rpm"] != "" %}<a href="{{ row['rpm'] }}"> RPMs</a>{% else %}RPMs{% endif %}</td>
4
+ <td>{% if row["cloud"] != "" %}<a href="{{ row['cloud'] }}">Cloud</a>{% else %}Cloud{% endif %}
5
+ | {% if row["containers"] != "" %}<a href="{{ row['containers'] }}">Containers</a>{% else %}Containers{% endif %}
6
+ | {% if row["vagrant"] != "" %}<a href="{{ row['vagrant'] }}">Vagrant</a>{% else %}Vagrant{% endif %}</td>
7
7
  </tr>
@@ -1,5 +1,5 @@
1
1
  {% include download/header-doc.html %}
2
- {% for row in site.data.centos-linux-7-doc %}
2
+ {% for row in site.data.centos.linux-7-doc %}
3
3
  {% include download/body-doc.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header-eol.html %}
2
- {% for row in site.data.centos-linux-7-eol %}
2
+ {% for row in site.data.centos.linux-7-eol %}
3
3
  {% include download/body-eol.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header.html %}
2
- {% for row in site.data.centos-linux-7 %}
2
+ {% for row in site.data.centos.linux-7 %}
3
3
  {% include download/body.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header-doc.html %}
2
- {% for row in site.data.centos-linux-8-doc %}
2
+ {% for row in site.data.centos.linux-8-doc %}
3
3
  {% include download/body-doc.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header-eol.html %}
2
- {% for row in site.data.centos-linux-8-eol %}
2
+ {% for row in site.data.centos.linux-8-eol %}
3
3
  {% include download/body-eol.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header.html %}
2
- {% for row in site.data.centos-linux-8 %}
2
+ {% for row in site.data.centos.linux-8 %}
3
3
  {% include download/body.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header-doc.html %}
2
- {% for row in site.data.centos-stream-8-doc %}
2
+ {% for row in site.data.centos.stream-8-doc %}
3
3
  {% include download/body-doc.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header-eol.html %}
2
- {% for row in site.data.centos-stream-8-eol %}
2
+ {% for row in site.data.centos.stream-8-eol %}
3
3
  {% include download/body-eol.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -1,5 +1,5 @@
1
1
  {% include download/header.html %}
2
- {% for row in site.data.centos-stream-8 %}
2
+ {% for row in site.data.centos.stream-8 %}
3
3
  {% include download/body.html %}
4
4
  {% endfor %}
5
5
  {% include download/footer.html %}
@@ -2,9 +2,9 @@
2
2
  <div class="container">
3
3
  <div class="row">
4
4
 
5
- {% if site.footer.columns %}
6
- {% for column in site.footer.columns %}
7
- {% assign links = site.navbar | where: "name", column %}
5
+ {% if site.data.centos.footer.columns %}
6
+ {% for column in site.data.centos.footer.columns %}
7
+ {% assign links = site.data.centos.navbar | where: "name", column %}
8
8
  {% for section in links %}
9
9
  <section class="links">
10
10
  <h6><i class="{{ section.icon }}"></i> {{ section.name }}</h6>
@@ -22,7 +22,7 @@
22
22
  <h4>{{ site.title }}</h4>
23
23
  <p class="lead">{{ site.description }}</p>
24
24
  <div class="lead social">
25
- {% for item in site.footer.social %}
25
+ {% for item in site.data.centos.footer.social %}
26
26
  <a href="{{ item.link }}"><i class="{{ item.icon }}"></i></a>
27
27
  {% endfor %}
28
28
  </div>
@@ -32,7 +32,7 @@
32
32
 
33
33
  <div class="row">
34
34
  <section class="copyright">
35
- <p>Copyright &copy; {{ site.time | date: "%Y" }} {{ site.footer.copyright.author }} {% for item in site.footer.copyright.legals %} | <a href="{{ item.link }}">{{ item.text }}</a>{% endfor %}</p>
35
+ <p>Copyright &copy; {{ site.time | date: "%Y" }} {{ site.data.centos.footer.copyright.author }} {% for item in site.data.centos.footer.copyright.legals %} | <a href="{{ item.link }}">{{ item.text }}</a>{% endfor %}</p>
36
36
  </section>
37
37
  </div>
38
38
 
@@ -1,14 +1,4 @@
1
1
  <header class="header header__home">
2
2
  <h1 class="header__home__title">{{ site.title }}</h1>
3
3
  <p class="header__home__description">{{ site.description }}</p>
4
- {% if site.header.preamble %}
5
- <p class="header__home__preamble">{{ site.header.preamble }}</p>
6
- {% endif %}
7
- {% if site.header.worklines %}
8
- <div class="header__home__worklines">
9
- {% for item in site.header.worklines %}
10
- <a class="btn" role="button" href="{{ item.link }}">{{ item.name }}</a>
11
- {% endfor %}
12
- </div>
13
- {% endif %}
14
4
  </header>
@@ -0,0 +1,12 @@
1
+ <section class="home__content__distributions">
2
+ <h2>Distributions</h2>
3
+ <p class="home__content__distributions_preamble">{{ site.data.centos.distributions.preamble }}</p>
4
+
5
+ {% if site.data.centos.distributions.buttons %}
6
+ <div class="home__content__distributions__buttons">
7
+ {% for item in site.data.centos.distributions.buttons %}
8
+ <a class="btn" role="button" href="{{ item.link }}">{{ item.name }}</a>
9
+ {% endfor %}
10
+ </div>
11
+ {% endif %}
12
+ </section>
@@ -0,0 +1,13 @@
1
+ <section class="home__content__news-and-events">
2
+
3
+ <h2>News and events</h2>
4
+
5
+ <ul>
6
+ {% assign blog_posts = site.posts | where: "category", "news-and-events" %}
7
+ {% for i in blog_posts limit:4 %}
8
+ {%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
9
+ <li><a href="{{ i.url }}">{{ i.title }}</a> &mdash; <small>{{ i.date | date: date_format }}</small> {{ i.excerpt }}</li>
10
+ {% endfor %}
11
+ </ul>
12
+
13
+ </section>
@@ -1,4 +1,4 @@
1
- <section class="home__content__around">
1
+ <section class="home__content__planet">
2
2
  <h2>Around CentOS</h2>
3
3
  <div id="rss-feeds"></div>
4
4
  </section>
@@ -1,6 +1,6 @@
1
- <section class="home__sponsorship">
1
+ <section class="home__content__sponsors">
2
2
 
3
- <h2>Sponsorship</h2>
3
+ <h2>Sponsors</h2>
4
4
 
5
5
  <div class="carousel">
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>
@@ -1,22 +1,22 @@
1
1
  <nav class="navbar fixed-top navbar-expand-lg navbar-dark">
2
2
  <div class="container">
3
- <a class="navbar-brand" href="{{ site.identity.logo.link }}"><img src="{{ site.identity.logo.image }}" height="32" alt="{{ site.title }}"></a>
3
+ <a class="navbar-brand" href="{{ site.data.centos.identity.logo.link }}"><img src="{{ site.data.centos.identity.logo.image }}" 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">
7
- {% for nav-item in site.navbar %}
7
+ {%- for nav-item in site.data.centos.navbar -%}
8
8
  {% if nav-item.menu.size == 0 %}
9
9
  <li class="nav-item" role="presentation"><a class="nav-link" href="{{ nav-item.link }}"><i class="{{ nav-item.icon }}"></i> {{ nav-item.name }}</a></li>
10
- {% else %}
10
+ {% else -%}
11
11
  <li class="nav-item dropdown"><a class="dropdown-toggle nav-link" data-toggle="dropdown" aria-expanded="false" href="#"><i class="{{ nav-item.icon }}"></i> {{ nav-item.name }}</a>
12
12
  <div class="dropdown-menu" role="menu">
13
- {% for dropdown-item in nav-item.menu %}
13
+ {%- for dropdown-item in nav-item.menu -%}
14
14
  <a class="dropdown-item" role="presentation" href="{{ dropdown-item.link }}">{{ dropdown-item.name }}</a>
15
- {% endfor %}
15
+ {% endfor -%}
16
16
  </div>
17
17
  </li>
18
18
  {% endif %}
19
- {% endfor %}
19
+ {%- endfor -%}
20
20
  </ul>
21
21
  </div>
22
22
  </div>
@@ -11,7 +11,7 @@
11
11
  <a href="{{ "/feed.xml" | relative_url }}"><button type="button" class="btn btn-light" data-toggle="tooltip" data-placement="top" title="RSS"><i class="fas fa-rss"></i></button></a>
12
12
  </div>
13
13
  <div class="post__nav__explorer__index">
14
- <a href="{{ "/blog.html" | relative_url }}"><button type="button" class="btn btn-light" data-toggle="tooltip" data-placement="top" title="Blog posts"><i class="fas fa-th"></i></button></a>
14
+ <a href="/{{ site.pagination.indexpage }}/"><button type="button" class="btn btn-light" data-toggle="tooltip" data-placement="top" title="Blog posts"><i class="fas fa-th"></i></button></a>
15
15
  </div>
16
16
  {% if page.next.url %}
17
17
  <div class="post__nav__explorer__older">
@@ -1,62 +1,81 @@
1
- <script src="/assets/js/lunr.min.js"></script>
1
+ <div id="search-searchbar"></div>
2
+ <div id="search-hits"></div>
3
+ <div id="search-pagination"></div>
2
4
 
5
+ <script src="/assets/js/instantsearch.min.js"></script>
6
+ <script src="/assets/js/moment.min.js"></script>
3
7
  <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
- }
8
+ const search = instantsearch({
9
+ appId: '{{ site.algolia.application_id }}',
10
+ apiKey: '{{ site.algolia.search_only_api_key }}',
11
+ indexName: '{{ site.algolia.index_name }}'
12
+ });
13
+
14
+ const hitTemplate = function(hit) {
15
+ let date = '';
16
+ if (hit.date) {
17
+ date = moment.unix(hit.date).format('MMM D, YYYY');
51
18
  }
52
- return false;
53
- }
54
- </script>
55
19
 
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>
20
+ let url = `{{ site.baseurl }}${hit.url}`;
21
+ let url_detail = `{{ site.baseurl }}${hit.url}#${hit.anchor}`;
22
+
23
+ const title = hit._highlightResult.title.value;
24
+
25
+ let breadcrumbs = '';
26
+ if (hit._highlightResult.headings) {
27
+ breadcrumbs = hit._highlightResult.headings.map(match => {
28
+ return `<span class="post-breadcrumb">${match.value}</span>`
29
+ }).join(' > ')
30
+ }
31
+
32
+ let content = "";
33
+
34
+ if (hit.html) {
35
+ content = hit.html;
36
+ }
37
+
38
+ if (hit._highlightResult.html) {
39
+ content = hit._highlightResult.html.value;
40
+ }
41
+
42
+ return `
43
+ <ul>
44
+ <li><a class="post-link" href="${url}">${title}</a> {{#breadcrumbs}}<a href="${url_detail}" class="post-breadcrumbs">${breadcrumbs}</a>{{/breadcrumbs}} ${content}</li>
45
+ </ul>
46
+ `;
47
+ }
48
+
49
+ search.addWidget(
50
+ instantsearch.widgets.searchBox({
51
+ container: '#search-searchbar',
52
+ autofocus: true,
53
+ placeholder: 'Search...',
54
+ poweredBy: true // This is required if you're on the free Community plan
55
+ })
56
+ );
59
57
 
60
- <div id="lunrsearchresults">
61
- <ul></ul>
62
- </div>
58
+ search.addWidget(
59
+ instantsearch.widgets.hits({
60
+ container: '#search-hits',
61
+ templates: {
62
+ item: hitTemplate
63
+ }
64
+ })
65
+ );
66
+
67
+ search.addWidget(
68
+ instantsearch.widgets.configure({
69
+ hitsPerPage: 5,
70
+ enablePersonalization: true,
71
+ })
72
+ );
73
+
74
+ search.addWidget(
75
+ instantsearch.widgets.pagination({
76
+ container: '#search-pagination',
77
+ })
78
+ );
79
+
80
+ search.start();
81
+ </script>
data/_layouts/home.html CHANGED
@@ -10,8 +10,20 @@
10
10
 
11
11
  <main class="home">
12
12
  <div class="home__content">
13
- {% include home/news-and-sponsors.html -%}
14
- {% include home/around.html -%}
13
+ <div class="row">
14
+ <div class="col-sm-12 col-lg-8">
15
+ {% include home/news-and-events.html %}
16
+ </div>
17
+ <div class="col-sm-12 col-lg-4">
18
+ {% include home/distributions.html -%}
19
+ {% include home/sponsors.html %}
20
+ </div>
21
+ </div>
22
+ <div class="row">
23
+ <div class="col-sm-12">
24
+ {% include home/planet.html -%}
25
+ </div>
26
+ </div>
15
27
  </div>
16
28
  </main>
17
29
 
data/_layouts/search.html CHANGED
@@ -1,18 +1,39 @@
1
- ---
2
- layout: default
3
- ---
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: 'en' }}">
4
3
 
5
- <main class="search">
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
7
+ <title>{{ page.title }}</title>
8
+ <link rel="icon" type="image/png" sizes="16x16" href="/assets/img/favicon.png">
9
+ <link rel="stylesheet" href="/assets/css/centos.bootstrap.min.css">
10
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch.min.css">
11
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.6.0/dist/instantsearch-theme-algolia.min.css">
12
+ </head>
6
13
 
7
- <div class="search__content">
8
- <div class="search__content__nav">
9
- {% include breadcrumbs.html %}
10
- {% include toc.html html=content %}
11
- </div>
14
+ <body>
15
+
16
+ {% include navbar.html -%}
17
+ {% include header.html -%}
18
+
19
+ <main class="search">
20
+
21
+ <div class="search__content">
22
+ <div class="search__content__nav">
23
+ {% include breadcrumbs.html %}
24
+ </div>
12
25
 
13
- <div class="search__results">
14
- {{ content }}
26
+ <div class="search__content_results">
27
+ {{ content }}
28
+ </div>
15
29
  </div>
16
- </div>
17
-
18
- </main>
30
+
31
+ </main>
32
+
33
+ {% include footer.html -%}
34
+
35
+ <script src="/assets/js/jquery.min.js"></script>
36
+ <script src="/assets/js/bootstrap.min.js"></script>
37
+ </body>
38
+
39
+ </html>