Added "Search posts by title" functionality to easy backlink list

in #utopian-io7 years ago (edited)

Lasts days I have added the new feature "Filter posts by tags" to the easy backlink functionality in coffeesource.net. In order to make easier the need to find our Steem posts, I have added the "Search post by title" functionality. Now, is very easy to find posts by title too.

Now we can see the input field "Search by title", as we can see in the following image:


postsfilter.png

When a user types some text into the "Search by title" field, only posts that include this string as a substring of their title will be showed. I have developed this new functionality completely in javascript.
Each time that a user types or removes a character into the "Search by title" field, the list will be automatically updated. In the following image, we can see only posts that include the world "added" as a substring of their title.


Screen Shot 2017-12-16 at 11.28.09 AM.png

If a user clicks the button "Load more posts" and there is a value in the input field "Search by title", then new posts will be filtered by this search criteria. When a user clicks this button, next 30 posts in the blockchain will be loaded, but if they don't have the value typed into the filed "Search by title" as a substring of their title, the posts will be hidden.

I have added the post title like a data attribute per each post container called data-entry-title:


Screen Shot 2017-12-16 at 11.40.29 AM.png

When a users changes the value of the "Search by title" field, I use javascript to check if the typed value is a substring of the data-entry-title attribute. If the answer is no (false), then the container will be hidden.

This is the link to the Pull request detail.

Have happy days ✌



image_3


Proof of logged in session in Github 🙂





Coffeesource is an open source project to create tools based on Steem's blockchain useful to the entire steemit community, and which seeks to encourage the growing community of Python developers and the development community in general to take an interest in Blockchain technology and contribute in open source projects using utopian.io.

@coffeesource.net is a creation of @kit.andres and @ecoinstant, who are building out new tools upon the Steem Blockchain.





Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 61599.30
ETH 3389.34
USDT 1.00
SBD 2.50