[OCaml] Mobile-friendly clone of cgit.
style separate footer copyright and validation link
Split the footer into two distinct <p> elements (copyright and validation) displayed on opposite sides via flexbox, matching the Org mode HTML export pattern.
Changed files
lib/static/styles.css
@@ -1056,7 +1056,13 @@
1056
1056
footer {
1057
1057
margin: 1em;
1058
1058
padding: 0 1em;
1059
Removed:
text-align: center;
1059
Added:
display: flex;
1060
Added:
justify-content: space-between;
1061
Added:
align-items: center;
1062
Added:
}
1063
Added:
1064
Added:
footer p {
1065
Added:
margin: 0;
1060
1066
}
1061
1067
1062
1068
@media (max-width: 768px) {
lib/views/layout.ml
@@ -63,13 +63,15 @@
63
63
let footer user_name =
64
64
let now = Unix.(time () |> localtime) in
65
65
let year = string_of_int (now.tm_year + 1900) in
66
Removed:
Ui.page_footer
66
Added:
Ui.page_footer ~class_:"site-footer"
67
67
[
68
Removed:
Ui.text
68
Added:
Ui.paragraph_text ~class_:"copyright"
69
69
(if user_name = "" then Printf.sprintf "Copyright %s" year
70
70
else Printf.sprintf "Copyright %s %s" year user_name);
71
Removed:
Ui.text " — ";
72
Removed:
Ui.text_link ~href:"https://validator.w3.org/check/referer" "Validate";
71
Added:
Ui.paragraph ~class_:"validation"
72
Added:
[
73
Added:
Ui.text_link ~href:"https://validator.w3.org/check/referer" "Validate";
74
Added:
];
73
75
]
74
76
75
77
let body site page_data =