Skip to content

Commit e08ca63

Browse files
author
NooBxGockeL
committed
❄️ Design update!
There are just too many changes to cover them individually, so sorry that i wont list them here. With the designing i also did some externalizing (into _includes/*.html) and modular loading of heavy-weight modules (lunr and viewer, see _includes/footerScripts.html as well as disqus, see _includes/disqus.html).
1 parent e44bd5c commit e08ca63

23 files changed

Lines changed: 598 additions & 308 deletions

_data/categories.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33
# description: This is a good description (and it's used in the tooltip!)
44

55
- name: Creational
6+
icon: "fa fa-plus"
67
- name: Structural
8+
icon: "fa fa-university"
79
- name: Concurrency
10+
icon: "fa fa-comments"
811
- name: Behavioral
12+
icon: "fa fa-cogs"
913
- name: Architectural
14+
icon: "fa fa-building-o"
1015
- name: Integration
16+
icon: "fa fa-sign-in"
1117
- name: Presentation Tier
18+
icon: "fa fa-file-powerpoint-o"
1219
- name: Business Tier
20+
icon: "fa fa-briefcase"
1321
- name: Persistence Tier
22+
icon: "fa fa-database"
1423
- name: Testing
24+
icon: "fa fa-list-ul"
1525
- name: Other
26+
icon: "fa fa-question"

_data/people.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# twitter: twitter-username (optional)
99
# linkedin: linkedin-username (optional)
1010

11-
nxg:
11+
mo3:
1212
name: Markus Moser
1313
description: Website-Dev Hobo
1414
github: markusmo3

_includes/author.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Parameters:
2+
- include.author: short name of the author (mo3, ilu, npa, ...) as seen in the _data/people.yml file
3+
used to get the informations from site.data.people[include.author]
4+
-->
5+
<div class="author-info">
6+
{% assign author = site.data.people[include.author] %}
7+
<span>Written by {{ author.name }}</span>
8+
{% if author.description %}
9+
<p>{{ author.description }}</p>
10+
{% endif %}
11+
<div class="author-social-buttons">
12+
{% if author.github %}
13+
<a class="btn btn-social-icon btn-github" href="https://github.com/{{ author.github }}">
14+
<span class="fa fa-github"></span>
15+
</a>
16+
{% endif %}
17+
{% if author.facebook %}
18+
<a class="btn btn-social-icon btn-facebook" href="https://www.facebook.com/{{ author.facebook }}">
19+
<span class="fa fa-facebook"></span>
20+
</a>
21+
{% endif %}
22+
{% if author.twitter %}
23+
<a class="btn btn-social-icon btn-twitter" href="https://twitter.com/{{ author.twitter }}">
24+
<span class="fa fa-twitter"></span>
25+
</a>
26+
{% endif %}
27+
{% if author.linkedin %}
28+
<a class="btn btn-social-icon btn-linkedin" href="https://twitter.com/{{ author.linkedin }}">
29+
<span class="fa fa-linkedin"></span>
30+
</a>
31+
{% endif %}
32+
</div>
33+
</div>

_includes/disqus.html

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,35 @@
11
<!-- Template for disqus comments anywhere -->
22
{% if site.disqus_shortname %}
33
<hr class="dashed">
4-
<div class="disqus-container">
4+
<div class="disqus-container" >
5+
<!-- An element a visitor can click if they <3 comments! -->
6+
<button class="show-comments btn btn-primary"><i class="fa fa-comments" aria-hidden="true"></i> Load Disqus comments</button>
7+
8+
<!-- The empty element required for Disqus to loads comments into -->
59
<div id="disqus_thread"></div>
6-
<!-- Add Disqus comments (not comment count) -->
7-
<script type="text/javascript">
8-
var disqus_shortname = '{{ site.disqus_shortname }}';
9-
var disqus_identifier = '{{ page.url }}';
10-
var disqus_title = '{{ page.title }}';
11-
var disqus_url = '{{ site.url }}{{ site.baseurl }}{{ page.url }}';
12-
/* var disqus_developer = 1; /* Comment out when the site is live */
13-
(function() {
14-
var dsq = document.createElement('script');
15-
dsq.type = 'text/javascript';
16-
dsq.async = true;
17-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
18-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
19-
})();
20-
</script>
2110

22-
<!-- Add Disqus comment count (not the comments) -->
11+
<!-- Add Disqus comments (not comment count) -->
2312
<script type="text/javascript">
24-
/* * * CONFIGURATION VARIABLES * * */
25-
var disqus_shortname = '{{ site.disqus_shortname }}';
26-
/* var disqus_developer = 1; /* Comment out when the site is live */
27-
/* * * DON'T EDIT BELOW THIS LINE * * */
28-
(function() {
29-
var s = document.createElement('script');
30-
s.async = true;
31-
s.type = 'text/javascript';
32-
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
33-
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
34-
}());
13+
$(document).ready(function() {
14+
$('.show-comments').on('click', function() {
15+
var disqus_shortname = '{{ site.disqus_shortname }}';
16+
var disqus_identifier = '{{ page.url }}';
17+
var disqus_title = '{{ page.title }}';
18+
var disqus_url = '{{ site.url }}{{ site.baseurl }}{{ page.url }}';
19+
$.ajax({
20+
type: "GET",
21+
url: "http://" + disqus_shortname + ".disqus.com/embed.js",
22+
dataType: "script",
23+
cache: true
24+
});
25+
$(this).fadeOut();
26+
});
27+
});
3528
</script>
36-
3729
<noscript>
3830
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
3931
</noscript>
32+
33+
4034
</div>
4135
{% endif %}

_includes/footer.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
<div class="container">
33
<div class="row">
44
<div class="col-md-12">
5-
Jekyll Theme created by <a href="https://github.com/{{ site.designer_github_username }}">{{ site.designer_github_username }}</a>
6-
| Modified by <a href="https://github.com/markusmo3">markusmo3</a>
7-
| Commit <a href="https://github.com/iluwatar/java-design-patterns/commit/{{ site.github.build_revision }}">{{ site.github.build_revision | truncate: 7, '' }}</a>
5+
<a href="{{ site.repo_url }}">
6+
<i class="fa fa-lg fa-github" aria-hidden="true"></i> Github Repository</a>
7+
&sdot;
8+
Designed by <a href="https://github.com/{{ site.designer_github_username }}">
9+
<i class="fa fa-lg fa-github-alt" aria-hidden="true"></i> {{ site.designer_github_username }}</a>
10+
&sdot;
11+
Modified by <a href="https://github.com/markusmo3">
12+
<i class="fa fa-lg fa-github-alt" aria-hidden="true"></i> markusmo3</a>
13+
&sdot;
14+
Commit <a href="https://github.com/iluwatar/java-design-patterns/commit/{{ site.github.build_revision }}">
15+
<i class="fa fa-lg fa-code" aria-hidden="true"></i> {{ site.github.build_revision | truncate: 7, '' }}</a>
816
</div>
917
</div>
1018
</div>

_includes/footerScripts.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script type="text/javascript">
2+
function addBlankTargetForLinks() {
3+
$('a[href^="http"]').each(function() {
4+
$(this).attr('target', '_blank');
5+
});
6+
}
7+
$(document).bind('DOMNodeInserted', function(event) {
8+
addBlankTargetForLinks();
9+
});
10+
</script>
11+
{% if page.modules == "lunr" or page.modules contains "lunr" %}
12+
<!-- Lunr -->
13+
<script type="text/javascript" src="{{ '/static/js/elasticlunr.min.js' | prepend: site.baseurl }}"></script>
14+
<script type="text/javascript" src="{{ '/static/js/search.js' | prepend: site.baseurl }}"></script>
15+
{% endif %}
16+
{% if page.modules == "viewer" or page.modules contains "viewer" %}
17+
<!-- Viewer (image viewer) -->
18+
<script type="text/javascript" src="{{ '/static/js/viewer.min.js' | prepend: site.baseurl }}"></script>
19+
<link rel="stylesheet" type="text/css" href="{{ '/static/css/viewer.min.css' | prepend: site.baseurl }}">
20+
<script type="text/javascript">
21+
function initViewer() {
22+
$.fn.viewer.setDefaults({ navbar: false });
23+
$('.row.post img, .row.pattern img').viewer();
24+
}
25+
$(document).bind('DOMNodeInserted', function(event) {
26+
initViewer();
27+
});
28+
</script>
29+
{% endif %}

_includes/head.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | prepend: site.baseurl }}" />
1111

