From: Sylvain Rabot Date: Thu, 30 Dec 2010 21:20:30 GMT Subject: [PATCH 3/4] gitweb: add css class to remote url titles Message-ID: <1293744031-17790-4-git-send-email-sylvain@abstraction.fr> In-Reply-To: <1293744031-17790-1-git-send-email-sylvain@abstraction.fr> add a new optional parameter to format_repo_url routine used to add a css class to the url title cell. Signed-off-by: Sylvain Rabot --- gitweb/gitweb.perl | 17 +++++++++++------ gitweb/static/gitweb.css | 5 +++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index eae75ac..350f8b8 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3881,8 +3881,13 @@ sub git_print_header_div { } sub format_repo_url { - my ($name, $url) = @_; - return "$name$url\n"; + my ($name, $url, $class) = @_; + + if (defined $class) { + return "$name$url\n"; + } else { + return "$name$url\n"; + } } # Group output by placing it in a DIV element and adding a header. @@ -5146,13 +5151,13 @@ sub git_remote_block { if (defined $fetch) { if ($fetch eq $push) { - $urls_table .= format_repo_url("URL", $fetch); + $urls_table .= format_repo_url("URL", $fetch, 'metadata_remote_fetch_url'); } else { - $urls_table .= format_repo_url("Fetch URL", $fetch); - $urls_table .= format_repo_url("Push URL", $push) if defined $push; + $urls_table .= format_repo_url("Fetch URL", $fetch, 'metadata_remote_fetch_url'); + $urls_table .= format_repo_url("Push URL", $push, 'metadata_remote_push_url') if defined $push; } } elsif (defined $push) { - $urls_table .= format_repo_url("Push URL", $push); + $urls_table .= format_repo_url("Push URL", $push, 'metadata_remote_push_url'); } else { $urls_table .= format_repo_url("", "No remote URL"); } diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css index 79d7eeb..631b20d 100644 --- a/gitweb/static/gitweb.css +++ b/gitweb/static/gitweb.css @@ -579,6 +579,11 @@ div.remote { display: inline-block; } +.metadata_remote_fetch_url, +.metadata_remote_push_url { + font-weight: bold; +} + /* Style definition generated by highlight 2.4.5, http://www.andre-simon.de/ */ /* Highlighting theme definition: */ -- 1.7.3.4.523.g72f0d.dirty