/ Layout for a single Category

It will get shown as a part of a greater
list
Local variable: category

li.folder.list-group-item.nolink

/ This span is for FancyTree to allow
  inserting arbitrary HTML on items
span
  a href="/category/#{category.id}" = category.name

- if (not category.childs.empty?) or (not category.links.empty?)
  ul
    - if not category.childs.empty?
      - category.childs.each do |child|
        == slim(:single_category, locals: { category: child })

    - if not category.links.empty?
      - category.links.each do |link|
        li.list-group-item
          span
            / This empty <a> tag is for FancyTree to redirect
              to it when pressing ENTER or SPACE.
              That's because it redirects to the FIRST link
              it finds.
              So if you want to redirect to the EXTERNAL link
              just delete this
            a.link-internal-link href="/link/#{link.id}"

            - if link.title.empty?
              a.link-link target="_blank" href="#{link.url}" data-link-id="#{link.id}"
                | #{link.url}
            - else
              a.link-link target="_blank" href="#{link.url}" data-link-id="#{link.id}"
                | #{link.title}