# [PATCH v4 3/4] gitweb: omit the repository owner when it is unset

8 messages from 2013-08-20 to 2013-08-21. Participants: Tony Finch, Junio C Hamano.
Thread: https://gitlist.dev/t/34734

## Tony Finch, 2013-08-20 16:59

Subject: [PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.
Message-ID: <724e6c13dba3ee00967b4e3f13e472357e24b6c5.1377019362.git.dot@dotat.at>
URL: https://gitlist.dev/e/724e6c13dba3ee00967b4e3f13e472357e24b6c5.1377019362.git.dot%40dotat.at
In-Reply-To: <cover.1377019362.git.dot@dotat.at>

```
The rss_logo CSS style has a fixed width which is too narrow for
the string "OPML". Replace the fixed width with horizontal padding
so the text fits with nice margins.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index cb86d2d..a869be1 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -548,8 +548,7 @@ a.linenr {
 
 a.rss_logo {
 	float: right;
-	padding: 3px 0px;
-	width: 35px;
+	padding: 3px 5px;
 	line-height: 10px;
 	border: 1px solid;
 	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-08-20 16:59

Subject: [PATCH v4 2/4] gitweb: vertically centre contents of page footer
Message-ID: <5c4afd189553d0f1e83b0c2b9758643deba5a671.1377019362.git.dot@dotat.at>
URL: https://gitlist.dev/e/5c4afd189553d0f1e83b0c2b9758643deba5a671.1377019362.git.dot%40dotat.at
In-Reply-To: <cover.1377019362.git.dot@dotat.at>

```
Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/static/gitweb.css | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
index a869be1..3b4d833 100644
--- a/gitweb/static/gitweb.css
+++ b/gitweb/static/gitweb.css
@@ -68,12 +68,13 @@ div.page_path {
 }
 
 div.page_footer {
-	height: 17px;
+	height: 22px;
 	padding: 4px 8px;
 	background-color: #d9d8d1;
 }
 
 div.page_footer_text {
+	line-height: 22px;
 	float: left;
 	color: #555555;
 	font-style: italic;
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-08-20 16:59

Subject: [PATCH v4 3/4] gitweb: omit the repository owner when it is unset
Message-ID: <e5b90eb96919a30661bcad7ba77aba0b6bfcfa72.1377019362.git.dot@dotat.at>
URL: https://gitlist.dev/e/e5b90eb96919a30661bcad7ba77aba0b6bfcfa72.1377019362.git.dot%40dotat.at
In-Reply-To: <cover.1377019362.git.dot@dotat.at>

```
On the repository summary page, leave the owner line out if the
repo does not have an owner, rather than displaying a labelled empty
field. This does not affect the owner column in the projects list
page, which is present unless $omit_owner is true.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..c029b98 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -6463,7 +6463,7 @@ sub git_summary {
 	print "<div class=\"title\">&nbsp;</div>\n";
 	print "<table class=\"projects_list\">\n" .
 	      "<tr id=\"metadata_desc\"><td>description</td><td>" . esc_html($descr) . "</td></tr>\n";
-        unless ($omit_owner) {
+        if ($owner and not $omit_owner) {
 	        print  "<tr id=\"metadata_owner\"><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
         }
 	if (defined $cd{'rfc2822'}) {
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-08-20 16:59

Subject: [PATCH v4 4/4] gitweb: make search help link less ugly
Message-ID: <3a61bd631c264ac398271af34400809dc2fa0429.1377019362.git.dot@dotat.at>
URL: https://gitlist.dev/e/3a61bd631c264ac398271af34400809dc2fa0429.1377019362.git.dot%40dotat.at
In-Reply-To: <cover.1377019362.git.dot@dotat.at>

```
The search help link was a superscript question mark right next to
a drop-down menu, which looks misaligned and is a cramped and
awkward click target. Remove the superscript tags and add some
spacing to fix these nits. Add a title attribute to provide an
explanatory mouseover.

Signed-off-by: Tony Finch <dot@dotat.at>
---
 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 8d69ada..59af7de 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -4030,8 +4030,8 @@ sub print_search_form {
 	      $cgi->input({-name=>"h", -value=>$search_hash, -type=>"hidden"}) . "\n" .
 	      $cgi->popup_menu(-name => 'st', -default => 'commit',
 	                       -values => ['commit', 'grep', 'author', 'committer', 'pickaxe']) .
-	      $cgi->sup($cgi->a({-href => href(action=>"search_help")}, "?")) .
-	      " search:\n",
+	      " " . $cgi->a({-href => href(action=>"search_help"),
+			     -title => "search help" }, "?") . " search:\n",
 	      $cgi->textfield(-name => "s", -value => $searchtext, -override => 1) . "\n" .
 	      "<span title=\"Extended regular expression\">" .
 	      $cgi->checkbox(-name => 'sr', -value => 1, -label => 're',
-- 
1.8.3.1.605.g85318f5

```

## Tony Finch, 2013-08-20 17:22

Subject: [PATCH v4 0/4] Four small gitweb tweaks
Message-ID: <cover.1377019362.git.dot@dotat.at>
URL: https://gitlist.dev/e/cover.1377019362.git.dot%40dotat.at
In-Reply-To: <alpine.LSU.2.00.1308051220170.6019@hermes-2.csi.cam.ac.uk>

```
This is mostly just a repost to un-stall this topic.

I have fixed the tab damage problem spotted by Jakub in the search
help link patch, and I have improved the commit message for the
repository owner patch. No other changes.

Tony Finch (4):
  gitweb: Ensure OPML text fits inside its box.
  gitweb: vertically centre contents of page footer
  gitweb: omit the repository owner when it is unset
  gitweb: make search help link less ugly

 gitweb/gitweb.perl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.8.3.1.605.g85318f5

```

## Junio C Hamano, 2013-08-20 19:52

Subject: Re: [PATCH v4 1/4] gitweb: Ensure OPML text fits inside its box.
Message-ID: <xmqq61v0w35x.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq61v0w35x.fsf%40gitster.dls.corp.google.com
In-Reply-To: <724e6c13dba3ee00967b4e3f13e472357e24b6c5.1377019362.git.dot@dotat.at>

```
Tony Finch <dot@dotat.at> writes:

> The rss_logo CSS style has a fixed width which is too narrow for
> the string "OPML". Replace the fixed width with horizontal padding
> so the text fits with nice margins.

Makes sense to me (although I do not do css).

>
> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/static/gitweb.css | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index cb86d2d..a869be1 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -548,8 +548,7 @@ a.linenr {
>  
>  a.rss_logo {
>  	float: right;
> -	padding: 3px 0px;
> -	width: 35px;
> +	padding: 3px 5px;
>  	line-height: 10px;
>  	border: 1px solid;
>  	border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e;

```

## Junio C Hamano, 2013-08-20 19:53

Subject: Re: [PATCH v4 2/4] gitweb: vertically centre contents of page footer
Message-ID: <xmqq1u5ow33c.fsf@gitster.dls.corp.google.com>
URL: https://gitlist.dev/e/xmqq1u5ow33c.fsf%40gitster.dls.corp.google.com
In-Reply-To: <5c4afd189553d0f1e83b0c2b9758643deba5a671.1377019362.git.dot@dotat.at>

```
Tony Finch <dot@dotat.at> writes:

> Signed-off-by: Tony Finch <dot@dotat.at>
> ---
>  gitweb/static/gitweb.css | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gitweb/static/gitweb.css b/gitweb/static/gitweb.css
> index a869be1..3b4d833 100644
> --- a/gitweb/static/gitweb.css
> +++ b/gitweb/static/gitweb.css
> @@ -68,12 +68,13 @@ div.page_path {
>  }
>  
>  div.page_footer {
> -	height: 17px;
> +	height: 22px;
>  	padding: 4px 8px;
>  	background-color: #d9d8d1;
>  }
>  
>  div.page_footer_text {
> +	line-height: 22px;
>  	float: left;
>  	color: #555555;
>  	font-style: italic;

Hmmm, is it a good idea to do "px" here, or are they ways to do
relative to x-height or something to make sure the text fits?

```

## Tony Finch, 2013-08-21 09:06

Subject: Re: [PATCH v4 2/4] gitweb: vertically centre contents of page footer
Message-ID: <alpine.LSU.2.00.1308211003040.6019@hermes-2.csi.cam.ac.uk>
URL: https://gitlist.dev/e/alpine.LSU.2.00.1308211003040.6019%40hermes-2.csi.cam.ac.uk
In-Reply-To: <xmqq1u5ow33c.fsf@gitster.dls.corp.google.com>

```
Junio C Hamano <gitster@pobox.com> wrote:
> Tony Finch <dot@dotat.at> writes:
>
> >  div.page_footer {
> > -	height: 17px;
> > +	height: 22px;
> >  	padding: 4px 8px;
> >  	background-color: #d9d8d1;
> >  }
> >
> >  div.page_footer_text {
> > +	line-height: 22px;
> >  	float: left;
> >  	color: #555555;
> >  	font-style: italic;
>
> Hmmm, is it a good idea to do "px" here, or are they ways to do
> relative to x-height or something to make sure the text fits?

Good question. I also don't know much about css. I basically followed the
style that was already there, and found out about vertical centering using
line-height by searching the web.

I think font-size relative scaling would require a bigger overhaul.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.

```
