Skip to content

Commit 0f0ee51

Browse files
author
Jurgen Leschner
committed
init
0 parents  commit 0f0ee51

15 files changed

+604
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_site
2+
.sass-cache
3+
Gemfile.lock

Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gem "github-pages", :github => "github/pages-gem", :branch => "jekyll-v3-3-0"
4+
gemspec

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unknown!

README.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Hacker `jekyll-theme-hacker` gem
2+
3+
Hacker is a Jekyll theme for [GitHub Pages](https://pages.github.com).
4+
5+
You can preview the theme at http://pages-theme.github.io/hacker.
6+
7+
### Usage
8+
9+
This theme was ported from the GitHub Automatic Page Generator to a Jekyll v3.3 theme gem.
10+
11+
To use it on a Pages site, add `theme: jekyll-theme-hacker` to your `_config.yml`.
12+
13+
```yml
14+
theme: jekyll-theme-hacker
15+
title: Custom title
16+
description: Custom description.
17+
show_downloads: true
18+
google_analytics:
19+
```
20+
21+
- To override the repository name or description from GitHub used in the header, set a `title` or `description`.
22+
- Set `show_downloads` to `false` to hide the download buttons in the header.
23+
- Set `google_analytics` to your tracking ID to enable pageview tracking.
24+
25+
This theme includes a single `default` layout. Markdown files should be prefixed with the following frontmatter.
26+
27+
```
28+
---
29+
layout: default
30+
---
31+
32+
```
33+
34+
#### CSS
35+
36+
For CSS customization, create your own `/assets/css/styles.scss` in your project to replace the one from this theme, and override selected stylesheet properties.
37+
38+
```scss
39+
---
40+
---
41+
42+
@import "rouge-base16-dark";
43+
@import 'hacker';
44+
45+
```
46+
47+
#### Syntax Highlighting
48+
49+
[Rouge](http://rouge.jneen.net/) is the default highlighter in Jekyll 3. This theme includes the `base16.dark` stylesheet from Rouge.
50+
51+
To switch syntax highlighting colors to say `monokai`, install the `rouge` gem and run the following on the command line.
52+
53+
```
54+
mkdir _scss
55+
rougify style monokai > _scss/rouge-monokai.scss
56+
```
57+
58+
Then replace `rouge-base16-dark` with `rouge-monokai` in `/assets/css/styles.scss`
59+
60+
Other pygments highlighter themes should work as well.

_config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
title: Hacker theme
2+
description: Hacker is a theme for GitHub Pages.
3+
show_downloads: true
4+
google_analytics:
5+
theme:

_layouts/default.html

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset='utf-8'>
5+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6+
<link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url }}">
7+
<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>
8+
</head>
9+
10+
<body>
11+
12+
<header>
13+
<div class="container">
14+
<h1>{{ site.title | default: site.github.repository_name }}</h1>
15+
<h2>{{ site.description | default: site.github.project_tagline }}</h2>
16+
17+
<section id="downloads">
18+
{% if site.show_downloads %}
19+
<a href="{{ site.github.zip_url }}" class="btn">Download as .zip</a>
20+
<a href="{{ site.github.tar_url }}" class="btn">Download as .tar.gz</a>
21+
{% endif %}
22+
<a href="{{ site.github.repository_url }}" class="btn btn-github"><span class="icon"></span>View on GitHub</a>
23+
</section>
24+
</div>
25+
</header>
26+
27+
<div class="container">
28+
<section id="main_content">
29+
{{ content }}
30+
</section>
31+
</div>
32+
33+
{% if site.google_analytics %}
34+
<script type="text/javascript">
35+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
36+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
37+
</script>
38+
<script type="text/javascript">
39+
try {
40+
var pageTracker = _gat._getTracker("{{ site.google_analytics }}");
41+
pageTracker._trackPageview();
42+
} catch(err) {}
43+
</script>
44+
{% endif %}
45+
</body>
46+
</html>

_sass/hacker.scss

