Commit Graph

80 Commits

Author SHA1 Message Date
Lars Hjemli
f4f6210b4f Merge branch 'ro/ssdiff' 2009-12-08 19:32:48 +01:00
Georg Lukas
545b5a5dca cgit.css: highlight directories in tree 2009-11-28 03:07:34 +01:00
Ragnar Ouchterlony
735e15e38a In side-by-side diff, add support for marking individual characters.
Refuses to do so if the left hand side of the diff has different amount of
differing lines to the right hand side to avoid confusion.

Note that I use the naive dynamic programming approach for calculating the
longest common subsequence. We could probably be more efficient by using a
better algorithm. The LCS calculating function is O(n*m) and uses up n*m
amount of memory too (so if we we compare two strings of length 100, I use
an array of 10000 for calculating the LCS). Might want to not calculate LCS
if the length of the line is too large.

Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se>
2009-11-07 15:37:11 +01:00
Ragnar Ouchterlony
207cc34711 Polishing of how the side-by-side diff looks.
Aligned all different files, so that all side-by-side tables look
the same. Also made sure that the tables take up the whole browser
width.

Also various changes to the css to make things easier on the eye.

Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-16 20:17:56 +02:00
Ragnar Ouchterlony
40e174d536 First version of side-by-side diff.
This constitutes the first prototype of a side-by-side diff. It is not
possible to switch between unidiff and side-by-side diff at all at this
stage.

Signed-off-by: Ragnar Ouchterlony <ragnar@lysator.liu.se>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-09-16 20:17:56 +02:00
Lars Hjemli
92f6940975 Merge branch 'lh/repo-scan' 2009-09-13 22:02:07 +02:00
Lars Hjemli
e7af002d5c Introduce 'section' as canonical spelling for 'repo.group'
The 'repo.' prefix should be reserved for repo-specific options, but
the option 'repo.group' must still be honored to stay backwards
compatible.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-08-24 10:22:58 +02:00
Lars Hjemli
6638f40868 cgit.css: make the blob display in tree view a bit prettier
Adding some padding to the linenumbers while right-aligning them and
removing the background color makes the page more readable.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-08-21 14:37:50 +02:00
Lars Hjemli
4c228e3c3b cgit.css: align commit message with subject in expanded log listing
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-08-10 18:03:31 +02:00
Lars Hjemli
ae1d4d75b2 ui-tree: show hexdump of binary blobs
This teaches ui-tree to detect binary blobs and display them similar
to `hexdump -C` (only wider).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-31 17:45:48 +01:00
Lars Hjemli
dfc4c82aad Merge branch 'jw/commit-decorations'
Conflicts:
	cgit.css

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27 23:00:40 +01:00
Lars Hjemli
236665d70d cgit.css: minor adjustment of commit decorations
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27 22:47:24 +01:00
Lars Hjemli
1fdde95a5a Merge branch 'og/tree-view-selection'
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27 20:21:56 +01:00
Lars Hjemli
7710178e45 Merge branch 'lh/stats'
Conflicts:
	cgit.c
	cgit.css
	cgit.h
	ui-tree.c

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-27 20:16:37 +01:00
Lars Hjemli
ef2dc552b2 ui-log: show name-decorations in log output
Commits are now decorated with a clickable 'label' for each ref pointing
at it, similar to how gitweb and gitk displays commit decorations.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2009-01-11 12:16:18 +01:00
Onne Gorter
a90e2aa4e1 changed objects are outputted, allowing for selections of code only 2009-01-10 12:13:54 +01:00
Lars Hjemli
f86a23ff53 Add a 'stats' page to each repo
This new page, which is disabled by default, can be used to print some
statistics about the number of commits per period in the repository,
where period can be either weeks, months, quarters or years.

The function can be activated globally by setting 'enable-stats=1' in
cgitrc and disabled for individual repos by setting 'repo.enable-stats=0'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-12-06 17:38:19 +01:00
Lars Hjemli
ab67164d62 ui-log: use css to make full-log prettier
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-11-30 13:01:44 +01:00
Lars Hjemli
17890d0058 Add link to index page from repo header, remove page name
This makes it more obvious how to get back to the index, especially when the
config option `logo-link` is used. And the page name displayed in the header
provided no extra information. It only consumed space and deserved to die.

While at it, make sure that the different parts of the header doesn't wrap
when horizontal space is limited.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-05-04 17:30:02 +02:00
Lars Hjemli
aa3c4486b4 Add footer with page creation time and cgit version on all pages
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-05-03 11:07:41 +02:00
Lars Hjemli
c6078b8b00 Add a pager on the repolist
This enables a pager on the repolist which restricts the number of entries
displayed per page, controlled by the new option `max-repo-count` (default
value 50).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-05-03 10:54:39 +02:00
Lars Hjemli
35d19bbb64 Fix more css ugliness
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-14 22:10:33 +02:00
Lars Hjemli
2ee1238cdf cgit.css: set form margins
According to the css2 spec, htmlforms have 1.12em top and bottom margins. That
doesn't play well with the placement of the search form, so lets force it to
use 0em margins.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-14 10:21:18 +02:00
Lars Hjemli
adf61225c4 Fix css font-family
When the sidebar was introduced in v0.7 the default font-family property
got messed up, but this commit should fix the issue.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-14 10:07:43 +02:00
Lars Hjemli
931fc6d1e4 More layout fixes
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-13 10:57:11 +02:00
Lars Hjemli
72a69b77e7 Minor fixup in tree-view css
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-12 20:18:16 +02:00
Lars Hjemli
68cb84839f Reintroduce the branch switcher
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-12 20:11:49 +02:00
Lars Hjemli
f135569b2b Replace sidebar/logo
This replaces the sidebar with a more 'common' header layout and also
updates the logo.

