@@ -18,6 +18,7 @@ Definition header : LString.t :=
1818 <meta charset=""utf-8"">
1919 <meta name=""viewport"" content=""width=device-width, initial-scale=1"">
2020 <title>Coq OPAM</title>
21+ <link rel=""shortcut icon"" type=""image/png"" href=""img/bag-48.png"" />
2122 <link rel=""stylesheet"" href=""style.min.css"" type=""text/css"" />
2223 <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
2324 <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -30,14 +31,13 @@ Definition header : LString.t :=
3031 <div class=""container-fluid"">
3132 <div class=""navbar navbar-default"" role=""navigation"">
3233 <div class=""navbar-header"">
33- <a class=""navbar-brand"" href=""."">Coq OPAM</a>
34+ <a class=""navbar-brand"" href="".""><img alt=""icon"" src=""img/bag-48.png"" height=""24""> Coq OPAM</a>
3435 </div>
3536 <div id=""navbar"" class=""collapse navbar-collapse"">
3637 <p class=""navbar-text navbar-right""><a class=""navbar-link"" href=""https://github.com/coq/opam-coq-archive"">github.com/coq/opam-coq-archive</a></p>
3738 </div>
3839 </div>
3940 <div class=""row"">
40- <div class=""col-md-12"">
4141".
4242
4343(** The footer of the page. *)
@@ -56,18 +56,31 @@ Definition footer : LString.t :=
5656</html>
5757".
5858
59+ (** A package name without the `coq:` prefix. *)
60+ Definition short_name (name : LString.t) : LString.t :=
61+ match name with
62+ | _ :: _ :: _ :: _ :: short => short
63+ | _ => name
64+ end .
65+
5966Module Index.
6067 (** The title with the number of packages. *)
6168 Definition title (packages : list Package.t) : LString.t :=
6269 let nb_packages : N := N.of_nat @@ List.length packages in
6370 let nb_versions : N := N.of_nat @@ Package.number_of_versions packages in
64- LString.s " <h1>" ++ LString.of_N 10 10 None nb_packages ++
71+ LString.s " <div class=""col-md-3"">
72+ <img alt=""icon"" src=""img/bag.svg"" style=""min-width: 180px; margin-top: 40px"" class=""img-responsive center-block"">
73+ </div>
74+ <div class=""col-md-9"">
75+ <h1>" ++ LString.of_N 10 10 None nb_packages ++
6576 LString.s " packages <small>" ++ LString.of_N 10 10 None nb_versions ++
6677 LString.s " versions</small></h1>
67- <p><a href=""http://opam.ocaml.org/"">OPAM</a> is the most popular package manager for the <a href=""https://coq.inria.fr/"">Coq</a> community.</p>
78+ <p><a href=""http://opam.ocaml.org/""> OPAM</a> is the most popular package manager for the <a href=""https://coq.inria.fr/"">Coq</a> community.</p>
6879 <p>Activate the Coq repository:</p>
6980 <pre>opam repo add coq-released https://coq.inria.fr/opam/released</pre>
70- <p>You can read this <a href=""http://coq-blog.clarus.me/make-a-coq-package.html"">tutorial</a> to make your own packages.</p>
81+ <p>Read this <a href=""http://coq-blog.clarus.me/make-a-coq-package.html"">tutorial</a> to make your own packages.</p>
82+ </div>
83+ <div class=""col-md-12"">
7184 ".
7285
7386 (** A row in the table of packages. *)
@@ -84,8 +97,7 @@ Module Index.
8497 end in
8598 LString.s
8699" <tr>
87- <td><a href=""./" ++ name ++ LString.s "." ++ Version.version last_version ++ LString.s ".html"">" ++ LString.escape_html name ++ LString.s "</a></td>
88- <td>" ++ LString.escape_html (Version.version last_version) ++ LString.s "</td>
100+ <td class=""text-center""><a href=""./" ++ name ++ LString.s "." ++ Version.version last_version ++ LString.s ".html"">" ++ LString.escape_html (short_name name) ++ LString.s "</a></td>
89101 <td>" ++ LString.escape_html description ++ LString.s "</td>
90102 </tr>
91103"
@@ -99,11 +111,10 @@ Module Index.
99111 | Gt => false
100112 end ) in
101113 LString.s
102- " <table class=""table table-striped text-center "">
114+ " <table class=""table table-striped"">
103115 <thead>
104116 <tr>
105- <td><strong>Name</strong></td>
106- <td><strong>Version</strong></td>
117+ <td class=""text-center""><strong>Name</strong></td>
107118 <td><strong>Description</strong></td>
108119 </tr>
109120 </thead>
@@ -120,7 +131,8 @@ End Index.
120131
121132Module Version.
122133 Definition title (name : LString.t) : LString.t :=
123- LString.s " <h1>" ++ LString.escape_html name ++ LString.s "</h1>
134+ LString.s " <div class=""col-md-12"">
135+ <h1>" ++ LString.escape_html (short_name name) ++ LString.s "</h1>
124136".
125137
126138 Definition version_link (is_active : bool) (name : LString.t)
@@ -131,17 +143,17 @@ Module Version.
131143 else
132144 LString.s "" in
133145 let url := LString.s "./" ++ name ++ LString.s "." ++ Version.version version ++ LString.s ".html" in
134- LString.s " <li role=""presentation""" ++ class ++
146+ LString.s " <li role=""presentation""" ++ class ++
135147 LString.s "><a href=""" ++ url ++ LString.s """>" ++ LString.escape_html (Version.version version) ++
136148 LString.s "</a></li>
137149".
138150
139151 Definition version_links (name : LString.t) (version : Version.t)
140152 (versions : list Version.t) : LString.t :=
141- LString.s " <ul class=""nav nav-pills"">
153+ LString.s " <ul class=""nav nav-pills"">
142154" ++ LString.join (LString.s "") (versions |> List.map (fun version' =>
143155 version_link (LString.eqb (Version.version version) (Version.version version')) name version')) ++
144- LString.s " </ul>
156+ LString.s " </ul>
145157".
146158
147159 Definition description (name : LString.t) (version : Version.t) : LString.t :=
0 commit comments