Commit Graph

103 Commits (23debef62104c70600be2b745ec3957538eeac6e)

Author SHA1 Message Date
Jason A. Donenfeld 8149be213f filters: import more modern scripts
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
11 years ago
Lukas Fleischer b60e6bff75 Convert pager navigation into a unordered list
It is common practice and semantically appropriate to use unordered
lists for long navigation lists.

This also fixes the layout of very long pager navigations in
Webkit-based browsers.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
11 years ago
Jamie Couture 4675b91211 ui-repolist: Bold the currently viewed page.
Signed-off-by: Jamie Couture <jamie.couture@gmail.com>
12 years ago
Ferry Huberts 45555512ba css: only use div#cgit
Don't bother with 'body' and 'div#cgit form', since
everything is wrapped in 'div#cgit' already.
Removing these two types makes embedding even easier.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
12 years ago
Ferry Huberts 6e63ebfe00 css: force text color to black on decorations
improves readability when embedding into a page that
has the text color set to a different color

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
12 years ago
Ferry Huberts fac65a7ed2 css: vertically align the cgit logo image
When embedding cgit in other pages, the logo alignment needs to be
specified to avoid any css rules from the embedding page to make the
page look bad.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
12 years ago
Ferry Huberts add1ccb1d8 css: prefix all styles with div#cgit
to facilitate easier embedding

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
12 years ago
Lars Hjemli aa25ff3c8b Merge branch 'stable' 13 years ago
Norberto Lopes dad620ee56 fix css color value and vertical-align value 13 years ago
Lars Hjemli 962a24892f ui-diff.c: create a control panel for diff options
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
13 years ago
Lars Hjemli 979c460e7f Merge branch 'br/misc'
* br/misc:
  Use transparent background for the cgit logo
  ssdiff: anchors for ssdiff
  implement repo.logo and repo.logo-link
13 years ago
Bernhard Reutner-Fischer e52040bf90 ssdiff: anchors for ssdiff
Emit anchors to the respective revisions in side-by-side diff view

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
13 years ago
Lars Hjemli 31e1f9af1d Merge branch 'jh/graph'
* jh/graph:
  ui-log: Move 'Age' column when commit graph is present
  ui-log: Line-wrap long commit subjects when showmsg is enabled
  ui-log: Colorize commit graph
  ui-log: Implement support for commit graphs
  ui-log: Change display of full commit messages (and notes)

Conflicts:
	cgit.css
13 years ago
Johan Herland 268b34af23 ui-log: Colorize commit graph
Use the existing coloring logic in Git's graph code to color the lines
between commits in the commit graph.

Whereas Git normally uses ANSI color escapes to produce colors, we here
use graph_set_column_colors() to replace those with HTML color escapes,
that embed the graph lines in <span> tags that apply the desired color
using CSS.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Johan Herland 9a8d39c668 ui-log: Implement support for commit graphs
Teach CGit to print an ASCII art commit graph to the left of the commit
message, similar to 'git log --graph'. The graph adds extra lines (table
rows) to the log when needed to add/remove/shuffle edges in the graph.

When 'showmsg' is enabled, the graph is automatically padded to account
for the extra lines added by the commit message/notes.

This feature is controlled by a new config variable: "enable-commit-graph"
(disabled by default), and individual repos can control it by setting
"repo.enable-commit-graph".

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Johan Herland 5a36c2a291 ui-log: Change display of full commit messages (and notes)
When showmsg is enabled, ui-log (in addition to the table row containing
the details of the current commit) adds a second table row containing the
remainder of the commit message, and yet another table row containing the
commit notes (if any). The vertical margins between commit subject, commit
message and commit notes are controlled by CSS.

In preparation for the commit graph (which will be printed to the left of
the commit message/notes) we need to eliminate these vertical margins (as
they would produce ugly gaps in the commit graph) and instead achieve them
by adding newlines to the commit message/notes. Furthermore, we can no
longer print the "Notes:" header in the "Age" column, since the graph will
be drawn between the "Age" column and the "Commit message" column.

This patch therefore prepares the commit message and commit notes in a
single buffer (properly formatting the notes using the NOTES_SHOW_HEADER
and NOTES_INDENT flags to format_note()), and then prints the entire
buffer into a single table row.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Todd Zullinger d7765df117 cgit.css: Add syntax highlighting entries
Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Jeff Smith 39c2e224d3 ui-log: Display git notes when present
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Jeff Smith 059b39344f ui-commit: Display git notes when present
Signed-off-by: Jeff Smith <whydoubt@yahoo.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli 37a24e4e39 Merge branch 'jh/path-limit'
Conflicts:
	cgit.h
	ui-commit.c
14 years ago
Lars Hjemli a2cbd3c30b ui-shared.c: path-limit style nitpick
This subjectively makes the path-limit bar less visually intrusive.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Johan Herland 47187b33be Fix style of commit-filter links in commit-subject.
When using the commit-filter functionality to add e.g. bug tracker links to
commit messages, the style of those links is mangled by a CSS directive that
is meant to only apply to decorations that are listed on the commit-subject
line.

Fix this directive to only apply to the decorations.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
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