Elenco argomenti MD Componente Mobile

I’ve pushed a fix

3 Mi Piace

The 2nd one with the avatar on the right please :pray:

I’m glad the component was updated, I’m using it on all my instances.

1 Mi Piace

The alternative looks good. Replacing the avatar with the badge is odd, to be honest. I would personally reduce the badge size, but yeah, it sounds good to me.

2 Mi Piace

I like this alternative.

2 Mi Piace

Ok I’ve updated the component to try this out. Let me know if you have any issue

Thanks again @Arkshine, without your work I would’ve let it down

2 Mi Piace

Do you think it’s necessary to display the number of views and likes below the title as well?
Because in the old version, they were displayed.

I don’t think it was, my guess is you added it directly in the component using plugin outlet

I don’t have the code right now, but if you really need it I can help

The base code should be something like this

<script type='text/x-handlebars' data-template-name='/connectors/topic-list-after-category/viewsandlikes'>
  <span class='topic-views'>{{d-icon "eye"}} **code**</span>
  <span class='topic-likes'>{{d-icon "heart"}} **code**</span>
</script>
1 Mi Piace

Aha, really? I can’t remember if I made any changes either.
Maybe my memory is playing tricks on me.
But thank your help, i’ll change code from my side :sweat_smile:

1 Mi Piace

By the way, it looks like the preview link doesn’t work.

2 Mi Piace

Fixed it, thanks

I cleaned up my theme creator page, but forgot to share these components again

3 Mi Piace

Hi Steven,

When a new article is published, two badges appear after the article title. Is this intentionally set up?

I added a piece of JS code to remove one of them, but it doesn’t seem to work consistently, especially when using different browsers.

Do you have any other good suggestions?

document.addEventListener("DOMContentLoaded", function () {
  const badges = document.querySelectorAll(".topic-post-badges .badge-notification.new-topic");
  if (badges.length > 1) {
    // 移除第二个 badge
    badges[1].remove();
  }
});

1 Mi Piace

I think i’ve got it, i’ve pushed a fix, try to update and let me know if it’s good now

1 Mi Piace

After the update, it works very well.thank you :smiley:

2 Mi Piace

The online indicator is misplaced :slight_smile:


See on the first line

1 Mi Piace

It’s tricky since the whos online plugin attach this indicator to the pull left side (which we deactivated) and the avatar is centered vertically.

I can get closer with these modifications (put these on a css mobile stylesheet), but it’s definitely far from perfect.

.pull-left {
  float: right;
}

html.whos-online-flair.mobile-view .topic-list-item.last-poster-online div.pull-left::before {
  top: -15px;
  left: unset;
  right: -50px;
}

The easiest solution would be to deactivate this indicator on mobile and on the topic list only

html.whos-online-flair.mobile-view .topic-list-item.last-poster-online div.pull-left::before {
  display: none;
}
2 Mi Piace

Hi Max. I wanna show some stuff under the title as well, like the number of likes and views. How did you pull that off?