File: _topic.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (16 lines) | stat: -rw-r--r-- 826 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- max_topic_title_length = 30
- detail_page_link = topic_explore_projects_cleaned_path(topic_name: topic.name)

.gl-mt-5.gl-grid{ class: 'sm:gl-grid-cols-2 md:gl-grid-cols-3 ml:gl-grid-cols-3' }
  = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' },
                                      body_options: { class: 'gl-flex gl-items-center' }) do |c|
    - c.with_body do
      = link_to detail_page_link do
        = render Pajamas::AvatarComponent.new(topic, size: 48, alt: '', class: 'gl-mr-3')
      = link_to detail_page_link do
        - if topic.title_or_name.length > max_topic_title_length
          %h5.gl-str-truncated.has-tooltip{ title: topic.title_or_name }
            = truncate(topic.title_or_name, length: max_topic_title_length)
        - else
          %h5
            = topic.title_or_name