forked from sujaykundu777/devlopr-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ec3fbc
commit f5ce376
Showing
14 changed files
with
142 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-feed' | ||
gem 'jekyll-sitemap' | ||
gem 'jekyll-seo-tag' | ||
gem 'jekyll-analytics' | ||
gem 'jekyll-algolia' | ||
gem 'jekyll-menus' | ||
end | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<style> | ||
#search-searchbar{ | ||
width: 100%; | ||
text-align: center; | ||
margin-top: 20px; | ||
} | ||
|
||
.ais-search-box { | ||
margin-top: 15px; | ||
margin-bottom: 15px; | ||
} | ||
|
||
.ais-hits--item{ | ||
float:left; | ||
} | ||
|
||
</style> | ||
|
||
<script> | ||
/* Instanciating InstantSearch.js with Algolia credentials */ | ||
const search = instantsearch({ | ||
appId: '{{ site.algolia.application_id }}', | ||
indexName: '{{ site.algolia.index_name }}', | ||
apiKey: '{{ site.algolia.search_only_api_key }}' | ||
}); | ||
|
||
search.addWidget( | ||
instantsearch.widgets.searchBox({ | ||
container: '#search-searchbar', | ||
placeholder: 'Search into posts...', | ||
poweredBy: true | ||
}) | ||
); | ||
|
||
search.addWidget( | ||
instantsearch.widgets.hits({ | ||
container: '#search-hits', | ||
templates: { | ||
item: function(hit) { | ||
return ` | ||
<div class="card blog-post"> | ||
<img class="card-img-top" src="${ hit.thumbnail }" alt="${ hit.title }"> | ||
<div class="card-body center"> | ||
<img src="/assets/img/{{ site.author_logo }}" class="author-profile-img"> | ||
<h4 class="card-title">${ hit.title }</h4> | ||
<h6 class="card-subtitle mb-2 text-muted">${moment.unix(hit.date).format('MMM D, YYYY')}</h6> | ||
<p class="card-text">${hit.summary }</p> | ||
<a href="${hit.url}" data-disqus-identifier="${hit.url}" class="btn btn-primary btn-sm">Read</a> | ||
<span class="disqus-comment-count" data-disqus-identifier="${ hit.url }"></span> | ||
</div> | ||
</div> | ||
`; | ||
} | ||
} | ||
}) | ||
); | ||
|
||
search.start(); | ||
|
||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
<div class="col-lg-4"> | ||
<div class="card"> | ||
<div class="card-header"> About </div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,13 @@ | |
crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" | ||
crossorigin="anonymous"> | ||
<!-- Including InstantSearch.js library and styling --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script> | ||
<link href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch-theme-algolia.min.css"> | ||
|
||
<script> | ||
(function(d, h, m){ | ||
var js, fjs = d.getElementsByTagName(h)[0]; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
--- | ||
layout: default | ||
--- | ||
<div class="row"> | ||
|
||
<div class="row"> | ||
|
||
</div> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-lg-8 col-md-4"> | ||
|
||
<!-- Blog Posts --> | ||
{%- include blog_posts.html -%} | ||
|
||
|
||
{%- include blog_posts.html -%} | ||
|
||
{%- include algolia_search.html -%} | ||
</div> | ||
|
||
|
||
{%- include blog_sidebar.html -%} | ||
</div> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
{%- include algolia_search.html -%} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,8 @@ code { | |
color:#fff; | ||
|
||
|
||
|
||
|
||
@media (min-width: 320px) and (max-width: 480px) { | ||
header { | ||
height: auto; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters