Skip to content

Commit 2441082

Browse files
committed
Add config entries for the GitHub buttons.
1 parent d9ea1fc commit 2441082

14 files changed

+112
-32
lines changed

index.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index.rb

+24-8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ def read_file(f)
1313
# load website config file
1414
site_config = YAML.safe_load(read_file('site.yml'))
1515

16+
# data for GitHub buttons
17+
buttons = [
18+
['', "Follow @#{site_config['github_username']} on GitHub", "Follow @#{site_config['github_username']}", ''],
19+
["/#{site_config['repository']}", "Star #{site_config['github_username']}/#{site_config['repository']} on GitHub", 'Star', 'star'],
20+
["/#{site_config['repository']}/subscription", "Watch #{site_config['github_username']}/#{site_config['repository']} on GitHub", 'Watch', 'eye'],
21+
["/#{site_config['repository']}/fork", "Fork #{site_config['github_username']}/#{site_config['repository']} on GitHub", 'Fork', 'repo-forked']
22+
]
23+
24+
# function to make the list of GitHub buttons
25+
def add_github_buttons(arr)
26+
s = ''
27+
arr.map do |button|
28+
s += %(
29+
<li>
30+
<a class="github-button" href="https://github.com/jbampton#{button[0]}")
31+
s += %( data-icon="octicon-#{button[3]}" ) unless button[3] == ''
32+
s += %( data-size="large" data-show-count="true" aria-label="#{button[1]}">#{button[2]}</a>
33+
</li>)
34+
end
35+
s
36+
end
37+
1638
# function
1739
def ii(i)
1840
i.positive? ? i : ''
@@ -174,13 +196,8 @@ def clean_chart(chart)
174196
</div>
175197
<footer>
176198
<div class="container">
177-
<ul class="list-unstyled">
178-
<li>
179-
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
180-
</li>
181-
<li>
182-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
183-
</li>'
199+
<ul class="list-unstyled">'
200+
$page += add_github_buttons(buttons)
184201
# continue to build all the pages
185202
page_build(page_count)
186203
# restart common page region
@@ -206,7 +223,6 @@ def clean_chart(chart)
206223
<script src="https://www.google.com/jsapi"></script>
207224
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
208225
<script src="bootstrap/js/jquery.min.js"></script>
209-
<!-- Latest compiled and minified JavaScript -->
210226
<script src="bootstrap/js/bootstrap.min.js"></script>
211227
<script>
212228
// Load the Visualization API and the corechart package.

index1.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index10.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index11.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@
103103
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
104104
</li>
105105
<li>
106-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
106+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
107+
</li>
108+
<li>
109+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
110+
</li>
111+
<li>
112+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
107113
</li>
108114
<li><a href="index.html">Page 1</a></li>
109115
<li><a href="index1.html">Page 2</a></li>
@@ -134,7 +140,6 @@
134140
<script src="https://www.google.com/jsapi"></script>
135141
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
136142
<script src="bootstrap/js/jquery.min.js"></script>
137-
<!-- Latest compiled and minified JavaScript -->
138143
<script src="bootstrap/js/bootstrap.min.js"></script>
139144
<script>
140145
// Load the Visualization API and the corechart package.

index2.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index3.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index4.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index5.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index6.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

index7.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@
114114
<a class="github-button" href="https://github.com/jbampton" data-size="large" data-show-count="true" aria-label="Follow @jbampton on GitHub">Follow @jbampton</a>
115115
</li>
116116
<li>
117-
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
117+
<a class="github-button" href="https://github.com/jbampton/dashboard-2" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star jbampton/dashboard-2 on GitHub">Star</a>
118+
</li>
119+
<li>
120+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch jbampton/dashboard-2 on GitHub">Watch</a>
121+
</li>
122+
<li>
123+
<a class="github-button" href="https://github.com/jbampton/dashboard-2/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="true" aria-label="Fork jbampton/dashboard-2 on GitHub">Fork</a>
118124
</li>
119125
<li><a href="index.html">Page 1</a></li>
120126
<li><a href="index1.html">Page 2</a></li>
@@ -145,7 +151,6 @@
145151
<script src="https://www.google.com/jsapi"></script>
146152
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
147153
<script src="bootstrap/js/jquery.min.js"></script>
148-
<!-- Latest compiled and minified JavaScript -->
149154
<script src="bootstrap/js/bootstrap.min.js"></script>
150155
<script>
151156
// Load the Visualization API and the corechart package.

0 commit comments

Comments
 (0)