Browse Source

updates getting started docs

pull/258/head
jlukic 11 years ago
parent
commit
05c76a6d31
8 changed files with 174 additions and 54 deletions
  1. 173
      node/src/documents/introduction/definitions.html.eco
  2. 2
      node/src/documents/introduction/getting-started.html.eco
  3. 2
      node/src/documents/introduction/types.html.eco
  4. 36
      node/src/documents/introduction/variations.html.eco
  5. 0
      node/src/documents/views/item.html.eco
  6. 10
      node/src/files/stylesheets/semantic.css
  7. 3
      src/collections/table.less
  8. 2
      src/modules/checkbox.less

173
node/src/documents/introduction/definitions.html.eco

@ -1,6 +1,6 @@
---
layout : 'default'
css : 'types'
css : 'guide'
status : 'draft'
title : 'Definitions'
@ -30,24 +30,137 @@ type : 'UI Introduction'
<p>Semantic has five different ui definitions. These are useful patterns for describing re-usable parts of a website.</p>
<table class="ui celled table segment">
<tr>
<td class="two wide"><b>Element</b></td>
<td> a basic building block of a website, exists alone or in homogenous groups</td>
<td class="four wide"><b>UI Element</b></td>
<td>A basic building block of a website, exists alone or in homogenous groups</td>
</tr>
<tr>
<td><b>Collection</b></td>
<td>a heterogeneous group of several elements which can usually be found together. often pairs with individual elements</td>
<td><b>UI Collection</b></td>
<td>A heterogeneous group of several elements which can usually be found together.</td>
</tr>
<tr>
<td><b>View</b></td>
<td> a way to present common website content like comments, activity feeds</td>
<td><b>UI View</b></td>
<td>A way to present common website content like comments, activity feeds</td>
</tr>
<tr>
<td><b>Module</b></td>
<td> an element that also includes behavior as part of its definition</td>
<td><b>UI Module</b></td>
<td>An element where its behavior is an essential part of its definition</td>
</tr>
<tr>
<td><b>Behavior</b></td>
<td> a set of behaviors not specfically tied to a design</td>
<td><b>UI Behavior</b></td>
<td>A set of free-standing actions not specfically tied to an element</td>
</tr>
</table>
<h3 class="ui dividing header">Definition Sections</h2>
<p>All UI components of a single type are defined similarly.</p>
<table class="ui celled definition table segment">
<tr>
<td class="three wide">All UI</td>
<td>
<div class="ui divided relaxed list">
<div class="item">
<div class="header">Types</div>
<div class="description">Defines mutually exclusive types which each may have their own html</div>
</div>
<div class="item">
<div class="header">States</div>
<div class="description">Defines element states like disabled, hovered, pressed down</div>
</div>
<div class="item">
<div class="header">Variations</div>
<div class="description">Defines changes to an element which are not mutually exclusive and can be used together</div>
</div>
</div>
</td>
</tr>
<tr>
<td>Elements</td>
<td>
<div class="ui divided relaxed list">
<div class="item">
<div class="header">Group</div>
<div class="description">An element can define how attributes can be shared across a group</div>
</div>
<div class="item">
<div class="header">
View an example <a href="/elements/button.html">UI Button</a>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>Collections</td>
<td>
<div class="ui divided relaxed list">
<div class="item">
<div class="header">Content</div>
<div class="description">Content elements which can exist inside of the UI collection</div>
</div>
<div class="item">
<div class="header">States</div>
<div class="description">A collection may define states for content elements or itself</div>
</div>
<div class="item">
<div class="header">Variations</div>
<div class="description">A collection may define variations for content elements or itself</div>
</div>
<div class="item">
<div class="header">
View an example <a href="/collections/form.html">UI Form</a>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>Views</td>
<td>
<div class="ui divided relaxed list">
<div class="item">
<div class="header">Content</div>
<div class="description">Content elements which can exist inside of the UI view</div>
</div>
<div class="item">
<div class="header">States</div>
<div class="description">A view may define states for content elements or itself</div>
</div>
<div class="item">
<div class="header">Variations</div>
<div class="description">A view may define variations for a content elements or itself</div>
</div>
<div class="item">
<div class="header">
View an example <a href="/views/item.html">UI Item</a>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td>Modules & Behaviors</td>
<td>
<div class="ui divided relaxed list">
<div class="item">
<div class="header">Behavior</div>
<div class="description">A set of behaviors which can be invoked programatically</div>
</div>
<div class="item">
<div class="header">Settings</div>
<div class="description">A settings object which can alter the default behavior when instantiating a module</div>
</div>
<div class="item">
<div class="header">Examples</div>
<div class="description">A list of examples to showcase the variations in behavior of a module</div>
</div>
<div class="item">
<div class="header">
View an example <a href="/modules/dropdown.html">UI Dropdown</a>
</div>
</div>
</div>
</td>
</tr>
</tr>
</table>
@ -137,14 +250,6 @@ type : 'UI Introduction'
<li>Product List</li>
</ul>
<h2 class="ui dividing header">Authoring UI</h2>
<p><b>All UI</b>: The specification defines class name and html structures which can be used to represent an element
</p>
<p><b>Elements</b>: An element definition gives states which an elements can occupy, common types of that element, and if necessary, defines how the element functions in groups.</p>
<p><b>Collections</b>: Collection definitions list elements that it can include, and variations which can apply to both the collection, or individual elements found in the collection.</p>
<p><b>Modules</b>: Module definitions include a list of behaviors that are commonly associated with an element</p>
<p><b>Views</b>: View specifications defines the types of content the view usually display, and the heirarchy typical to presenting this content to the user.</p>
<!-- <a class="ui large right labeled teal icon button">
Authoring Guide
@ -152,36 +257,6 @@ type : 'UI Introduction'
</a>
-->
<h3 class="ui header">Context sensitive</h3>
<p>In Semantic, variations maintain context based on the element they modify, but keep the same vocabulary between elements. Just like how in English, the adjective 'big' may describe a different scale for a big planet versus a big insect.</p>
<p>For example, a form you can have a variation called "inverted". This changes the appearance of form elements to work on dark backgrounds.</p>
<div class="code" data-type="html" data-label="true">
<div class="ui inverted form">
<div class="field">
<label>Name</label>
<input type="text">
</div>
</div>
</div>
<p>The same variation can also be useful in the context of a menu although the implementation may be different.</p>
<div class="code" data-type="html" data-label="true">
<div class="ui inverted menu">
<div class="item">Section 1</div>
<div class="ui simple dropdown item">
Dropdown
<div class="menu">
<div class="item">Dropdown item 1</div>
<div class="item">Dropdown item 2</div>
</div>
</div>
</div>
</div>
<div class="ui divider"></div>
<a class="ui large right labeled teal icon button" href="/introduction/types.html">
Next: Element Types

