8000 Small UI fixes on full width form titles by joubertredrat · Pull Request #3786 · gogs/gogs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Small UI fixes on full width form titles #3786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gopmfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ github.com/nfnt/resize = commit:891127d
github.com/russross/blackfriday = commit:93622da
github.com/satori/go.uuid = commit:0aa62d5
github.com/sergi/go-diff = commit:ec7fdbb
github.com/strk/go-libravatar = commit:5eed7bf
strk.kbt.io/projects/go/libravatar = commit:5eed7bf
github.com/shurcooL/sanitized_anchor_name = commit:10ef21a
github.com/Unknwon/cae = commit:7f5e046
github.com/Unknwon/com = commit:28b053d
Expand Down
1 change: 1 addition & 0 deletions .lgtm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
self_approval_off = false
2 changes: 1 addition & 1 deletion glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import:
- package: github.com/sergi/go-diff
subpackages:
- diffmatchpatch
- package: github.com/strk/go-libravatar
- package: strk.kbt.io/projects/go/libravatar
- package: golang.org/x/crypto
subpackages:
- ssh
Expand Down
2 changes: 1 addition & 1 deletion models/mail.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []s
if err != nil {
log.Error(3, "HTMLString (%s): %v", tplName, err)
}
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.User), subject, content)
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.FromEmail), subject, content)
msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info)
return msg
}
Expand Down
11 changes: 10 additions & 1 deletion modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package setting

