Skip to content

Commit 2374bc3

Browse files
committed
CSS improvements
1 parent b7113d5 commit 2374bc3

File tree

5 files changed

+183
-358
lines changed

5 files changed

+183
-358
lines changed

Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ source/offboarding.md \
3232
CHANGELOG.md \
3333
" > ORDER
3434

35-
# source/public_data.md \
36-
3735
build: format set_order
3836
mkdir -p build/html
3937
mkdir -p build/pdf
4038
bash build.sh
39+
-rm ORDER

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
# Lab manual
44
<!--
55
<div style="width:50%; display: block; margin: auto;">
6-
<img src="https://github.com/rendeirolab/labdocs/blob/main/assets/img/logo.png?raw=true" style="width: 100%;"/>
6+
<img src="https://github.com/rendeirolab/lab-manual/blob/main/assets/img/logo.png?raw=true" style="width: 100%;"/>
77
<p style="text-align: center;">Rendeiro Lab</p>
88
</div> -->
99

10-
This is the lab manual, with all the information about the lab's culture and procedures.
10+
This is the Rendeiro lab manual, with all the information about the lab's culture and procedures.
1111

12-
The manual is available in the [`labdocs`](https://github.com/rendeirolab/labdocs/tree/main/manual) repository on Github.
12+
The manual is available in the [`lab-manual`](https://github.com/rendeirolab/lab-manual/tree/main/manual) repository on Github.
1313

1414
It is written in [Markdown](https://daringfireball.net/projects/markdown/), but can be converted to HTML and PDF using [Pandoc](https://pandoc.org/).
1515

1616
It can be maintained and edited by anyone on Github.
1717

1818
## Building the manual
1919

20-
A [Makefile](https://github.com/rendeirolab/labdocs/blob/main/manual/Makefile) is available in the [`labdocs repository`](https://github.com/rendeirolab/labdocs/tree/main/manual).
20+
A [Makefile](https://github.com/rendeirolab/lab-manual/blob/main/manual/Makefile) is available in the [`lab-manual repository`](https://github.com/rendeirolab/lab-manual/tree/main/manual).
2121

2222
Converting the manual to a single HTML file:
2323

assets/style.css

+174
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/* General Reset */
2+
body {
3+
font-family: 'Arial', 'Helvetica Neue', sans-serif;
4+
color: #333;
5+
font-size: 10pt;
6+
line-height: 1.35;
7+
margin: 0;
8+
padding: 0;
9+
background-color: #ffffff;
10+
}
11+
12+
/* Headings */
13+
h1, h2, h3, h4, h5, h6 {
14+
font-family: 'Segoe UI', 'Arial', sans-serif;
15+
color: #222;
16+
margin-top: 1em;
17+
margin-bottom: 0.25em;
18+
font-weight: 600;
19+
}
20+
h1 { font-size: 2em; border-bottom: 2px solid #ddd; padding-bottom: 0.2em; }
21+
h2 { font-size: 1.75em; border-bottom: 1px solid #eee; padding-bottom: 0.15em; }
22+
h3 { font-size: 1.5em; }
23+
h4 { font-size: 1.25em; }
24+
h5 { font-size: 1em; }
25+
h6 { font-size: 0.875em; }
26+
27+
/* Paragraphs */
28+
p {
29+
margin: 0 0 0.25em;
30+
}
31+
32+
/* Links */
33+
a {
34+
color: #0066cc;
35+
text-decoration: none;
36+
}
37+
a:hover {
38+
text-decoration: underline;
39+
}
40+
41+
/* Tables */
42+
table {
43+
width: 100%;
44+
border-collapse: collapse;
45+
margin: 1em 0;
46+
}
47+
th, td {
48+
border: 1px solid #ddd;
49+
padding: 0.5em;
50+
text-align: left;
51+
}
52+
th {
53+
background-color: #f5f5f5;
54+
font-weight: bold;
55+
}
56+
57+
/* Code Blocks */
58+
code {
59+
font-family: 'Courier New', monospace;
60+
background-color: #f8f8f8;
61+
border: 1px solid #eee;
62+
padding: 0.2em 0.4em;
63+
border-radius: 4px;
64+
font-size: 0.95em;
65+
}
66+
pre {
67+
background-color: #f8f8f8;
68+
border: 1px solid #eee;
69+
padding: 1em;
70+
border-radius: 4px;
71+
overflow-x: auto;
72+
}
73+
74+
/* Blockquotes */
75+
blockquote {
76+
margin: 0 0 1em;
77+
padding: 0.5em 1em;
78+
color: #666;
79+
border-left: 4px solid #ccc;
80+
background: #f9f9f9;
81+
}
82+
83+
/* Lists */
84+
ul, ol {
85+
margin: 1em 0;
86+
padding-left: 1.5em;
87+
}
88+
li {
89+
margin-bottom: 0.5em;
90+
}
91+
92+
/* Horizontal Rule */
93+
hr {
94+
border: 0;
95+
border-top: 1px solid #ddd;
96+
margin: 2em 0;
97+
}
98+
99+
/* Table of Contents */
100+
.toc {
101+
margin: 2em 0;
102+
padding: 0;
103+
}
104+
.toc ul {
105+
list-style-type: none;
106+
padding: 0;
107+
}
108+
.toc li {
109+
margin-bottom: 0.5em;
110+
}
111+
.toc a {
112+
color: #0066cc;
113+
text-decoration: none;
114+
}
115+
.toc a:hover {
116+
text-decoration: underline;
117+
}
118+
119+
/* Headers and Footers for PDF */
120+
@page {
121+
margin: 1in;
122+
}
123+
@page:first {
124+
margin-top: 2in;
125+
}
126+
header {
127+
text-align: center;
128+
font-size: 10pt;
129+
color: #777;
130+
margin-bottom: 1em;
131+
}
132+
footer {
133+
text-align: center;
134+
font-size: 10pt;
135+
color: #777;
136+
margin-top: 1em;
137+
}
138+
139+
.abstract-title {
140+
font-family: 'Segoe UI', 'Arial', sans-serif;
141+
color: #222;
142+
margin-top: 1em;
143+
margin-bottom: 0.5em;
144+
font-weight: 600;
145+
font-size: 2em;
146+
color: #000;
147+
border-bottom: 2px solid #ddd; padding-bottom: 0.2em;
148+
}
149+
.abstract {
150+
text-align: justify;
151+
}
152+
/* Images */
153+
img {
154+
max-width: 100%;
155+
height: auto;
156+
margin: 1em 0;
157+
}
158+
159+
/* Highlighting */
160+
mark {
161+
background-color: #ff0;
162+
color: #000;
163+
font-weight: bold;
164+
}
165+
166+
/* Additional Styles */
167+
figure {
168+
margin: 1em 0;
169+
text-align: center;
170+
}
171+
figcaption {
172+
font-size: 0.9em;
173+
color: #666;
174+
}

build.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ echo ${ORDER[@]:0:12} | xargs sed -i -e '$a<div style="page-break-after: always;
1515
# Convert to HTML
1616
cat ORDER | pandoc \
1717
-V toc-title='Table of contents' \
18-
--css https://raw.githubusercontent.com/simov/markdown-viewer/master/themes/github.css \
19-
--css style.css \
18+
--embed-resources \
19+
--standalone \
20+
--css=assets/style.css \
2021
--toc \
2122
--toc-depth 1 \
2223
-t html5 \
2324
--metadata-file=metadata.yaml \
2425
-s `xargs` \
2526
-o build/html/rendeiro-lab_manual.html
26-
27+
2728
# Convert to PDF
2829
wkhtmltopdf \
2930
--enable-internal-links \

0 commit comments

Comments
 (0)