Skip to content

Commit 63e08ea

Browse files
committed
1 parent 0927291 commit 63e08ea

File tree

12 files changed

+707
-161
lines changed

12 files changed

+707
-161
lines changed

assets/imgs/go.PNG

16.2 KB
Loading

assets/main.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title str
112112
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
113113
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;text-rendering:optimizeSpeed}
114114
.keyseq{color:rgba(51,51,51,.8)}
115-
kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
115+
kbd{font-weight: normal;display:inline-block;color:rgba(0,0,0,.8);line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
116116
.keyseq kbd:first-child{margin-left:0}
117117
.keyseq kbd:last-child{margin-right:0}
118118
.menuseq,.menu{color:rgba(0,0,0,.8)}
@@ -167,7 +167,7 @@ body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-b
167167
.sect1{padding-bottom:.625em}
168168
@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
169169
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
170-
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
170+
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:4px}
171171
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
172172
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
173173
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
@@ -427,6 +427,7 @@ body.toc2 {
427427
font-size: 12px;
428428
display: block;
429429
color: rgba(0, 0, 0, 0.498039);
430+
font-weight: normal;
430431
}
431432
#toc+#preamble li a{
432433
display: inline-block;
@@ -488,6 +489,14 @@ ul.sectlevel1>li>a {
488489
margin-top:0;
489490
overflow: hidden;
490491
}
492+
#header h1 i{
493+
position: absolute;
494+
left: 20px;
495+
font-style: normal;
496+
}
497+
#header h1{
498+
text-align: center;
499+
}
491500
#header h1,#footer-text{
492501
border: none;
493502
line-height: 1;
@@ -503,4 +512,7 @@ ul.sectlevel1>li>a {
503512
height: 1.5em;
504513
display: inline-block;
505514
margin-top: -0.25em;
506-
}
515+
}
516+
#content .sect1 p a,#content .sect1 p a:visited{color: green}
517+
#content .sect1 p a:hover{color: #000}
518+
#content .sect1 p{line-height: 2}

assets/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ $(function() {
7676
}
7777
});
7878

