jekyll-clean-dark 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +96 -0
- data/README.md +62 -0
- data/_includes/collecttags.html +18 -0
- data/_includes/disqus-comments.html +18 -0
- data/_includes/disqus-counts.html +12 -0
- data/_includes/footer.html +8 -0
- data/_includes/google-analytics.html +15 -0
- data/_includes/header.html +63 -0
- data/_includes/share.html +73 -0
- data/_includes/sidebar.html +20 -0
- data/_includes/social.html +41 -0
- data/_includes/yandex-metrica.html +3 -0
- data/_layouts/page.html +21 -0
- data/_layouts/post.html +45 -0
- data/_layouts/tag_index.html +22 -0
- data/_posts/2015-11-01-installation.md +34 -0
- data/_posts/2016-07-01-images.md +47 -0
- data/_posts/2016-08-01-analytics-tags-comments.md +29 -0
- data/_posts/2016-09-16-be-social.md +101 -0
- data/_posts/2016-09-20-customizations.md +122 -0
- data/_posts/2016-10-01-code-syntax-highlighting.md +81 -0
- data/_posts/2016-11-02-text-formatting.md +72 -0
- data/_posts/2016-12-01-jekyll-clean-theme.md +27 -0
- data/assets/css/bootstrap.min.css +5 -0
- data/assets/css/font-awesome/HELP-US-OUT.txt +7 -0
- data/assets/css/font-awesome/css/font-awesome.css +2026 -0
- data/assets/css/font-awesome/css/font-awesome.min.css +4 -0
- data/assets/css/font-awesome/fonts/FontAwesome.otf +0 -0
- data/assets/css/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/assets/css/font-awesome/fonts/fontawesome-webfont.svg +640 -0
- data/assets/css/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/css/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/assets/css/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/css/font-awesome/less/animated.less +34 -0
- data/assets/css/font-awesome/less/bordered-pulled.less +25 -0
- data/assets/css/font-awesome/less/core.less +12 -0
- data/assets/css/font-awesome/less/fixed-width.less +6 -0
- data/assets/css/font-awesome/less/font-awesome.less +17 -0
- data/assets/css/font-awesome/less/icons.less +677 -0
- data/assets/css/font-awesome/less/larger.less +13 -0
- data/assets/css/font-awesome/less/list.less +19 -0
- data/assets/css/font-awesome/less/mixins.less +26 -0
- data/assets/css/font-awesome/less/path.less +15 -0
- data/assets/css/font-awesome/less/rotated-flipped.less +20 -0
- data/assets/css/font-awesome/less/stacked.less +20 -0
- data/assets/css/font-awesome/less/variables.less +688 -0
- data/assets/css/font-awesome/scss/_animated.scss +34 -0
- data/assets/css/font-awesome/scss/_bordered-pulled.scss +25 -0
- data/assets/css/font-awesome/scss/_core.scss +12 -0
- data/assets/css/font-awesome/scss/_fixed-width.scss +6 -0
- data/assets/css/font-awesome/scss/_icons.scss +677 -0
- data/assets/css/font-awesome/scss/_larger.scss +13 -0
- data/assets/css/font-awesome/scss/_list.scss +19 -0
- data/assets/css/font-awesome/scss/_mixins.scss +26 -0
- data/assets/css/font-awesome/scss/_path.scss +15 -0
- data/assets/css/font-awesome/scss/_rotated-flipped.scss +20 -0
- data/assets/css/font-awesome/scss/_stacked.scss +20 -0
- data/assets/css/font-awesome/scss/_variables.scss +688 -0
- data/assets/css/font-awesome/scss/font-awesome.scss +17 -0
- data/assets/css/pics/background/3px-tile.png +0 -0
- data/assets/css/pics/background/asfalt-light.png +0 -0
- data/assets/css/pics/background/black-linen.png +0 -0
- data/assets/css/pics/background/food.png +0 -0
- data/assets/css/pics/background/gplay.png +0 -0
- data/assets/css/pics/background/green-dust-and-scratches.png +0 -0
- data/assets/css/pics/background/hexellence.png +0 -0
- data/assets/css/pics/background/random-grey-variations.png +0 -0
- data/assets/css/pics/background/shley-tree-1.png +0 -0
- data/assets/css/pics/background/subtle-grey.png +0 -0
- data/assets/css/pics/background/triangles.png +0 -0
- data/assets/css/pics/background/xv.png +0 -0
- data/assets/css/pics/dark-theme-iphone.png +0 -0
- data/assets/css/pics/dark-theme-tablet.png +0 -0
- data/assets/css/pics/dark-theme-tablet1.png +0 -0
- data/assets/css/syntax.scss +148 -0
- data/assets/css/theme.scss +377 -0
- data/assets/images/ava.jpg +0 -0
- data/assets/images/batWid1.png +0 -0
- data/assets/images/cc_by_88x31.png +0 -0
- data/assets/images/dark_matter.png +0 -0
- data/assets/images/deer.jpg +0 -0
- data/assets/images/ipad_landscape.PNG +0 -0
- data/assets/images/ipad_portrait.PNG +0 -0
- data/assets/images/iphone_landscape.PNG +0 -0
- data/assets/images/iphone_portrait.PNG +0 -0
- data/assets/images/mike.jpeg +0 -0
- data/assets/images/preview1.jpg +0 -0
- data/assets/images/preview2.jpg +0 -0
- data/assets/images/preview3.jpg +0 -0
- data/assets/js/bootstrap.min.js +6 -0
- data/assets/js/header.js +11 -0
- data/assets/js/jquery.min.js +4 -0
- data/assets/js/toc.js +88 -0
- metadata +107 -28
data/_layouts/page.html
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
{% include header.html %}
|
2
|
+
|
3
|
+
<div class="wrapper">
|
4
|
+
<div class="content">
|
5
|
+
<div class="container container-center">
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-8">
|
8
|
+
<div class="well">
|
9
|
+
{{ content }}
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="col-md-4 hidden-xs">
|
13
|
+
{% include sidebar.html %}
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
{% include footer.html %}
|
19
|
+
</div>
|
20
|
+
</body>
|
21
|
+
</html>
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
{% include header.html %}
|
2
|
+
<div class="wrapper">
|
3
|
+
<div class="content">
|
4
|
+
<div class="container container-center">
|
5
|
+
<div class="row">
|
6
|
+
<div class="col-md-8">
|
7
|
+
<div class="article">
|
8
|
+
<div class="well">
|
9
|
+
<h1><a href="{{ page.url | relative_url }}">{{ page.title }}</a></h1>
|
10
|
+
<div class="post-meta">
|
11
|
+
<div class="post-time">
|
12
|
+
<i class="fa fa-calendar"></i>
|
13
|
+
<time>{{ page.date | date_to_string }}</time>
|
14
|
+
</div>
|
15
|
+
<ul>
|
16
|
+
{% for tag in page.tags %}
|
17
|
+
<li><a href="{{ '/tag/' | append: tag | relative_url }}">{{ tag }}</a></li>
|
18
|
+
{% endfor %}
|
19
|
+
</ul>
|
20
|
+
</div>
|
21
|
+
<div class="post-content">
|
22
|
+
<div id="toc" class="toc"></div>
|
23
|
+
{{ content }}
|
24
|
+
{% include share.html %}
|
25
|
+
</div>
|
26
|
+
{% if page.comments %}
|
27
|
+
<div id="disqus_thread">
|
28
|
+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
29
|
+
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
30
|
+
</div>
|
31
|
+
{% endif %}
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<div class="col-md-4 hidden-xs">
|
36
|
+
{% include sidebar.html %}
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
{% include disqus-comments.html %}
|
41
|
+
</div>
|
42
|
+
{% include footer.html %}
|
43
|
+
</div>
|
44
|
+
</body>
|
45
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
---
|
4
|
+
<div class="page-content wc-container">
|
5
|
+
|
6
|
+
<div class="post">
|
7
|
+
<h2 class="post_title">{{page.title}}</h2>
|
8
|
+
<ul>
|
9
|
+
{% for post in site.posts %}
|
10
|
+
{% for tag in post.tags %}
|
11
|
+
{% if tag == page.tag %}
|
12
|
+
<li class="archive_list">
|
13
|
+
<time>{{ post.date | date_to_string }}</time>
|
14
|
+
<a class="archive_list_article_link" href='{{ post.url | relative_url }}'>{{post.title}}</a>
|
15
|
+
<p>{{post.description}}</p>
|
16
|
+
</li>
|
17
|
+
{% endif %}
|
18
|
+
{% endfor %}
|
19
|
+
{% endfor %}
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Installation"
|
4
|
+
date: 2015-11-01 16:25:06
|
5
|
+
description: Here you'll find out how to install this theme
|
6
|
+
tags:
|
7
|
+
- installation
|
8
|
+
---
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
If you dont't have your own blog you can clone this repository and put your articles in a `_posts` folder.
|
13
|
+
If you already have your own blog then I think you can clone this repository and copy-paste content keeping your `_posts` folder.
|
14
|
+
|
15
|
+
After you will have to set up your `_config.yml`
|
16
|
+
|
17
|
+
## License
|
18
|
+
|
19
|
+
The content of this theme is distributed and licensed under a [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/legalcode)
|
20
|
+
|
21
|
+
> This license lets others distribute, remix, tweak, and build upon your work,
|
22
|
+
> even commercially, as long as they credit you for the original creation. This
|
23
|
+
> is the most accommodating of licenses offered. Recommended for maximum
|
24
|
+
> dissemination and use of licensed materials.
|
25
|
+
|
26
|
+
In other words: you can do anything you want with this theme on any site, just please
|
27
|
+
provide a link to the original theme on github.
|
28
|
+
|
29
|
+
This theme includes the following files which are the properties of their
|
30
|
+
respective owners:
|
31
|
+
|
32
|
+
* js/bootstrap.min.js - [bootstrap](http://getbootstrap.com)
|
33
|
+
* css/bootstrap.min.css - [bootstrap](http://getbootstrap.com)
|
34
|
+
* js/jquery.min.js - [jquery](https://jquery.com)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Images"
|
4
|
+
date: 2016-07-01 16:25:06
|
5
|
+
tags: images jekyll
|
6
|
+
description: Sample post showing how to use images
|
7
|
+
---
|
8
|
+
|
9
|
+
## Introduction
|
10
|
+
|
11
|
+
This theme supports two types of images:
|
12
|
+
|
13
|
+
- inline images: ![Battery Widget]({{ '/assets/images/batWid1.png' | relative_url }})
|
14
|
+
|
15
|
+
{% highlight html %}
|
16
|
+
{% raw %}
|
17
|
+
![Battery Widget]({{ '/assets/images/batWid1.png' | relative_url }})
|
18
|
+
{% endraw %}
|
19
|
+
{% endhighlight html %}
|
20
|
+
|
21
|
+
- centered images with caption (optional):
|
22
|
+
|
23
|
+
![img]({{ '/assets/images/deer.jpg' | relative_url }}){: .center-image }*(°0°)*
|
24
|
+
|
25
|
+
{% highlight html %}
|
26
|
+
{% raw %}
|
27
|
+
![img]({{ '/assets/images/deer.jpg' | relative_url }}){: .center-image }*(°0°)*
|
28
|
+
{% endraw %}
|
29
|
+
{% endhighlight html %}
|
30
|
+
|
31
|
+
You can apply your own styles to image by creating css class with style:
|
32
|
+
|
33
|
+
{% highlight css %}
|
34
|
+
.custom-image-style
|
35
|
+
{
|
36
|
+
/* your style */
|
37
|
+
}
|
38
|
+
{% endhighlight css %}
|
39
|
+
|
40
|
+
And then applying your style just after the image in curly brackets with colon:
|
41
|
+
|
42
|
+
{% highlight html %}
|
43
|
+
{% raw %}
|
44
|
+
[!image](path to image){:.custom-image-style}
|
45
|
+
{% endraw %}
|
46
|
+
{% endhighlight html %}
|
47
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Analytics, tags and comments"
|
4
|
+
date: 2016-08-01 16:25:06
|
5
|
+
description: Here you'll find how to setup analytics, tags and comments for your blog
|
6
|
+
tags:
|
7
|
+
- jekyll
|
8
|
+
- analytics
|
9
|
+
- tags
|
10
|
+
- comments
|
11
|
+
---
|
12
|
+
|
13
|
+
# Analytics
|
14
|
+
|
15
|
+
#### [Google Analytics](http://www.google.com/analytics/)
|
16
|
+
|
17
|
+
To enable Google Analytics create an account [here](https://analytics.google.com). Then add your tracking id in `config.xml`, it should look something like `UA-********-1`
|
18
|
+
|
19
|
+
#### [Yandex Metrica](http://metrica.yandex.com)
|
20
|
+
|
21
|
+
To enable Yandex Metrica you need to register, create a 'counter' and then copy-paste it's code in `/_includes/yandex-metrica.html` file.
|
22
|
+
|
23
|
+
# Tags
|
24
|
+
|
25
|
+
To use this feature you simply will need to create a markdown file for each tag which you are using in you site in **tag** folder. To simplify this procedure there is an [/admin](http://pavelmakhov.com/jekyll-clean-dark/admin.html) page, which outputs the bash command which you just need to run inside **tag** folder of your site. Also don't forget to rerun it when you add a post with new tag.
|
26
|
+
|
27
|
+
# Comments
|
28
|
+
|
29
|
+
To enable [Disqus](http://disqus.com) register on the site and then just put your name in `_config.xml`. Comments could be switched on and off on per post basis, just put `comments: true` to enable them.
|
@@ -0,0 +1,101 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Be social"
|
4
|
+
date: 2016-09-15 16:25:06
|
5
|
+
description: Built-in share buttons!
|
6
|
+
share: true
|
7
|
+
tags:
|
8
|
+
- tags
|
9
|
+
---
|
10
|
+
|
11
|
+
# Social icons
|
12
|
+
|
13
|
+
You can have social icons which could lead to your social profile.
|
14
|
+
Out-of-the box it has:
|
15
|
+
|
16
|
+
<ul class="social-media">
|
17
|
+
<li>
|
18
|
+
<a title="Github"
|
19
|
+
href="https://github.com/{{ site.social.github }}"
|
20
|
+
target="_blank"><i class="fa fa-github fa-2x"></i></a>
|
21
|
+
</li>
|
22
|
+
<li>
|
23
|
+
<a title="StackOverflow"
|
24
|
+
href="http://stackoverflow.com/users/1252056/{{ site.social.stackoverflow }}"
|
25
|
+
target="_blank"><i class="fa fa-stack-overflow fa-2x"></i></a>
|
26
|
+
</li>
|
27
|
+
<li>
|
28
|
+
<a title="LinkedIn"
|
29
|
+
href="https://www.linkedin.com/in/{{ site.social.linkedin }}"
|
30
|
+
target="_blank"><i class="fa fa-linkedin fa-2x"></i></a>
|
31
|
+
</li>
|
32
|
+
<li>
|
33
|
+
<a title="Instagram"
|
34
|
+
href="https://instagram.com/{{ site.social.instagram }}"
|
35
|
+
target="_blank"><i class="fa fa-instagram fa-2x"></i></a>
|
36
|
+
</li>
|
37
|
+
<li>
|
38
|
+
<a title="Last.fm"
|
39
|
+
href="http://lastfm.com/user/{{ site.social.lastfm }}"
|
40
|
+
target="_blank"><i class="fa fa-lastfm fa-2x"></i></a>
|
41
|
+
</li>
|
42
|
+
<li>
|
43
|
+
<a title="RSS"
|
44
|
+
href="{{site.url}}/{{ site.social.rss }}"
|
45
|
+
target="_blank"><i class="fa fa-rss fa-2x"></i></a>
|
46
|
+
</li>
|
47
|
+
</ul>
|
48
|
+
|
49
|
+
They could be setup in `_config.yml`.
|
50
|
+
|
51
|
+
To add more icons do following steps:
|
52
|
+
|
53
|
+
- choose an icon you want to use: [Font Awesome Icons](https://fortawesome.github.io/Font-Awesome/icons/)
|
54
|
+
- add variable in `_config.yml`
|
55
|
+
- add icon in `social.html` with check if variable exists:
|
56
|
+
|
57
|
+
{% highlight html %}
|
58
|
+
{% raw %}
|
59
|
+
{% if site.social.rss %}
|
60
|
+
<li>
|
61
|
+
<a title="{{ site.social.<your_social_variable> }}"
|
62
|
+
href="{{site.url}}/{{ site.social.<your_social_variable> }}"
|
63
|
+
target="_blank"><font_awesome_icon></i></a>
|
64
|
+
</li>
|
65
|
+
{% endif %}
|
66
|
+
{% endraw %}
|
67
|
+
{% endhighlight html %}
|
68
|
+
|
69
|
+
|
70
|
+
# Share buttons
|
71
|
+
|
72
|
+
This theme comes with built-in share buttons. You can see them in the bottom of this post.
|
73
|
+
To turn them on in the header of your post add:
|
74
|
+
|
75
|
+
{% highlight yml %}
|
76
|
+
layout: post
|
77
|
+
title: "Be sociable"
|
78
|
+
date: 2016-05-15 16:25:06
|
79
|
+
description: Built-in share buttons!
|
80
|
+
share: true <-- here
|
81
|
+
{% endhighlight yml %}
|
82
|
+
|
83
|
+
If you want to disable some of them - go to **_config.yml**:
|
84
|
+
|
85
|
+
>_config.yml
|
86
|
+
{:.filename}
|
87
|
+
{% highlight yml%}
|
88
|
+
share:
|
89
|
+
facebook: true
|
90
|
+
twitter: true
|
91
|
+
gplus: true
|
92
|
+
linkedin: true
|
93
|
+
pinterest: true
|
94
|
+
email: true
|
95
|
+
{% endhighlight yml%}
|
96
|
+
|
97
|
+
To add new buttons:
|
98
|
+
|
99
|
+
1. add icon name in **_config.yml**;
|
100
|
+
2. add section in **_includes/share.html**;
|
101
|
+
3. add styles in **css/theme.css**.
|
@@ -0,0 +1,122 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Customizations"
|
4
|
+
date: 2016-09-20 16:25:06
|
5
|
+
description: Few customizations available out of the box!
|
6
|
+
share: true
|
7
|
+
tags:
|
8
|
+
- customizations
|
9
|
+
- jekyll
|
10
|
+
---
|
11
|
+
|
12
|
+
# Accent color
|
13
|
+
|
14
|
+
Accent color is color for some important elements, such as links, buttons, icons. Currently accent color is <span class="btn" style="background-color:#3CA2A2; color:#444444">#3CA2A2</span>. This theme has some more predefined colors available in **theme.scss**:
|
15
|
+
|
16
|
+
>theme.scss
|
17
|
+
{:.filename}
|
18
|
+
{% highlight scss %}
|
19
|
+
// Several accent colors, choose one or create your own!
|
20
|
+
$accent-color: #3CA2A2; // original =)
|
21
|
+
// $accent-color: #C38FD6; velvet
|
22
|
+
// $accent-color: #8FD6B3; greenish
|
23
|
+
// $accent-color: #35B4DE; bluish
|
24
|
+
// $accent-color: #D2E354; yellowish
|
25
|
+
// $accent-color: #52B54B; green
|
26
|
+
|
27
|
+
{% endhighlight %}
|
28
|
+
|
29
|
+
You can use one of them (just click the button below to see accent color in action) or define your own!
|
30
|
+
|
31
|
+
<span class="btn" style="background-color:#C38FD6; color:#444444">#C38FD6</span>, <span class="btn" style="background-color:#8FD6B3; color:#444444">#8FD6B3</span>, <span class="btn" style="background-color:#35B4DE; color:#444444">#35B4DE</span>, <span class="btn" style="background-color:#D2E354; color:#444444">#D2E354</span>, <span class="btn" style="background-color:#52B54B; color:#444444">#52B54B</span>.
|
32
|
+
|
33
|
+
<script>
|
34
|
+
$('.btn').click(function(){
|
35
|
+
var color = $(this).text();
|
36
|
+
[].forEach.call($('a'), function(item) {
|
37
|
+
item.style.color = color
|
38
|
+
})
|
39
|
+
})
|
40
|
+
</script>
|
41
|
+
|
42
|
+
<style>
|
43
|
+
.label{
|
44
|
+
cursor: default;
|
45
|
+
border-radius: 5px;
|
46
|
+
padding: 5px 8px;
|
47
|
+
}
|
48
|
+
</style>
|
49
|
+
|
50
|
+
# Other colors
|
51
|
+
|
52
|
+
As Jekyll comes with support of SASS I put colors in variables. Here are the ones which could be easily changed:
|
53
|
+
|
54
|
+
>theme.scss
|
55
|
+
{:.filename}
|
56
|
+
{% highlight scss %}
|
57
|
+
$font-color: #dddddd;
|
58
|
+
$background-color: #292929;
|
59
|
+
$post-panel-color: #444;
|
60
|
+
$footer-background-color: #292c2f;
|
61
|
+
$note-color: #87CEFA;
|
62
|
+
$warning-color: #ffff00;
|
63
|
+
{% endhighlight %}
|
64
|
+
|
65
|
+
# Background
|
66
|
+
|
67
|
+
It is also possible to change the background pattern and color. This theme comes with few patterns pre-installed -- you can check them by clicking on the images below. Or check the [transparenttextures.com](https://www.transparenttextures.com/) -- it has tons of different patterns for background.
|
68
|
+
|
69
|
+
<style>
|
70
|
+
.pattern-list{
|
71
|
+
list-style-type: none;
|
72
|
+
padding: 0;
|
73
|
+
}
|
74
|
+
.pattern{
|
75
|
+
height: 100px;
|
76
|
+
box-shadow: 0 0 3px 2px rgba(0,0,0,.1);
|
77
|
+
|
78
|
+
}
|
79
|
+
.pattern:hover {
|
80
|
+
box-shadow: 0 0 3px 2px rgba(0,0,0,.3);
|
81
|
+
transition: box-shadow .2s ease;
|
82
|
+
cursor: pointer;
|
83
|
+
}
|
84
|
+
.smthg{
|
85
|
+
max-width: none !important;
|
86
|
+
}
|
87
|
+
.col-sm-6 {
|
88
|
+
padding: 5px !important;
|
89
|
+
}
|
90
|
+
</style>
|
91
|
+
|
92
|
+
<ul class="pattern-list">
|
93
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/3px-tile.png' | relative_url }}')"></div></li>
|
94
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/asfalt-light.png' | relative_url }}')"></div></li>
|
95
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/black-linen.png' | relative_url }}')"></div></li>
|
96
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/food.png' | relative_url }}')"></div></li>
|
97
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/gplay.png' | relative_url }}')"></div></li>
|
98
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/green-dust-and-scratches.png' | relative_url }}')"></div></li>
|
99
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/hexellence.png' | relative_url }}')"></div></li>
|
100
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/random-grey-variations.png' | relative_url }}')"></div></li>
|
101
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/shley-tree-1.png' | relative_url }}')"></div></li>
|
102
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/subtle-grey.png' | relative_url }}')"></div></li>
|
103
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/xv.png' | relative_url }}')"></div></li>
|
104
|
+
<li class="col-sm-6"><div class="pattern" style="background-image:url('{{ '/assets/css/pics/background/triangles.png' | relative_url }}')"></div></li>
|
105
|
+
</ul>
|
106
|
+
|
107
|
+
<script>
|
108
|
+
$('.pattern').click(function(){
|
109
|
+
var source = this.style.backgroundImage;
|
110
|
+
document.getElementsByTagName('body')[0].style.backgroundImage = source;
|
111
|
+
console.log("url('" + source + "'))");
|
112
|
+
})
|
113
|
+
</script>
|
114
|
+
|
115
|
+
To change the color go to the **theme.scss** and change the `background-pattern` variable to the name of the pattern image file. To use custom pattern, download it from [transparenttextures.com](https://www.transparenttextures.com/) and place it under **css/pics/background/**.
|
116
|
+
|
117
|
+
>theme.scss
|
118
|
+
{:.filename}
|
119
|
+
{% highlight scss %}
|
120
|
+
// use this or pick any from /css/pics/background folder or from transparenttextures.com
|
121
|
+
$background-pattern: 'random-grey-variations.png';
|
122
|
+
{% endhighlight %}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Code snippets"
|
4
|
+
date: 2016-10-01 16:25:06
|
5
|
+
tags: code jekyll
|
6
|
+
description: Sample post showing how code samples would look like
|
7
|
+
---
|
8
|
+
|
9
|
+
## Introduction
|
10
|
+
|
11
|
+
For code syntax coloration I'm using Darcula theme from Intellij IDEA, which I've found in this post [Darcula theme for Pygments](http://smasue.github.io/pygments-darcula).
|
12
|
+
|
13
|
+
XML with line numbers (linenos flag), `{{ "{%" }} highlight xml linenos %}`:
|
14
|
+
{% highlight xml linenos %}
|
15
|
+
{% raw %}
|
16
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
17
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
18
|
+
<channel>
|
19
|
+
<title>{{ site.name }}</title>
|
20
|
+
<description>{{ site.description }}</description>
|
21
|
+
<link>{{site.baseurl | prepend:site.url}}</link>
|
22
|
+
<atom:link href="{{site.baseurl | prepend:site.url}}/feed.xml" rel="self" type="application/rss+xml" />
|
23
|
+
{% for post in site.posts limit:10 %}
|
24
|
+
<item>
|
25
|
+
<title>{{ post.title }}</title>
|
26
|
+
<description>{{ post.content | xml_escape }}</description>
|
27
|
+
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
|
28
|
+
<link>{{post.url | prepend:site.baseurl | prepend:site.url}}</link>
|
29
|
+
<guid isPermaLink="true">{{post.url | prepend:site.baseurl | prepend:site.url}}</guid>
|
30
|
+
</item>
|
31
|
+
{% endfor %}
|
32
|
+
</channel>
|
33
|
+
</rss>
|
34
|
+
{% endraw %}
|
35
|
+
{% endhighlight xml %}
|
36
|
+
|
37
|
+
>JSON
|
38
|
+
{:.filename}
|
39
|
+
{% highlight json %}
|
40
|
+
{"employees":[
|
41
|
+
{"firstName":"John", "lastName":"Doe"},
|
42
|
+
{"firstName":"Anna", "lastName":"Smith"},
|
43
|
+
{"firstName":"Peter", "lastName":"Jones"}
|
44
|
+
]}
|
45
|
+
{% endhighlight %}
|
46
|
+
|
47
|
+
>SQL
|
48
|
+
{:.filename}
|
49
|
+
{% highlight SQL %}
|
50
|
+
select count(*) as cm_content_nodes
|
51
|
+
from alf_node nd, alf_qname qn, alf_namespace ns
|
52
|
+
where qn.ns_id = ns.id
|
53
|
+
and nd.type_qname_id = qn.id
|
54
|
+
and ns.uri = 'http://www.alfresco.org/model/content/1.0'
|
55
|
+
and qn.local_name = 'content';
|
56
|
+
{% endhighlight %}
|
57
|
+
|
58
|
+
>Java
|
59
|
+
{:.filename}
|
60
|
+
{% highlight java %}
|
61
|
+
private String getToken(HttpClient client) throws UnsupportedEncodingException{
|
62
|
+
Cookie[] cookies = client.getState().getCookies();
|
63
|
+
for (Cookie cookie : cookies){
|
64
|
+
if (cookie.getName().equals("Alfresco-CSRFToken")){
|
65
|
+
return URLDecoder.decode(cookie.getValue(), "UTF-8");
|
66
|
+
}
|
67
|
+
}
|
68
|
+
return null;
|
69
|
+
}
|
70
|
+
{% endhighlight %}
|
71
|
+
|
72
|
+
To add name to the code snippet, as in the examples above, add following construction before the snippet:
|
73
|
+
|
74
|
+
{% highlight bash %}
|
75
|
+
{% raw %}
|
76
|
+
>Java
|
77
|
+
{:.filename}
|
78
|
+
{% highlight java %}
|
79
|
+
...
|
80
|
+
{% endraw %}
|
81
|
+
{% endhighlight %}
|