Skip to content

Commit

Permalink
update readme, sample and composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mistergraphx committed Oct 29, 2018
1 parent 7814d19 commit 3e3db11
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
23 changes: 17 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -75,27 +76,35 @@ 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();
```

`<img class="fixie" width="300" height="200" title="sports"/>`

**Piscsum**

https://picsum.photos/

```javascript
fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/?${text}').init();
```
fixie.setImagePlaceholder('https://picsum.photos/${w}/${h}/${text}').init();
```
`<img class="fixie" width="300" height="200" title="[ramdom|image=0|blur|gravity=east]"/>`


### Add class fixie to containers

Fixie will act on all child elements, but will never
overwrite content within an element.

Consider the following example:
```

```xml
<div class="fixie">
<p>Hello <a></a></p>
</div>
Expand All @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
}
3 changes: 0 additions & 3 deletions fixie.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -27,7 +25,6 @@ var fixie = (function () {
return retnode;
};
}

/*
* Spec
* Here are some functions you might find useful
Expand Down
2 changes: 1 addition & 1 deletion sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h2 class="fixie"></h2>
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();
</script>
</body>
</html>

0 comments on commit 3e3db11

Please sign in to comment.