79-
$('pre.highlight code').each(function(i, block) {
79+
/*$('pre.highlight code').each(function(i, block) {
8080
hljs.highlightBlock(block);
81-
});
81+
});*/
8282

8383
$('[class^="date:"]').each(function(i,e){
8484
$(this).html( $(this).text()+'<i>@ ' + $('[class^="date:"]').attr('class').split(':')[1] + '</i>' )

index.html

Lines changed: 349 additions & 1 deletion
Large diffs are not rendered by default.

layout/document.html.erb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="<%= key %>" content="<%= attr key %>"><%
99
end
1010
end %>
11-
<title><%= doctitle(:sanitize => true) || (attr 'untitled-label') %></title><%
11+
<title><%= doctitle(:sanitize => true) || (attr 'untitled-label') %> - <%= %(#{attr :btitle}) %></title><%
1212
if Asciidoctor::DEFAULT_STYLESHEET_KEYS.include?(attr :stylesheet)
1313
if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss) %>
1414
<link rel="stylesheet" href="<%= normalize_web_path(Asciidoctor::DEFAULT_STYLESHEET_NAME, (attr :stylesdir, '')) %>"><%
@@ -57,8 +57,8 @@ when 'highlightjs' %>
5757
<script src="<%= attr 'highlightjsdir', 'http://cdnjs.cloudflare.com/ajax/libs/highlight.js/7.4' %>/lang/common.min.js"></script>
5858
<script>hljs.initHighlightingOnLoad()</script><%
5959
when 'prettify' %>
60-
<link rel="stylesheet" href="<%= attr 'prettifydir', 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298' %>/<%= attr 'prettify-theme', 'prettify' %>.min.css">
61-
<script src="<%= attr 'prettifydir', 'http://cdnjs.cloudflare.com/ajax/libs/prettify/r298' %>/prettify.min.js"></script>
60+
<link rel="stylesheet" href="share/prettify.min.css">
61+
<script src="share/prettify.min.js"></script>
6262
<script>document.addEventListener('DOMContentLoaded', prettyPrint)</script><%
6363
end
6464
if attr? 'math' %>
@@ -100,7 +100,7 @@ unless noheader %>
100100
else
101101
if has_header?
102102
unless notitle %>
103-
<h1><%= @header.title %></h1><%
103+
<h1><i><%= %(#{attr :btitle}) %></i> <%= @header.title %></h1><%
104104
end
105105
end
106106
end %>
@@ -140,7 +140,6 @@ end %><%= (docinfo_content = (docinfo :footer)).empty? ? nil : %(
140140
end %>
141141
<script src="share/jquery.js"></script>
142142
<script src="share/underscore.js"></script>
143-
<script src="share/highlight.pack.js"></script>
144143
<script src="share/holder.js"></script>
145144
<script src="share/raphael-min.js"></script>
146145
<script src="share/flowchart.min.js"></script>

layout/header.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Aliencode <https://github.com/aliencode[@aliencode]>
1212
:sectnums:
1313
:linkattrs:
1414
:icons: font
15-
:source-highlighter: highlight.js
15+
:source-highlighter: prettify
1616
:experimental:
1717
:stem:
1818
:idprefix:
@@ -26,5 +26,6 @@ Aliencode <https://github.com/aliencode[@aliencode]>
2626
:example-caption!:
2727
:figure-caption!:
2828
:underscore: _
29+
:btitle: 小郭的博客aliencode
2930

3031
include::sidebar.adoc[]

layout/sidebar.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
. link:/[HOME]
1+
. link:index.html[GO语言简单的体验笔记, role="date:2014-11-13"]

share/highlight-github.css

Lines changed: 79 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,95 @@
1-
/*
2-
3-
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
4-
5-
*/
6-
7-
.hljs {
8-
display: block;
9-
overflow-x: auto;
10-
padding: 0.5em;
11-
color: #333;
12-
background: #f8f8f8;
13-
-webkit-text-size-adjust: none;
14-
}
1+
/* Base16 Atelier Forest Light - Theme */
2+
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
3+
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
4+
/* https://github.com/jmblog/color-themes-for-highlightjs */
155

6+
/* Atelier Forest Light Comment */
167
.hljs-comment,
17-
.hljs-template_comment,
18-
.diff .hljs-header,
19-
.hljs-javadoc {
20-
color: #998;
21-
font-style: italic;
22-
}
23-
24-
.hljs-keyword,
25-
.css .rule .hljs-keyword,
26-
.hljs-winutils,
27-
.javascript .hljs-title,
28-
.nginx .hljs-title,
29-
.hljs-subst,
30-
.hljs-request,
31-
.hljs-status {
32-
color: #333;
33-
34-
}
35-
36-
.hljs-number,
37-
.hljs-hexcolor,
38-
.ruby .hljs-constant {
39-
color: #008080;
40-
}
41-
42-
.hljs-string,
43-
.hljs-tag .hljs-value,
44-
.hljs-phpdoc,
45-
.hljs-dartdoc,
46-
.tex .hljs-formula {
47-
color: #d14;
48-
}
49-
50-
.hljs-title,
51-
.hljs-id,
52-
.scss .hljs-preprocessor {
53-
color: #900;
54-
55-
}
56-
57-
.javascript .hljs-title,
58-
.hljs-list .hljs-keyword,
59-
.hljs-subst {
60-
font-weight: normal;
61-
}
62-
63-
.hljs-class .hljs-title,
64-
.hljs-type,
65-
.vhdl .hljs-literal,
66-
.tex .hljs-command {
67-
color: #458;
68-
69-
}
70-
71-
.hljs-tag,
72-
.hljs-tag .hljs-title,
73-
.hljs-rules .hljs-property,
74-
.django .hljs-tag .hljs-keyword {
75-
color: #000080;
76-
font-weight: normal;
8+
.hljs-title {
9+
color: #766e6b;
7710
}
7811

79-
.hljs-attribute,
12+
/* Atelier Forest Light Red */
8013
.hljs-variable,
81-
.lisp .hljs-body {
82-
color: #008080;
83-
}
84-
85-
.hljs-regexp {
86-
color: #009926;
87-
}
88-
89-
.hljs-symbol,
90-
.ruby .hljs-symbol .hljs-string,
91-
.lisp .hljs-keyword,
92-
.clojure .hljs-keyword,
93-
.scheme .hljs-keyword,
94-
.tex .hljs-special,
95-
.hljs-prompt {
96-
color: #990073;
97-
}
98-
99-
.hljs-built_in {
100-
color: #0086b3;
101-
}
102-
14+
.hljs-attribute,
15+
.hljs-tag,
16+
.hljs-regexp,
17+
.ruby .hljs-constant,
18+
.xml .hljs-tag .hljs-title,
19+
.xml .hljs-pi,
20+
.xml .hljs-doctype,
21+
.html .hljs-doctype,
22+
.css .hljs-id,
23+
.css .hljs-class,
24+
.css .hljs-pseudo {
25+
color: #f22c40;
26+
}
27+
28+
/* Atelier Forest Light Orange */
29+
.hljs-number,
10330
.hljs-preprocessor,
10431
.hljs-pragma,
105-
.hljs-pi,
106-
.hljs-doctype,
107-
.hljs-shebang,
108-
.hljs-cdata {
109-
color: #999;
32+
.hljs-built_in,
33+
.hljs-literal,
34+
.hljs-params,
35+
.hljs-constant {
36+
color: #df5320;
11037
}
11138

112-
.hljs-deletion {
113-
background: #fdd;
39+
/* Atelier Forest Light Yellow */
40+
.hljs-ruby .hljs-class .hljs-title,
41+
.css .hljs-rules .hljs-attribute {
42+
color: #d5911a;
11443
}
11544

116-
.hljs-addition {
117-
background: #dfd;
45+
/* Atelier Forest Light Green */
46+
.hljs-string,
47+
.hljs-value,
48+
.hljs-inheritance,
49+
.hljs-header,
50+
.ruby .hljs-symbol,
51+
.xml .hljs-cdata {
52+
color: #5ab738;
53+
}
54+
55+
/* Atelier Forest Light Aqua */
56+
.css .hljs-hexcolor {
57+
color: #00ad9c;
58+
}
59+
60+
/* Atelier Forest Light Blue */
61+
.hljs-function,
62+
.python .hljs-decorator,
63+
.python .hljs-title,
64+
.ruby .hljs-function .hljs-title,
65+
.ruby .hljs-title .hljs-keyword,
66+
.perl .hljs-sub,
67+
.javascript .hljs-title,
68+
.coffeescript .hljs-title {
69+
color: #407ee7;
11870
}
11971

120-
.diff .hljs-change {
121-
background: #0086b3;
72+
/* Atelier Forest Light Purple */
73+
.hljs-keyword,
74+
.javascript .hljs-function {
75+
color: #6666ea;
12276
}
12377

124-
.hljs-chunk {
125-
color: #aaa;
78+
.hljs {
79+
display: block;
80+
overflow-x: auto;
81+
background: #f7f7f7;
82+
color: #68615e;
83+
padding: 0.5em;
84+
-webkit-text-size-adjust: none;
12685
}
86+
87+
.coffeescript .javascript,
88+
.javascript .xml,
89+
.tex .hljs-formula,
90+
.xml .javascript,
91+
.xml .vbscript,
92+
.xml .css,
93+
.xml .hljs-cdata {
94+
opacity: 0.5;
95+
}

share/highlight.pack.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)