Tag Archives: code

Upgrades

I’m working on some site upgrades this weekend, specifically re-coding the bacon ipsum generator and API as a proper WordPress plugin so it can go on GitHub.  There may be some hiccups when we post the updated site, just an FYI.

Posted in Blog | Tagged | Leave a comment

jQuery Plugin

I whipped up a little Bacon Ipsum jQuery plugin that uses our API to generate some meaty goodness.  When you’re mocking up a design, now you can use this plugin in your HTML rather than static text.

You can reference the plugin from our server or download it and use it locally.
http://cdn.baconipsum.com/api/jquery-BaconIpsum.js

The easiest way to use it is just to call the method with no options.
$('#placeholder').BaconIpsum();

You can also pass in options.

$('#placeholder).BaconIpsum({ type:'all-meat', paras:5, start_with_lorem:false });
$('#placeholder).BaconIpsum({ type:'meat-and-filler', sentences:1, start_with_lorem:true });

  • type: either ‘all-meat’ or ‘meat-and-filler’
  • paras: number of paragraphs
  • sentences: number of sentences (this overrides paragraphs)
  • start_with_lorem: true or false to start the text with ‘Bacon ipsum dolor sit amet’
  • no_tags: true or false, pass true to not wrap the return value in <p> tags
  • set_value: sets the element value rather than appending

There’s a sample page on GitHub with some example code.

Posted in Blog | Tagged , , | 5 Comments

iBacon

@Scrobby has whipped up an iOS Bacon Ipsum app and it’s now available in the App Store (iPhone and iPad).

Looks pretty good!  I think I need to do some UI improvements to my Android app now.  Thanks Scrobby!

Posted in Blog | Tagged , | 1 Comment

Bacon Ipsum on Android

The Bacon Ipsum app is now available on the Android Market.  I’m not sure how useful it will be, but hey, there it is.  It doesn’t require an internet connection, so you can use it on a plane, on a train, in a box, with a fox, etc.

Where is the iOS version?

Posted in Blog | Tagged , , | Leave a comment

A well-designed bacondroid

Google recently published a new Android Design site and used a screenshot of Bacon Ipsum.  Check out the Contextual Action Bars section.

Who do I talk to about naming the next version of Android “Bacon, Lettuce & Tomato”?

Posted in Blog | Tagged , | 1 Comment

I don’t always test my code

I happy rolled out the API, did some basic testing and it all worked fine, but it was all from within the API’s own page.  Sure enough, external calls weren’t working.  I’ve done some tweaks to the PHP code and the sample code so it should all be working now.

Posted in Blog | Tagged , , | Leave a comment

Judiciously sprinkle over nachos

Ok, so JSON actually stands for JavaScript Object Notation, but who doesn’t like bacon on nachos?

Anyway, we’ve rolled out an API for bacon ipsum.  You pass in what you want generated, we return a JSON string array of paragraphs.  There’s some sample jQuery code too.

Give it a try and I hope to see various WordPress and jQuery plugins, browser extensions, etc. taking advantage of this in the future.

Posted in Blog | Tagged , | 10 Comments