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
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/topics/_topic.html.haml')
-rw-r--r--app/views/shared/topics/_topic.html.haml16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/shared/topics/_topic.html.haml b/app/views/shared/topics/_topic.html.haml
new file mode 100644
index 00000000000..a47d4495777
--- /dev/null
+++ b/app/views/shared/topics/_topic.html.haml
@@ -0,0 +1,16 @@
+- max_topic_name_length = 30
+- detail_page_link = topic_explore_projects_path(topic_name: topic.name)
+
+.col-lg-3.col-md-4.col-sm-12
+ .gl-card.gl-mb-5
+ .gl-card-body.gl-display-flex.gl-align-items-center
+ .avatar-container.rect-avatar.s40.gl-flex-shrink-0
+ = link_to detail_page_link do
+ = topic_icon(topic, class: "avatar s40")
+ = link_to detail_page_link do
+ - if topic.name.length > max_topic_name_length
+ %h5.str-truncated.has-tooltip{ title: topic.name }
+ = truncate(topic.name, length: max_topic_name_length)
+ - else
+ %h5
+ = topic.name