X Tutup
Skip to content

Commit 8363e14

Browse files
MarkusMarkus
authored andcommitted
Website Cleanup
- fixes iluwatar#219 removed 2about.md and rename 1patterns.html to patterns.html - fixes iluwatar#217 changed forkme banner to more intuitive github-buttons - Work on iluwatar#213 properly name all the categories, fix issue with spaces in categories and tags
1 parent 40cf52a commit 8363e14

File tree

9 files changed

+44
-104
lines changed

9 files changed

+44
-104
lines changed

_config.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ description: Java Design Patterns
77
# Google search results) and in your feed.xml site description.
88

99
baseurl: "/java-design-patterns" # the subpath of your site, e.g. /blog/
10-
url: "http://iluwatar.github.io" # the base hostname & protocol for your site
10+
url: "https://iluwatar.github.io" # the base hostname & protocol for your site
11+
repo_url: "https://github.com/iluwatar/java-design-patterns"
1112
designer_github_username: Gaohaoyang
1213
permalink: /:year/:month/:day/:title/
1314

@@ -23,15 +24,15 @@ kramdown:
2324
input: GFM
2425

2526
category-list:
26-
- pattern_cat
27-
- creational
28-
- structural
29-
- concurrency
30-
- behavioral
31-
- architectural
32-
- integration
33-
- presentation_tier
34-
- business_tier
27+
- Other
28+
- Creational
29+
- Structural
30+
- Concurrency
31+
- Behavioral
32+
- Architectural
33+
- Integration
34+
- Presentation Tier
35+
- Business Tier
3536

3637
tag-list:
37-
- pattern_tag
38+
- Java

_includes/header.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@
1414
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
1515
<!-- <p class="navbar-text">Front-end Dev Engineer</p> -->
1616
</div>
17+
18+
<!-- Github Fork + Star button -->
19+
<div class="collapse navbar-collapse navbar-form navbar-left github-buttons">
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" data-count-aria-label="# forks on GitHub" aria-label="Fork iluwatar/java-design-patterns on GitHub">Fork</a>
21+
<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" data-count-aria-label="# stargazers on GitHub" aria-label="Star iluwatar/java-design-patterns on GitHub">Star</a>
22+
<!-- Place this tag right after the last github button or just before your close body tag. -->
23+
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
24+
</div>
25+
1726
<!-- Collect the nav links, forms, and other content for toggling -->
1827
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
1928
<ul class="nav navbar-nav navbar-right">
20-
2129
{% if page.url == "/index.html" %}
2230
<li class="active">
2331
{% else %}
@@ -40,10 +48,4 @@
4048
</div><!-- /.container-fluid -->
4149
</nav>
4250

43-
<!-- fork me banner -->
44-
<a href="https://github.com/iluwatar/java-design-patterns">
45-
<img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/82b228a3648bf44fc1163ef44c62fcc60081495e/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png">
46-
</a>
47-
48-
4951
</header>

_layouts/page.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22
layout: default
33
---
44
<div class="post-area post">
5+
{% if site.github_username %}
56
<header>
67
<h1>{{ page.title }}</h1>
78
</header>
89
<hr>
10+
{% endif %}
911
<article class="page-content">
1012
{{ content }}
1113
</article>
1214
</div>
13-
14-
<!--
15-
<div class="post-area post comment">
16-
17-
<div class="ds-thread" data-thread-key="{{ page.id }}" data-title="{{ page.title }}" data-url="gaohaoyang.github.io{{ page.url }}"></div>
18-
19-
</div>
20-
-->

_layouts/pattern.html

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,21 @@
55
<div id="myArticle" class="col-sm-9">
66
<div class="post-area post">
77
<header>
8+
<a id="viewSourceOnGithub" class="btn btn-primary" href="{{ site.repo_url }}/tree/master/{{ page.folder }}" target="_blank">
9+
<span class="glyphicon glyphicon-new-window"></span>
10+
&nbsp;View Source on Github
11+
</a>
812
<h1>{{ page.title }}</h1>
9-
<p>{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
1013
</header>
1114
<hr>
1215
<article>
13-
{{content}}
16+
{{ content }}
1417
</article>
1518
<hr>
1619
</div>
17-
<!--
18-
<div class="post-area post comment">
19-
<div class="ds-thread" data-thread-key="{{ page.id }}" data-title="{{ page.title }}" data-url="gaohaoyang.github.io{{ page.url }}"></div>
20-
</div>
21-
-->
2220
</div>
2321

2422
<div id="content" class="col-sm-3">
25-
<!-- <div id="myAffix" class="shadow-bottom-center hidden-xs" data-spy="affix" data-offset-top="0" data-offset-bottom="-20"> -->
2623
<div id="myAffix" class="shadow-bottom-center hidden-xs" >
2724
<div class="categories-list-header">
2825
Content

pages/2about.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

patterns

Submodule patterns updated 62 files

static/css/index.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ table td{
4444
}
4545
4646
47+
4748
#index a:link {color: #005} /* 未访问的链接 */
4849
#index a:visited {color: #669} /* 已访问的链接 */
4950
#index a:hover {color: #336;text-decoration: none;} /* 鼠标移动到链接上 */
@@ -104,7 +105,16 @@ nav{
104105
background-color: rgba(0,0,6,0.05);
105106
106107
}
107-
108+
.github-button {
109+
display: none;
110+
}
111+
.github-buttons iframe {
112+
width: 150px;
113+
margin-right: 10px;
114+
}
115+
#viewSourceOnGithub {
116+
float: right;
117+
}
108118
109119
/* categories list */
110120
.sidebar-list-header {

static/js/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ function categoryAndTagDisplay() {
9191
$('.sidebar-list-item.category').click(function() {
9292
var category = $(this).attr('category'); //get category's name
9393

94-
$('.post-list-body>div[post-category!=' + category + ']').hide(250);
95-
$('.post-list-body>div[post-category=' + category + ']').show(400);
94+
$('.post-list-body>div[post-category!=\'' + category + '\']').hide(250);
95+
$('.post-list-body>div[post-category=\'' + category + '\']').show(400);
9696
});
9797
/*show category when click tags list*/
9898
$('.sidebar-list-item.tag').click(function() {
9999
var tag = $(this).attr('tag'); //get tag's name
100100

101-
$('.post-list-body>div[post-tag!=' + tag + ']').hide(250);
102-
$('.post-list-body>div[post-tag=' + tag + ']').show(400);
101+
$('.post-list-body>div[post-tag!=\'' + tag + '\']').hide(250);
102+
$('.post-list-body>div[post-tag=\'' + tag + '\']').show(400);
103103
});
104104
}
105105

0 commit comments

Comments
 (0)
X Tutup