• Stars
    star
    831
  • Rank 54,863 (Top 2 %)
  • Language
    JavaScript
  • Created over 12 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automatically add filler content to HTML documents based on semantic tags.

Fixie.js

Fixie is an open source tool that that automatically adds filler content to HTML documents. It's very simple, and we welcome contributions.

To learn more, check out fixiejs.com

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.

Unfortunately, adding lots of filler content involves lots of copy-pasting and manual editing, and also makes your HTML unwieldy.

Fixie.js makes filler content succinct, making it faster and easier to test out your designs.

Instructions

Step 1 - Add fixie.js

Add <script type="text/javascript" src="fixie.js"></script> to the bottom of your html document, right before your closing </body> tag.

Step 2 - Add the fixie class.

Wherever you need filler content, set class="fixie".

For example, if you wanted one filler paragraph, you could use <p class="fixie"></p>

Step 2 - Alternatively use fixie.init

Select where you want filler content using CSS selectors.

Call

fixie.init([".array", "#of > .selectors", ".that", ".should", "#be > .populated", ".with", ".lorem"]) 

or

fixie.init(".string, #of > .comma, .separated, .selectors, .that, .should, #be > .populated, .with, .lorem")

in the JavaScript console or within a <script> tag.

You can call Fixie on all empty elements on a page by calling:

fixie.init(':empty')

Supported Elements

Fixie inserts the right type of content based on the tag name. Here are some major types you should be aware of:

  • <h1 class="fixie"></h1> - Adds a few words of text. Same goes for h2 - h6
  • <p class="fixie"></p> - Adds a paragraph of text.
  • <article class="fixie"></article> - Adds several paragraphs of text.
  • <section class="fixie"></section> - Adds several paragraphs of text.
  • <img class="fixie"></img> - Adds an image which displays the width and height of the image.
  • <a class="fixie"></a> - Adds a randomly named link.

Tips

Change the default image placeholder service

Use fixie.setImagePlaceholder(source).

For example, to pull images from Flickr using http://flickholdr.com/, call

fixie.setImagePlaceholder('http://flickholdr.com/${w}/${h}/canon').init();

Add class fixie to containers

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

Consider the following example:

<div class="fixie">
<p>Hello <a></a></p>
</div>

Fixie will preserve the "Hello" text, but will automatically add content to the link.

Fixie for Rails

fixie-rails

Flagging filler content

When you start adding real copy to your page, try adding the following CSS to your stylesheet:

.fixie{ border:4px solid red; }

This CSS will highlight all of your dummy content, making it easier to make sure you didn't miss anything.

License

The MIT License

Copyright (c) 2012 Ryhan Hassan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

guides.js

When designing and developing for the web, it's sometimes difficult to follow baselines and precisely align content. Instead of guessing, use guides.js overlay a grid over you HTML while you're working so that you can visually check that everything is aligned perfectly.
CoffeeScript
73
star
2

event-parse

Realtime clientside parsing of natural language into events with titles, locations, and times. Makes it easy to enable applications to understand phrases such as "Pick up milk at Kroger on Friday afternoon"
CoffeeScript
31
star
3

NLP-project

11411 Natural Language Processing Final Project. Reads wikipedia articles, and then can both answer natural-language questions about the article as well as generate comprehension questions. Built using ARKref Noun Phrase Coreference developed by Brendan O'Connor and Michael Heilman, and NLTK (a common natural language toolkit for Python).
Java
22
star
4

answer.js

Better in-page search using natural queries, implemented client-side with a Porter-stemmer, part of speech tagger and naive tokenizer. Reads current/specified page content and identifies passages that contain answers to user queries.
JavaScript
16
star
5

drive-projector

Manage remote displays from a Google Drive spreadsheet.
JavaScript
11
star
6

automator

Machine Learning using Dropbox Datastores
JavaScript
10
star
7

Pomodoro

Productivity pomodoro timer
JavaScript
8
star
8

CameraKit

A nice utility for accessing the user's native webcam through javascript
CoffeeScript
8
star
9

Framer-Prototypes

Playing around with Framer.js. These are prototypes, not polished bits of code.
JavaScript
7
star
10

githubTimeline

Timeline of a user's github repos
JavaScript
4
star
11

pinboard

Perfectly fit a group of photos in your browser.
CoffeeScript
4
star
12

directed-conversation

Prototype, attempting to improve voice recognition by using webcam
JavaScript
4
star
13

polaroid

A polaroid photobooth for hipster parties. Use a Mac as your camera, and your iPhone as the shutter.
JavaScript
3
star
14

eye

JS eyeball that uses your webcam to follow you around.
JavaScript
3
star
15

FBFeed

JavaScript
2
star
16

FlowButton

Embedable Add to Flow button
JavaScript
2
star
17

JS-Form-Validator

JSFV is an open-source JavaScript library for making form validation process easier.
JavaScript
2
star
18

cmujs

A JavaScript library for CMU data
CoffeeScript
2
star
19

glove

Accelerometer glove prototyped with node.js and a mobile device. By streaming accelerometer data from a glove with a bundled iPod over websockets, we can easily experiment with tilt based interfaces.
JavaScript
2
star
20

queue-manager

Simple Queue manager I made for chapter/senate meetings
1
star
21

rthprog.github.com

JavaScript
1
star
22

Santorum

Ayatollah or Santorum
JavaScript
1
star
23

Calculator

Angular.js + CSS3 Calculator Demo
JavaScript
1
star
24

Gyroscope-Ball

Tilt your iOS device to control a ball
JavaScript
1
star
25

Recipe-Recommendations

Recipe recommendations
CoffeeScript
1
star
26

TinySquare

Second attempt at iOS dev - a foursquare clone
Objective-C
1
star
27

htmlDemos

1
star
28

Calendar

Demo of a CSS Calendar
JavaScript
1
star
29

vincent.js

The most useful library ever. I promise.
JavaScript
1
star
30

Zephyr_Analysis

Identifies interesting features in data for Zephyr (PACE)
Python
1
star
31

noteinterface

A contenteditable div for Latex and Markdown headers. Makes outlining things easier.
JavaScript
1
star
32

BrandyJS

Clientside Domain + Twitter Handle Search Tool
JavaScript
1
star