コメントなしの投稿でtopic-mapを表示する方法

こんにちは。

このトピックを見て、以前これに関するコミットを見たことを思い出しました。:slightly_smiling_face:

これで動作するはずです。:arrow_down_small:

ヘッダー

<script type="text/discourse-plugin" version="0.8">
  api.includePostAttributes('topicMap');
</script>


また、他の投稿がない場合に不要な統計情報を非表示にするために、少量のCSSを追加しました。

共通 / CSS

body:not(.archetype-private_message) {
  .topic-post.regular {
    // if last-of-type is the #post_1
    &:last-of-type {
      article#post_1 {
        .topic-map {
          width: max-content;
          nav.buttons {
            display: none;
          }
          ul li {
            // hide all statistics but views
            &:not(.secondary.views) {
              display: none;
            }
          }
          // show views on mobile view
          .secondary.views {
            .mobile-view & {
              display: list-item;
              text-align: center;
            }
          }
        }
      }
    }
  }
}

デスクトップ(返信なし)

モバイル(返信なし)

誰かが返信すると、デフォルトに戻ります。

「いいね!」 14