Commit Graph

133 Commits

Author SHA1 Message Date
Alexander Plavin
9e521b740d paper: remove unused occurence of changelogtag in views
This variably isn't passed to these views and it always renders to empty string
for this reason. Other themes don't have this issue.
2013-08-03 00:34:56 +04:00
Alexander Plavin
ce27765c65 hgweb: show full date in rfc822 format in tooltips at shortlog page
The absolute date was not shown anywhere in the log view for users with
enabled JavaScript.
2013-06-30 11:48:21 +04:00
Kevin Bullock
a111856fd9 hgweb: remove trailing whitespace in mercurial.js 2013-08-04 16:19:12 -05:00
Alexander Plavin
db303d2e5c paper: get rid of changelogtag template duplication 2013-07-22 17:07:19 +04:00
Alexander Plavin
da7dc49074 paper: fix rendering of the first tab in a line in Webkit (issue3990)
This fixes issue3990 for Webkit-browsers, and also older Opera versions.
Rendering in firefox is not changed.
2013-07-21 18:50:54 +04:00
Alexander Plavin
793ff2d3f8 hgweb: highlight line which is linked to at annotate view 2013-07-14 05:35:04 +04:00
Alexander Plavin
76b5c57277 hgweb: highlight line which is linked to at comparison view 2013-07-13 17:32:54 +04:00
Alexander Plavin
2a275ba3af hgweb: change highlighted line color to be different from 'inserted' color
This changes line highlight color from a fain yellow (#ffff99) to
a faint blue (#bfdfff), because yellow color is used in comparison view for
inserted lines.
This new color is okay for people with different forms of color blindness
(tested with a simulator):
a) this color looks quite different from other used backgrounds
b) text doesn't lose distinction on this color
2013-07-13 17:31:53 +04:00
Alexander Plavin
af42bd5158 hgweb: make stripes in diffstat with CSS 2013-07-13 18:06:57 +04:00
Alexander Plavin
c077a7b985 hgweb: make stripes in file log with CSS 2013-07-13 18:03:35 +04:00
Alexander Plavin
d54d02c21a hgweb: make stripes in graph with CSS 2013-07-13 18:02:34 +04:00
Alexander Plavin
b7eaff030b hgweb: make stripes in log and search with CSS 2013-07-13 17:59:00 +04:00
Alexander Plavin
4ea0dd71d4 hgweb: make stripes in branch list with CSS 2013-07-13 17:51:43 +04:00
Alexander Plavin
71c7d486e4 hgweb: make stripes in repo list with CSS 2013-07-13 17:49:20 +04:00
Alexander Plavin
fe02157bda hgweb: make stripes in file annotate view with CSS 2013-07-13 17:43:45 +04:00
Alexander Plavin
c5c26ce5f7 hgweb: make stripes in tag list with CSS 2013-07-13 17:44:57 +04:00
Alexander Plavin
d32de28413 hgweb: make stripes in directory view with CSS 2013-07-13 17:44:46 +04:00
Alexander Plavin
bced7b0598 hgweb: make stripes in bookmark list with CSS 2013-07-13 17:43:19 +04:00
Alexander Plavin
f6368c5d37 hgweb: add line wrapping switch to file diff and changeset views 2013-07-13 00:57:56 +04:00
Alexander Plavin
a55c9084f3 hgweb: file diff and changesets views behave like file source view
This gives all the benefits introduced before for file source view, namely
code selection without line numbers and correct indents, highlighting line
which is linked to, long lines wrapping.

Implementation strategy is also the same as for file source view: all the
lines are put in a sigle pre tag with span's for each line. Correct line
numbering (same as before this patch) is achieved with nested CSS counters.
2013-07-13 00:57:10 +04:00
Alexander Plavin
0c3cdee1bd hgweb: introduce separate classes for stripey background
Introduce stripes2 and stripes4 classes to support different structure.
They will be useful to implement stripes with pure CSS everywhere instead
of current server-side implementation.
2013-07-12 23:47:56 +04:00
Alexander Plavin
6e640b5a19 hgweb: add line wrapping switch to file source view
This uses classList property, which is well-supported now: both Chromium 8.0+,
Firefox 3.6+ and Opera 11.5+ support it, as well as relatively modern versions
of other browsers.
2013-07-12 15:58:13 +04:00
Alexander Plavin
d84fdf56b7 hgweb: add changelog and search templates to raw style
This will make testing hgweb search and other things simpler and more concise,
as there is no extra HTML code in the raw style.
2013-07-09 02:08:24 +04:00
Alexander Plavin
4b47b3338d hgweb: toggleDiffstat function instead of showDiffstat and hideDiffstat
This eliminates the need of two almost equal functions, makes the code cleaner.
2013-07-12 16:01:11 +04:00
Alexander Plavin
57f00f5607 hgweb: get rid of branchentry template duplication 2013-07-13 17:51:24 +04:00
Alexander Plavin
b84ced8343 hgweb: show current search query in the input field 2013-07-11 17:01:54 +04:00
Alexander Plavin
8225ea1d54 hgweb: color line which is linked to in file source view
Browser compatibility (':target' selector used): IE 8+, FF 3.5+, Safari 3.1+,
Opera 9.5+, Chromium 4+, all popular mobile browsers.
2013-07-04 14:19:43 +04:00
Alexander Plavin
a93f6aef24 hgweb: wrap lines in file source view 2013-07-04 14:19:13 +04:00
Alexander Plavin
c6105565d1 hgweb: code selection without line numbers in file source view
All the source lines are put in a <pre> tag, which gives correct display and
copy&paste in both Chromium (WebKit) and FireFox: line numbers are not copied,
all the tabs and spaces are kept. This doesn't change the visual appearance
of the view compared to current hgweb version and doesn't use any JS code.
Also, stripes in this view are now generated clientside with CSS.

