Hello everyone, in this post I come to talk to you about a bookstore that I have been using in my personal project Math-worksheets. His name is Redom.js ## What is Redom.js It is a javascript library that lets you create your entire html tag structure in pure javascript to then generate the DOM using the method ```javascript var DOM = document.createelement() ``` encapsulated within a function that called ```javascript var create = el() ``` ## syntax From here we will begin to explain the syntax of Redom.js, from creating a simple HTML tag to creating a complete Dom structure ### labels to create an html tag we must use the function provided by redom.js called the () and we will pass as a first parameter a string with the name of the label we want to create and as a second parameter we will pass another string with the content we want within the label ```javascript var div = el("section","!!Hello World!!") ``` writing this is the equivalent of writing in html this ```html <section>!!Hello World!!</section> ``` si solo queremos crear un simple div en el primer parametro de la funcion dejaremos el string vacio , asi se creara un div por defecto ```javascript var div = el("","!!Hello World!!") ``` writing this is the equivalent of writing in html this ```html <div>!!Hello World!!</div> ``` ### Attributes if we want to add attributes to the tag we just have to add a point after the name of the tag in the first parameter of the function in case of the classes or a hashtag in the case of IDs ```javascript var tag = el('section.style#app') ``` writing this is the equivalent of writing in html this ```html <section class="style" id="app"></section> ``` ### Nesting If we want to create a label that is the son of another, all we have to do is nesting with the function that we believe. ```javascript var family = el('.father', el('.child','Hello' ) ) ``` writing this is the equivalent of writing in html this ```html <div class="father"> <div class="child">hello</div> </div> ``` ### Child groups to create a label with several children like for example in the case of a list, we must create as a child of a function el() an array of functions el() ```javascript var brothers = el("ol", [ el('li','!!Hi!!'), el('li','!!Hi!!'), el('li','!!Hi!!') ]) ``` writing this is the equivalent of writing in html this ```html <ol> <li>!!Hi!!</li> <li>!!Hi!!</li> <li>!!Hi!!</li> </ol> ``` ### Mount after we have our structure made we must enter it in our document, for that we will use the function provided by redom.js called mount() this will allow us to mount our code in our document ```javascript var el = el('.Style','Hello') mount(document.body,el) ``` using all the concepts that are explained here, you can create very complex structures in a programmatic way with javascript, which gives a better development experience and more possibilities when creating interfaces. https://redom.js.org/
post_id | 66,342,031 |
---|---|
author | kikers17 |
permlink | introduction-to-redom-js-front-end-library-to-manipulate-the-dom |
category | utopian-io |
json_metadata | {"users":[],"format":"markdown","image":[],"tags":["utopian-io","blog","redom","web","personal"],"community":"busy","links":["https:\/\/redom.js.org\/"],"app":"busy\/2.5.6"} |
created | 2018-11-20 20:23:15 |
last_update | 2018-11-20 20:23:15 |
depth | 0 |
children | 7 |
net_rshares | 2,142,649,468,161 |
last_payout | 2018-11-27 20:23:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 1.001 SBD |
curator_payout_value | 0.325 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 2,989 |
author_reputation | 327,759,701,601 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
jga | 0 | 72,597,915 | 0.72% | ||
leir | 0 | 1,878,436,297 | 50% | ||
espoem | 0 | 1,642,348,322 | 1% | ||
mcfarhat | 0 | 747,172,500 | 1.06% | ||
steem-plus | 0 | 2,259,349,095 | 0.29% | ||
utopian-io | 0 | 1,785,216,671,671 | 1.45% | ||
newsrx | 0 | 1,358,119,107 | 100% | ||
scipio | 0 | 78,905,389,940 | 33.33% | ||
steemitag | 0 | 3,302,677,556 | 10% | ||
amosbastian | 0 | 5,615,554,301 | 2.65% | ||
hakancelik | 0 | 31,001,639,444 | 50% | ||
xinvista | 0 | 24,000,608 | 100% | ||
kikers17 | 0 | 559,734,938 | 100% | ||
steem-ua | 0 | 227,901,580,892 | 1.84% | ||
curbot | 0 | 2,164,195,575 | 100% |
Hi, @kikers17! You just got a **0.29%** upvote from SteemPlus! To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn. If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
post_id | 66,356,323 |
---|---|
author | steem-plus |
permlink | introduction-to-redom-js-front-end-library-to-manipulate-the-dom---vote-steemplus |
category | utopian-io |
json_metadata | {} |
created | 2018-11-21 03:21:27 |
last_update | 2018-11-21 03:21:27 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-11-28 03:21:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 435 |
author_reputation | 247,995,867,762,997 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Thank you for your contribution. - Your overall text has key English syntax issues causing the text to be incomprehensible at many times. - You did not introduce Redom at the start, you jumped right into a weird example that does not properly illustrate what you are planning to teach - The samples you provided can all be properly found and documented in the redom official documentation. If you want to provide a good tutorial, try to build something useful with it and not just re-document their ideas - Try to follow utopian templates for tutorials to write higher quality tutorials. - Try to provide your own gist/github code relevant to the tutorial Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/8/31434443). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
post_id | 66,384,479 |
---|---|
author | mcfarhat |
permlink | re-kikers17-introduction-to-redom-js-front-end-library-to-manipulate-the-dom-20181121t161650005z |
category | utopian-io |
json_metadata | {"links":["https:\/\/join.utopian.io\/guidelines","https:\/\/review.utopian.io\/result\/8\/31434443","https:\/\/support.utopian.io\/","https:\/\/discord.gg\/uTyJkNm","https:\/\/join.utopian.io\/"],"app":"steemit\/0.1","tags":["utopian-io"]} |
created | 2018-11-21 16:17:21 |
last_update | 2018-11-21 16:17:21 |
depth | 1 |
children | 1 |
net_rshares | 9,612,227,962,622 |
last_payout | 2018-11-28 16:17:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 4.491 SBD |
curator_payout_value | 1.440 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,148 |
author_reputation | 104,178,422,702,645 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
yuxi | 0 | 18,741,709,299 | 60% | ||
codingdefined | 0 | 7,785,107,552 | 7.5% | ||
utopian-io | 0 | 9,447,156,383,303 | 6.56% | ||
emrebeyler | 0 | 115,293,601 | 0.01% | ||
amosbastian | 0 | 32,029,645,509 | 14.99% | ||
organicgardener | 0 | 4,960,626,243 | 25% | ||
reazuliqbal | 0 | 8,519,813,437 | 8% | ||
hakancelik | 0 | 28,526,277,764 | 50% | ||
mightypanda | 0 | 63,206,807,719 | 40% | ||
fastandcurious | 0 | 1,186,298,195 | 30% |
Thank you for your review, @mcfarhat! Keep up the good work!
post_id | 66,503,475 |
---|---|
author | utopian-io |
permlink | re-re-kikers17-introduction-to-redom-js-front-end-library-to-manipulate-the-dom-20181121t161650005z-20181124t041649z |
category | utopian-io |
json_metadata | {"app":"beem\/0.20.9"} |
created | 2018-11-24 04:16:51 |
last_update | 2018-11-24 04:16:51 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-12-01 04:16:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 60 |
author_reputation | 152,913,012,544,965 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
#### Hi @kikers17! Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! **Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
post_id | 66,386,773 |
---|---|
author | steem-ua |
permlink | re-introduction-to-redom-js-front-end-library-to-manipulate-the-dom-20181121t171412z |
category | utopian-io |
json_metadata | {"app":"beem\/0.20.9"} |
created | 2018-11-21 17:14:15 |
last_update | 2018-11-21 17:14:15 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-11-28 17:14:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 287 |
author_reputation | 23,203,609,903,979 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Hey, @kikers17! **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Get higher incentives and support Utopian.io!** Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)). **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
post_id | 66,408,314 |
---|---|
author | utopian-io |
permlink | re-introduction-to-redom-js-front-end-library-to-manipulate-the-dom-20181122t041223z |
category | utopian-io |
json_metadata | {"app":"beem\/0.20.9"} |
created | 2018-11-22 04:12:24 |
last_update | 2018-11-22 04:12:24 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-11-29 04:12:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 590 |
author_reputation | 152,913,012,544,965 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Congratulations @kikers17! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@kikers17/payout.png?201811270319</td><td>You received more than 10 as payout for your posts. Your next target is to reach a total payout of 50</td></tr> </table> <sub>_[Click here to view your Board of Honor](https://steemitboard.com/@kikers17)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
post_id | 66,639,749 |
---|---|
author | steemitboard |
permlink | steemitboard-notify-kikers17-20181127t035931000z |
category | utopian-io |
json_metadata | {"image":["https:\/\/steemitboard.com\/img\/notify.png"]} |
created | 2018-11-27 03:59:30 |
last_update | 2018-11-27 03:59:30 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-12-04 03:59:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 783 |
author_reputation | 38,705,954,145,809 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |
Congratulations @kikers17! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) : <table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@kikers17/votes.png?201812242331</td><td>You made more than 1500 upvotes. Your next target is to reach 1750 upvotes.</td></tr> </table> <sub>_[Click here to view your Board](https://steemitboard.com/@kikers17)_</sub> <sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub> **Do not miss the last post from @steemitboard:** <table><tr><td><a href="https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/kf4SJb.png"></a></td><td><a href="https://steemit.com/christmas/@steemitboard/christmas-challenge-send-a-gift-to-to-your-friends">Christmas Challenge - Send a gift to to your friends</a></td></tr></table> > Support [SteemitBoard's project](https://steemit.com/@steemitboard)! **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
post_id | 67,873,451 |
---|---|
author | steemitboard |
permlink | steemitboard-notify-kikers17-20181224t235959000z |
category | utopian-io |
json_metadata | {"image":["https:\/\/steemitboard.com\/img\/notify.png"]} |
created | 2018-12-24 23:59:57 |
last_update | 2018-12-24 23:59:57 |
depth | 1 |
children | 0 |
net_rshares | 0 |
last_payout | 2018-12-31 23:59:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,190 |
author_reputation | 38,705,954,145,809 |
root_title | " Introduction to Redom.js: Front-end library to manipulate the DOM" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |