Write on Hive, Read Everywhere!

in HiveDevs โ€ข 3 months ago

Write on Hive, Read Everywhere!

Hello, dear Hive community! ๊™ฎ

Even though it's only been about a week since my last post, I've missed you all so much! ๐Ÿค—

Recently, our dev team had a productive chat with @crimsonclad and @gtg about Hive components that users can embed on their websites. So, I got busy trying to bring these ideas to life as quickly as I could! ๐Ÿƒ

img1.png

๐Ÿ“– User Stories

We began by asking simple questions ๐Ÿค” about which components are essential and how they should be used, and we got immediate answers!

  • I want to embed Hive posts ๐Ÿงฉ on my website
  • I want my visitors to view comments ๐Ÿ—ช
  • I want my visitors to be able to โค๏ธ like & ๐Ÿ’ฌ comment on the content I create
  • I want to display a paginated list of the latest posts by tag ๐Ÿ“š
  • I want to show details of my Hive account ๐Ÿ‘ฆ
  • I want to display my witness details ๐Ÿ‘€

img2.png

๐Ÿ“Š Check Out the Components!

Witness

<hive-witness account="gtg"></hive-witness>

img3.png

Post

<hive-post permlink="@gtg/hello-world"></hive-post>

img4.png

Comments

<hive-comments permlink="@gtg/67juuw-skyteam-airline-alliance-official-partner-of-hivefest"></hive-comments>

img5.png

Posts by Tag

<hive-tag tag="photography" url-template="/photography/{permlink}"></hive-tag>

img6.png

๐Ÿ’ป Sample Website

Thanks to @gtg, you can see these components in action ๐Ÿ’ฅ

Feel free to explore the source code of the website (visit: view-source:https://gtg.openhive.network/5bb236). It's impressively simple! โ™ป๏ธ

๐Ÿ“ฑ Mobile Users Welcome!

No worries! The components are fully responsive! โšก

img7.png

No need to adjust settings. They automatically adapt to the viewport! ๐Ÿ˜Š

๐Ÿ” How to Use Them?

I created a quick start guide ๐Ÿง  in my repository.

TL;DR:

(html comment removed:  Prepare imports for our components )
<script type="importmap">
  {
    "imports": {
      "lit": "https://cdn.jsdelivr.net/gh/lit/dist@3/core/lit-core.min.js",
      "@hiveio/internal": "https://gtg.openhive.network/5bb236/hive-internal.js"
    }
  }
</script>

(html comment removed:  Import components we want )
<script type="module" src="https://gtg.openhive.network/5bb236/hive-post.js"></script>
<script type="module" src="https://gtg.openhive.network/5bb236/hive-witness.js"></script>
<script type="module" src="https://gtg.openhive.network/5bb236/hive-comments.js"></script>
<script type="module" src="https://gtg.openhive.network/5bb236/hive-tag.js"></script>

(html comment removed:  Use the components )
<hive-witness account="gtg"></hive-witness>
<hive-post permlink="@gtg/hello-world"></hive-post>
<hive-comments permlink="@gtg/hello-world"></hive-comments>
<hive-tag tag="photography" posts-per-page="4" url-template="/photography/{permlink}"></hive-tag>

๐Ÿง›๐Ÿปโ€โ™€๏ธ For Night Owls

Introducing the โœจ dark theme โœจ:

img8.png

Just set the theme="dark" attribute on any component and you're good to go! ๐Ÿ’ช

๐ŸŽจ Want More Colors?

Customize your communities and websites with just a few lines of CSS! ๐Ÿคฉ

hive-comments {
  --hive-on-surface: blue;
}

And here are the results: ๐Ÿ‘‡

img9.png

๐Ÿ“ˆ Need More Components?

Great! I love your spirit! ๐Ÿ‘ป

You can request a new component by creating an issue ๐Ÿ’ก or suggest edits by opening a pull request ๐Ÿ› ๏ธ

๐Ÿ’พ Component Sizes

I understand not everyone has super-fast internet ๐Ÿ“Ÿ

So, I worked to make the components as compact as possible! โฌ‡๏ธ

NameSize
Lit core7 kB
Hive Witness19 kB
Hive Post29.3 kB
Hive Comments46.9 kB
Hive Tag50.2 kB
Hive internals640 kB

And remember, these script sizes are not gzipped yet! They are cached by browsers and executed only once per page load, on demand! ๐Ÿคฏ

๐Ÿ’ฒ Pricing

Just kidding ๐Ÿคฃ It's completely ๐Ÿ†“ ๐Ÿ—ฝ

Feel free to visit the repository to contribute or use the components via CDN, thanks to @gtg ๐Ÿง™โ€โ™‚๏ธ

๐ŸŒŸ Future Plans

I have a few ideas in mind, and there are areas I can improve, but we did it! ๐Ÿ“ฃ

MVP is on board! ๐Ÿ’Ž

I strongly encourage you to use the Hive components! ๐Ÿ–ผ๏ธ


Images from private archive & chatgpt.com

Sort: ย 

Thank you for taking our chats and thinking about what something viable and usable for anyone, anywhere could look like. I'm stoked about it!

Thank you, @crimsonclad! ๐Ÿ˜Š Your insights and feedback were invaluable in shaping these ideas, and it means a lot to see your excitement. I'm really looking forward to making Hive even more accessible and engaging for everyone, everywhere. Let's keep building something amazing together! ๐Ÿš€โœจ

I think the "hive account" should be the next implemented, I guess a lot of people would like that one.

ย 3 months agoย ย 

Which is similar to "the badge" thing, only that badge was a simple image-indicator, while this would be a "my hive profile". Ability to follow, defined prefered front-end, idk what else?

I guess most obvious thing would be the description of themselves from their json metadata + some account statistics. But seems like a good question to ask potential users. Anyone want to suggest what they would like to see on their personal web pages about their account?

How about the using the bkg image? like it's done on PeakD (image below), I really like how it looks, even just on the defaults.

image.png

I never tailored that image for this use, and was kinda lucky it fits just OK (it even looks better than as the banner:D).

Considering a bit different 'target' or 'context', maybe it would be a better idea to add a separate metadata entry. After all, tinkering with keeping an image good for multiple purposes isn't fun at all. Users (at least those who actually care) could provide a different text/image for this purpose, and for those who don't - it could fall back to the existing field(s). Or don't fallback and let it just stay empty and ugly to emphasize the need to spend those few minutes to configure it :)

Absolutely agree with both of you! ๐Ÿ‘

Iโ€™ll make sure to add all suggestions and details for the Account component to the issue here: https://github.com/mtyszczak/hive-components/issues/1 for everyone who doesnโ€™t have a GitHub account, so we can keep the ideas organized and accessible. ๐Ÿ“โœจ

Iโ€™ll aim to work on this component and hopefully have it ready next week โ€” really excited to see how it turns out! ๐Ÿš€

Also, we could reuse this for Hive Bridge Account details! We can definitely make it modular enough so it fits both places nicely. Thanks for the brainstorming, and keep the ideas coming, everyone! ๐Ÿ˜ƒ

screenshot.png

Visit Hive Bridge

That's amazing. I am quite old backend (C++) guy, which lately is trying to touch frontend development and definitely understand the flow and code. The ideas that motivated this work (which are nothing groundbreaking) were presented > 2 years ago, but it was mtyszczak who brought them to success. Looking at the way of use and the code of the components themselves - it is a huge success and a reflection of the beautiful idea of โ€‹โ€‹programming: DRY KISS. Thank You !! A lot.

ย 3 months agoย ย 

"May the Hive be with you!" :-D

(my introduction post is from before-fork days, to many of us it's obvious why I mentioned the other network, but I guess it will be a way better if I edit my old posts and put a links to our story of creating Hive)

Great to see the embeddable Hive components taking shape! ๐Ÿš€ This will be a game changer for accessibility.

Very cool ๐Ÿ˜Ž

Dark theme should be default :o)

That's awesome! Good Job!!!

it is a great work, i like see tools made it by others devs in hive :D

Fabulous!

Kudos to the brain behind this, great job.๐Ÿ‘๐Ÿ’ช๐Ÿ”ฅ

๐Ÿ‘Œ๐Ÿ‘Œ

Wow this is lovely

That's great but we need to deal with the bad downvoters on Hive ๐Ÿค”

I've been getting downvoted for a long time for no reason ๐Ÿค” and I'm being downvoted by a racist person who is also a top Hive farmer

Congratulations @mtyszczak! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You received more than 300 upvotes.
Your next target is to reach 400 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Congratulations @mtyszczak! Your post has been a top performer on the Hive blockchain and you have been rewarded with this rare badge

Post with the highest payout of the day.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

$WINE

๐Ÿ“ Love the message-Write on Hive, read everywhere
It's amazing how this platform connects writers and readers from all over the world.
Keep sharing the inspiration๐ŸŒ๐Ÿ“šโœจ

This is amazing. You are doing a great job