<head th:remove="tag">
  <th:block th:insert="~{components/pagination/template :: head}"></th:block>
  <link rel="stylesheet" crossorigin href="/themes/howiehz-higan/assets/1.65.0CrTbsqC.css" integrity="sha384-eO1HOwAU7r+E0gkRXcQSEPpeZYXWM6EXDcBOq/owWUuvPfHXNca2pMISRm8UcKAS">
</head>
<body th:remove="tag" th:fragment="body(friends, pageTemplateName)">
  <section class="friends-list-summary flex tw-mb tw-ac">
    <div class="flex tw-mb tw-ac tw-jb">
      <th:block th:each="friend : ${friends.items}" th:with="spec = ${friend.spec}">
        <div class="grid tw-ra tw-r tw-d">
          <div class="group relative flex tw-ac tw-y">
            <h2 class="color-text static tw-ae tw-xb tw-w tw-t">
              <div
                class="friend-card-hover absolute tw-ab tw-bb tw-ee tw-tb tw-z tw-s"
              ></div>
              <a th:href="@{${spec.postLink}}" target="_blank" rel="noopener">
                <span class="absolute tw-ab tw-bb tw-wd tw-z tw-s"></span>
                <span class="relative tw-vd" th:text="${spec.title}">文章标题替换位</span>
              </a>
            </h2>
            <time
              th:if="${!(#strings.equals(pageTemplateName, 'index')
                         or #strings.equals(pageTemplateName, 'friends'))
                       or (#strings.equals(pageTemplateName, 'index')
                           and theme.config?.index_styles?.is_show_friend_pubdate)
                       or (#strings.equals(pageTemplateName, 'friends')
                           and theme.config?.friends_page_styles?.is_show_friend_pubdate)}"
              class="color-base-content-80 relative tw-vd tw-wa tw-dd flex tw-ga tw-pc tw-kc tw-sb"
              th:datetime="${#temporals.format(spec.pubDate, 'yyyy-MM-dd')}"
            >
              <span class="absolute tw-qb tw-nc flex tw-ga" aria-hidden="true">
                <span class="tw-yd tw-ad tw-ka tw-na tw-g"></span>
              </span>
              <th:block th:text="${#temporals.format(spec.pubDate, 'MMMM dd yyyy')}"></th:block>
            </time>
            <div
              th:if="${!(#strings.equals(pageTemplateName, 'index')
                         or #strings.equals(pageTemplateName, 'friends'))
                       or (#strings.equals(pageTemplateName, 'index')
                           and theme.config?.index_styles?.is_show_friend_author)
                       or (#strings.equals(pageTemplateName, 'friends')
                           and theme.config?.friends_page_styles?.is_show_friend_author)}"
              class="friend-author color-time relative tw-wd tw-oc tw-bd flex tw-ga tw-kc"
            >
              <a
                th:if="${!(#strings.equals(pageTemplateName, 'index')
                           or #strings.equals(pageTemplateName, 'friends'))
                         or (#strings.equals(pageTemplateName, 'index')
                             and theme.config?.index_styles?.is_show_friend_author_avatar)
                         or (#strings.equals(pageTemplateName, 'friends')
                             and theme.config?.friends_page_styles?.is_show_friend_author_avatar)}"
                th:href="@{${spec.authorUrl}}"
                target="_blank"
                rel="noopener"
                class="tw-id"
              >
                <img
                  th:src="${spec.logo}"
                  th:alt="${spec.author}"
                  class="friend-author-avatar tw-zd tw-de tw-ka"
                  loading="lazy"
                />
              </a>
              <a
                th:if="${!(#strings.equals(pageTemplateName, 'index')
                           or #strings.equals(pageTemplateName, 'friends'))
                         or (#strings.equals(pageTemplateName, 'index')
                             and theme.config?.index_styles?.is_show_friend_author_name)
                         or (#strings.equals(pageTemplateName, 'friends')
                             and theme.config?.friends_page_styles?.is_show_friend_author_name)}"
                th:href="@{${spec.authorUrl}}"
                target="_blank"
                rel="noopener"
                class="friend-author-link"
              >
                <span th:text="${spec.author}">作者名称替换位</span>
              </a>
            </div>
            <th:block
              th:if="${!(#strings.equals(pageTemplateName, 'index')
                         or #strings.equals(pageTemplateName, 'friends'))
                       or (#strings.equals(pageTemplateName, 'index')
                           and theme.config?.index_styles?.is_show_friend_description)
                       or (#strings.equals(pageTemplateName, 'friends')
                           and theme.config?.friends_page_styles?.is_show_friend_description)}"
              th:with="max_lines = ${#strings.equals(pageTemplateName, 'index')
                                     ? theme.config?.index_styles?.friend_description_max_lines
                                     : (#strings.equals(pageTemplateName, 'friends')
                                        ? theme.config?.friends_page_styles?.friend_description_max_lines
                                        : '3')}"
            >
              <p
                class="color-base-content-80 relative tw-vd tw-ld tw-bd tw-be tw-kc"
                th:text="${spec.description}"
                th:classappend="|${max_lines == '1' ? 'v-line-clamp-1' : ''} ${max_lines == '2' ? 'v-line-clamp-2' : ''} ${max_lines == '3' ? 'v-line-clamp-3' : ''} ${max_lines == '4' ? 'v-line-clamp-4' : ''} ${max_lines == '5' ? 'v-line-clamp-5' : ''}|"
              >
                文章描述替换位
              </p>
            </th:block>
            <div
              th:if="${!(#strings.equals(pageTemplateName, 'index')
                         or #strings.equals(pageTemplateName, 'friends'))
                       or (#strings.equals(pageTemplateName, 'index')
                           and theme.config?.index_styles?.is_show_friend_permalink_text)
                       or (#strings.equals(pageTemplateName, 'friends')
                           and theme.config?.friends_page_styles?.is_show_friend_permalink_text)}"
              aria-hidden="true"
              class="color-primary relative tw-vd tw-md flex tw-ga tw-kc tw-qa"
              th:text="#{page.friends.postListPermalinkText}"
            >
              阅读全文
            </div>
          </div>
          <time
            th:if="${!(#strings.equals(pageTemplateName, 'index')
                       or #strings.equals(pageTemplateName, 'friends'))
                     or (#strings.equals(pageTemplateName, 'index')
                         and theme.config?.index_styles?.is_show_friend_pubdate)
                     or (#strings.equals(pageTemplateName, 'friends')
                         and theme.config?.friends_page_styles?.is_show_friend_pubdate)}"
            class="color-base-content-80 relative tw-vd tw-wa tw-kd tw-dd hidden tw-ga tw-kc tw-fc"
            th:datetime="${#temporals.format(spec.pubDate, 'yyyy-MM-dd')}"
            th:text="${#temporals.format(spec.pubDate, 'MMMM dd yyyy')}"
          >
          </time>
        </div>
      </th:block>
    </div>
    <th:block
      th:if="${#strings.equals(pageTemplateName, 'index')}"
      th:insert="~{components/pagination/template :: body(posts = ${friends}, isListResult = true)}"
    ></th:block>
    <th:block
      th:if="${#strings.equals(pageTemplateName, 'friends')}"
      th:insert="~{components/pagination/template :: body(posts = ${friends})}"
    ></th:block>
  </section>
</body>
