¿Cómo mostrar el mapa del tema en publicaciones sin comentarios?

Hola,

Ahora que vi este tema, recordé que había visto un commit sobre esto antes. :slightly_smiling_face:

Creo que esto debería funcionar ahora :arrow_down_small:

Encabezado

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


También he añadido un poco de CSS para ocultar estadísticas innecesarias cuando no hay otras publicaciones.

Común / 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;
            }
          }
        }
      }
    }
  }
}

Escritorio (sin respuesta)

Móvil (sin respuesta)

Cuando alguien responde, vuelve al valor predeterminado.

14 Me gusta