best-blogging-theme 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/_data/blog/authors.yml +11 -0
- data/_data/blog/blog.yml +3 -0
- data/_data/blog/nav.json +14 -0
- data/_data/blog/share.yml +28 -0
- data/_includes/author_bio.html +12 -0
- data/_includes/custom-head.html +37 -0
- data/_includes/disqus_comments.html +11 -0
- data/_includes/footer/index.html +73 -0
- data/_includes/header/index.html +9 -0
- data/_includes/header/nav-menu.html +38 -0
- data/_includes/pagination.html +30 -0
- data/_includes/paginationPostPage.html +17 -0
- data/_includes/postbox.html +38 -0
- data/_includes/scripts.html +2 -0
- data/_includes/search-lunr.html +11 -0
- data/_includes/section/alertbar.html +12 -0
- data/_includes/section/count.html +22 -0
- data/_layouts/blog.html +75 -0
- data/_layouts/categories.html +25 -0
- data/_layouts/post.html +63 -0
- data/_sass/_main.scss +24 -0
- data/_sass/theme/_blog.scss +197 -0
- data/_sass/theme/_footer.scss +65 -0
- data/_sass/theme/_header.scss +136 -0
- data/_sass/theme/_pagination.scss +23 -0
- data/_sass/theme/pagination2.scss +36 -0
- data/assets/css/main.scss +7 -0
- data/assets/images/bebo-logo.svg +41 -0
- data/assets/images/blogger-logotype.svg +48 -0
- data/assets/images/cancel.png +0 -0
- data/assets/images/favicon-16x16.png +0 -0
- data/assets/images/favicon.ico +0 -0
- data/assets/images/manpreet.png +0 -0
- data/assets/images/menu.png +0 -0
- data/assets/images/ram.png +0 -0
- data/assets/js/lazyload.js +258 -0
- data/assets/js/lunr.js +2977 -0
- data/assets/js/lunrsearchengine.js +89 -0
- data/assets/js/thefrontendworld.js +13 -0
- data/readme.md +1 -0
- metadata +125 -0
@@ -0,0 +1,89 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
sitemap: false
|
4
|
+
---
|
5
|
+
|
6
|
+
{% assign counter = 0 %}
|
7
|
+
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' or page.url contains 'category' or page.url contains 'tag' %}{% else %}{
|
8
|
+
"id": {{ counter }},
|
9
|
+
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
|
10
|
+
"title": "{{ page.title }}",
|
11
|
+
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
|
12
|
+
}, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
|
13
|
+
"id": {{ counter }},
|
14
|
+
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
|
15
|
+
"title": "{{ page.title }}",
|
16
|
+
"body": "{{ page.content | markdownify | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
|
17
|
+
}, {% endfor %}{% for page in site.posts %}{
|
18
|
+
"id": {{ counter }},
|
19
|
+
"url": "{{ site.url }}{{site.baseurl}}{{ page.url }}",
|
20
|
+
"title": "{{ page.title }}",
|
21
|
+
"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 %}
|
22
|
+
}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}];
|
23
|
+
|
24
|
+
var idx = lunr(function () {
|
25
|
+
this.ref('id')
|
26
|
+
this.field('title')
|
27
|
+
this.field('body')
|
28
|
+
|
29
|
+
documents.forEach(function (doc) {
|
30
|
+
this.add(doc)
|
31
|
+
}, this)
|
32
|
+
});
|
33
|
+
function lunr_search(term) {
|
34
|
+
document.getElementById('lunrsearchresults').innerHTML = '<ul></ul>';
|
35
|
+
if(term) {
|
36
|
+
document.getElementById('lunrsearchresults').innerHTML = "<p>Search results for '" + term + "'</p>" + document.getElementById('lunrsearchresults').innerHTML;
|
37
|
+
//put results on the screen.
|
38
|
+
var results = idx.search(term);
|
39
|
+
if(results.length>0){
|
40
|
+
//console.log(idx.search(term));
|
41
|
+
//if results
|
42
|
+
for (var i = 0; i < results.length; i++) {
|
43
|
+
// more statements
|
44
|
+
var ref = results[i]['ref'];
|
45
|
+
var url = documents[ref]['url'];
|
46
|
+
var title = documents[ref]['title'];
|
47
|
+
var body = documents[ref]['body'].substring(0,160)+'...';
|
48
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span><br /><span class='body'>"+ body +"</span><br /><span class='url'>"+ url +"</span></a></li>";
|
49
|
+
}
|
50
|
+
} else {
|
51
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>No results found...</li>";
|
52
|
+
}
|
53
|
+
}
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
|
57
|
+
function lunr_search(term) {
|
58
|
+
$('#lunrsearchresults').show( 400 );
|
59
|
+
$( "body" ).addClass( "modal-open" );
|
60
|
+
|
61
|
+
document.getElementById('lunrsearchresults').innerHTML = '<div id="resultsmodal" class="modal fade show d-block" tabindex="-1" role="dialog" aria-labelledby="resultsmodal"> <div class="modal-dialog shadow-lg" role="document"> <div class="modal-content"> <div class="modal-header" id="modtit"> <button type="button" class="close" id="btnx" data-dismiss="modal" aria-label="Close"> × </button> </div> <div class="modal-body"> <ul class="mb-0"> </ul> </div> <div class="modal-footer"><button id="btnx" type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Close</button></div></div> </div></div>';
|
62
|
+
if(term) {
|
63
|
+
document.getElementById('modtit').innerHTML = "<h5 class='modal-title'>Search results for '" + term + "'</h5>" + document.getElementById('modtit').innerHTML;
|
64
|
+
//put results on the screen.
|
65
|
+
var results = idx.search(term);
|
66
|
+
if(results.length>0){
|
67
|
+
//console.log(idx.search(term));
|
68
|
+
//if results
|
69
|
+
for (var i = 0; i < results.length; i++) {
|
70
|
+
// more statements
|
71
|
+
var ref = results[i]['ref'];
|
72
|
+
var url = documents[ref]['url'];
|
73
|
+
var title = documents[ref]['title'];
|
74
|
+
var body = documents[ref]['body'].substring(0,160)+'...';
|
75
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" + title + "</span><br /><small><span class='body'>"+ body +"</span><br /><span class='url'>"+ url +"</span></small></a></li>";
|
76
|
+
}
|
77
|
+
} else {
|
78
|
+
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = "<li class='lunrsearchresult'>Sorry, no results found. Close & try a different search!</li>";
|
79
|
+
}
|
80
|
+
}
|
81
|
+
return false;
|
82
|
+
}
|
83
|
+
|
84
|
+
$(function() {
|
85
|
+
$("#lunrsearchresults").on('click', '#btnx', function () {
|
86
|
+
$('#lunrsearchresults').hide( 5 );
|
87
|
+
$( "body" ).removeClass( "modal-open" );
|
88
|
+
});
|
89
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
$(document).ready(function () {
|
2
|
+
console.log('connected')
|
3
|
+
|
4
|
+
const navbarToggler = $('.navbar-toggler')
|
5
|
+
const transformingBars = $('.transforming-bars')
|
6
|
+
const navbarCollapse = $('.navbar-collapse')
|
7
|
+
|
8
|
+
$(navbarToggler).click(function () {
|
9
|
+
$(transformingBars).toggleClass('barsActive')
|
10
|
+
$(navbarCollapse).toggleClass('activeNav')
|
11
|
+
$(navbarCollapse).css('width', '300px')
|
12
|
+
})
|
13
|
+
})
|
data/readme.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
BLOGTHEME
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: best-blogging-theme
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- manpreet-choudhary
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-03-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.9'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '12.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '12.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- rc4329915@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- _data/blog/authors.yml
|
63
|
+
- _data/blog/blog.yml
|
64
|
+
- _data/blog/nav.json
|
65
|
+
- _data/blog/share.yml
|
66
|
+
- _includes/author_bio.html
|
67
|
+
- _includes/custom-head.html
|
68
|
+
- _includes/disqus_comments.html
|
69
|
+
- _includes/footer/index.html
|
70
|
+
- _includes/header/index.html
|
71
|
+
- _includes/header/nav-menu.html
|
72
|
+
- _includes/pagination.html
|
73
|
+
- _includes/paginationPostPage.html
|
74
|
+
- _includes/postbox.html
|
75
|
+
- _includes/scripts.html
|
76
|
+
- _includes/search-lunr.html
|
77
|
+
- _includes/section/alertbar.html
|
78
|
+
- _includes/section/count.html
|
79
|
+
- _layouts/blog.html
|
80
|
+
- _layouts/categories.html
|
81
|
+
- _layouts/post.html
|
82
|
+
- _sass/_main.scss
|
83
|
+
- _sass/theme/_blog.scss
|
84
|
+
- _sass/theme/_footer.scss
|
85
|
+
- _sass/theme/_header.scss
|
86
|
+
- _sass/theme/_pagination.scss
|
87
|
+
- _sass/theme/pagination2.scss
|
88
|
+
- assets/css/main.scss
|
89
|
+
- assets/images/bebo-logo.svg
|
90
|
+
- assets/images/blogger-logotype.svg
|
91
|
+
- assets/images/cancel.png
|
92
|
+
- assets/images/favicon-16x16.png
|
93
|
+
- assets/images/favicon.ico
|
94
|
+
- assets/images/manpreet.png
|
95
|
+
- assets/images/menu.png
|
96
|
+
- assets/images/ram.png
|
97
|
+
- assets/js/lazyload.js
|
98
|
+
- assets/js/lunr.js
|
99
|
+
- assets/js/lunrsearchengine.js
|
100
|
+
- assets/js/thefrontendworld.js
|
101
|
+
- readme.md
|
102
|
+
homepage: https://github.com/ManpreetChoudhary/Blogging-Theme
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubygems_version: 3.1.4
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: You can import and use Blog theme in your projects.
|
125
|
+
test_files: []
|