From: Sylvain Rabot <sylvain@abstraction.fr>
To: git@vger.kernel.org
Cc: Sylvain Rabot <sylvain@abstraction.fr>
Subject: [PATCH 3/4] gitweb: add css class to remote url titles
Date: Thu, 30 Dec 2010 22:20:30 +0100 [thread overview]
Message-ID: <1293744031-17790-4-git-send-email-sylvain@abstraction.fr> (raw)
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 <sylvain@abstraction.fr>
---
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 "<tr class=\"metadata_url\"><td>$name</td><td>$url</td></tr>\n";
+ my ($name, $url, $class) = @_;
+
+ if (defined $class) {
+ return "<tr class=\"metadata_url\"><td class=\"$class\">$name</td><td>$url</td></tr>\n";
+ } else {
+ return "<tr class=\"metadata_url\"><td>$name</td><td>$url</td></tr>\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
next prev parent reply other threads:[~2010-12-30 21:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-30 21:20 [PATCH 0/4 v4] minor gitweb modifications Sylvain Rabot
2010-12-30 21:20 ` [PATCH 1/4] gitweb: add extensions to highlight feature map Sylvain Rabot
2010-12-30 21:20 ` [PATCH 2/4] gitweb: remove unnecessary test when closing file descriptor Sylvain Rabot
2011-01-05 0:15 ` Junio C Hamano
2011-01-05 0:50 ` Jakub Narebski
2010-12-30 21:20 ` Sylvain Rabot [this message]
2010-12-30 21:20 ` [PATCH 4/4] gitweb: add vim modeline header which describes gitweb coding rule Sylvain Rabot
2011-01-01 10:41 ` [PATCH 0/4 v4] minor gitweb modifications Jonathan Nieder
2011-01-01 23:02 ` Jonathan Nieder
2011-01-02 16:27 ` Sylvain Rabot
2011-01-02 17:53 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1293744031-17790-4-git-send-email-sylvain@abstraction.fr \
--to=sylvain@abstraction.fr \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).