aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Leonhardt <equinox.salexander@gmail.com>
2026-08-17 08:35:40 +0200
committerAlexander Leonhardt <equinox.salexander@gmail.com>
2026-08-17 08:35:40 +0200
commit0489328a0a615d44695a89791b66d5a51b01e682 (patch)
tree3fc0b8c8764dbcefa5800699a4f7e7b3503ddefc
parent68a4efbe21a1c4c9b0715fa78c83012df8138d9e (diff)
downloadcgit-0489328a0a615d44695a89791b66d5a51b01e682.tar.gz
cgit-0489328a0a615d44695a89791b66d5a51b01e682.tar.bz2
cgit-0489328a0a615d44695a89791b66d5a51b01e682.zip
fix: Updated the mobile UI slightly.
-rw-r--r--cgit.css21
-rw-r--r--ui-shared.c9
2 files changed, 23 insertions, 7 deletions
diff --git a/cgit.css b/cgit.css
index 415714a..0db18b9 100644
--- a/cgit.css
+++ b/cgit.css
@@ -60,19 +60,26 @@ div#cgit table#header tr {
display: flex;
}
@media(width <= 40rem) {
+div#cgit table#header td.main {
+ border-bottom: 1px solid #777;
+}
div#cgit table#header tr {
justify-content: center;
}
-div#cgit table#header tr:nth-child(2) {
- flex-direction: column-reverse;
+div#cgit table#header tbody tr:nth-child(2) {
+ flex-direction: column;
+ border-top: 0;
}
div#cgit table#header tr {
flex-direction: column;
}
div#cgit table#header tbody td.form {
- padding-top: 0.1rem;
+ padding-top: 0.3rem;
padding-bottom: 0.3rem;
}
+div#cgit table#header td.subem {
+ padding-top: 0.8rem;
+}
}
@media(width > 40rem) {
div#cgit table#header tr {
@@ -122,8 +129,8 @@ div#cgit table#header td.sub {
display: inline-flex;
justify-content: center;
color: #777;
- padding-left: 1em;
- padding-right: 1em;
+ padding-left: 1rem;
+ padding-right: 1rem;
white-space: wrap;
}
@@ -133,7 +140,8 @@ div#cgit table.tabs::-webkit-scrollbar {
div#cgit table.tabs {
display: block;
- overflow: auto;
+ overflow-x: scroll;
+ overflow-y: hidden;
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
border-bottom: solid 1px #777;
@@ -191,6 +199,7 @@ div#cgit td.form input {
div#cgit td.form select {
-webkit-appearance: none;
appearance: none;
+ font-family: monospace;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 10px center;
diff --git a/ui-shared.c b/ui-shared.c
index d8d5d76..cea9414 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -944,8 +944,15 @@ void cgit_add_clone_urls(void (*fn)(const char *))
static int print_branch_option(const struct reference *ref, void *cb_data)
{
+ char buffer[200];
char *name = (char *)ref->name;
- html_option(name, name, ctx.qry.head);
+ if (strlen(name)>=190) {
+ html_option(name, name, ctx.qry.head);
+ }
+ else {
+ snprintf(buffer, 199, "⎇%s", name);
+ html_option(name, buffer, ctx.qry.head);
+ }
return 0;
}