Mercurial > hg
diff mercurial/templates/gitweb/filediff.tmpl @ 32762:2d93d2159e30
hgweb: refresh styling of gitweb's search form
gitweb was missing the hint hover box. So that was added.
Also, the positioning of the form was absolute and it didn't
vertically align on all pages. The element has been moved inline
with the navigation links (which now are contained in a div) and
flexbox is used to obtain sane alignment of the navigation links
and search form. For those new to flexbox,
"justify-content: space-between" basically says to maximize space
elements. You can use it to easily get left and right justified
containers without having to worry about width, floating, etc.
"align-items: center" centers all items in a cross-axis. I've
literally wasted hours trying to figure out both these problems
before flexbox. Flexbox is amazing.
Flexbox has been supported by Chrome and Firefox for a few years.
But it is only supported by IE 11. I'm willing to wager that
people using this either won't be using IE or will be using IE 11.
So I'm willing to be a bit aggressive in adopting flexbox because
it makes CSS alignment so much easier.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 09 Jun 2017 13:55:51 -0700 |
parents | cb5123eff7d1 |
children |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/filediff.tmpl Fri Jun 09 13:45:36 2017 -0700 +++ b/mercurial/templates/gitweb/filediff.tmpl Fri Jun 09 13:55:51 2017 -0700 @@ -10,10 +10,10 @@ <div class="page_header"> <a href="{logourl}" title="Mercurial" style="float: right;">Mercurial</a> <a href="/">Mercurial</a> {pathdef%breadcrumb} / diff -{searchform} </div> <div class="page_nav"> +<div> <a href="{url|urlescape}summary{sessionvars%urlparameter}">summary</a> | <a href="{url|urlescape}shortlog{sessionvars%urlparameter}">shortlog</a> | <a href="{url|urlescape}log{sessionvars%urlparameter}">changelog</a> | @@ -31,7 +31,8 @@ <a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a> | <a href="{url|urlescape}raw-diff/{symrev}/{file|urlescape}">raw</a> | <a href="{url|urlescape}help{sessionvars%urlparameter}">help</a> -<br/> +</div> +{searchform} </div> <div class="title">{file|escape}</div>