1212
<!-- Fonts -->
13-
<link href="//fonts.googleapis.com/css?family=Roboto:300,400,400italic,500,500italic,700,700italic|Roboto+Mono:400,700" rel="stylesheet">
13+
<link href="https://fonts.googleapis.com/css?family=Dosis|Inconsolata|Indie+Flower|Lato|Open+Sans" rel="stylesheet">
1414
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
1515

1616
<!-- JQuery 2.1.4 -->
@@ -26,9 +26,6 @@
2626
<!-- Bootstrap Checkbox -->
2727
<link rel="stylesheet" type="text/css" href="{{ '/static/css/awesome-bootstrap-checkbox.css' | prepend: site.baseurl }}">
2828

29-
<!-- Lunr -->
30-
<script type="text/javascript" src="{{ '/static/js/elasticlunr.min.js' | prepend: site.baseurl }}"></script>
31-
3229
<!-- Customizations -->
3330
<script type="text/javascript" src="{{ '/static/js/index.js' | prepend: site.baseurl }}"></script>
3431
<link rel="stylesheet" type="text/css" href="{{ '/static/css/index.css' | prepend: site.baseurl }}">

_includes/header.html

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<header>
22

33
<!-- navbar -->
4-
<nav class="navbar navbar-inverse">
4+
<nav class="navbar navbar-default">
55
<div class="container">
66
<!-- Brand and toggle get grouped for better mobile display -->
77
<div class="navbar-header">
@@ -11,18 +11,6 @@
1111
<span class="icon-bar"></span>
1212
<span class="icon-bar"></span>
1313
</button>
14-
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
15-
<!-- <p class="navbar-text">Front-end Dev Engineer</p> -->
16-
</div>
17-
18-
<!-- Github Fork + Star button -->
19-
<div class="collapse navbar-collapse navbar-form navbar-left github-button-container">
20-
<a class="github-button" href="https://github.com/iluwatar/java-design-patterns/fork" data-icon="octicon-git-branch" data-style="mega" data-count-href="/iluwatar/java-design-patterns/network" data-count-api="/repos/iluwatar/java-design-patterns#forks_count"
21-
data-count-aria-label="# forks on GitHub" aria-label="Fork iluwatar/java-design-patterns on GitHub">Fork</a>
22-
<a class="github-button" href="https://github.com/iluwatar/java-design-patterns" data-icon="octicon-star" data-style="mega" data-count-href="/iluwatar/java-design-patterns/stargazers" data-count-api="/repos/iluwatar/java-design-patterns#stargazers_count"
23-
data-count-aria-label="# stargazers on GitHub" aria-label="Star iluwatar/java-design-patterns on GitHub">Star</a>
24-
<!-- Place this tag right after the last github button or just before your close body tag. -->
25-
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
2614
</div>
2715

