From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain Rabot Subject: [PATCH 3/4] gitweb: add css class to remote url titles Date: Thu, 30 Dec 2010 22:20:30 +0100 Message-ID: <1293744031-17790-4-git-send-email-sylvain@abstraction.fr> References: <1293744031-17790-1-git-send-email-sylvain@abstraction.fr> Cc: Sylvain Rabot To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Thu Dec 30 22:21:05 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PYPvk-00089D-I8 for gcvg-git-2@lo.gmane.org; Thu, 30 Dec 2010 22:21:04 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370Ab0L3VUq (ORCPT ); Thu, 30 Dec 2010 16:20:46 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:55433 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755329Ab0L3VUn (ORCPT ); Thu, 30 Dec 2010 16:20:43 -0500 Received: by mail-ww0-f44.google.com with SMTP id 36so11945274wwa.1 for ; Thu, 30 Dec 2010 13:20:42 -0800 (PST) Received: by 10.227.136.146 with SMTP id r18mr9614123wbt.46.1293744042576; Thu, 30 Dec 2010 13:20:42 -0800 (PST) Received: from localhost.localdomain (85-168-197-251.rev.numericable.fr [85.168.197.251]) by mx.google.com with ESMTPS id m10sm11283348wbc.16.2010.12.30.13.20.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 13:20:41 -0800 (PST) X-Mailer: git-send-email 1.7.3.4.523.g72f0d.dirty In-Reply-To: <1293744031-17790-1-git-send-email-sylvain@abstraction.fr> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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