THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

mention: Change rendered mention css style

tags/v1.11.0
Suwon Chae 1 year ago
parent
commit
457680ff59
3 changed files with 39 additions and 25 deletions
  1. +31
    -4
      app/assets/stylesheets/less/_page.less
  2. +1
    -1
      app/models/User.java
  3. +7
    -20
      app/utils/AutoLinkRenderer.java

+ 31
- 4
app/assets/stylesheets/less/_page.less View File

@@ -2937,10 +2937,6 @@ label.inline-list {
}
}
.one-line-comment {
:hover {
background-color: #f1f1f1;
}

.contents {
text-align: left;
margin-left: 12px;
@@ -6639,6 +6635,37 @@ div.diff-body[data-outdated="true"] tr:hover .icon-comment {
text-decoration: none !important;
}

.user-link {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
-webkit-font-feature-settings: "kern" 1;
-moz-font-feature-settings: "kern" 1;
-o-font-feature-settings: "kern" 1;
font-feature-settings: "kern" 1;
font-kerning: normal;
border: 1px solid #4FC3F7;
border-radius: 3px;
margin-right: 3px;
padding-left: 2px;
padding-right: 2px;
background-color: #4FC3F7;
color: white;

&.me {
background-color: #4FC3F7;
}

&:hover {
color: black;
background-color: #4FC3F7 !important;
}

span {
font-weight: 600;
color: white;
}
}

.ago-date {
vertical-align: middle;
}

+ 1
- 1
app/models/User.java View File

@@ -1076,7 +1076,7 @@ public class User extends Model implements ResourceConvertible {
pureName = this.name;
}
if (pureName.contains(spliter)) {
pureName = this.name.substring(0, this.name.indexOf(spliter));
pureName = this.name.substring(0, this.name.indexOf(spliter)).trim();
}
}


+ 7
- 20
app/utils/AutoLinkRenderer.java View File

@@ -1,23 +1,10 @@
/**
* Yobi, Project Hosting SW
*
* Copyright 2014 NAVER Corp.
* http://yobi.io
*
* @author Changgun Kim
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Yona, 21st Century Project Hosting SW
* <p>
* Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp.
* https://yona.io
**/

package utils;

import controllers.UserApp;
@@ -338,7 +325,7 @@ public class AutoLinkRenderer {
userName = user.getPureNameOnly(lang);
}

return new Link(RouteUtil.getUrl(user), "no-text-decoration", "<span data-toggle='popover' data-placement='top' data-trigger='hover' data-html='true' data-content=\"" + StringEscapeUtils.escapeHtml4(avatarImage + user.name + " " + user.loginId) + "\">@" + userName + "</span>");
return new Link(RouteUtil.getUrl(user), "no-text-decoration user-link", "<span data-toggle='popover' data-placement='top' data-trigger='hover' data-html='true' data-content=\"" + StringEscapeUtils.escapeHtml4(avatarImage + user.name + " " + user.loginId) + "\">@" + userName + "</span>");
}
}


Loading…
Cancel
Save