2816
<!-- Collect the nav links, forms, and other content for toggling -->

_includes/labels.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!-- Template for labels
2+
Parameters:
3+
- include.useLinks: if the labels should be made up of <a> elements (currently only used by the+
4+
sidebar in the patterns.html overview)
5+
- include.categories: list of categories
6+
- include.tags: list of tags
7+
-->
8+
{% include sortedlabels.html %}
9+
10+
<span class="tags">
11+
{% for tag in sortedTags %}
12+
{% if include.tags contains tag.name %}
13+
{% if include.useLinks %}
14+
<a href="javascript:;" class="tag-label" tag="{{ tag.name }}">{{ tag.name }}</a>
15+
{% else %}
16+
<span class="tag-label">{{ tag.name }}</span>
17+
{% endif %}
18+
{% endif %}
19+
{% endfor %}
20+
</span>
21+
<span class="cats">
22+
{% for cat in sortedCats %}
23+
{% if include.categories contains cat.name %}
24+
{% if include.useLinks %}
25+
<a href="javascript:;" class="cat-label" category="{{ cat.name }}">
26+
<i class="{{ cat.icon }}" aria-hidden="true"></i>
27+
{{ cat.name }}</a>
28+
{% else %}
29+
<span class="cat-label">
30+
<i class="{{ cat.icon }}" aria-hidden="true"></i>
31+
{{ cat.name }}</span>
32+
{% endif %}
33+
{% endif %}
34+
{% endfor %}
35+
</span>

