Browse Source

updating structure of docs

Former-commit-id: 788bb124fd7d9d9adffb7217840f4eefe04f2e0c
Former-commit-id: 8aa891207fd634671c7b2767adf2dd6ebcee5363
beta
Jack Lukic 12 years ago
parent
commit
ed4f872ffc
  1. 141
      node/src/documents/collection.html
  2. 2
      node/src/documents/element.html
  3. 170
      node/src/documents/index.html
  4. 2
      node/src/documents/module.html
  5. 10
      node/src/files/components/semantic/src/collections/items.css
  6. 35
      node/src/files/stylesheets/semantic.css
  7. 9
      node/src/layouts/default.html.eco
  8. 10
      src/collections/items.css

141
node/src/documents/collection.html

@ -3,7 +3,7 @@ layout : 'default'
css : 'index'
title : 'UI Collections'
type : 'Library'
type : 'Semantic'
---
<div class="segment">
@ -13,87 +13,86 @@ type : 'Library'
</div>
</div>
<div class="main container">
<div class="column">
<h2>Types of Collections</h2>
<div class="ui horizontal type items">
<div class="item">
<div class="image">
<div class="ui fluid form">
<div class="field">
<label>Name</label>
<input class="ui input" placeholder="Name">
</div>
<div class="field">
<label>E-mail</label>
<input class="ui input" placeholder="E-mail">
</div>
<h2>Types of Collections</h2>
<div class="ui horizontal type items">
<div class="item">
<div class="image">
<div class="ui fluid form">
<div class="field">
<label>Name</label>
<input class="ui input" placeholder="Name">
</div>
</div>
<div class="content">
<a href="/collections/form.html" class="name">Form</a>
<p>A form is used to solicit a user response</p>
</div>
</div>
<div class="item">
<div class="image">
<div class="ui three column aligned responsive grid">
<div class="column"><div class="ui segment">1</div></div>
<div class="column"><div class="ui segment">2</div></div>
<div class="column"><div class="ui segment">3</div></div>
<div class="field">
<label>E-mail</label>
<input class="ui input" placeholder="E-mail">
</div>
</div>
<div class="content">
<a href="/collections/grid.html" class="name">Grid</a>
<p>A grid helps harmonize negative space in a layout</p>
</div>
</div>
<div class="item">
<div class="image">
<div class="ui inverted compact menu">
<div class="item">Friends</div>
<div class="item">Messages</div>
</div>
</div>
<div class="content">
<a href="/collections/menu.html" class="name">Menu</a>
<p>A menu organizes related links</p>
</div>
<div class="content">
<a href="/collections/form.html" class="name">Form</a>
<p>A form is used to solicit a user response</p>
</div>
<div class="item">
<div class="image">
<table class="ui table">
<thead>
<th>Name</th>
<th>Status</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td class="positive"><i class="icon check"></i> Approved</td>
</tr>
</tbody>
</table>
</div>
<div class="content">
<a href="/collections/table.html" class="name">Table</a>
<p>A table collects related data into rows of content</p>
</div>
<div class="item">
<div class="image">
<div class="ui three column aligned responsive grid">
<div class="column"><div class="ui segment">1</div></div>
<div class="column"><div class="ui segment">2</div></div>
<div class="column"><div class="ui segment">3</div></div>
</div>
</div>
<div class="item">
<div class="image">
<div class="ui warning message">
<div class="header">Alert</div>
<p>You forgot your name!</p>
</div>
<div class="content">
<a href="/collections/grid.html" class="name">Grid</a>
<p>A grid helps harmonize negative space in a layout</p>
</div>
</div>
<div class="item">
<div class="image">
<div class="ui inverted menu">
<a class="item">Friends</a>
<a class="item">Messages</a>
<a class="item">Profile</a>
</div>
<div class="content">
<a href="collections/block.html" class="name">Message</a>
<p>Messages alert a user to something important.</p>
</div>
<div class="content">
<a href="/collections/menu.html" class="name">Menu</a>
<p>A menu organizes related links</p>
</div>
</div>
<div class="item">
<div class="image">
<table class="ui table">
<thead>
<th>Name</th>
<th>Status</th>
</thead>
<tbody>
<tr>
<td>John</td>
<td class="positive"><i class="icon check"></i> Approved</td>
</tr>
</tbody>
</table>
</div>
<div class="content">
<a href="/collections/table.html" class="name">Table</a>
<p>A table collects related data into rows of content</p>
</div>
</div>
<div class="item">
<div class="image">
<div class="ui warning message">
<div class="header">Alert</div>
<p>You forgot your name!</p>
</div>
</div>
<div class="content">
<a href="collections/block.html" class="name">Message</a>
<p>Messages alert a user to something important.</p>
</div>
</div>
</div>
</div>

