diff --git a/Readme.md b/Readme.md index 7a4f881..217dfa9 100755 --- a/Readme.md +++ b/Readme.md @@ -4,6 +4,8 @@ Fixie is an open source tool that that automatically adds filler content to HTML To learn more, check out the sample.html. +*This repository is a fork of https://github.com/ryhan/fixie, adding some features likes personal dictionary for filler contents, improved ignore rules, and updated documentation.* + ### Why use Fixie? When designing and developing websites, it's often useful to add lorem ipsum text to see what your page will look like without worrying about your final content. @@ -62,10 +64,9 @@ Fixie inserts the right type of content based on the tag name. Here are some maj ### Change the default dictionary -``` +```javascript var words= ["Je", "france", "sport", "aurait mieux fait", "super", "voir", "plus", "Mister-graphX"]; fixie.setWordLibrary(words).init(); - ``` ### Change the default image placeholder service @@ -75,19 +76,26 @@ fixie.setWordLibrary(words).init(); Use `fixie.setImagePlaceholder(source)`. + +**Lorempixel** + Example http://www.lorempixel.com call -``` +```javascript fixie.setImagePlaceholder('http://www.lorempixel.com/${w}/${h}/${text}').init(); ``` `` +**Piscsum** + https://picsum.photos/ +```javascript +fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/?${text}').init(); ``` -fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/${text}').init(); -``` +`` + ### Add class fixie to containers @@ -95,7 +103,8 @@ Fixie will act on all child elements, but will never overwrite content within an element. Consider the following example: -``` + +```xml

Hello

@@ -107,6 +116,7 @@ automatically add content to the link. [fixie-rails](https://github.com/csexton/fixie-rails) + ### Flagging filler content When you start adding real copy to your page, try adding the following CSS to your stylesheet: @@ -115,6 +125,7 @@ When you start adding real copy to your page, try adding the following CSS to yo This CSS will highlight all of your dummy content, making it easier to make sure you didn't miss anything. + ## License The MIT License diff --git a/composer.json b/composer.json index 33640e7..6751cd3 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { "name": "mistergraphx/fixie", - "description": "Automatically add filler content to HTML documents based on semantic tags.", - "require": {} + "description": "Forked from https://github.com/ryhan/fixie, Automatically add filler content to HTML documents based on semantic tags.", + "license": "MIT" } diff --git a/fixie.js b/fixie.js index 253cd85..f755745 100755 --- a/fixie.js +++ b/fixie.js @@ -13,8 +13,6 @@ var fixie = (function () { var fixie_wordlibrary = ["8-bit", "ethical", "reprehenderit", "delectus", "non", "latte", "fixie", "mollit", "authentic", "1982", "moon", "helvetica", "dreamcatcher", "esse", "vinyl", "nulla", "Carles", "bushwick", "bronson", "clothesline", "fin", "frado", "jug", "kale", "organic", "local", "fresh", "tassel", "liberal", "art", "the", "of", "bennie", "chowder", "daisy", "gluten", "hog", "capitalism", "is", "vegan", "ut", "farm-to-table", "etsy", "incididunt", "sunt", "twee", "yr", "before", "gentrify", "whatever", "wes", "Anderson", "chillwave", "dubstep", "sriracha", "voluptate", "pour-over", "esse", "trust-fund", "Pinterest", "Instagram", "DSLR", "vintage", "dumpster", "totally", "selvage", "gluten-free", "brooklyn", "placeat", "delectus", "sint", "magna", "brony", "pony", "party", "beer", "shot", "narwhal", "salvia", "letterpress", "art", "party", "street-art", "seitan", "anime", "wayfarers", "non-ethical", "viral", "iphone", "anim", "polaroid", "gastropub", "city", "classy", "original", "brew"]; var imagePlaceHolder = "https://placehold.it/${w}x${h}&text=${text}"; - - if (typeof document.getElementsByClassName !== "function") { document.getElementsByClassName = function (cl) { var retnode = []; @@ -27,7 +25,6 @@ var fixie = (function () { return retnode; }; } - /* * Spec * Here are some functions you might find useful diff --git a/sample.html b/sample.html index f75f44a..e9b9659 100755 --- a/sample.html +++ b/sample.html @@ -47,7 +47,7 @@

var words= ["Je", "france", "sport", "aurait mieux fait", "super", "voir", "plus", "Mister-graphX"]; fixie.setWordLibrary(words).init(); // Changes default image source to Picsum - // fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/${text}').init(); + // fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/${text}').init();