Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-02-06 02:12:02 +0300
committerFatih Acet <acetfatih@gmail.com>2019-02-06 02:12:02 +0300
commit52434a7034529330e8b5a7ebd0b75992635644c7 (patch)
tree4d30a6bfe59ec43ca4ec2074fef2e23dade1faaa /app
parentdb35914c61be3d78f5956af51b74546a0b101ca7 (diff)
Resolve "Update project topics styling to use badges design"
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/framework/common.scss4
-rw-r--r--app/views/projects/_home_panel.html.haml9
2 files changed, 11 insertions, 2 deletions
diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss
index 15fe331f9e4..cb449b642e7 100644
--- a/app/assets/stylesheets/framework/common.scss
+++ b/app/assets/stylesheets/framework/common.scss
@@ -89,6 +89,10 @@ hr {
.str-truncated {
@include str-truncated;
+ &-30 {
+ @include str-truncated(30%);
+ }
+
&-60 {
@include str-truncated(60%);
}
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index 7694217eb28..0be41b5888c 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -21,9 +21,14 @@
- if @project.tag_list.present?
%span.home-panel-topic-list.d-inline-flex.prepend-left-8.has-tooltip{ data: { container: 'body' }, title: @project.has_extra_topics? ? @project.tag_list.join(', ') : nil }
= sprite_icon('tag', size: 16, css_class: 'icon append-right-4')
- = @project.topics_to_show
+
+ - @project.topics_to_show.each do |topic|
+ %a{ class: 'badge badge-pill badge-secondary append-right-5 str-truncated-30', href: explore_projects_path(tag: topic) }
+ = topic.titleize
+
- if @project.has_extra_topics?
- = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown }
+ .text-nowrap
+ = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown }
.project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end