Skip to content

Commit cac3ad2

Browse files
committed
Documentation comments and corresponding HTML generation.
1 parent 3ee0c81 commit cac3ad2

29 files changed

+1572
-134
lines changed

INSTALL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ proceed to [install EasyCrypt from Source](#installing-easycrypt-from-source).
522522
- [OCaml ini-files](https://opam.ocaml.org/packages/ocaml-inifiles/) (version >= 1.2)
523523
Additional resources:
524524
- http://archive.ubuntu.com/ubuntu/pool/universe/o/ocaml-inifiles
525+
- [OCaml Markdown](https://github.com/gildor478/ocaml-markdown)
526+
Additional resources:
527+
- https://opam.ocaml.org/packages/markdown
525528
- [Python3](https://www.python.org/downloads)
526529
You also need to install the following libraries:
527530
- [Python3 YAML](https://pyyaml.org/wiki/PyYAMLDocumentation)

assets/.gitignore

Whitespace-only changes.

assets/styles/styles.css

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
/* General Styling */
2+
/* Body */
3+
body {
4+
font-family: "-apple-system", "BlinkMacSystemFont", "Roboto", "Arial", sans-serif;
5+
line-height: 1.2;
6+
font-size: 16px;
7+
margin: 0;
8+
padding: 0;
9+
color: #333;
10+
background-color: #f9f9f9;
11+
}
12+
13+
/* Code blocks */
14+
pre {
15+
font-family: "Fira Code", "Consolas", monospace;
16+
font-size: 1rem;
17+
padding: 5px;
18+
border-radius: 1px;
19+
color: #2d2d2d;
20+
background-color: #ecf0f1;
21+
}
22+
23+
/* Inline code */
24+
code {
25+
font-family: "Fira Code", "Consolas", monospace;
26+
font-size: 1rem;
27+
color: #d6336c;
28+
}
29+
30+
/* Headings */
31+
h1, h2, h3, h4, h5, h6 {
32+
font-family: "Roboto", "Arial", sans-serif;
33+
font-weight: 600;
34+
color: #1a1a1a;
35+
margin-bottom: 0.5em;
36+
}
37+
38+
h1 {
39+
font-size: 2.25rem;
40+
}
41+
h2 {
42+
font-size: 2rem;
43+
}
44+
h3 {
45+
font-size: 1.75rem;
46+
}
47+
h4 {
48+
font-size: 1.5rem;
49+
}
50+
h5 {
51+
font-size: 1.25rem;
52+
}
53+
h6 {
54+
font-size: 1rem;
55+
}
56+
57+
/* Links */
58+
a {
59+
font-family: "Roboto", "Arial", sans-serif;
60+
color: #007bff;
61+
text-decoration: none;
62+
}
63+
64+
a:hover {
65+
color: #0056b3;
66+
text-decoration: underline;
67+
}
68+
69+
.serif-text {
70+
font-family: "Times New Roman", "Times", serif;
71+
font-size: 1rem;
72+
color: #333;
73+
}
74+
75+
/* Specific styling */
76+
77+
/* Sidebar */
78+
.sidebar {
79+
width: 200px;
80+
background-color: #2c3e50;
81+
color: #ecf0f1;
82+
position: fixed;
83+
height: 100%;
84+
overflow: auto;
85+
}
86+
87+
.sidebar-title {
88+
padding: 20px;
89+
color: #ecf0f1;
90+
background-color: #34495e;
91+
margin-bottom: 20px;
92+
}
93+
94+
.sidebar-title h2 {
95+
font-size: 1.5em;
96+
margin-bottom: 5px;
97+
color: #ecf0f1;
98+
}
99+
100+
.sidebar-title .sidebar-title-theory {
101+
font-size: 1.2em;
102+
color: #3498db;
103+
}
104+
105+
.sidebar-title-theory {
106+
word-wrap: break-word;
107+
overflow-wrap: break-word;
108+
white-space: normal;
109+
}
110+
111+
.sidebar-elems {
112+
padding: 20px;
113+
}
114+
115+
.sidebar-section-list {
116+
list-style: none;
117+
padding: 0;
118+
}
119+
120+
.sidebar-section-list li {
121+
margin: 15px 0;
122+
}
123+
124+
.sidebar-section-list li a {
125+
color: #ecf0f1;
126+
font-weight: bold;
127+
}
128+
129+
/* Main content */
130+
main {
131+
margin-left: 220px;
132+
padding: 20px;
133+
max-width: 960px;
134+
}
135+
136+
.page-heading-container {
137+
border-bottom: 2px solid #ddd;
138+
padding-bottom: 5px;
139+
margin-bottom: 20px;
140+
}
141+
142+
.page-heading-container .page-heading {
143+
margin-block-end: 5px;
144+
}
145+
146+
.page-heading-container .page-subheading {
147+
margin-block-start: 0px;
148+
margin-block-end: 5px;
149+
font-size: 1.2em;
150+
}
151+
152+
/* Sections */
153+
.item-section {
154+
margin-bottom: 40px;
155+
}
156+
157+
.section-heading {
158+
color: #34495e;
159+
border-bottom: 2px solid #ddd;
160+
padding-bottom: 10px;
161+
margin-bottom: 20px;
162+
}
163+
164+
/* Item lists */
165+
.item-list {
166+
list-style: none;
167+
padding: 0;
168+
}
169+
170+
.item-entry {
171+
display: flex;
172+
flex-direction: column;
173+
margin-bottom: 20px;
174+
}
175+
176+
.item-name-desc-container {
177+
display: flex;
178+
align-items: flex-start;
179+
}
180+
181+
.item-name {
182+
width: 200px;
183+
font-weight: bold;
184+
color: #2980b9;
185+
white-space: normal;
186+
overflow-wrap: break-word;
187+
}
188+
189+
.item-basic-desc {
190+
flex: 1;
191+
margin-left: 10px;
192+
}
193+
194+
.item-basic-desc p {
195+
margin-top: 0px;
196+
}
197+
198+
.item-details {
199+
margin-left: 210px;
200+
}
201+
202+
.item-details summary {
203+
cursor: pointer;
204+
color: #3498db;
205+
font-weight: bold;
206+
}
207+
208+
.item-details summary:hover {
209+
text-decoration: underline;
210+
}
211+
212+
.item-details-par {
213+
margin-top: 10px;
214+
}
215+
216+
/* Source code */
217+
pre.source {
218+
border: 2px solid #bdc3c7;
219+
padding: 10px;
220+
border-radius: 5px;
221+
overflow-x: auto;
222+
white-space: pre-wrap;
223+
}
224+
225+
/* Introduction section */
226+
.intro-section {
227+
margin-bottom: 40px;
228+
}

dune

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
(dirs 3rdparty src etc theories examples scripts)
1+
(dirs 3rdparty src etc theories examples assets scripts)
22

33
(install
44
(section (site (easycrypt commands)))
55
(files (scripts/testing/runtest as runtest)))
66

7+
(install
8+
(section (site (easycrypt doc)))
9+
(files (assets/styles/styles.css as styles.css)))
10+
711
(install
812
(section (bin))
913
(files (scripts/testing/bin-ec-runtest as ec-runtest)))

dune-project

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
(package
1212
(name easycrypt)
13-
(sites (lib theories) (libexec commands) (lib config))
13+
(sites (lib theories) (libexec commands) (lib doc) (lib config))
1414
(depends
1515
(ocaml (>= 4.08.0))
1616
(batteries (>= 3))
@@ -19,6 +19,7 @@
1919
dune
2020
dune-build-info
2121
dune-site
22+
markdown
2223
(pcre2 (>= 8))
2324
(why3 (and (>= 1.8.0) (< 1.9)))
2425
yojson

easycrypt.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ depends: [
77
"dune" {>= "3.13"}
88
"dune-build-info"
99
"dune-site"
10+
"markdown"
1011
"pcre2" {>= "8"}
1112
"why3" {>= "1.8.0" & < "1.9"}
1213
"yojson"

0 commit comments

Comments
 (0)