-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.go
118 lines (95 loc) · 1.61 KB
/
style.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// vim: set filetype=css :
// Copyright 2016 Manlio Perillo. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Definition of the CSS template.
package main
var style = `
* {
margin: 0;
padding: 0;
tab-size: 4;
}
html {
font-family: "{{ .Font.Family }}", Courier, monospace;
font-size: {{ .Font.Size }};
line-height: {{ .Font.LineHeight }};
}
code {
display: block;
}
.line {
color: #999;
}
.operator, .ident {
font-style: normal;
font-weight: normal;
}
.keyword {
font-weight: bold;
}
.builtin {
font-weight: bold;
font-style: italic;
}
.literal {
font-style: italic;
}
.comment {
font-style: oblique;
}
.invalid {
background-color: red;
}
@media print {
@page {
size: {{ .PageSize }};
margin: {{ .PageMargin }};
font-size: {{ .Font.Size }};
counter-increment: page 1;
@top-left {
vertical-align: bottom;
margin-bottom: 1.5em;
content: "{{ .Package.ImportPath }}";
}
@top-right {
vertical-align: bottom;
margin-bottom: 1.5em;
content: string(file);
}
@bottom-left {
vertical-align: top;
margin-top: 1.5em;
content: "{{ .Module }}" "\2003" "{{ .Module.Date }}";
}
@bottom-right {
vertical-align: top;
margin-top: 1.5em;
content: "page " counter(page);
}
}
.package > h1 {
display: none;
}
.file {
page-break-after: always;
string-set: file attr(data-file);
}
.file:last-of-type {
page-break-after: auto;
}
h1, h2 {
display: none;
}
}
@media screen {
h1 {
font-size: 2em;
}
h2 {
margin: 16px;
font-size: 1.5em;
text-align: center;
}
}
`