This implementation is chosen because other variants have important issues:

Strategy             FF              Chrome

current             D,LT,E,T,L        D,L
pre                 S,NW              S,NW
pre/div/nbsp        LT,E,T,TS,NW      TS,NW
pre/div/br          LT,E,T,NW         NW
ol/li/nbsp          LT,E,T,TS,AJ      TS,AJ
ol/li/br            LT,E,T,AJ         AJ
pre/span            LV                LV

Legend

Strategies:
- current: implemented in hgweb before this patch, i.e. divs for each line,
and line numbers links in the div too
- pre: the whole code in one pre tag with newlines, all line numbers
in another one with 'float: left'
- pre/div/{nbsp,br}: same as just 'pre', but separate divs for each line and
&nbsp; or <br> instead of empty lines (otherwise they are not copied at all)
- ol/li/{nbsp,br}: a single ol with li's and divs for each line,
&nbsp; or <br> same as in previous strategy
- pre/span: this patch

Problems:
D = (very minor) display problems, like wrong width of leading tabs
LT = loses leading/trailing whitespace
E = loses embedded whitespace
B = loses blank lines
T = loses tabs
L = selects line numbers
LV = (only) visually selects line numbers
LVE = (only) visually selects line numbers at empty lines
S = no stripes (and no ability to easily highlight
lines-which-are-linked-at in the future)
TS = space copied instead of empty line
AJ = get anchor links only with JS (they work even without)
NW = no linewrap easily possible (in future)

As for browser versions compatibility, the CSS tricks used are supported in
(according to caniuse.com):
a) line numbers generation with 'content:' property and CSS counters:
IE 8+, all other popular browsers (in pre-WebKit Opera numbers are being copied)
b) stripes ('nth-child' selector):
IE 8+, FF 3.5+, Safari 3.2+, Opera 9.5+, all other popular browsers
c) line numbers are not visually selected ('user-select:' property):
IE 10+, Opera 15.0+, all other popular browsers

This patch is based on a demo implementation by
Martin Geisler <martin@geisler.net>.
2013-07-04 14:18:44 +04:00
Iulian Stana
12d69a242d log-style: add a log style that is default+phase (issue3436)
There is a new style called phases style.
Usage::
    hg log --style phases

Why do we need this new style - in what way is it different from or similar to
existing styles?
The new style is default + phases information. With the new phases feature the
users exhibited their desire for a new style that could help them.

Why do this need a new style - couldn't it be folded into an existing style?
The default style and the new one are about the same, the difference is the
phases tag. The users find both styles useful, this means that the both styles
must exist.
2013-04-18 22:56:57 +03:00
Alexander Plavin
93a914c0c3 css: remove repeated property
'margin' property was repeated for the same selector
2013-04-20 16:46:38 +04:00
Alexander Plavin
86ea67ee62 css: fixed font-family
There is no 'sans' font-family, replaced with 'sans-serif'
2013-04-20 22:09:17 +04:00
Mads Kiilerich
3f5dd3e256 codingstyle: remove trailing spaces in various text files
Better do it once than see random changes in diffs later.
2013-04-17 03:40:18 +02:00
Angel Ezquerra
8d01e97626 hgweb: change manifest archive links to only archive the current directory
When the web server shows the manifest for a single, non top directory, append
the path to the directory to the archive links. This makes the web server
generate archive files that only include the current directory (and its
subdirectories).

Note that archive links in other pages (e.g. changeset) or at the top of the
manifest are unchanged. Directory archive links have an extra "/" at the end
which does not impact the result of the archive operation. Keeping it there
made the implementation of this feature simpler.
2013-02-26 21:20:35 +01:00
Dan Villiom Podlaski Christiansen
9e387ff40b hgweb: generate HTML documentation
It's generated from the raw ReST source, as returned from help.help_().
2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
e500e66efd hgweb help: split up long lines (in generated output) 2013-02-09 21:51:21 +00:00
Dan Villiom Podlaski Christiansen
50755dee9e hgweb: consistent author name width
Paper & coal use a sligtly shorter name length of 12em in the log view
than gitweb's 15em. Names too long for 12em is not entirely unheard
of, and hence increasing the length is appropriate; hgweb should
remain usable on 1024x768.
2013-02-10 13:14:31 +01:00
Angel Ezquerra
e25f843231 hgweb: apply the websub filter to revision descriptions
In order to use this, add a [websub] section to your configuration and add
websub expressions such as:

