Commit Graph

81 Commits (ab42741c49d369e41c1e1915c6c024d79509f7d6)

Author SHA1 Message Date
Johan Herland c93ef96aaf ui-shared: Display path limit directly beneath tab bar in relevant pages
Design-wise, the path is shown by "expanding" the grey border between the
tab bar and the content area of the page to house the current path limit.

This is only displayed on pages where the path limit is relevant, and only
when a path limit is in effect.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli f4f6210b4f Merge branch 'ro/ssdiff' 15 years ago
Georg Lukas 545b5a5dca cgit.css: highlight directories in tree 15 years ago
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>
15 years ago
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>
15 years ago
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>
15 years ago
Lars Hjemli 92f6940975 Merge branch 'lh/repo-scan' 15 years ago
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>
15 years ago
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>
15 years ago
Lars Hjemli 4c228e3c3b cgit.css: align commit message with subject in expanded log listing
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
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>
16 years ago
Lars Hjemli dfc4c82aad Merge branch 'jw/commit-decorations'
Conflicts:
	cgit.css

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 236665d70d cgit.css: minor adjustment of commit decorations
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 1fdde95a5a Merge branch 'og/tree-view-selection'
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
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>
16 years ago
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>
16 years ago
Onne Gorter a90e2aa4e1 changed objects are outputted, allowing for selections of code only 16 years ago
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>
16 years ago
Lars Hjemli ab67164d62 ui-log: use css to make full-log prettier
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
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>
16 years ago
Lars Hjemli aa3c4486b4 Add footer with page creation time and cgit version on all pages
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
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>
16 years ago
Lars Hjemli 35d19bbb64 Fix more css ugliness
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
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>
16 years ago
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>
16 years ago
Lars Hjemli 931fc6d1e4 More layout fixes
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 72a69b77e7 Minor fixup in tree-view css
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 68cb84839f Reintroduce the branch switcher
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
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>
16 years ago
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>
17 years ago
Lars Hjemli 2915483ef6 Fix html error detected by test-suite
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
Shunichi Fuji df203a293e Fix typo in css
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli f214118c56 Merge branch 'stable'
* stable:
  correct typo in CSS
17 years ago
Michael Krelin fd39489f4f correct typo in CSS 17 years ago
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>
17 years ago
Lars Hjemli 7e1af8ad92 css: remove the annoying tr:hover rule for diffstat
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
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>
17 years ago
Michael Krelin 3aae82703b css: adjust vertical-align of commit info th cells 17 years ago
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>
17 years ago
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>
17 years ago
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>
17 years ago
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.
17 years ago
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>
17 years ago
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>
17 years ago
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>
17 years ago
Lars Hjemli 3b86b44fc7 css: make column headings bold
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago