@silas@programming.dev

web dev and digital artist making !lemmynade

https://www.buymeacoffee.com/silasobviously

This profile is from a federated server and may be incomplete. Browse more on the original instance.

silas,
@silas@programming.dev avatar

Like others have said, these are Card components. Usually you’d create an empty low-level Card component that has basic props for different styles (rounded, flat, error, etc.), slots for the content inside, and event handlers for interaction. Then, if you wish, you could make another CardGroup component that can contain Card components and position them using flexbox or grid like the example you provided.

Another possible name for these components would be List or ListItem

silas,
@silas@programming.dev avatar

If you have language settings or are not showing bot accounts, those comments will be hidden too but the comment count still includes them

silas,
@silas@programming.dev avatar

<span style="color:#323232;">curl --request GET 
</span><span style="color:#323232;">     --url 'https://lemmy.world/api/v3/post/list?type_=All&amp;sort=New&amp;community_name=memes%2540lemmy.ml' 
</span><span style="color:#323232;">     --header 'accept: application/json'
</span>
silas,
@silas@programming.dev avatar

There is less content here than Reddit because there are less users here—less users creating content each day. Each of our comments and posts have far more weight and impact on the Fediverse because of this. The more we push ourselves to engage, create posts, or moderate communities when we normally wouldn’t before, the faster we will see Lemmy grow!

silas,
@silas@programming.dev avatar

As a dev, Lemmy comments are really difficult to work with and sometimes they go missing. Every app tries to mitigate it their own way, but ultimately we are waiting for Lemmy to improve and have clearer documentation on comments. So to answer your question, it’s probably both a Lemmy and Memmy issue.

Also, if you have bot accounts disabled/hidden in your settings, it also hides bot comments

silas,
@silas@programming.dev avatar

Can you explain this, or point me in the right direction to learn more?

What's the best and most secure way to take a fragment of html from one document and add it to another html document with Javascript?

I’m not new to programming, but I am somewhat new to web development and I’m trying to figure out the most preferred way of taking a standalone header from one html document and adding it to other html documents without code duplication. If possible I want to do this with Javascript so I can learn with more basic tools...

silas,
@silas@programming.dev avatar

If I understand you right, the closest thing to this natively is probably web components. They have really good support across browsers now, and they would accomplish what you want without adding extra javascript to weigh your site down.

You could also learn and use a javascript framework like Astro, Svelte, Vue, React, etc. which are all industry-standard frameworks built to break your website down into a ton of reusable components and keep things organized. I like Svelte or Astro because they feel closer to vanilla HTML/CSS/JS to me. Here’s the official interactive tutorial for Svelte if you want to mess around with it: learn.svelte.dev

PHP does have “includes” too if you want to go that route

silas,
@silas@programming.dev avatar

I commented on another comment of yours too, but I think the easiest ways to do this would be with web components or with PHP includes

If you want to dive deeper, you can learn a javascript framework like Astro or Svelte which have more of a learning curve but are better at organizing larger or more powerful websites/web apps

silas,
@silas@programming.dev avatar

No problem! Svelte has an awesome Discord community, and we got a Svelte community here too. Feel free to ask me any questions as well

silas,
@silas@programming.dev avatar

Thanks, I’ll take a look at this too!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • KamenRider
  • TheResearchGuardian
  • KbinCafe
  • Socialism
  • oklahoma
  • SuperSentai
  • feritale
  • All magazines