italic = s/\b_(\S+)_\b/<i>\1<\/i>/
bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a href="http://bz.selenic.com/\2">\1</a>!i

This also adds documentation (proofed by Kevin!) to the config help section.
2013-02-09 16:48:21 +01:00
Thomas Arendsen Hein
6ca8967a44 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Without this, repository paths or names containing e.g. & characters or html
tags yielded strange results, possibly allowing cross-site scripting attacks.
2013-02-01 20:43:35 +01:00
Kevin Bullock
3cf3843b51 hgweb: rename 'changesetbaseline' template to 'difffrom'
More accurately reflects what it will be used for, and is also shorter.
This template is used to change which rev the current rev is diff'd
against. For example, if you're at '/rev/P1:REV', this would link to a
path like '/rev/P2:REV'.

Example usage in a template:

    {parent%difffrom}
2013-02-01 09:58:25 -06:00
Pierre-Yves David
6c0cbcf3ba hgweb: remove baseline info from paper template
The user interface introduced in 3ff83729b63f is not considered ready
for prime time yet. The internal code stays in place for custom template
usage. The feature is ultimately wanted and will be re-enabled soon. The
current issue is only related to the visual of the current interface.
2013-02-01 05:40:06 +01:00
Angel Ezquerra
39f2a199fb hgweb, spartan: link from manifest title to changeset page 2012-12-21 02:41:07 +01:00
Angel Ezquerra
75eabcc2b2 hgweb, spartan: add "URL breadcrumbs"
This change adds a "URL breadcrumb"  to the "title" of the pages on the spartan
template. By title I mean the first line that is shown right below the page
selection row, which shows the name of the page that is being viewed, along with
some additional information.

In doing so it standarizes those "titles" which now follow the pattern:

URL breadcumb / page details
2012-12-21 02:40:12 +01:00
Angel Ezquerra
feab81183f hgweb: add a "URL breadcrumb" to the index and repository pages
The purpose of this change is to make it much easier to navigate up the
repository tree when the hg web server is used to serve more than one
repository.

A "URL breadcrumb" is a path where each of the path items can be clicked to go
to the corresponding path page.

This lets you go up the folder hierarchy very quickly. For example, when showing
the list of repositories in http://myserver/myteams/myprojects, the following
"breadcrumb" will be shown:

Mercurial > myteams > myprojects

Clicking on "myprojects" reloads the page. Clicking on "myteams" goes up one
folder. Clicking on the leftmost "Mercurial" goes to the server root.

This "breadcrumb" also appears on all repository pages. For example on the
summary page of the repository at http://myserver/myteams/myprojects/myrepo the
following will be shown:

Mercurial > myteams > myprojects > myrepo / summary

This change has been applied to all templates that already had a link to the
main repository page (i.e. gitweb, monoblue, paper and coal) plus to the index
page of the spartan template.

In order to make the breadcumb links stand out the some of the template styles
have been customized.
2012-11-28 20:21:26 +01:00
Matt Mackall
fe2cbf4904 merge with stable 2013-01-02 00:24:28 -06:00
Matt Mackall
bad4a7148f paper: sanity-check page feed links
filelog has feeds in header, but not in menu bar
help has header feeds pointing to tags
2012-12-20 16:36:45 -06:00
Angel Ezquerra
b072cb14e8 hgweb, paper: add (Atom) subscribe links to the repository index
This is similar to the subscribe links that already exist in other templates.
Rather than the usual RSS and Atom links a single feed icon linking to the
atom-log is shown.
2012-12-20 19:22:12 +01:00
Angel Ezquerra
4108217b64 hgweb: add (Atom) subscribe link to the main paper template pages
The subscribe link is found at the bottom of the navigation sidebar.
This uses a free icon from http://feedicons.com.
2012-12-04 00:41:29 +01:00
Angel Ezquerra
d3a4755c75 hgwebdir: do not show RSS and Atom links for plain directories
Up until now the templates that show RSS and Atom feeds on the "repository
lists" (i.e. gitweb and monoblue) showed them for all entries, including regular
folders. Clicking on those "folder RSS" links would result in an error page
being shown.

This patch hides those links for regular folders.
2012-11-27 22:24:02 +01:00
Angel Ezquerra
689bb15da1 hgweb: add branches RSS and Atom feeds
There were no RSS nor Atom feeds for the branches page. Different hgweb
templates linked to different feeds on their branches page (some linked to the
tags feed, some to the log feed and some to the unexisting branches feed).
2012-12-04 00:37:50 +01:00