_includes/sidebar.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
- include.categories: list of categories
44
- include.tags: list of tags
55
-->
6-
<div class="shadow-corner-curl hidden-xs">
7-
<div class="sidebar-list-header">
8-
Categories
9-
</div>
10-
11-
<!-- All / None Buttons -->
12-
<div class="sidebar-list-item">
13-
<div class="btn-group-sm centerContents" role="group">
14-
<button id="allCatsButton" type="button" class="btn btn-primary" style="width: 40%;">All</button>
15-
<button id="noCatsButton" type="button" class="btn btn-default" style="width: 40%;">None</button>
16-
</div>
6+
{% include sortedlabels.html %}
7+
<div class="row">
8+
<div class="col-md-12 col-sm-6">
9+
<div class="sidebar-list-header checkbox">
10+
<input type="checkbox" id="checkbox_allcats" checked>
11+
<label for="checkbox_allcats">
12+
Categories
13+
</label>
1714
</div>
1815

19-
{% for category in include.categories %}
16+
{% for category in sortedCats %}
2017
<div class="sidebar-list-item checkbox" category="{{ category.name }}"
2118
<!-- add tooltip only if we have something to display -->
2219
{% if category.description %}
@@ -25,8 +22,9 @@
2522

2623
<input type="checkbox" id="checkbox_{{ category.name }}" checked>
2724
<label for="checkbox_{{ category.name }}">
25+
<i class="{{ category.icon }}" aria-hidden="true"></i>
2826
{{ category.name }}
29-
<span class="my-badge">
27+
<span class="amount-badge">
3028
{% assign counter=0 %}
3129
{% for page in include.allItems %}
3230
{% if page.categories contains category.name %}
@@ -42,20 +40,23 @@
4240
{% endfor %}
4341
</div>
4442

45-
<div class="shadow-corner-curl hidden-xs top20">
46-
<div class="sidebar-list-header">
47-
Tags
43+
<div class="col-md-12 col-sm-6 top20">
44+
<div class="sidebar-list-header checkbox">
45+
<input type="checkbox" id="checkbox_alltags" checked>
46+
<label for="checkbox_alltags">
47+
Tags
48+
</label>
4849
</div>
4950

5051
<!-- All / None Buttons -->
51-
<div class="sidebar-list-item">
52+
<!--<div class="sidebar-list-item">
5253
<div class="btn-group-sm centerContents" role="group">
5354
<button id="allTagsButton" type="button" class="btn btn-primary" style="width: 40%;">All</button>
5455
<button id="noTagsButton" type="button" class="btn btn-default" style="width: 40%;">None</button>
5556
</div>
56-
</div>
57+
</div>-->
5758

58-
{% for tag in include.tags %}
59+
{% for tag in sortedTags %}
5960
<div class="sidebar-list-item checkbox" tag="{{ tag.name }}" <!-- add tooltip only if we have something to display -->
6061
{% if tag.description %}
6162
data-toggle="tooltip" data-placement="left" title="{{ tag.description }}"
@@ -64,7 +65,7 @@
6465
<input type="checkbox" id="checkbox_{{ tag.name }}" checked>
6566
<label for="checkbox_{{ tag.name }}">
6667
{{ tag.name }}
67-
<span class="my-badge">
68+
<span class="amount-badge">
6869
{% assign counter=0 %}
6970
{% for page in include.allItems %}
7071
{% if page.tags contains tag.name %}
@@ -77,3 +78,4 @@
7778
</div>
7879
{% endfor %}
7980
</div>
81+
</div>

0 commit comments

Comments
 (0)