Skip to content

Commit

Permalink
major updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Redgadget committed Sep 13, 2016
1 parent 3b40873 commit 0df15f3
Show file tree
Hide file tree
Showing 15 changed files with 196 additions and 34 deletions.
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ description: > # this means to ignore newlines until "baseurl:"
baseurl: "/cards" # the subpath of your site, e.g. /blog
url: "http://webjeda.com" # the base hostname & protocol for your site

#sidebar
default-image: webjeda-logo-big.jpg # If there is no featured image in a post then this image will be showed. Also on all pages this image will be showed. Use a 500x250 image.

#footer
built-by: webjeda

Expand All @@ -25,6 +28,8 @@ permalink: /:title/
paginate: 9
paginate_path: /page:num/

analytics: UA-83979019-1
disqus-shortname: webjeda-demo

#social
facebook: http://facebook.com/webjeda
Expand All @@ -37,7 +42,6 @@ fb-app-id: 549480635219583
fb-page-url: https://www.facebook.com/webjeda/
fb-page-title: webjeda

analytics: UA-71358787-1

sass:
style: compressed
Expand Down
11 changes: 11 additions & 0 deletions _includes/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="disqus_thread"></div>
<script defer>
(function() {
var d = document, s = d.createElement('script');
s.src = '//{{site.disqus-shortname}}.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>

6 changes: 5 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<div class="row mt20">

<div class="col-md-4 text-center">All rights reserved by <a target="_blank" href="http://webjeda.com">WebJeda</a></div>
<div class="col-md-4 text-center" ><a target="_blank" href="http://webjeda.com"><img src="https://img.shields.io/badge/Built%20by-{{site.built-by}}-blue.svg" alt="{{site.built-by}}"></a></div>
<div class="col-md-4 text-center" >
{% if site.built-by %}
<a target="_blank" href="http://webjeda.com"><img src="https://img.shields.io/badge/Built%20by-webjeda-blue.svg" alt="{{site.built-by}}"></a>
{% endif %}
</div>
<div class="col-md-4 text-center">
<a target="_blank" href="{{site.facebook}}"><li class="social facebook"><img src="{{site.baseurl}}/images/facebook.svg" alt="{{site.facebook}}"></li></a>
<a target="_blank" href="{{site.quora}}"><li class="social quora"><img src="{{site.baseurl}}/images/quora.svg" alt="{{site.quora}}"></li></a>
Expand Down
20 changes: 11 additions & 9 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
{% seo title=false %}

{% seo %}

<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<style>
{% capture include_to_scssify %}
{% include main.scss %}
{% endcapture %}
{{ include_to_scssify | scssify }}
</style>


<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{site.baseurl}}/"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1083.6 166.5" width="200"><style>.a{fill:#1B1A1B;}</style><path d="M150 155l-70-38.4L10 155V15h140V155z" fill="#2980BA"/><path d="M155.5 164.3l-75.5-41.4L4.5 164.3V9.5h151V164.3zM15.5 20.5V145.7l64.5-35.4 64.5 35.4V20.5H15.5z" class="a"/><path d="M279.6 94v7h25.4v54H170V15h135v54h-25.4v7h25.4v18H279.6z" fill="#24AE5F"/><path d="M310.5 160.5H164.5V9.5h146V160.5zM175.5 149.5h124v-43h-25.4v-18h25.4v-7h-25.4V63.5h25.4v-43H175.5V149.5z" class="a"/><path d="M391.6 15c7 0 13 1 17 2.6 12.4 5 21 17.2 21 31.2 16.2 10.4 26.8 28.2 26.8 48.6 0 24-14.8 44.8-35.8 53.4 -6.6 2.6-17.2 4.2-29 4.2h-66.6V15H391.6z" fill="#F29C1F"/><path d="M391.6 160.5h-72.1V9.5h72.1c7.5 0 14.2 1.1 19 3 13.9 5.6 23.2 18.5 24.3 33.3 16.9 11.9 26.9 31 26.9 51.6 0 25.8-15.4 48.7-39.2 58.5C415.2 158.8 403.9 160.5 391.6 160.5zM330.5 149.5h61.1c10.8 0 20.9-1.4 27-3.8 19.6-8 32.3-27 32.3-48.3 0-17.8-9.1-34.2-24.3-44l-2.5-1.6v-3c0-11.6-6.9-21.8-17.6-26.1 -3.5-1.4-8.9-2.2-14.9-2.2h-61.1V149.5z" class="a"/><path d="M609.8 85c0 38.6-31.4 70-70 70s-70-31.4-70-70h36.2V15h103.8V85z" fill="#2C3E50"/><path d="M539.8 160.5c-41.6 0-75.5-33.9-75.5-75.5v-5.5h36.2V9.5h114.8V85C615.3 126.6 581.4 160.5 539.8 160.5zM475.5 90.5c2.8 33 30.6 59 64.3 59 35.6 0 64.5-28.9 64.5-64.5V20.5h-92.8V90.5H475.5z" class="a"/><path d="M740.2 94v7h25.4v54H630.6V15h135v54h-25.4v7h25.4v18H740.2z" fill="#894B9D"/><path d="M771.1 160.5H625.1V9.5h146V160.5zM636.1 149.5h124v-43h-25.4v-18h25.4v-7h-25.4V63.5h25.4v-43H636.1V149.5z" class="a"/><path d="M925.6 85c0 38.6-31.4 70-70 70h-70V15h70C894.2 15 925.6 46.4 925.6 85z" fill="#D25627"/><path d="M855.6 160.5h-75.5V9.5h75.5c41.6 0 75.5 33.9 75.5 75.5C931.1 126.6 897.2 160.5 855.6 160.5zM791.1 149.5h64.5c35.6 0 64.5-28.9 64.5-64.5 0-35.6-28.9-64.5-64.5-64.5h-64.5V149.5z" class="a"/><path d="M916.6 155l76.8-140 77 140H916.6z" fill="#EE2A5A"/><path d="M1079.7 160.5h-172.4L993.4 3.6 1079.7 160.5zM925.9 149.5h135.2L993.4 26.4 925.9 149.5z" class="a"/></svg></a>
<a class="navbar-brand" href="{{site.baseurl}}/">{{site.title}}</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
Expand Down
9 changes: 0 additions & 9 deletions css/main.scss → _includes/main.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";



// Our variables
$base-font-family: Georgia, "Times New Roman", Times, serif;
$base-font-size: 16px;
Expand Down Expand Up @@ -47,8 +40,6 @@ $on-laptop: 800px;

// Import partials from `sass_dir` (defaults to `_sass`)
@import
"bootstrap-readable",
"layout",
"syntax-highlighting",
"custom"
;
10 changes: 5 additions & 5 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div class="col-md-4 mt20">
<div class="row post-img">
<div class="post-img">
{% if page.img %}
<img src="{{site.baseurl}}/images/{{page.img}}" alt="{{page.title}}">
<img width="600" src="{{site.baseurl}}/images/{{page.img}}" alt="{{page.title}}">
{% else %}
<img src="{{site.baseurl}}/images/webjeda-logo-big.jpg" alt="webjeda">
<img width="600" src="{{site.baseurl}}/images/{{site.default-image}}" alt="webjeda">
{% endif %}
</div>


<div class="row mt10 recent">
<div class="mt10 recent">
<h2>Recent articles</h2>
<ul>
{% for post in site.related_posts limit:3 %}
Expand All @@ -21,7 +21,7 @@ <h2>Recent articles</h2>
</ul>
</div>

<div class="row mt10">
<div class="mt10">
<div class="fb-page" data-href="https://www.facebook.com/webjeda/" data-width="400" data-small-header="true" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="true"><blockquote cite="https://www.facebook.com/webjeda/" class="fb-xfbml-parse-ignore"><a href="{{site.fb-page-url}}">{{site.fb-page-title}}</a></blockquote></div>
</div>

Expand Down
10 changes: 10 additions & 0 deletions _layouts/compress.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.0.1
# http://jch.penibelst.de/
# © 2014–2015 Anatol Broder
# MIT License
---

{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% assign _lastchar = _pres.last | split: "" | last %}{% assign _outerloop = forloop %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if forloop.last and _lastchar == _LINE_FEED %}{% unless _outerloop.last %}{{ _LINE_FEED }}{% endunless %}{% continue %}{% endif %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
21 changes: 21 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: compress
---
<!DOCTYPE html>
<html>

Expand All @@ -14,6 +17,24 @@
</div>

{% include footer.html %}

<script>
(function() {
var font = document.createElement('link');
var font2 = document.createElement('link');
font.type = 'text/css';
font2.type = 'text/css';
font.rel = 'stylesheet';
font2.rel = 'stylesheet';
font.href = '{{site.baseurl}}/css/syntax-highlighting.css';
font2.href = '{{site.baseurl}}/css/bootstrap.min.css';
var s = document.getElementsByTagName('link')[0];
var t = document.getElementsByTagName('link')[0];
s.parentNode.insertBefore(font, s);
t.parentNode.insertBefore(font2, t);
})();
</script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="{{site.baseurl}}/js/bootstrap.min.js"></script>
{% if site.analytics %}{% include analytics.html %}{% endif %}
Expand Down
9 changes: 8 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,21 @@
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
/

</header>

<div class="post-content" itemprop="articleBody">
{{ content }}
</div>

</article>
<div class="row">
{% if site.disqus-shortname %}
{% include disqus.html %}
{% endif %}
</div>


<div class="row">
<ul class="pager">
{% if page.next.url %}
Expand Down
11 changes: 10 additions & 1 deletion _posts/2016-05-07-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ Make changes to the **master** branch and create a pull request. Do not use **gh


# License
MIT License
MIT License

# Changelog
<pre>
version 1.0 - SEO, disqus, page-speed enhancement, compressed html.

version 0.9 - Sidebar default image and other minor improvements.

version 0.8 - Bootstrap based cards layout theme.
</pre>
6 changes: 1 addition & 5 deletions _sass/_bootstrap-readable.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4279,11 +4279,7 @@ select[multiple].input-group-sm > .input-group-btn > .btn {
border-width: 1px 0 0;
}
.navbar-brand {
float: left;
padding: 21.5px 15px;
font-size: 20px;
line-height: 22px;
height: 65px;

}
.navbar-brand:hover,
.navbar-brand:focus {
Expand Down
7 changes: 6 additions & 1 deletion _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ img {
margin-top: 10px;
}
.navbar-brand {
line-height: 3;
font-weight: 900;
font-size: 1.85em;
padding: 10px;
@media screen and (max-width: $on-palm) {
font-size: 1.5em;
}
}
.post-meta {
color: $grey-color;
Expand Down
51 changes: 51 additions & 0 deletions css/bootstrap.min.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";



// Our variables
$base-font-family: Georgia, "Times New Roman", Times, serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;

$spacing-unit: 30px;

$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;

$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);

// Width of the content area
$content-width: 800px;

$on-palm: 600px;
$on-laptop: 800px;



// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}



// Import partials from `sass_dir` (defaults to `_sass`)
@import
"bootstrap-readable"
;
51 changes: 51 additions & 0 deletions css/syntax-highlighting.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";



// Our variables
$base-font-family: Georgia, "Times New Roman", Times, serif;
$base-font-size: 16px;
$base-font-weight: 400;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;

$spacing-unit: 30px;

$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;

$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);

// Width of the content area
$content-width: 800px;

$on-palm: 600px;
$on-laptop: 800px;



// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}



// Import partials from `sass_dir` (defaults to `_sass`)
@import
"syntax-highlighting"
;

0 comments on commit 0df15f3

Please sign in to comment.