Not quite finished yet, though.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2008-04-12 20:00:27 +02:00
Lars Hjemli
6ef637e090 Use tables for page layout
It feels like the Right Thing, and it fixes some rendering problems in a
much used webbrowser.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-16 09:52:03 +01:00
Lars Hjemli
2915483ef6 Fix html error detected by test-suite
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-11 13:04:28 +01:00
Lars Hjemli
86d6dfa9b7 Minor css tweaks
Don't specify border and background color for input controls, reduce font-
size of heading in sidebar.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-09 13:19:56 +01:00
Lars Hjemli
601c76eb15 Do not require javascript-enabled clients
A simple submit-button is all that's required to make the branch selector
drop-down work on any client, so lets add one.

Noticed-by: Olivier Ramonat <olivier@ramonat.fr>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-03 14:05:12 +01:00
Shunichi Fuji
df203a293e Fix typo in css
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-11-03 09:36:09 +01:00
Lars Hjemli
0c8e184e9c Change the cgit layout
This modifies and hopefully improves the layout of all cgit pages:

  * Remove the header from all pages and replace it with a sidebar;
    most pages have sufficient width but many needs more height.

  * Add a dropdown-box to switch between branches, using a one-liner
    javascript to reload the current page in context of the selected branch.

  * Include refs found below refs/archives in the sidebar, appearing as a
    set of menuitems below a 'download' heading.

  * Include the brand new cgit logo

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-10-30 13:38:34 +01:00
Lars Hjemli
68ca032dbe Teach log search about --grep, --author and --committer
This makes the log searching more explicit, using a dropdown box to specify
the commit field to match against.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-10-28 15:23:00 +01:00
Lars Hjemli
f214118c56 Merge branch 'stable'
* stable:
  correct typo in CSS
2007-10-05 16:20:13 +02:00
Michael Krelin
fd39489f4f correct typo in CSS 2007-10-05 16:19:26 +02:00
Lars Hjemli
271829f269 cgit.css: make diff headers more visible
This modifies the background color of diff headers to make them easier to
spot.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-10-01 12:41:29 +02:00
Lars Hjemli
7e1af8ad92 css: remove the annoying tr:hover rule for diffstat
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-10-01 12:09:41 +02:00
Lars Hjemli
f405d0bf75 Add support for line number in url fragment
With this change, urls like http://hjemli.net/git/cgit/tree/ui-tree.c#43 can
be used to jump directly to the specified line number.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-07-23 00:47:18 +02:00
Michael Krelin
3aae82703b css: adjust vertical-align of commit info th cells 2007-07-18 14:55:40 +02:00
Lars Hjemli
a215bf4620 Change S/L/T to summary/log/tree
In yet another attempt at better usability, the cryptic S/L/T links are
changed to show their full name.

Suggested-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-18 22:14:17 +02:00
Lars Hjemli
b8be028a30 Add more menuitems on repo pages
In an attempt to get better usability, a set of 'semistatic' menuitems
are added to the page header on all pages except the repository index.

The menuitems (summary, log, files, commit and diff) honours the current
branch and revision. To switch the current branch one can use the branch
links on the summary page.

The backlink to the repository index page is now available by clicking
the static page heading.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-18 08:29:53 +02:00
Lars Hjemli
426032f767 ui-tree: html/css cleanup
Various fixes to make html and css more "clean". The only visible change
is the link to file/directory log: it is now printed as "L" (for Log)
instead of "H" (for History).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-17 13:17:00 +02:00
Lars Hjemli
ffc69736a6 ui-tree: unify with ui-view, use path to select tree/blob
This teaches ui-tree to show both trees and blobs, thereby making ui-view
superfluous. At the same time, ui-tree is extended to honour the specified
path instead of requiering a tree/blob sha1.
2007-06-16 20:20:42 +02:00
Lars Hjemli
849f0f0f02 cgit.css: make it validate
This fixes a few validation-issues in the css.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-06-07 00:43:07 +02:00
Lars Hjemli
bbcdc290c6 Add repo.readme parameter
This parameter can be used to specify a repo-specific includefile, which will
then be printed on the summary page for the repo.

If the parametervalue is a not an absolute path, it is taken to be relative
to repo.path.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-23 22:46:54 +02:00
Lars Hjemli
5db39170b6 Add cgit_print_age() function
This function can be used to print relative dates, just as in gitweb. Next
step will be to actually use the new function.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-22 23:12:41 +02:00
Lars Hjemli
3b86b44fc7 css: make column headings bold
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-21 00:29:11 +02:00
Lars Hjemli
0b8b6a3176 Make frontpage friendlier
This is an attempt to make the index page more usable by changing how
repo groups and repo links are displayed.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2007-05-21 00:14:28 +02:00