NOTICE
Please note, development has stalled on the .NET version of Pattern Lab. The current version contains all of the core functionality from v0.7.12 of the PHP version.
Call for contributors
Anyone interested in becoming a contributor please contact @benedfit
About the .NET version of Pattern Lab
The .NET version of Pattern Lab differs some what from PHP version. At it's core, it combines the Mustache-based patterns and the JavaScript-based viewer, with a ASP.NET MVC powered dynamic site and "builder" that transforms and dynamically builds the Pattern Lab site. By making it a static site generator, Pattern Lab strongly separates patterns, data, and presentation from build logic.
Demo
You can play with a demo of the front-end of Pattern Lab at demo.patternlab.io.
Getting Started
Quick start via NuGet Package Manager Console:
Latest stable release: 0.7.12.7
PM> Install-Package PatternLab
- Requirements
- Installing the .NET Version of Pattern Lab
- Running the .NET version for the First Time
- Editing the Source Files of the .NET version
- Using The Static Output Generator
Working with Patterns
Patterns are the core element of Pattern Lab. Understanding how they work is the key to getting the most out of the system. Patterns use Mustache so please read Mustache's docs as well.
- How Patterns Are Organized
- Adding New Patterns
- Reorganizing Patterns
- Including One Pattern Within Another via Partials
- Managing Assets for a Pattern: JavaScript, images, CSS, etc.
- Modifying the Pattern Header and Footer
- Using Pseudo-Patterns
- Using Pattern Parameters
- Using Pattern State
- Using styleModifiers
- "Hiding" Patterns in the Navigation
- Adding Annotations
- Viewing Patterns on a Mobile Device
Creating & Working With Dynamic Data for a Pattern
The .NET version of Pattern Lab utilizes Mustache as the template language for patterns. In addition to allowing for the inclusion of one pattern within another it also gives pattern developers the ability to include variables. This means that attributes like image sources can be centralized in one file for easy modification across one or more patterns. The .NET version of Pattern Lab uses a JSON file, _data/data.json
, to centralize many of these attributes.
- Introduction to JSON & Mustache Variables
- Overriding the Central
data.json
Values with Pattern-specific Values - Linking to Patterns with Pattern Lab's Default
link
Variable - Creating Lists with Pattern Lab's Default
listItems
Variable