2
node/src/documents/element.html

@ -3,7 +3,7 @@ layout : 'default'
css : 'index'
title : 'UI Elements'
type : 'Library'
type : 'Semantic'
---
<div class="segment">

170
node/src/documents/index.html

@ -1,171 +1,25 @@
---
layout : 'default'
css : 'index'
title : 'About'
type : 'Library'
title : 'Introduction'
type : 'Semantic'
---
<div class="segment">
<div class="masthead segment">
<div class="container">
<h1>Semantic</h1>
<p>UI is the DNA of the web. Semantic empowers designers and developers by creating a shared vocabulary for UI.</p>
</div>
</div>
<div class="main container">
<h2>UI is the language of the web.</h2>
<p>Semantic empowers designers and developers by creating a shared vocabulary for UI.</p>
<div class="peek">
<div class="ui vertical pointing menu">
<a class="active item">What is Semantic?</a>
<a class="item">The UI Spec</a>
<a class="item">The Module Spec</a>
<a class="item">The Semantic Library</a>
<div class="ui large buttons">
<a href="#" class="ui button"><i class="icon cloud"></i> Download</a>
<a href="#" class="ui button"><i class="icon terminal"></i> Customize</a>
</div>
</div>
<h2>What is Semantic?</h2>
<p>Most developers create similar types of interface elements in their codebase, things like navigation menus, buttons, and forms, but each programmer may have different ways of structuring and classifying these elements.</p>
<p>The semantic specification is a set of standards designed to help developers share a common language for defining interface elements. The semantic library is a first draft at a UI library implementing these standards.</p>
<p>With a community developed standard for interface elements, anyone can share a style definition of a UI element, without having to restructure their websites' codebase to match.</p>
<p>Developing a standard for defining UI modules like chat rooms, pop-ups, and modals, along with a consensus on
<a name="standard"></a>
<h2>The UI Specification</h2>
<p>The semantic specification creates a standard language for describing user interface elements.</p>
<table class="ui table">
<tr>
<td>UI Elements</td>
<td>UI Only</td>
<td>menus, columns, grids, tables, buttons, forms</td>
</tr>
<tr>
<td>UI Modules</td>
<td>UI + Behavior</td>
<td>popups, modals, chat rooms</td>
</tr>
<tr>
<td>Behavioral Modules</td>
<td>Behavior Only</td>
<td>form validation, state management, polyfills, history</td>
</tr>
</table>
<h3>Exchanging Designs</h3>
<p>Semantic defines HTML structures and class names for UI elements that attempt to create a common vernacular to make front end development <a href="http://instruct.westvalley.edu/lafave/DFW_present_tense.html">less prescriptive</a>.</p>
<p>Sharing language for UI releases the burden from developers at making arbitrary decisions, like naming conventions, in their own projects, and opens up the ability to swap website designs without having to restructure your codebase.</p>
<h3>What's in an Element?</h3>
<p>UI elements definitions are made of 4 parts:
<table class="ui table">
<tr>
<td>A prototype form of an element</td>
<td>A bunny has two long ears and is furry</td>
<tr>
<td>A definition of the relationship between a plural and singular instance of an element</td>
<td>Three white bunnies are each white</td>
</tr>
<tr>
<td>A definition of possible variations of the element</td>
<td> A bunny can be large or small and can be spotted or fuzzy</td>
</tr>
<tr>
<td>A list of states which the element can exist</td>
<td> A bunny can either be hopping, eating or sitting still</td>
</tr>
</table>
<p>UI elements can be thought of as nouns, and variations as adjectives. Variations are written so to only describe the innate features of that variation, and must account for the differences when declared along-side other variations.</p>
<p>For example, in English, a large planet has a different meaning than a large chair, and would require different specific contextual definitions, but both are the same variant "largeness" to the person using the word.</p>
<p>Variations can be used together without negating each other unless used in a paradoxical way (A large small bunny).</p>
<h3>Plurality</h3>
<p>UI elements are given a plural definition. Groups of elements can share properties, in the same way "There are two tall men" provides a shortcut to saying "there is a tall man, and another tall man".</p>
<p>Some plural relationships are not all instances of the same thing, and can be thought of as <b>ui collections</b>. For example a form is a collection of related UI elements, but not all items of the same type. Semantic allows for these grouping to be defined as well, so that groups of related elements can be defined together.</p>
<h3>Just Show Me the Code</h3>
<p>If you'd like to shortcut any more explanation, check out the standard definition for a UI button for a live example.</p>
<a class="blue ui button" href="button.html">UI Button Spec</a>
<h2>The Module Specification</h2>
<p>In Semantic, modules are user interface elements which require a behavioral definition. For example, a pop-up is understood by the actual action that occurs, it "pops up". Without this logic any pop-up is incomplete.</p>
<p>Semantic UI modules have two components, a definition of the UI element and a behavioral definition in javascript. Semantic includes a standard javascript module pattern, which helps in defining interface elements in a similar context to UI.</p>
<p>The goal of the module design pattern is primarily to accomplish three things:</p>
<ol>
<li>Make debugging modules simpler by making techniques like performance profiling, and logging easier and more useful.</li>
<li>Make understanding new code easier, by defining a common pattern for initializing, destroying elements, modifying settings, and allowing more advanced features.</li>
<li>Reduce prescriptive aspects of</li>
</ol>
<h3>Why use Semantic Modules?</h3>
<ol>
<li><b>Puts accessibility first</b>.
<p>Although Coffeescript is beautiful, and Angular is smart, Semantic has a different agenda: to be easy to use, and opinionless. Semantic can be thought of more as the <a href="http://en.wikipedia.org/wiki/Aaron_Copland">Aaron Copland</a> of programming libraries. It only requires an understanding of jQuery and Javascript to begin writing code. If you're stuck there are also <a href="#">plenty of examples</a> to help you get started.</p>
</li>
<li><b>Is self documenting.</b>
<p>Instead of reading through inline comments to determine what a developer is intending, semantic allows developers to pass meaningful debug data where its most useful: the javascript console. This allows you to see the sequence of events that occur in a module , along with useful debug information, like the value of significant variables. If you're in the source code, debug statements also read similarly to code comments which provide context. <a href="#">Show me</a>
</p>
</li>
<li><b>Separates arbitrary decisions from the fundamental mechanics of your module.</b>
<p>Ever scroll through an unfimiliar library looking for the line of code where they define the ID tag for an expected html structure? Semantic keeps you from ever having to do that again. Developer decisions like metadata, classnames, selectors, and messages are separated from the less arbitrary parts of code. <a href="#">Show me</a></p>
</li>
<li><b>Lets you access anything, and change everything.</b>
<p>Methods defined as part of module definitions are all invokable. Semantic also maps from dot notation to their appropriate locations inside the module, allowing developers not to only make flat modules. Settings can be changed at initialization, or after. Module defaults can be changed whenever. <a href="#">Show me</a></p>
</li>
<li><b>Plays nice with other libraries</b>.
<p>Modules include a destroy method which will remove any bound events or initialized code. Modules also use namespaced events so you can have more flexibility over defining and clearing them
</p>
</li>
<li><b>Patterns for every need</b>.
<p>Semantic has patterns that work well both as a widget factory, and as a single entity.</p>
</li>
</ol>
<h3>You really like to talk. Lets see some code</h3>
<p>For a complete definition of the specification check to annotated source:</p>
<div class="ui blue buttons">
<a class="ui button">Single Instance</a>
<a class="ui button" href="generated/multiple.html">Many Instances</a>
</div>
<a name="library"></a>
<h2>The Libraries</h2>
<p>To semantic library is a set of UI elements and javascript modules that provides an example implementation of the Semantic standard. The purpose is to be useful in their own right for developers, but also to provide a guide for how the standard can be used.</p>
<h3>The UI Library</h3>
<ul class="features">
<li><a href="button.html">Buttons</a></li>
<li><a>Text</a></li>
<li><a>Headers</a></li>
<li><a>Columns</a></li>
<li><a>Elements (Grid System)</a></li>
<li><a>Tags</a></li>
<li><a>Items (Lists of Content)</a></li>
<li><a>Panels (Type of Menu)</a></li>
<li><a>Forms</a></li>
<li><a>Fields</a></li>
<li><a>Checkboxes</a></li>
<li><a>Icons</a></li>
<li><a>Dividers</a></li>
</ul>
<h3>The module library</h3>
<p>Javascript modules.</p>
<ul class="features">
<li>Accordion</li>
<li>API</li>
<li>Animation</li>
<li>Chat Room</li>
<li>Form Validation</li>
<li>Placeholder Text</li>
<li>Modal</li>
<li>Nag</li>
<li>Popup</li>
<li>Search</li>
<li>Star Rating</li>
<li>Shape</li>
<li>State</li>
<li>Tabs</li>
</ul>
</div>
<div class="main container">
</div>
</body>

2
node/src/documents/module.html

@ -3,7 +3,7 @@ layout : 'default'
css : 'index'
title : 'UI Modules'
type : 'Library'
type : 'Semantic'
---
<div class="segment">

10
node/src/files/components/semantic/src/collections/items.css

@ -229,8 +229,8 @@
box-sizing: border-box;
}
.ui.items > .item > .image a,
.ui.items > .item > .image img {
.ui.items > .item > .image > a,
.ui.items > .item > .image > img {
position: relative;
display: block;
width: 100%;
@ -239,7 +239,7 @@
-moz-border-radius: 3px;
border-radius: 3px;
}
.ui.items > .item > .image a:after {
.ui.items > .item > .image > a:after {
position: absolute;
display: block;
content: '';
@ -254,7 +254,7 @@
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2) inset;
}
.ui.items > .item > .image .overlay {
.ui.items > .item > .image > .overlay {
position: absolute;
bottom: 0px;
left: 0px;
@ -273,7 +273,7 @@
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6);
}
.ui.items > .item > .image .overlay i {
.ui.items > .item > .image > .overlay i {
font-size: 1.3em;
font-weight: bold;
}

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

@ -165,7 +165,7 @@ ul.list li {
h1 {
margin: 0px 0px 20px;
padding: 50px 0px 5px;
border-bottom: 1px solid #DDDDDD;
border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
h1 {
margin: 0px auto;
@ -295,6 +295,37 @@ box-shadow: 3px 0px 2px rgba(0, 0, 0, 0.2); */
font-weight: bold;
}
/*--------------
Masthead
---------------*/
#example .masthead {
background-color: #EF4D6D;
padding: 75px 0px 50px;
color: #FFFFFF;
}
#example .masthead h1 {
font-size: 4em;
line-height: 1.2;
padding-bottom: 0px;
}
#example .masthead strike {
color: rgba(255, 255, 255, 0.5);
}
#example .masthead h2 {
font-weight: normal;
margin: 0.5em 0em 1em;
font-size: 1.5em;
border-bottom: none;
line-height: 1;
}
#example .masthead p {
font-size: 1.25em;
margin: 1.5em 0em 1em;
padding: 0px;
}
/*--------------
Transparent
---------------*/
@ -561,7 +592,7 @@ box-shadow: 3px 0px 2px rgba(0, 0, 0, 0.2); */
#example .highlighted.example .grid,
#example .ui.type.items .image .grid {
background-color: #FCFCFC;
background-color: #F6F6F6;
}
#example .highlighted.example .grid .row,
#example .ui.type.items .image .grid .row {

9
node/src/layouts/default.html.eco

@ -3,6 +3,7 @@
<% uiElements = @getCollection("documents").findAllLive({type: $in: ['UI Element']},[{title: 1}]).toJSON() %>
<% uiCollections = @getCollection("documents").findAllLive({type: $in: ['UI Collection']},[{title: 1}]).toJSON() %>
<% uiModules = @getCollection("documents").findAllLive({type: $in: ['UI Module']},[{title: 1}]).toJSON() %>
<% uiSpecification = @getCollection("documents").findAllLive({type: $in: ['UI Specification']},[{title: 1}]).toJSON() %>
<% currentCollection = @getCollection("documents").findAllLive({type: $in: [@document.type]},[{title: 1}]).toJSON() %>
<% pageCount = @pageCount(currentCollection) %>
<% pageNumber = @getPage(currentCollection, @document.id) %>
@ -90,6 +91,14 @@
<% end %>
</div>
</div>
<div class="item">
<a href="/specification.html"><b>Specification</b></a>
<div class="menu">
<% for element in uiSpecification: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
<% end %>
</div>
</div>
</div>
<div class="ui fixed transparent inverted main menu">

10
src/collections/items.css

@ -229,8 +229,8 @@
box-sizing: border-box;
}
.ui.items > .item > .image a,
.ui.items > .item > .image img {
.ui.items > .item > .image > a,
.ui.items > .item > .image > img {
position: relative;
display: block;
width: 100%;
@ -239,7 +239,7 @@
-moz-border-radius: 3px;
border-radius: 3px;
}
.ui.items > .item > .image a:after {
.ui.items > .item > .image > a:after {
position: absolute;
display: block;
content: '';
@ -254,7 +254,7 @@
-moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2) inset;
}
.ui.items > .item > .image .overlay {
.ui.items > .item > .image > .overlay {
position: absolute;
bottom: 0px;
left: 0px;
@ -273,7 +273,7 @@
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6);
}
.ui.items > .item > .image .overlay i {
.ui.items > .item > .image > .overlay i {
font-size: 1.3em;
font-weight: bold;
}

Loading…
Cancel
Save