Add index link on repo pages to return to homepage

Shows an 'index' link above the page header on all repo pages, linking back to the root. Not displayed on the root page itself.

Commit
7bf362025b8a9701ea2f58e945f7c4ccc9a6753d
Author
Marius Peter <dev@marius-peter.com>
Author date
Committer
Marius Peter <dev@marius-peter.com>
Committer date
Changed files
lib/static/styles.css
index c371a571..7c25d8d7 100644..100644
@@ -16,6 +16,16 @@
16 16 padding: 0.5em 0;
17 17 }
18 18
19 Added: #index-link {
20 Added: color: skyblue;
21 Added: text-decoration: none;
22 Added: font-size: 0.9em;
23 Added: }
24 Added:
25 Added: #index-link:hover {
26 Added: text-decoration: underline;
27 Added: }
28 Added:
19 29 #page-header .site-logo {
20 30 width: 2.5em;
21 31 height: 2.5em;
lib/views.ml
index 4f054261..da72d692 100644..100644
@@ -69,6 +69,10 @@
69 69 let open HTML in
70 70 body []
71 71 [
72 Added: (match bd.repo with
73 Added: | None -> null []
74 Added: | Some _ ->
75 Added: Routes.link_to Root ~other_attrs:[ id "index-link" ] (txt "index"));
72 76 page_header bd.title bd.subtitle;
73 77 (match bd.repo with
74 78 | None -> HTML.null []