Add buttons
This commit is contained in:
parent
09fd94c597
commit
b9b9848039
10 changed files with 91 additions and 35 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
|
|
||||||
<defs>
|
|
||||||
<font id="fontello" horiz-adv-x="1000" >
|
|
||||||
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
|
||||||
<missing-glyph horiz-adv-x="1000" />
|
|
||||||
<glyph glyph-name="ok" unicode="" d="m932 534q0-22-15-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q15-16 15-38z" horiz-adv-x="1000" />
|
|
||||||
</font>
|
|
||||||
</defs>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 719 B |
Binary file not shown.
Binary file not shown.
14
content/fonts/fontellos.svg
Normal file
14
content/fonts/fontellos.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
|
||||||
|
<defs>
|
||||||
|
<font id="fontello" horiz-adv-x="1000" >
|
||||||
|
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
||||||
|
<missing-glyph horiz-adv-x="1000" />
|
||||||
|
<glyph glyph-name="check" unicode="" d="m932 534q0-22-15-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q15-16 15-38z" horiz-adv-x="1000" />
|
||||||
|
<glyph glyph-name="star" unicode="" d="m634 290l171 165-235 35-106 213-105-213-236-35 171-165-41-235 211 111 211-111z m295 199q0-12-15-27l-203-197 48-279q1-4 1-12 0-28-23-28-10 0-22 7l-251 132-250-132q-13-7-23-7-11 0-17 9t-6 19q0 4 1 12l48 279-203 197q-14 15-14 27 0 21 31 26l280 40 126 254q11 23 27 23t28-23l125-254 280-40q32-5 32-26z" horiz-adv-x="928.6" />
|
||||||
|
<glyph glyph-name="fork" unicode="" d="m161 29q0 22-16 38t-38 15-38-15-15-38 15-38 38-16 38 16 16 38z m0 642q0 23-16 38t-38 16-38-16-15-38 15-38 38-15 38 15 16 38z m357-71q0 22-16 38t-38 16-38-16-15-38 15-38 38-16 38 16 16 38z m53 0q0-29-14-54t-39-39q-1-160-126-231-38-21-114-45-71-22-94-39t-23-56v-15q24-14 39-39t14-53q0-45-31-76t-76-32-76 32-31 76q0 29 15 53t39 39v458q-25 14-39 39t-15 53q0 45 31 76t76 32 76-32 31-76q0-29-14-53t-39-39v-278q30 15 86 32 30 10 49 17t39 17 33 22 22 29 16 38 5 51q-25 14-39 39t-15 54q0 45 31 76t76 31 76-31 31-76z" horiz-adv-x="571.4" />
|
||||||
|
</font>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
BIN
content/fonts/fontellow.woff
Normal file
BIN
content/fonts/fontellow.woff
Normal file
Binary file not shown.
30
content/stylesheets/fontello.css
vendored
Normal file
30
content/stylesheets/fontello.css
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'fontello';
|
||||||
|
src: url('/fonts/fontelloe.eot?23005170');
|
||||||
|
src: url('/fonts/fontelloe.eot?23005170#iefix') format('embedded-opentype'),
|
||||||
|
url('/fonts/fontellow.woff?23005170') format('woff'),
|
||||||
|
url('/fonts/fontellot.ttf?23005170') format('truetype'),
|
||||||
|
url('/fonts/fontellos.svg?23005170#fontello') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||||
|
font-family: "fontello";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: none;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
margin-right: .2em;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-check:before { content: '\e800'; } /* '' */
|
||||||
|
.icon-star:before { content: '\e801'; } /* '' */
|
||||||
|
.icon-fork:before { content: '\e802'; } /* '' */
|
||||||
|
|
@ -1,16 +1,8 @@
|
||||||
@font-face {
|
|
||||||
font-family: "FontAwesome";
|
|
||||||
src: url('/fonts/fontawesomee.eot?45135880'); /* IE9 Compat Modes */
|
|
||||||
src: url('/fonts/fontawesomew.woff?45135880') format('woff'), /* Modern Browsers */
|
|
||||||
url('/fonts/fontawesomet.ttf?45135880') format('truetype'), /* Safari, Android, iOS */
|
|
||||||
url('/fonts/fontawesomes.svg?45135880#fontello') format('svg'); /* Legacy iOS */
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
font-family: Georgia, Palatino, serif;
|
font-family: Palatino, serif;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,6 +33,28 @@ a:hover {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main #gh-buttons {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main #starcount {
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 15px;
|
||||||
|
text-align: center;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
float: right;
|
||||||
|
right: 5px;
|
||||||
|
width: 3em;
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #CCC;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
#main h1 {
|
#main h1 {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
|
@ -124,6 +138,9 @@ a:hover {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|
||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
|
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar h2 {
|
#sidebar h2 {
|
||||||
|
|
@ -140,14 +157,9 @@ a:hover {
|
||||||
list-style: decimal-leading-zero;
|
list-style: decimal-leading-zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar li {
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar a.visited:after { /* selected with JS */
|
#sidebar a.visited:after { /* selected with JS */
|
||||||
content: "";
|
content: "";
|
||||||
font-family: "FontAwesome";
|
font-family: "fontello";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -3em;
|
left: -3em;
|
||||||
color: #EEE;
|
color: #EEE;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<title>Nimrod by Example - <%= @item[:title] %></title>
|
<title>Nimrod by Example - <%= @item[:title] %></title>
|
||||||
<link rel="stylesheet" href="<%= @items['/stylesheets/main/'].path %>">
|
<link rel="stylesheet" href="<%= @items['/stylesheets/main/'].path %>">
|
||||||
<link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful">
|
<link rel="stylesheet" href="<%= @items['/stylesheets/colorful/'].path %>" title="colorful">
|
||||||
<link rel="stylesheet" href="<%= @items['/stylesheets/cotton_candy/'].path %>" title="cottoncandy">
|
<link rel="stylesheet" href="<%= @items['/stylesheets/fontello/'].path %>">
|
||||||
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
|
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
|
||||||
<meta http-equiv="Default-Style" content="colorful">
|
<meta http-equiv="Default-Style" content="colorful">
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<%= @items["/toc/"].compiled_content(:snapshot => :last) %>
|
<%= @items["/toc/"].compiled_content(:snapshot => :last) %>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
|
<h1 id="gh-buttons"><a class="icon-fork" href="https://github.com/flaviut/nimrod-by-example/"></a> <a class="icon-star" href="https://github.com/flaviut/nimrod-by-example/stargazers" /><div id="starcount">?</div></a></h1>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -24,6 +25,17 @@
|
||||||
tocLinks[i].classList.add("visited");
|
tocLinks[i].classList.add("visited");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var request = new XMLHttpRequest();
|
||||||
|
request.open("GET", "https://api.github.com/repos/flaviut/nimrod-by-example/stargazers", true);
|
||||||
|
request.onload = function (e) {
|
||||||
|
var starcount = JSON.parse(request.responseText).length;
|
||||||
|
var starcount_elem = document.getElementById("starcount");
|
||||||
|
starcount_elem.innerHTML = starcount;
|
||||||
|
};
|
||||||
|
request.onerror = function (e) {
|
||||||
|
console.error(request.statusText);
|
||||||
|
};
|
||||||
|
request.send(null);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue