Hack Forums
Bacon-Ipsum-Component | Enter and manage placeholder text super easy! BACON STYLE! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Webmasters (https://hackforums.net/forumdisplay.php?fid=141)
+---- Forum: Website Construction (https://hackforums.net/forumdisplay.php?fid=50)
+---- Thread: Bacon-Ipsum-Component | Enter and manage placeholder text super easy! BACON STYLE! (/showthread.php?tid=4622799)



Bacon-Ipsum-Component | Enter and manage placeholder text super easy! BACON STYLE! - Tasemu - Jan 5, 2015

Intro:

Here is another little project for you people to use as you please. I decided to make this because I was getting tired of going to lorem-ipsum constantly and copy/pasting placeholder jibberish into my templates. So I made this component which I believe has a few cool tricks to it that can help your development workflow:
  • Use one tag to generate any placeholder paragraphs you need

  • Dont need to copy/paste anything

  • Takes up a lot less room than a wall of text in your markup, its only 1 tag

  • Bacon goodness



How to install

The component is super easy to install with bower. Just run the following in your project directory:

Code
bower install bacon-ipsum-component

and then include the import anywhere in your header like so:

Code
<link rel="import" href="/path/to/bower_components/bacon-ipsum/bacon-ipsum.html">

Thats it!

Usage

The Bacon Ipsum Component is hella easy to use. Simply find an area in your markup, for example:

Code
<div class="my-area">

</div>

and then copy in the tag like this:

Code
<div class="my-area">
  <bacon-ipsum paragraphs="5"></bacon-ipsum>
</div>

Notice you can pass in how many paragraphs you would like to generate in the 'paragraphs' attribute. If you do not put in a paragraphs attribute then it will default to 2 paragraphs.

Contribute

Feel free to pull the code from here and do whatever you want with it. If you make it better then why not commit a pull-request?

https://github.com/Tasemu/bacon-ipsum


The lack of bacon related replies is disturbing.


* - Cryptoâ„¢ - Jan 7, 2015

Bacon is the #1 tool in any web designer's toolbox. Thanks for this meaty goodness! (Which is incidentally, I'm sure, the name of someone's dick.)


* - Tasemu - Jan 8, 2015

Thanks for replying crypto, you're so nice Q-Q