scrobble.life
HiveDevs

Write on Hive, Read Everywhere!

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:

<!-- 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>

<!-- 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>

<!-- 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! โฌ‡๏ธ

Name Size
Lit core 7 kB
Hive Witness 19 kB
Hive Post 29.3 kB
Hive Comments 46.9 kB
Hive Tag 50.2 kB
Hive internals 640 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

Comments ยท 19

  • @davingson(64)ยท 331d

    This is a great initiative, it is a great idea and it very good to experience more people engagement, it is of high value for daily assessment and charts of one's authorship and how creative you are in writing.

  • @bhetea01(64)ยท 421d

    This is amazing. You are doing a great job

  • @alienpunklord(67)ยท 433d

    untitled.gif

  • @nov13(49)ยท 433d

    ๐Ÿ“ 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๐ŸŒ๐Ÿ“šโœจ

  • @crimsonclad(74)ยท 433d

    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!

  • @praiselove(68)ยท 434d

    Wow this is lovely

  • @jakiro12(66)ยท 434d

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

  • @ivyann(63)ยท 434d

    Fabulous!

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

  • @louis88(80)ยท 434d

    That's awesome! Good Job!!!

  • @cryptocoins500(25)ยท 434d

    ๐Ÿ‘Œ๐Ÿ‘Œ

  • @theguruasia(69)ยท 434d

    $WINE

  • @hivebuzz(74)ยท 434d

    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

  • @offgridlife(74)ยท 434d

    Very cool ๐Ÿ˜Ž

  • @miosha(67)ยท 434d

    Dark theme should be default :o)

  • @blocktrades(80)ยท 434d

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

  • @hivebuzz(74)ยท 434d

    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

  • @gtg(76)ยท 434d

    "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)

  • @small.minion(61)ยท 434d

    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.

  • @bhr-curation(63)ยท 434d

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