import (
"fmt"
"net/mail"
"net/url"
"os"
"os/exec"
Expand All @@ -21,7 +22,7 @@ import (
_ "github.com/go-macaron/cache/redis"
"github.com/go-macaron/session"
_ "github.com/go-macaron/session/redis"
"github.com/strk/go-libravatar"
"strk.kbt.io/projects/go/libravatar"
"gopkg.in/ini.v1"

"github.com/gogits/gogs/modules/bindata"
Expand Down Expand Up @@ -714,6 +715,7 @@ type Mailer struct {
Name string
Host string
From string
FromEmail string
User, Passwd string
DisableHelo bool
HeloHostname string
Expand Down Expand Up @@ -749,6 +751,13 @@ func newMailService() {
EnableHTMLAlternative: sec.Key("ENABLE_HTML_ALTERNATIVE").MustBool(),
}
MailService.From = sec.Key("FROM").MustString(MailService.User)

parsed, err := mail.ParseAddress(MailService.From)
if err != nil {
log.Fatal(4, "Invalid mailer.FROM (%s): %v", MailService.From, err)
}
MailService.FromEmail = parsed.Address

log.Info("Mail Service Enabled")
}

Expand Down
64 changes: 42 additions & 22 deletions public/css/gogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,23 @@ pre.wrap,
code.wrap {
white-space: pre-wrap;
/* CSS 3 */

word-break: break-word;
}
.dont-break-out {
/* These are technically the same, but use both */

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new-lines should be before the comment, not after (for readability)

Copy link
Author
@joubertredrat joubertredrat Oct 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkcsoft I will investigate this, because css is generated by lass.

overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */

word-break: break-all;
/* Instead use this non-standard one: */

word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */

-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
Expand Down Expand Up @@ -812,7 +817,7 @@ footer .ui.language .menu {
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbb;
box-shadow: inset 0 -1px 0 #bbbbbb;
}
.markdown:not(code) input[type="checkbox"] {
vertical-align: middle !important;
Expand Down Expand Up @@ -883,7 +888,7 @@ footer .ui.language .menu {
}
.install form label {
text-align: right;
width: 320px !important;
width: 320px;
}
.install form input {
width: 35% !important;
Expand All @@ -892,7 +897,7 @@ footer .ui.language .menu {
text-align: left;
}
.install form .field .help {
margin-left: 335px !important;
margin-left: 335px;
}
.install form .field.optional .title {
margin-left: 38%;
Expand Down Expand Up @@ -927,18 +932,18 @@ footer .ui.language .menu {
text-align: center;
}
#create-page-form form .header {
padding-left: 280px !important;
padding-left: 280px;
}
#create-page-form form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
#create-page-form form .help {
margin-left: 265px !important;
margin-left: 265px;
}
#create-page-form form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
#create-page-form form input,
#create-page-form form textarea {
Expand All @@ -964,30 +969,30 @@ footer .ui.language .menu {
.user.reset.password form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.user.activate form .help,
.user.forgot.password form .help,
.user.reset.password form .help,
.user.signin form .help,
.user.signup form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.user.activate form .optional .title,
.user.forgot.password form .optional .title,
.user.reset.password form .optional .title,
.user.signin form .optional .title,
.user.signup form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.user.activate form input,
.user.forgot.password form input,
Expand All @@ -1013,14 +1018,15 @@ footer .ui.language .menu {
.user.reset.password form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 230px !important;
padding-left: 0 !important;
text-align: center;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
width: 200px !important;
width: 200px;
}
.repository.new.repo form,
.repository.new.migrate form,
Expand All @@ -1036,24 +1042,24 @@ footer .ui.language .menu {
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.repository.new.repo form .inline.field > label,
.repository.new.migrate form .inline.field > label,
.repository.new.fork form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.repository.new.repo form .help,
.repository.new.migrate form .help,
.repository.new.fork form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.repository.new.repo form .optional .title,
.repository.new.migrate form .optional .title,
.repository.new.fork form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.repository.new.repo form input,
.repository.new.migrate form input,
Expand All @@ -1078,11 +1084,17 @@ footer .ui.language .menu {
.repository.new.fork form .dropdown .text i {
margin-right: 0!important;
}
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 0 !important;
text-align: center;
}
.repository.new.repo .ui.form .selection.dropdown:not(.owner) {
width: 50%!important;
}
.repository.new.repo .ui.form #auto-init {
margin-left: 265px !important;
margin-left: 265px;
}
.new.webhook form .help {
margin-left: 25px;
Expand Down Expand Up @@ -2328,14 +2340,18 @@ footer .ui.language .menu {
}
.settings .hook.list .item a {
/* These are technically the same, but use both */

overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */

word-break: break-all;
/* Instead use this non-standard one: */

word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */

-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
Expand Down Expand Up @@ -2534,23 +2550,27 @@ footer .ui.language .menu {
text-align: center;
}
.organization.new.org form .header {
padding-left: 280px !important;
padding-left: 280px;
}
.organization.new.org form .inline.field > label {
text-align: right;
width: 250px !important;
width: 250px;
word-wrap: break-word;
}
.organization.new.org form .help {
margin-left: 265px !important;
margin-left: 265px;
}
.organization.new.org form .optional .title {
margin-left: 250px !important;
margin-left: 250px;
}
.organization.new.org form input,
.organization.new.org form textarea {
width: 50%!important;
}
.organization.new.org form .header {
padding-left: 0 !important;
text-align: center;
}
.organization.options input {
min-width: 300px;
}
Expand Down
13 changes: 9 additions & 4 deletions public/less/_form.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.form {
.help {
color: #999999;
padding-top: .6em;
padding-bottom: .6em;
display: inline-block;
padding-top: .6em;
padding-bottom: .6em;
display: inline-block;
}
}
.ui.attached.header {
Expand Down Expand Up @@ -56,7 +56,8 @@
form {
width: 700px!important;
.header {
padding-left: @input-padding+30px;
padding-left: 0 !important;
text-align: center;
}
.inline.field > label {
width: @input-padding;
Expand All @@ -81,6 +82,10 @@
}
}
}
.header {
padding-left: 0 !important;
text-align: center;
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions public/less/_organization.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@

&.new.org {
#create-page-form;
form {
.header {
padding-left: 0 !important;
text-align: center;
}
}
}

&.options {
Expand Down
0