+247
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
background: #151515 url("../images/bkg.png") 0 0;
5+
color: #eaeaea;
6+
font-size: 16px;
7+
line-height: 1.5;
8+
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
9+
}
10+
11+
/* General & 'Reset' Stuff */
12+
13+
.container {
14+
width: 90%;
15+
max-width: 600px;
16+
margin: 0 auto;
17+
}
18+
19+
section {
20+
display: block;
21+
margin: 0 0 20px 0;
22+
}
23+
24+
h1, h2, h3, h4, h5, h6 {
25+
margin: 0 0 20px;
26+
}
27+
28+
li {
29+
line-height: 1.4 ;
30+
}
31+
32+
/* Header, <header>
33+
header - container
34+
h1 - project name
35+
h2 - project description
36+
*/
37+
38+
header {
39+
background: rgba(0, 0, 0, 0.1);
40+
width: 100%;
41+
border-bottom: 1px dashed #b5e853;
42+
padding: 20px 0;
43+
margin: 0 0 40px 0;
44+
}
45+
46+
header h1 {
47+
font-size: 30px;
48+
line-height: 1.5;
49+
margin: 0 0 0 -40px;
50+
font-weight: bold;
51+
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
52+
color: #b5e853;
53+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
54+
0 0 5px rgba(181, 232, 83, 0.1),
55+
0 0 10px rgba(181, 232, 83, 0.1);
56+
letter-spacing: -1px;
57+
-webkit-font-smoothing: antialiased;
58+
}
59+
60+
header h1:before {
61+
content: "./ ";
62+
font-size: 24px;
63+
}
64+
65+
header h2 {
66+
font-size: 18px;
67+
font-weight: 300;
68+
color: #666;
69+
}
70+
71+
#downloads .btn {
72+
display: inline-block;
73+
text-align: center;
74+
margin: 0;
75+
}
76+
77+
/* Main Content
78+
*/
79+
80+
#main_content {
81+
width: 100%;
82+
-webkit-font-smoothing: antialiased;
83+
}
84+
section img {
85+
max-width: 100%
86+
}
87+
88+
h1, h2, h3, h4, h5, h6 {
89+
font-weight: normal;
90+
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
91+
color: #b5e853;
92+
letter-spacing: -0.03em;
93+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1),
94+
0 0 5px rgba(181, 232, 83, 0.1),
95+
0 0 10px rgba(181, 232, 83, 0.1);
96+
}
97+
98+
#main_content h1 {
99+
font-size: 30px;
100+
}
101+
102+
#main_content h2 {
103+
font-size: 24px;
104+
}
105+
106+
#main_content h3 {
107+
font-size: 18px;
108+
}
109+
110+
#main_content h4 {
111+
font-size: 14px;
112+
}
113+
114+
#main_content h5 {
115+
font-size: 12px;
116+
text-transform: uppercase;
117+
margin: 0 0 5px 0;
118+
}
119+
120+
#main_content h6 {
121+
font-size: 12px;
122+
text-transform: uppercase;
123+
color: #999;
124+
margin: 0 0 5px 0;
125+
}
126+
127+
dt {
128+
font-style: italic;
129+
font-weight: bold;
130+
}
131+
132+
ul li {
133+
list-style: none;
134+
}
135+
136+
ul li:before {
137+
content: ">>";
138+
font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
139+
font-size: 13px;
140+
color: #b5e853;
141+
margin-left: -37px;
142+
margin-right: 21px;
143+
line-height: 16px;
144+
}
145+
146+
blockquote {
147+
color: #aaa;
148+
padding-left: 10px;
149+
border-left: 1px dotted #666;
150+
}
151+
152+
pre {
153+
background: rgba(0, 0, 0, 0.9);
154+
border: 1px solid rgba(255, 255, 255, 0.15);
155+
padding: 10px;
156+
font-size: 16px;
157+
color: #b5e853;
158+
border-radius: 2px;
159+
-moz-border-radius: 2px;
160+
-webkit-border-radius: 2px;
161+
text-wrap: normal;
162+
overflow: auto;
163+
overflow-y: hidden;
164+
}
165+
166+
table {
167+
width: 100%;
168+
margin: 0 0 20px 0;
169+
}
170+
171+
th {
172+
text-align: left;
173+
border-bottom: 1px dashed #b5e853;
174+
padding: 5px 10px;
175+
}
176+
177+
td {
178+
padding: 5px 10px;
179+
}
180+
181+
hr {
182+
height: 0;
183+
border: 0;
184+
border-bottom: 1px dashed #b5e853;
185+
color: #b5e853;
186+
}
187+
188+
/* Buttons
189+
*/
190+
191+
.btn {
192+
display: inline-block;
193+
background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.3), rgba(35, 35, 35, 0.3) 50%, rgba(10, 10, 10, 0.3) 50%, rgba(0, 0, 0, 0.3));
194+
padding: 8px 18px;
195+
border-radius: 50px;
196+
border: 2px solid rgba(0, 0, 0, 0.7);
197+
border-bottom: 2px solid rgba(0, 0, 0, 0.7);
198+
border-top: 2px solid rgba(0, 0, 0, 1);
199+
color: rgba(255, 255, 255, 0.8);
200+
font-family: Helvetica, Arial, sans-serif;
201+
font-weight: bold;
202+
font-size: 13px;
203+
text-decoration: none;
204+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75);
205+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
206+
}
207+
208+
.btn:hover {
209+
background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.6), rgba(35, 35, 35, 0.6) 50%, rgba(10, 10, 10, 0.8) 50%, rgba(0, 0, 0, 0.8));
210+
}
211+
212+
.btn .icon {
213+
display: inline-block;
214+
width: 16px;
215+
height: 16px;
216+
margin: 1px 8px 0 0;
217+
float: left;
218+
}
219+
220+
.btn-github .icon {
221+
opacity: 0.6;
222+
background: url("../images/blacktocat.png") 0 0 no-repeat;
223+
}
224+
225+
/* Links
226+
a, a:hover, a:visited
227+
*/
228+
229+
a {
230+
color: #63c0f5;
231+
text-shadow: 0 0 5px rgba(104, 182, 255, 0.5);
232+
}
233+
234+
/* Clearfix */
235+
236+
.cf:before, .cf:after {
237+
content:"";
238+
display:table;
239+
}
240+
241+
.cf:after {
242+
clear:both;
243+
}
244+
245+
.cf {
246+
zoom:1;
247+
}

0 commit comments

Comments
 (0)