Adam Strzelecki [Wed, 9 Dec 2015 12:28:56 +0000 (13:28 +0100)]
Makefile: Do not fail build on missing lessc
This is achieved by adding public/css/gogs.css to special .IGNORE target, which
makes inability to generate/update gogs.css non-fatal and not stopping whole
build process. User is still notified about missing lessc command though, since
inability to update CSS may lead to potential problems:
lessc public/less/gogs.less public/css/gogs.css
make: lessc: No such file or directory
make: [public/css/gogs.css] Error 1 (ignored)
Angus Gibson [Wed, 9 Dec 2015 05:14:54 +0000 (16:14 +1100)]
Dropdown on commits page to choose branch #1846
I've mostly duplicated the dropdown code from repo/home.tmpl, which
basically only required a change to the URL. This could probably be
broken out into something more modular.
Angus Gibson [Wed, 9 Dec 2015 03:36:39 +0000 (14:36 +1100)]
Only show comparison link for >2 commits #1110
We can look at the PushCommits object to see how many commits were
included in a commit, and add some template logic to only show the
comparison link when there are at least 2 commits in a push. We also
correct the link to display the number of commits.
Adam Strzelecki [Sun, 6 Dec 2015 23:18:12 +0000 (00:18 +0100)]
Render commit msg as header + verbatim description
Most commit in Git are expected to follow standard of single header line,
followed by description paragraphs, separated by empty line from previous block.
Previously Gogs were treating everything as single header. Now we are trying to
render only first line as header, but following lines (description chunks) as a
verbatim.
Adam Strzelecki [Thu, 3 Dec 2015 12:49:52 +0000 (13:49 +0100)]
UI: More subtle strips on commits list
With grey SHA1 labels, we should consider having also more subtle strips on
commits list. As current strips blend too much with grey SHA1 labels and top
bar, making hard to distinguish headers from content.
Adam Strzelecki [Wed, 2 Dec 2015 23:03:49 +0000 (00:03 +0100)]
UI: Use more subtle grey SHA1 labels
Current green SHA1 labels are more pronounced than other UI elements attracting
attention as if they were most important thing in the UI, while they are not as
important, especially without real Git client.
Using grey SHA1 labels makes the UI more balanced, less aggressive and lets
user to focus on other content elements.
NOTE: Neither GitHub or Bitbucket uses so heavy pronunciation as Gogs.
Adam Strzelecki [Thu, 3 Dec 2015 00:15:40 +0000 (01:15 +0100)]
UI: Display last-commit header without 2nd column
This uses a CSS trick making first th to be relative block with width equal to
first two columns, effectively working around inability to use colspan="2" on
first row that was breaking "fixed-layout" for tables.
Adam Strzelecki [Wed, 2 Dec 2015 22:00:23 +0000 (23:00 +0100)]
Translation: Add missing entry for new "code" tab
We have new tab, but we had no entry. That's why it was showing "code"
(lowercase) as this is text id, where we were expecting properly title cased
"Code" to be shown in English version.
Adam Strzelecki [Mon, 30 Nov 2015 14:38:58 +0000 (15:38 +0100)]
CSS: Ensure Octicons are used with 16px font size
Semantic UI .icon 1em font-size has priority over .octicon 16px, resulting
octicons rendered at 14px font-size, which is not okay since Octicons are meant
to be shown sizes that are multiples of 16px.
Adam Strzelecki [Tue, 1 Dec 2015 13:49:49 +0000 (14:49 +0100)]
LDAP: Optional user name attribute specification
Consider following LDAP search query example:
(&(objectClass=Person)(|(uid=%s)(mail=%s)))
Right now on first login attempt Gogs will use the text supplied on login form
as the newly created user name. In example query above the text matches against
both e-mail or user name. So if user puts the e-mail then the new Gogs user
name will be e-mail which may be undesired.
Using optional user name attribute setting we can explicitly say we want Gogs
user name to be certain LDAP attribute eg. `uid`, so even user will use e-mail
to login 1st time, the new account will receive correct user name.