diff options
-rw-r--r-- | api/context.go | 15 | ||||
-rw-r--r-- | api/templates/error.html | 2 | ||||
-rw-r--r-- | web/react/components/post_info.jsx | 16 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 4 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_markdown.scss | 38 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_mentions.scss | 4 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_post.scss | 7 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_responsive.scss | 2 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_videos.scss | 10 |
9 files changed, 62 insertions, 36 deletions
diff --git a/api/context.go b/api/context.go index 9a276a1a1..f123d8702 100644 --- a/api/context.go +++ b/api/context.go @@ -456,18 +456,13 @@ func IsPrivateIpAddress(ipAddress string) bool { } func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) { - - protocol := GetProtocol(r) - SiteURL := protocol + "://" + r.Host - - m := make(map[string]string) - m["Message"] = err.Message - m["Details"] = err.DetailedError - m["SiteName"] = utils.Cfg.TeamSettings.SiteName - m["SiteURL"] = SiteURL + props := make(map[string]string) + props["Message"] = err.Message + props["Details"] = err.DetailedError + props["SiteURL"] = GetProtocol(r) + "://" + r.Host w.WriteHeader(err.StatusCode) - ServerTemplates.ExecuteTemplate(w, "error.html", m) + ServerTemplates.ExecuteTemplate(w, "error.html", Page{Props: props, ClientProps: utils.ClientProperties}) } func Handle404(w http.ResponseWriter, r *http.Request) { diff --git a/api/templates/error.html b/api/templates/error.html index 760578896..6b643556e 100644 --- a/api/templates/error.html +++ b/api/templates/error.html @@ -23,7 +23,7 @@ <div class="error__container"> <div class="error__icon"><i class="fa fa-exclamation-triangle"></i></div> <h2>{{ .ClientProps.SiteName }} needs your help:</h2> - <p>{{.Message}}</p> + <p>{{ .Props.Message }}</p> <a href="{{.Props.SiteURL}}">Go back to team site</a> </div> </div> diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx index c38edf6a2..824e7ef39 100644 --- a/web/react/components/post_info.jsx +++ b/web/react/components/post_info.jsx @@ -5,6 +5,8 @@ var UserStore = require('../stores/user_store.jsx'); var utils = require('../utils/utils.jsx'); var Constants = require('../utils/constants.jsx'); +var Tooltip = ReactBootstrap.Tooltip; +var OverlayTrigger = ReactBootstrap.OverlayTrigger; export default class PostInfo extends React.Component { constructor(props) { @@ -148,15 +150,19 @@ export default class PostInfo extends React.Component { var dropdown = this.createDropdown(); + let tooltip = <Tooltip>{utils.displayDate(post.create_at)} at ${utils.displayTime(post.create_at)}</Tooltip>; + return ( <ul className='post-header post-info'> <li className='post-header-col'> - <time - className='post-profile-time' - title={`${utils.displayDate(post.create_at)} at ${utils.displayTime(post.create_at)}`} + <OverlayTrigger + placement='top' + overlay={tooltip} > - {utils.displayDateTime(post.create_at)} - </time> + <time className='post-profile-time'> + {utils.displayDateTime(post.create_at)} + </time> + </OverlayTrigger> </li> <li className='post-header-col post-header__reply'> <div className='dropdown'> diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 50438c6cf..d45240f9a 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -314,7 +314,6 @@ function getYoutubeEmbed(link) { $('.video-type.' + youtubeId).html('Youtube - '); $('.video-uploader.' + youtubeId).html(metadata.channelTitle); $('.video-title.' + youtubeId).find('a').html(metadata.title); - $('.post-list-holder-by-time').scrollTop($('.post-list-holder-by-time')[0].scrollHeight); } if (global.window.config.GoogleDeveloperKey) { @@ -616,8 +615,9 @@ export function applyTheme(theme) { } if (theme.centerChannelColor) { - changeCss('.app__content', 'color:' + theme.centerChannelColor, 2); + changeCss('.app__content, .post-create__container .post-create-body .btn-file', 'color:' + theme.centerChannelColor, 1); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); + changeCss('.post-body hr', 'background:' + theme.centerChannelColor, 1); changeCss('.channel-header .heading', 'color:' + theme.centerChannelColor, 1); changeCss('.markdown__table tbody tr:nth-child(2n)', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.channel-header__info>div.dropdown .header-dropdown__icon', 'color:' + changeOpacity(theme.centerChannelColor, 0.8), 1); diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss index de92e9d20..122586354 100644 --- a/web/sass-files/sass/partials/_markdown.scss +++ b/web/sass-files/sass/partials/_markdown.scss @@ -2,10 +2,20 @@ font-weight: 700; } .markdown__paragraph-inline { - display: inline; - + .markdown__paragraph-inline { - margin-left: 4px; - } + display: inline; + + .markdown__paragraph-inline { + margin-left: 4px; + } +} +.post-body { + hr { + height: 4px; + padding: 0; + margin: 15px 0 16px; + background-color: #e7e7e7; + border: 0 none; + @include opacity(0.2); + } } .markdown__table { background: #fff; @@ -21,6 +31,26 @@ } } } +blockquote { + border: none; + position: relative; + font-size: 16px; + padding: 10px 10px 10px 38px; + margin-bottom: 0; + &:before { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + display: inline-block; + text-decoration: inherit; + content: "\f10d"; + left: 8px; + top: 5px; + position: absolute; + font-size: 20px; + @include opacity(0.6); + } +} pre { border: none; background-color: #f7f7f7; diff --git a/web/sass-files/sass/partials/_mentions.scss b/web/sass-files/sass/partials/_mentions.scss index a86cb8a73..83cdde53b 100644 --- a/web/sass-files/sass/partials/_mentions.scss +++ b/web/sass-files/sass/partials/_mentions.scss @@ -66,8 +66,4 @@ .mention-highlight { background-color:#fff2bb; color: #333; -} - -.mention-link { - color:$primary-color; }
\ No newline at end of file diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index e362e8f7a..a1958af3b 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -185,7 +185,7 @@ body.ios { .post-create__container { form { width: 100%; - padding: 0 1em; + padding: 10px 1em 0 1em; margin: 0; } .post-create-body { @@ -229,12 +229,13 @@ body.ios { right: 0; position: absolute; top: 1px; - color: #999; + color: #444; + @include opacity(0.5); @include single-transition(all, 0.15s); font-size: 16px; padding: 7px 9px 6px; &:hover, &:active { - color: #444; + @include opacity(0.9); box-shadow: none; } } diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss index d29c653ff..e0b35d0bf 100644 --- a/web/sass-files/sass/partials/_responsive.scss +++ b/web/sass-files/sass/partials/_responsive.scss @@ -417,7 +417,7 @@ padding: 0 1em; } form { - padding: 0; + padding: 10px 0 0 0; } .post-create-body { padding-bottom: 10px; diff --git a/web/sass-files/sass/partials/_videos.scss b/web/sass-files/sass/partials/_videos.scss index de18aa08a..9e1ce29b7 100644 --- a/web/sass-files/sass/partials/_videos.scss +++ b/web/sass-files/sass/partials/_videos.scss @@ -1,6 +1,7 @@ .video-div { position:relative; max-width: 480px; + margin-bottom: 8px; .video-thumbnail { max-width: 100%; height: auto; @@ -19,18 +20,15 @@ } .video-type { - color:grey; + @include opacity(0.8); font-size:15px; - font-weight:200; margin:0px; padding:0px; } .video-uploader { - font-size:15px; - margin-top:3px; - margin-bottom:0px; - padding:0px; + font-size: 13px; + margin: 0 0 15px; } .video-title { |