A Grunt-Enabled Head-StartThe building blocks to quickly get started with Grunt to create an optimized website. Lint, minify and concatenate CSS and Javascript and provide simple lossless image compression throughout a project build.
GruntStart includes the H5BP, jQuery, Modernizr and Respond, with the right amount of abstraction to quickly integrate with the latest CSS frameworks like Bootstrap, CSS preprocessors like SASS or Javascript MVC solutions like Backbone.
Quick Start
- Clone or download GruntStart
- Run grunt watch from the command line within the project
- Build your project
- Keep tabs on the watch task output as custom CSS and Javascript files are saved
- When going to production make sure to use the custom Modernizr build, only testing for exactly what you need. See /js/vendor/
Take a closer look at index.html to
- optionally use the non-minified CSS and Javascript for development
- optionally use Modernizr without Respond.js
Learn More
Check out the documentation
Merrick Christensen's Grunt workflow article is highly recommended along with the Grunt documentation.
Paragraphs
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat
El illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.
Blockquote
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio Someone Important
Blockquote Small
lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio Someone Important
Inline Styles
Heading 1
- Strong
- Emphasis
- Inline Link
- Strike
- Inline Icons
- <h1>Sample Code</h1>
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Address
1234 South Creek Lane Calgary, Alberta, Canada T4B–1S6
Buttons w/Icons
Small
Medium
Large
Button Bar
col_12
col_1
col_11
col_2
col_10
col_3
col_9
col_4
col_8
col_5
col_7
col_6
col_6
col_7
col_5
col_8
col_4
col_9
col_3
col_10
col_2
col_11
col_1
col_12
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam.
PicturefillA Responsive Images approach that you can use today, that mimics the proposed picture element using divs, for safety sake.
- Author: Scott Jehl (c) 2012
- License: MIT/GPLv2
Demo URL: http://scottjehl.github.com/picturefill/
Note: Picturefill works best in browsers that support CSS3 media queries. It includes (externally) the matchMedia polyfill which makes matchMedia work in media-query-supporting browsers that don't have matchMedia, or at least allows media types to be tested in most any browser. matchMedia and the matchMedia polyfill are not required for picturefill to work, but they are required to support the media attributes on picture source elements.
Size and delivery
Currently, picturefill.js compresses to around 498bytes (~0.5kb), after minify and gzip. To minify, you might try these online tools: [Uglify]:(http://marijnhaverbeke.nl/uglifyjs), [Yahoo Compressor]:(http://refresh-sf.com/yui/), or Closure Compiler. Serve with gzip compression.
Markup pattern and explanation
Mark up your responsive images like this.
<div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> <div data-src="small.jpg"></div> <div data-src="medium.jpg" data-media="(min-width: 400px)"></div> <div data-src="large.jpg" data-media="(min-width: 800px)"></div> <div data-src="extralarge.jpg" data-media="(min-width: 1000px)"></div> <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. --> <noscript> <img src="external/imgs/small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> </noscript> </div>Each div[data-src] element’s data-media attribute accepts any and all CSS3 media queries—such as min or max width, or even min-device-pixel-ratio for HD (retina) displays.
Explained...
Notes on the markup above...
- The div[data-picture] element's alt attribute is used as alternate text for the generated img element.
- The div[data-picture] element can have any number of source elements. The above example may contain more than the average situation would call for.
- Each div[data-src] element must have a data-src attribute specifying the image path.
- It's generally a good idea to include one source element with no media qualifier, so it'll apply everywhere.
- Each data-src element can have an optional media attribute to make it apply in different media settings. Both media types and queries can be used, like any media attribute, but support for media queries depends on the browser (unsupporting browsers fail silently).
- The matchMedia polyfill (included in /external) is necessary to support the media attribute across browsers, even in browsers that support media queries, although it is becoming more widely supported in new browsers.
- The noscript element wraps the fallback image for non-JavaScript environments, and including this wrapper prevents browsers from fetching the fallback image during page load (causing unnecessary overhead). Generally, it's a good idea to reference a small image here, as it's likely to be loaded in older/underpowered mobile devices.
HD Media Queries
Picturefill natively supports HD(Retina) image replacement. While numerous other solutions exist, picturefill has the added benefit of performance for the user in only getting served one image.
- The data-media attribute supports compound media queries, allowing for very specific behaviors to emerge. For example, a data-media="(min-width: 400px) and (min-device-pixel-ratio: 2.0) attribute can be used to serve a higher resolution version of the source instead of a standard definition image. Note you currently also need to add the -webkit-min-device-pixel-ratio prefix (e.g. for iOS devices).
<div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> <div data-src="small.jpg"></div> <div data-src="small.jpg" data-media="(min-device-pixel-ratio: 2.0)"></div> <div data-src="medium.jpg" data-media="(min-width: 400px)"></div> <div data-src="medium_x2.jpg" data-media="(min-width: 400px) and (min-device-pixel-ratio: 2.0)"></div> <div data-src="large.jpg" data-media="(min-width: 800px)"></div> <div data-src="large_x2.jpg" data-media="(min-width: 800px) and (min-device-pixel-ratio: 2.0)"></div> <div data-src="extralarge.jpg" data-media="(min-width: 1000px)"></div> <div data-src="extralarge_x2.jpg" data-media="(min-width: 1000px) and (min-device-pixel-ratio: 2.0)"></div> <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. --> <noscript> <img src="external/imgs/small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> </noscript> </div>
- Note: Supporting this many breakpoints quickly adds size to the DOM and increases implementation and maintenance time, so use this technique sparingly.
Supporting IE Desktop
Internet Explorer 8 and older have no support for CSS3 Media Queries, so in the examples above, IE will receive the first data-src image reference (or the last one it finds that has no data-media attribute. If you'd like to serve a larger image to IE desktop browsers, you might consider using conditional comments, like this:
<div data-picture data-alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> <div data-src="small.jpg"></div> <div data-src="medium.jpg" data-media="(min-width: 400px)"></div> <!--[if (lt IE 9) & (!IEMobile)]> <div data-src="medium.jpg"></div> <![endif]--> <!-- Fallback content for non-JS browsers. Same img src as the initial, unqualified source element. --> <noscript> <img src="small.jpg" alt="A giant stone face at The Bayon temple in Angkor Thom, Cambodia"> </noscript> </div>Support
Picturefill supports a broad range of browsers and devices (there are currently no known unsupported browsers), provided that you stick with the markup conventions provided.
Check that your HTML code conforms to your coding standard
HTML_CodeSniffer is a client-side script that checks HTML source code and detects violations of a defined coding standard. HTML_CodeSniffer is written entirely in JavaScript, does not require any server-side processing and can be extended by developers to enforce custom coding standards by creating your own "sniffs".
To get you started, HTML_CodeSniffer comes with a set of 3 standards that enforce the Web Content Accessibility Guidelines (WCAG) 2.0. An auditor interface is provided by a bookmarklet to let you try out the WCAG 2.0 checks on any web page.
List of standards and sniff coverage
WCAG 2.0 Bookmarklet
Issues detected by the bookmarklet:HTML_CodeSnifferGet the WCAG 2.0 Bookmarklet
Drag this link to your bookmarks bar to installThis bookmarklet has been designed to work with Google Chrome, Firefox 10+, Safari 5+ and Internet Explorer 8+
Awesome tips & tricks to help restaurants increase the return on investment on their websites. If your local restaurant has flash, music playing or PDF menus, pass it on!
A native framework for developing gesture based web/desktop apps using JavaScript, HTML and CSS
PHP framework for developing sleek multi-user web apps and complex websites. LGPL.
Getting started Proto uses a combination of HTML and compiled SCSS to create your prototypes. If you're new to SCSS there's a quick guide for you to follow below. If you've worked with it before keep going. SCSS 101: The quick guide. At the top of the proto.scss file, you'll find the Proto variables. // Proto vars // Be sure to inlclude appropriate units i.e. 'px', '%', 'em' etc // (These comments will be stripped out during compile) // Base $blockBackground: #eee; $centerWidth: 70%; // Demo $DemoPass: #dff0d8; $DemoFail: #f0d8d8; // Media Query $desktopWidth: 1024px; $tabletWidth: 768px; $phoneWidth: 480px; Proto comes with these variables predefined, but feel free to change any of the values to match your own requirements. The 'block' class The single most important part of Proto is the .block class. It's the structural foundation of the toolkit, so using it correctly is important. Thankfully, this is pretty straightforward: <!-- It all starts with the '.block' class... --> <div class="block"> foo </div><!--/.block--> Any 'containing' element you create - header,section,article,footer,div etc - should have the .block class applied it. The 'center' class Apply this class to a block to center it within its parent. The value of the $centerWidth variable is the width applied to the .center class (70% by default). <!-- An example of the 'center' class... --> <div class="block center"> introduction </div><!--/.block center--> The 'grid' class Grids are a cinch. Add the .grid class to any element you'd like to act as a grid wrapper. <!-- An example of the 'grid' class... --> <div class="block grid"> <div class="block sixty"> main content </div><!--/.block sixty--> <div class="block forty"> sidebar </div><!--/.block forty--> </div><!--/.block grid--> main content sidebar Nesting grids Grids can be nested as far down as you'd like allowing the creation of intricate layouts. Only the outermost wrapping element need have the .grid class applied. <!-- An example of nested grids... --> <div class="block grid"> <div class="block sixty"> main content </div><!--/.block sixty--> <div class="block forty"> <div class="block fifty"> col 1 </div><!--/.block fifty--> <div class="block fifty"> col 2 </div><!--/.block fifty--> </div><!--/.block forty--> </div><!--/.block grid--> main content col 1 col 2 Hide or show? You can opt to either show an element within a given viewport range, or display it within all but a given viewport range. <!-- Element(s) will be shown within their respective viewport range only --> .desktop .tablet .phone <!-- Element(s) will be shown within all BUT their respective viewport range --> .not-desktop .not-tablet .not-phone <!-- Let's say you wanted an element to only show within the 'desktop' viewport range... --> <div class="block desktop"> foo </div><!--/.block desktop--> <!-- What about displaying an element on all BUT the 'desktop' viewport range... --> <div class="block not-desktop"> bar </div><!--/.block not-desktop--> The 'demo' class If you'd like to demonstrate the effect of the classes set out above without actually hiding any elements, append the class name with -demo. This changes the visual style of the element, rather than applying display:none; to it. <!-- The following will render a light green box if the viewport width is within the 'desktop' range. As soon as the width drops below this range, it will render as a light red box... --> <div class="block desktop-demo"> .desktop-demo </div><!--/.block desktop-demo--> <!-- The following will render a light green box if the viewport width is within all BUT the 'tablet' range. As soon as the viewport width is outside of (either above or below) this range, it will render as a light red box... --> <div class="block not-tablet-demo"> .not-tablet-demo </div><!--/.block not-tablet-demo--> The '-to-' class Imagine you have a 1x4 grid of elements within the desktop viewport range that but you'd like to become a 2x2 grid in the tablet range and a 4x1 in the phone range. Enter the -to- class. <!-- Using the above as an example, the following will change the width of each 'twentyfive' block to that of a 'fifty' block at the 'tablet' viewport width and to a 'hundred' width at the 'phone' viewport range. --> <div class="block grid"> <div class="block twentyfive tablet-to-fifty phone-to-hundred"> 1 </div><!--/.block twentyfive tablet-to-fifty phone-to-hundred--> <div class="block twentyfive tablet-to-fifty phone-to-hundred"> 2 </div><!--/.block twentyfive tablet-to-fifty phone-to-hundred--> <div class="block twentyfive tablet-to-fifty phone-to-hundred"> 3 </div><!--/.block twentyfive tablet-to-fifty phone-to-hundred--> <div class="block twentyfive tablet-to-fifty phone-to-hundred"> 4 </div><!--/.block twentyfive tablet-to-fifty phone-to-hundred--> </div><!--/.block grid--> <!-- The '-to-' class has a simple naming convention: .{viewport}-to-{new width} --> 1 2 3 4
NimbusBase lets you store application data on top of an user's Dropbox account.
Base width Fluid and fixed (724px, 940px, 1170px; below 767px are single column and vertically stacked) Fluid (max-width 1200px) Fluid (max-width 100%) 960px Columns 12 12 12 16 Single column class syntax .span1 .one.columns .one.column .one.column Two column class syntax .span2 .two.columns .two.columns .two.columns Container syntax <div class="container> or <div class="container-fluid"> <div class="container"> Not available <div class="container"> Row syntax <div class="row"> <div class="span4">...</div> <div class="span8">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="eight columns">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="eight columns">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="eight columns">...</div> </div> Nested column syntax <div class="row"> <div class="span6"> <div class="row"> <!-- nested columns add up to parent total --> <div class="span3">...</div> <div class="span3">...</div> </div> </div> </div> <div class="row"> <div class="six columns"> <div class="row"> <!-- nested columns add up to 12 --> <div class="six columns">...</div> <div class="six columns">...</div> </div> </div> </div> <div class="row"> <div class="six columns"> <div class="row"> <!-- nested columns add up to 12 --> <div class="six columns">...</div> <div class="six columns">...</div> </div> </div> </div> <div class="row"> <div class="six columns clearfix"> <!-- nested columns add up to parent total --> <div class="three columns alpha">...</div> <div class="three columns omega">...</div> </div> </div> Offset column syntax <div class="row"> <div class="span4">...</div> <div class="span4 offset4">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="four columns offset-by-four">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="four columns offset-by-four">...</div> </div> <div class="row"> <div class="four columns">...</div> <div class="four columns offset-by-four">...</div> </div> Centered syntax Not available <div class="row"> <div class="three columns centered">...</div> </div> <div class="row"> <div class="three columns centered">...</div> </div> Not available Ordering syntax Not available <div class="row display"> <div class="two columns push-ten">first in mobile/last in desktop</div> <div class="ten columns pull-two">first in desktop/last in mobile</div> </div> <div class="row"> <div class="two columns push-ten">first in mobile/last in desktop</div> <div class="ten columns pull-two">first in desktop/last in mobile</div> </div> Not available Four column mobile syntax Not available <div class="row display"> <div class="three phone-one columns">...</div> <div class="nine phone-three columns">...</div> </div> <div class="row display"> <div class="three mobile-one columns">...</div> <div class="nine mobile-three columns">...</div> </div> Not available Block grids syntax Not available <ul class="block-grid two-up"> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> </ul> <ul class="block-grid two-up"> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> <li>Two-up element</li> </ul> Not available Visibility class syntax Device based: .visible-desktop .visible-tablet .visible-phone .hidden-desktop .hidden-tablet .hidden-phone Device based: .show-on-desktops .show-on-tablets .show-on-phones .hide-on-desktops .hide-on-tablets .hide-on-phones Screen size based: .show-for-xlarge .show-for-large .show-for-large-up .show-for-medium .show-for-medium-down .show-for-small .hide-for-xlarge .hide-for-large .hide-for-large-up .hide-for-medium .hide-for-medium-down .hide-for-small Landscape based: .show-for-landscape .show-for-portrait Touch based: .show-for-touch .hide-for-touch Print based: .print-only .hide-on-print Not available Media queries syntax /* Landscape phones and down */ @media (max-width: 480px) { ... } /* Landscape phone to portrait tablet */ @media (max-width: 767px) { ... } /* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { ... } /* Large desktop */ @media (min-width: 1200px) { ... } /* Mobile wide */ @media handheld, only screen and (max-width: 1023px) { ... } /* Mobile narrow */ @media handheld, only screen and (max-width: 767px) { ... } /* Desktop wide */ @media only screen and (max-width: 1280px) and (min-width: 768px) { ... } /* Desktop narrow */ @media only screen and (max-width: 767px) { ... } /* Very large display targeting */ @media only screen and (min-width: 1441px) { ... } /* Medium display targeting */ @media only screen and (max-width: 1279px) and (min-width: 768px) { ... } /* Small display targeting */ @media only screen and (max-width: 767px) { ... } /* Small display targeting */ @media only screen and (max-width: 767px) { ... } /* Landscape orientation targeting */ @media screen and (orientation: landscape) { ... } /* Portrait orientation targeting */ @media screen and (orientation: portrait) { ... } /* Mobile styles */ @media only screen and (max-device-width: 1280px) { ... } @media only screen and (max-width: 1279px) and (min-width: 768px) { ... } /* Smaller than standard 960 (devices and browsers) */ @media only screen and (max-width: 959px) {} /* Tablet Portrait size to standard 960 (devices and browsers) */ @media only screen and (min-width: 768px) and (max-width: 959px) {} /* All Mobile Sizes (devices and browser) */ @media only screen and (max-width: 767px) { ... } /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ @media only screen and (min-width: 480px) and (max-width: 767px) { ... } /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ @media only screen and (max-width: 479px) { ... }
iconSweets is a free icon set containing 60 vector Photoshop shapes, influenced by sets such as Glyphish and Pictoico. You may use these icons for both commercial and non-commercial projects and customize them any way you like. Also check out iconSweets2
A cool visual drag-and-drop captcha jQuery plugin. Mobile-friendly.
BootMetroMetro style web framework
Simple and flexible HTML, CSS, and Javascript for web apps that wants to use the "Windows 8 MetroUI" style, without the need to run on Windows 8.
Download Now it's free Latest version: 0.5
Privacy Policy Agreement
This privacy policy describes the privacy practices for the site name (the "Site"), located at site address).
Links to other websites
The Site may contain links to other websites of interest. We cannot be responsible for the protection and privacy of any information which you provide while visiting such sites; such sites are not goverened by this privacy statement.
FakerFaker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.
Faker is heavily inspired by Perl's Data::Faker, and by ruby's Faker.
Faker requires PHP >= 5.3.3.
Basic Usage
Use Faker\Factory::create() to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want.
<?php // require the Faker autoloader require_once '/path/to/Faker/src/autoload.php'; // alternatively, use another PSR-0 compliant autoloader (like the Symfony2 ClassLoader for instance) // use the factory to create a Faker\Generator instance $faker = Faker\Factory::create(); // generate data by accessing properties echo $faker->name; // 'Lucy Cechtelar'; echo $faker->address; // "426 Jordy Lodge // Cartwrightshire, SC 88120-6700" echo $faker->text; // Sint velit eveniet. Rerum atque repellat voluptatem quia rerum. Numquam excepturi // beatae sint laudantium consequatur. Magni occaecati itaque sint et sit tempore. Nesciunt // amet quidem. Iusto deleniti cum autem ad quia aperiam. // A consectetur quos aliquam. In iste aliquid et aut similique suscipit. Consequatur qui // quaerat iste minus hic expedita. Consequuntur error magni et laboriosam. Aut aspernatur // voluptatem sit aliquam. Dolores voluptatum est. // Aut molestias et maxime. Fugit autem facilis quos vero. Eius quibusdam possimus est. // Ea quaerat et quisquam. Deleniti sunt quam. Adipisci consequatur id in occaecati. // Et sint et. Ut ducimus quod nemo ab voluptatum.Even if this example shows a property access, each call to $faker->name yields a different (random) result. This is because Faker uses __get() magic, and forwards Faker\Generator->$property calls to Faker\Generator->format($property).
<?php for ($i=0; $i < 10; $i++) { echo $faker->name, "\n"; } // Adaline Reichel // Dr. Santa Prosacco DVM // Noemy Vandervort V // Lexi O'Conner // Gracie Weber // Roscoe Johns // Emmett Lebsack // Keegan Thiel // Wellington Koelpin II // Ms. Karley Kiehn VFormatters
Each of the generator properties (like name, address, and lorem) are called "formatters". A faker generator has many of them, packaged in "providers". Here is a list of the bundled formatters in the default locale.
Faker\Provider\en_US\Person
prefix // 'Ms.' suffix // 'Jr.' name // 'Dr. Zane Stroman' firstName // 'Maynard' lastName // 'Zulauf'Faker\Provider\en_US\Address
cityPrefix // 'Lake' secondaryAddress // 'Suite 961' state // 'NewMexico' stateAbbr // 'OH' citySuffix // 'borough' streetSuffix // 'Keys' buildingNumber // '484' city // 'West Judge' streetName // 'Keegan Trail' streetAddress // '439 Karley Loaf Suite 897' postcode // '17916' address // '8888 Cummings Vista Apt. 101, Susanbury, NY 95473' country // 'Falkland Islands (Malvinas)' latitude // '77.147489' longitude // '86.211205'Faker\Provider\en_US\PhoneNumber
phoneNumber // '132-149-0269x3767'Faker\Provider\en_US\Company
catchPhrase // 'Monitored regional contingency' bs // 'e-enable robust architectures' company // 'Bogan-Treutel' companySuffix // 'and Sons'Faker\Provider\Lorem
word // 'aut' words($nb = 3) // array('porro', 'sed', 'magni') sentence($nbWords = 6) // 'Sit vitae voluptas sint non voluptates.' sentences($nb = 3) // array('Optio quos qui illo error.', 'Laborum vero a officia id corporis.', 'Saepe provident esse hic eligendi.') paragraph($nbSentences = 3) // 'Ut ab voluptas sed a nam. Sint autem inventore aut officia aut aut blanditiis. Ducimus eos odit amet et est ut eum.' paragraphs($nb = 3) // array('Quidem ut sunt et quidem est accusamus aut. Fuga est placeat rerum ut. Enim ex eveniet facere sunt.', 'Aut nam et eum architecto fugit repellendus illo. Qui ex esse veritatis.', 'Possimus omnis aut incidunt sunt. Asperiores incidunt iure sequi cum culpa rem. Rerum exercitationem est rem.') text($maxNbChars = 200) // 'Fuga totam reiciendis qui architecto fugiat nemo. Consequatur recusandae qui cupiditate eos quod.'Faker\Provider\Internet
email // 'tkshlerin@collins.com' safeEmail // 'king.alford@example.org' freeEmail // 'bradley72@gmail.com' companyEmail // 'russel.durward@mcdermott.org' freeEmailDomain // 'yahoo.com' userName // 'wade55' domainName // 'wolffdeckow.net' domainWord // 'feeney' tld // 'biz' url // 'http://www.strackeframi.com/' ipv4 // '109.133.32.252' ipv6 // '8e65:933d:22ee:a232:f1c1:2741:1f10:117c'Faker\Provider\DateTime
unixTime // 58781813 dateTime // DateTime('2008-04-25 08:37:17') dateTimeAD // DateTime('1800-04-29 20:38:49') iso8601 // '1978-12-09T10:10:29+0000' date($format = 'Y-m-d') // '1979-06-09' time($format = 'H:i:s') // '20:49:42' dateTimeBetween($startDate = '-30 years', $endDate = 'now') // DateTime('2003-03-15 02:00:49') dateTimeThisCentury // DateTime('1915-05-30 19:28:21') dateTimeThisDecade // DateTime('2007-05-29 22:30:48') dateTimeThisYear // DateTime('2011-02-27 20:52:14') dateTimeThisMonth // DateTime('2011-10-23 13:46:23') amPm // 'pm' dayOfMonth // '04' dayOfWeek // 'Friday' month // '06' monthName // 'January' year // '1993' century // 'VI' timezone // 'Europe/Paris'Faker\Provider\Miscellaneous
boolean($chanceOfGettingTrue = 50) // true md5 // 'de99a620c50f2990e87144735cd357e7' sha1 // 'f08e7f04ca1a413807ebc47551a40a20a0b4de5c' sha256 // '0061e4c60dac5c1d82db0135a42e00c89ae3a333e7c26485321f24348c7e98a5' locale // en_UK countryCode // UK languageCode // enFaker\Provider\Base
randomDigit // 7 randomNumber($nbDigits = NULL) // 79907610 randomLetter // 'b' randomElement($array = array ('a','b','c')) // 'b' numerify($string = '###') // '609' lexify($string = '????') // 'wgts' bothify($string = '## ??') // '42 jz'Faker\Provider\UserAgent
userAgent // 'Mozilla/5.0 (Windows CE) AppleWebKit/5350 (KHTML, like Gecko) Chrome/13.0.888.0 Safari/5350' chrome // 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_5) AppleWebKit/5312 (KHTML, like Gecko) Chrome/14.0.894.0 Safari/5312' firefox // 'Mozilla/5.0 (X11; Linuxi686; rv:7.0) Gecko/20101231 Firefox/3.6' safari // 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_1 rv:3.0; en-US) AppleWebKit/534.11.3 (KHTML, like Gecko) Version/4.0 Safari/534.11.3' opera // 'Opera/8.25 (Windows NT 5.1; en-US) Presto/2.9.188 Version/10.00' internetExplorer // 'Mozilla/5.0 (compatible; MSIE 7.0; Windows 98; Win 9x 4.90; Trident/3.0)'Localization
Faker\Factory can take a locale as an argument, to return localized data. If no localized provider is found, the factory fallbacks to the default locale (en_EN).
<?php $faker = Faker\Factory::create('fr_FR'); // create a French faker for ($i=0; $i < 10; $i++) { echo $faker->name, "\n"; } // Luce du Coulon // Auguste Dupont // Roger Le Voisin // Alexandre Lacroix // Jacques Humbert-Roy // Thérèse Guillet-Andre // Gilles Gros-Bodin // Amélie Pires // Marcel Laporte // Geneviève MarchalYou can check available Faker locales in the source code, under the Provider directory. The localization of Faker is an ongoing process, for which we need your help. Don't hesitate to create localized providers to your own locale and submit a PR!
Populating Entities Using an ORM or an ODM
Faker provides adapters for Object-Relational and Object-Document Mappers (currently, Propel, Doctrine2, and Mandango are supported). These adapters ease the population of databases through the Entity classes provided by an ORM library (or the population of document stores using Document classes provided by an ODM library).
To populate entities, create a new populator class (using a generator instance as parameter), then list the class and number of all the entities that must be generated. To launch the actual data population, call the execute() method.
Here is an example showing how to populate 5 Author and 10 Book objects:
<?php $generator = \Faker\Factory::create(); $populator = new Faker\ORM\Propel\Populator($generator); $populator->addEntity('Author', 5); $populator->addEntity('Book', 10); $insertedPKs = $populator->execute();The populator uses name and column type guessers to populate each column with relevant data. For instance, Faker populates a column named first_name using the firstName formatter, and a column with a TIMESTAMP type using the dateTime formatter. The resulting entities are therefore coherent. If Faker misinterprets a column name, you can still specify a custom clusure to be used for populating a particular column, using the third argument to addEntity():
<?php $populator->addEntity('Book', 5, array( 'ISBN' => function() use ($generator) { return $generator->randomNumber(13); } ));In this example, Faker will guess a formatter for all columns except ISBN, for which the given anonymous function will be used.
Tip: To ignore some columns, specify null for the column names in the third argument of addEntity(). This is usually necessary for columns added by a behavior:
<?php $populator->addEntity('Book', 5, array( 'CreatedAt' => null, 'UpdatedAt' => null, ));Of course, Faker does not populate autoincremented primary keys. In addition, Faker\ORM\Propel\Populator::execute() returns the list of inserted PKs, indexed by class:
<?php print_r($insertedPKs); // array( // 'Author' => (34, 35, 36, 37, 38), // 'Book' => (456, 457, 458, 459, 470, 471, 472, 473, 474, 475) // )In the previous example, the Book and Author models share a relationship. Since Author entities are populated first, Faker is smart enough to relate the populated Book entities to one of the populated Author entities.
Lastly, if you want to execute an arbitrary function on an entity before insertion, use the fourth argument of the addEntity() method:
<?php $populator->addEntity('Book', 5, array(), array( function($book) { $book->publish(); }, ));Seeding the Generator
You may want to get always the same generated data - for instance when using Faker for unit testing purposes. The generator offers a seed() method, which seeds the random number generator. Calling the same script twice with the same seed produces the same results.
<?php $faker = Faker\Factory::create(); $faker->seed(1234); echo $faker->name; // 'Jess Mraz I';Faker Internals: Understanding Providers
A Faker\Generator alone can't do much generation. It needs Faker\Provider objects to delegate the data generation to them. Faker\Factory::create() actually creates a Faker\Generator bundled with the default providers. Here is what happens under the hood:
<?php $faker = new Faker\Generator(); $faker->addProvider(new Faker\Provider\en_US\Name($faker)); $faker->addProvider(new Faker\Provider\en_US\Address($faker)); $faker->addProvider(new Faker\Provider\en_US\PhoneNumber($faker)); $faker->addProvider(new Faker\Provider\en_US\Company($faker)); $faker->addProvider(new Faker\Provider\Lorem($faker)); $faker->addProvider(new Faker\Provider\Internet($faker));Whenever you try to access a property on the $faker object, the generator looks for a method with the same name in all the providers attached to it. For instance, calling $faker->name triggers a call to Faker\Provider\Name::name(). And since Faker starts with the last provider, you can easily override existing formatters: just add a provider containing methods named after the formatters you want to override.
That means that you can esily add your own providers to a Faker\Generator instance. A provider is usually a class extending \Faker\Provider\Base. This parent class allows you to use methods like lexify() or randomNumber(); it also gives you access to formatters of other providers, through the protected $generator property. The new formatters are the public methods of the provider class.
Here is an example provider for populating Book data:
<?php namespace Faker\Provider; class Book extends \Faker\Provider\Base { public function title($nbWords = 5) { $sentence = $this->generator->sentence($nbWords); return substr($sentence, 0, strlen($sentence) - 1); } public function ISBN() { return $this->generator->randomNumber(13); } }To register this provider, just add a new instance of \Faker\Provider\Book to an existing generator:
<?php $faker->addProvider(new \Faker\Provider\Book($faker));Now you can use the two new formatters like any other Faker formatter:
<?php $book = new Book(); $book->setTitle($faker->title); $book->setISBN($faker->ISBN); $book->setSummary($faker->text); $book->setPrice($faker->randomNumber(2));Tip: A provider can also be a Plain Old PHP Object. In that case, all the public methods of the provider become available to the generator.
Real Life Usage
The following script generates a valid XML document:
<?php require_once '/path/to/Faker/src/autoload.php'; $faker = Faker\Factory::create(); ?> <?xml version="1.0" encoding="UTF-8"?> <contacts> <?php for ($i=0; $i < 10; $i++): ?> <contact firstName="<?php echo $faker->firstName ?>" lastName="<?php echo $faker->lastName ?>" email="<?php echo $faker->email ?>"/> <phone number="<?php echo $faker->phoneNumber ?>"/> <?php if ($faker->boolean(25)): ?> <birth date="<?php echo $faker->dateTimeThisCentury->format('Y-m-d') ?>" place="<?php echo $faker->city ?>"/> <?php endif; ?> <address> <street><?php echo $faker->streetAddress ?></street> <city><?php echo $faker->city ?></city> <postcode><?php echo $faker->postcode ?></postcode> <state><?php echo $faker->state ?></state> </address> <company name="<?php echo $faker->company ?>" catchPhrase="<?php echo $faker->catchPhrase ?>"> <?php if ($faker->boolean(33)): ?> <offer><?php echo $faker->bs ?></offer> <?php endif; ?> <?php if ($faker->boolean(33)): ?> <director name="<?php echo $faker->name ?>" /> <?php endif; ?> </company> <?php if ($faker->boolean(15)): ?> <details> <![CDATA[ <?php echo $faker->text(400) ?> ]]> </details> <?php endif; ?> </contact> <?php endfor; ?> </contacts>Running this script produces a document looking like:
<?xml version="1.0" encoding="UTF-8"?> <contacts> <contact firstName="Ona" lastName="Bednar" email="schamberger.frank@wuckert.com"/> <phone number="1-265-479-1196x714"/> <address> <street>182 Harrison Cove</street> <city>North Lloyd</city> <postcode>45577</postcode> <state>Alabama</state> </address> <company name="Veum, Funk and Shanahan" catchPhrase="Function-based stable solution"> <offer>orchestrate compelling web-readiness</offer> </company> <details> <![CDATA[ Alias accusantium voluptatum autem nobis cumque neque modi. Voluptatem error molestiae consequatur alias. Illum commodi molestiae aut repellat id. Et sit consequuntur aut et ullam asperiores. Cupiditate culpa voluptatem et mollitia dolor. Nisi praesentium qui ut. ]]> </details> </contact> <contact firstName="Aurelie" lastName="Paucek" email="alfonzo55@durgan.com"/> <phone number="863.712.1363x9425"/> <address> <street>90111 Hegmann Inlet</street> <city>South Geovanymouth</city> <postcode>69961-9311</postcode> <state>Colorado</state> </address> <company name="Krajcik-Grimes" catchPhrase="Switchable cohesive instructionset"> </company> </contact> <contact firstName="Clifton" lastName="Kshlerin" email="kianna.wiegand@framiwyman.info"/> <phone number="692-194-4746"/> <address> <street>9791 Nona Corner</street> <city>Harberhaven</city> <postcode>74062-8191</postcode> <state>RhodeIsland</state> </address> <company name="Rosenbaum-Aufderhar" catchPhrase="Realigned asynchronous encryption"> </company> </contact> <contact firstName="Alexandre" lastName="Orn" email="thelma37@erdmancorwin.biz"/> <phone number="189.655.8677x027"/> <address> <street>11161 Schultz Via</street> <city>Feilstad</city> <postcode>98019</postcode> <state>NewJersey</state> </address> <company name="O'Hara-Prosacco" catchPhrase="Re-engineered solution-oriented algorithm"> <director name="Dr. Berenice Auer V" /> </company> <details> <![CDATA[ Ut itaque et quaerat doloremque eum praesentium. Rerum in saepe dolorem. Explicabo qui consequuntur commodi minima rem. Harum temporibus rerum dolores. Non molestiae id dolorem placeat. Aut asperiores nihil eius repellendus. Vero nihil corporis voluptatem explicabo commodi. Occaecati omnis blanditiis beatae quod aspernatur eos. ]]> </details> </contact> <contact firstName="Katelynn" lastName="Kohler" email="reinger.trudie@stiedemannjakubowski.com"/> <phone number="(665)713-1657"/> <address> <street>6106 Nader Village Suite 753</street> <city>McLaughlinstad</city> <postcode>43189-8621</postcode> <state>Missouri</state> </address> <company name="Herman-Tremblay" catchPhrase="Object-based explicit service-desk"> <offer>expedite viral synergies</offer> <director name="Arden Deckow" /> </company> </contact> <contact firstName="Blanca" lastName="Stark" email="tad27@feest.net"/> <phone number="168.719.4692x87177"/> <address> <street>7546 Kuvalis Plaza</street> <city>South Wilfrid</city> <postcode>77069</postcode> <state>Georgia</state> </address> <company name="Upton, Braun and Rowe" catchPhrase="Visionary leadingedge pricingstructure"> </company> </contact> <contact firstName="Rene" lastName="Spencer" email="anibal28@armstrong.info"/> <phone number="715.222.0095x175"/> <birth date="2008-08-07" place="Zulaufborough"/> <address> <street>478 Daisha Landing Apt. 510</street> <city>West Lizethhaven</city> <postcode>30566-5362</postcode> <state>WestVirginia</state> </address> <company name="Wiza Inc" catchPhrase="Persevering reciprocal approach"> <offer>orchestrate dynamic networks</offer> <director name="Erwin Nienow" /> </company> <details> <![CDATA[ Dolorem consequatur voluptates unde optio unde. Accusantium dolorem est est architecto impedit. Corrupti et provident quo. Reprehenderit dolores aut quidem suscipit repudiandae corporis error. Molestiae enim aperiam illo. Et similique qui non expedita quia dolorum. Ex rem incidunt ea accusantium temporibus minus non. ]]> </details> </contact> <contact firstName="Alessandro" lastName="Hagenes" email="tbreitenberg@oharagorczany.com"/> <phone number="1-284-958-6768"/> <address> <street>1251 Koelpin Mission</street> <city>North Revastad</city> <postcode>81620</postcode> <state>Maryland</state> </address> <company name="Stiedemann-Bruen" catchPhrase="Re-engineered 24/7 success"> </company> </contact> <contact firstName="Novella" lastName="Rutherford" email="claud65@bogisich.biz"/> <phone number="(091)825-7971"/> <address> <street>6396 Langworth Hills Apt. 446</street> <city>New Carlos</city> <postcode>89399-0268</postcode> <state>Wyoming</state> </address> <company name="Stroman-Legros" catchPhrase="Expanded 4thgeneration moratorium"> <director name="Earlene Bayer" /> </company> </contact> <contact firstName="Andreane" lastName="Mann" email="meggie17@ornbaumbach.com"/> <phone number="941-659-9982x5689"/> <birth date="1934-02-21" place="Stantonborough"/> <address> <street>2246 Kreiger Station Apt. 291</street> <city>Kaydenmouth</city> <postcode>11397-1072</postcode> <state>Wyoming</state> </address> <company name="Lebsack, Bernhard and Kiehn" catchPhrase="Persevering actuating framework"> <offer>grow sticky portals</offer> </company> <details> <![CDATA[ Quia dolor ut quia error libero. Enim facilis iusto earum et minus rerum assumenda. Quia doloribus et reprehenderit ut. Occaecati voluptatum dolor voluptatem vitae qui velit quia. Fugiat non in itaque sunt nobis totam. Sed nesciunt est deleniti cumque alias. Repudiandae quo aut numquam modi dicta libero. ]]> </details> </contact> </contacts>Language specific formatters
Faker\Provider\fr_FR\Company
<?php // Generates a random SIREN number echo $faker->siren; // 082 250 104 // Generates a random SIRET number echo $faker->siret; // 347 355 708 00224 // Generates a random SIRET number (controlling the number of sequential digits) echo $faker->siret(3); // 438 472 611 01513Faker\Provider\fr_FR\Address
<?php // Generates a random department name echo $faker->departmentName; // "Haut-Rhin" // Generates a random department number echo $faker->departmentNumber; // "2B" // Generates a random department info (department number => department name) $faker->department; // array('18' => 'Cher'); // Generates a random region echo $faker->region; // "Saint-Pierre-et-Miquelon"License
Faker is released under the MIT Licence. See the bundled LICENSE file for details.
Export
At the end of the day, Terrific Composer delivers you highly modularized and standardized HTML, JS and CSS. So the built frontend can be integrated easily in your CMS or Framework of choice.
Yeoman: Modern Workflows for Modern Webapps Yeoman is a robust and opinionated set of tools, libraries, and a workflow that can help developers quickly build beautiful, compelling web apps. Can I help you get started? Step 1: Install me Open up a terminal and enter in the following: $ curl -L get.yeoman.io | bash This will check your system to see what's already installed. You'll need a few things to use Yeoman effectively like NodeJS, Compass, Grunt, and PhantomJS. This script will suggest how to handle installing these dependencies. More descriptive yeoman install instructions are available as well. Note: Yeoman requires Node 0.8.x currently. Step 2: Create a new project Next, enter in `yeoman init` in the directory you would like to scaffold your application in. $ yeoman init Step 3: Profit We'll then ask you some questions to help scaffold your project out. Simple!There's more!
Psst..would you like to learn how to scaffold out Backbone, Ember or Chrome Apps? Read our Command Line docs for more info.
My features
- Lightning-fast scaffolding — Easily scaffold new projects with customizable templates (e.g HTML5 Boilerplate, Twitter Bootstrap), AMD (via RequireJS) and more.
- Automatically compile CoffeeScript & Compass — Our LiveReload watch process automatically compiles source files and refreshes your browser whenever a change is made so you don't have to.
- Automatically lint your scripts — All your scripts are automatically run against jshint to ensure they're following language best-practices.
- Built-in preview server — No more having to fire up your own HTTP Server. My built-in one can be fired with just one command.
- Awesome Image Optimization — I optimize all your images using OptiPNG and JPEGTran so your users can spend less time downloading assets and more time using your app.
- AppCache manifest generation — I generate your application cache manifests for you. Just build a project and boom. You'll get it for free.
- Killer build process — Not only do you get minification and concatenation; I also optimize all your image files, HTML, compile your CoffeeScript and Compass files, generate you an application cache manifest and, if you're using AMD, we'll pass those modules through r.js so you don't have to.
- Integrated package management — Need a dependency? It's just a keystroke away. I allow you to easily search for new packages via the command-line (e.g., yeoman search jquery), install them and keep them updated without needing to open your browser.
- Support for ES6 module syntax — Experiment with writing modules using the latest ECMAScript 6 module syntax. This is an experimental feature that transpiles back to ES5 so you can use the code in all modern browsers.
- PhantomJS Unit Testing — Easily run your unit tests in headless WebKit via PhantomJS. When you create a new application, I also include some test scaffolding for your app.
About
Yeoman is a project developed by Paul Irish, Addy Osmani, Sindre Sorhus, Mickael Daniel, Eric Bidelman, and the Yeoman Community.
It's built upon many projects including Ben Alman's awesome work on Grunt and Mickael's work on the HTML5 Boilerplate Node Build Script.
Dillinger ========= Dillinger is a cloud-enabled HTML5 Markdown editor. - Type some Markdown text in the left window - See the HTML in the right - Magic Markdown is a lightweight markup language based on the formatting conventions that people naturally use in email.
How does it work? Just put your image size after our URL and you'll get a placeholder. You can also use it in your code, like this: Have fun! Custom Text &text=Hello+World Custom text can be entered using a query string at the very end of the url.
Useful HTML5 Frameworks, Template Generators and Tools
Web designing needs consideration of a few facts before starting with a particular project. Clients will never allow you to take ample time to end up the project and you have to be efficient enough to run parallel with your clients. Uses of technical applications can ease the task which again takes in account the right choice of the designing medium. Using designing template is thus important to deliver a project at the stipulated time. HTML5 frameworks help to cut short the CSS step along with increasing the visibility of the site.
Let me discuss in brief why it is inevitable to use frameworks while working with HTML5. It is true that learning the uses of HTML5 frameworks is a matter of time, still once you are able to grab it properly, it is just adding the content and making a few changes with the sire is what you will be left with. There is nothing to suspect you creative spirit when you are using a ready made framework. Instead enjoy using framework to avoid cross-platform and cross-browser issues.
Few of the HTML5 frameworks, template generators and tools provide option to include the template in your preferable place including JavaScript, server configurations, Google analytics and also jQuery. Others are useful enough to increase the HTML5 grasp, add more functionalities and helps in improving the quality of your site, in less time. Apart from theses uses, some of the ready made frameworks provide additional option to mention the author’s name. If you want your site to be more visible, including apple touch and favicon, frameworks template generators are the way to go. The end product you will get from the uses of this framework
The sites that incorporate HTML5 and CSS3 should be grateful to these magical framework. There are certain unavoidable facts regarding generator templates that you find it a must install to take the site into next level. Don’t think much about the version of the visitor’s browser and let them get the relevant information they are looking for. It becomes possible only when you opt for frameworks template generators and tools. Apart from theses a few tools are really needed to reform images which are tiresome. Lightweight reform tools are now available to built site from scratches.
HTML5 Frameworks, Template Generators and Tools
Initializr
Modernizr
52framework
HTML5 Boilerplate
HTML5 Front End Development Framework
reformed Form Builder
Sencha
LungoJS – Mobile Framework
Popcorn.js – The HTML5 Media Framework
The Joshfire Framework
Jo HTML5 Mobile App Framework
Generate a HTML5 Framework with SwitchToHTML5
HTML5 Template Generator
sprite.js
LimeJS
Editor's Note: Best premium web design resources. Big collection of Web UI Kits and Icons. Professional and pixel perfect User Interface packs for Designers and Web Developers. Get Your Design Elements Now!We believe we are an exceptional team that works hard to do things the right way. We help designers and developers to find the good inspiration before create their works. If you would like to be kept up to date with our posts, you can follow us on Twitter, Facebook, Google+, or even by subscribing to our RSS Feed.
SproutCore is an open-source framework for building blazingly fast, innovative user experiences on the web. New Tutorial to Help You Get Up and Running! You've heard all about SproutCore and now it's time to see for yourself. It's easier than ever to get started with our new tutorial.
About Initializr Initializr is here to kick-start the development of your new projects. It generates templates based on HTML5 Boilerplate by allowing you to choose which parts you want or don't want from it. A responsive template has also been added to start from a basic design instead of a blank page.