2
node/src/documents/introduction/getting-started.html.eco

@ -29,7 +29,7 @@ $(document)
<p>UI definitions in Semantic are given the class name <code>ui</code>. This is to help tell the difference between ui elements and parts of the definition of an element. For example a menu may have menu items inside of it. These items are contained as part of the menu definition but do not receive the class name <code>ui</code>.</p>
<p>Class names in semantic always use single english words. If a class name is an adjective it is either a <a href="/introduction/types.html">type</a> of element or <a href="/introduction/variation.html">variation</a> of an element. <b>CSS definitions always define adjectives in the context of a noun</b>. In this way class names cannot pollute the namespace.</p>
<p>Class names in semantic always use single english words. If a class name is an adjective it is either a <a href="/introduction/types.html">type</a> of element or <a href="/introduction/variations.html">variation</a> of an element. <b>CSS definitions always define adjectives in the context of a noun</b>. In this way class names cannot pollute the namespace.</p>
<div class="code" data-type="html" data-label="true" data-preview="true">
<div class="ui compact menu">

2
node/src/documents/introduction/types.html.eco

@ -1,6 +1,6 @@
---
layout : 'default'
css : 'types'
css : 'guide'
title : 'Types'
description : 'A type is an mutually exclusive change to an element'

36
node/src/documents/introduction/variations.html.eco

@ -1,6 +1,6 @@
---
layout : 'default'
css : 'types'
css : 'guide'
title : 'Variations'
description : 'Variations are stackable, symbiotic changes to an elements appearance'
@ -47,7 +47,8 @@ type : 'UI Introduction'
<h3 class="ui header">Stacking Variations</h3>
<p>Another variation of a menu is an <b>inverted menu</b>. This alters the color contrast to appear inverted for darker backgrounds. Some variations may also mutate when used together. Lets try adding the class name <code>red</code> as well. Because variations are not mutually exclusive we can use these together to create a compact, inverted, red tiered menu</p>
<p>Another variation of a menu is an <b>inverted menu</b>. This alters the color contrast to appear inverted for darker backgrounds. Some variations may also mutate when used together. Lets try adding the class name <code>red</code> as well.</p>
<p>Variations are not mutually exclusive so we can use these together to create an <code>inverted red tiered menu</code></p>
<div class="code" data-type="html" data-label="true">
<div class="ui red inverted tiered menu">
@ -99,6 +100,37 @@ type : 'UI Introduction'
</div>
<h3 class="ui header">Context sensitive</h3>
<p>In Semantic, variations maintain context based on the element they modify, but keep the same vocabulary between elements. Just like how in English, the adjective 'big' may describe a different scale for a big planet versus a big insect.</p>
<p>For example, a form you can have a variation called "inverted". This changes the appearance of form elements to work on dark backgrounds.</p>
<div class="code" data-type="html" data-label="true">
<div class="ui inverted form">
<div class="field">
<label>Name</label>
<input type="text">
</div>
</div>
</div>
<p>The same variation can also be useful in the context of a menu although the implementation may be different.</p>
<div class="code" data-type="html" data-label="true">
<div class="ui inverted menu">
<div class="item">Section 1</div>
<div class="ui simple dropdown item">
Dropdown
<div class="menu">
<div class="item">Dropdown item 1</div>
<div class="item">Dropdown item 2</div>
</div>
</div>
</div>
</div>
<div class="ui divider"></div>
<a class="ui large right labeled teal icon button" href="/element.html">
Next: View Elements

node/src/documents/views/items.html.eco → node/src/documents/views/item.html.eco

10
node/src/files/stylesheets/semantic.css

@ -200,6 +200,16 @@ a:hover {
margin-left: 2em;
}
/*--------------
Intro
---------------*/
body.guide .main h3 {
margin: 3rem 0em 0.5rem;
}
body.guide .main.container > * {
max-width: 800px;
}
/*--------------

3
src/collections/table.less

@ -486,6 +486,9 @@
.ui.basic.table td {
padding: 0.8em 0.5em;
}
.ui.basic.table tbody tr:nth-child(2n) {
background-color: transparent !important;
}
/*--------------

2
src/modules/checkbox.less

@ -43,7 +43,7 @@
position: relative;
min-width: 1em;
height: 1em;
height: 1.5em;
padding-left: 2em;
outline: none;

Loading…
Cancel
Save