Browse Source

Updates docs to include new tab layout, adds sortable tables

pull/2229/head
jlukic 11 years ago
parent
commit
52f1a87114
22 changed files with 647 additions and 498 deletions
  1. 2
      server/documents/collection.html.eco
  2. 10
      server/documents/collections/table.html.eco
  3. 2
      server/documents/introduction/definitions.html.eco
  4. 170
      server/documents/module.html.eco
  5. 709
      server/documents/modules/accordion.html.eco
  6. 6
      server/documents/modules/checkbox.html.eco
  7. 8
      server/documents/modules/dropdown.html.eco
  8. 6
      server/documents/modules/form.html.eco
  9. 8
      server/documents/modules/modal.html.eco
  10. 115
      server/documents/modules/popup.html.eco
  11. 8
      server/documents/modules/rating.html.eco
  12. 6
      server/documents/modules/shape.html.eco
  13. 4
      server/documents/modules/sidebar.html.eco
  14. 4
      server/documents/modules/transition.html.eco
  15. 8
      server/draft/chat.html
  16. 4
      server/draft/tab.html.eco
  17. 2
      server/files/javascript/popup.js
  18. 6
      server/files/javascript/semantic.js
  19. 8
      server/files/javascript/table.js
  20. 19
      server/files/stylesheets/semantic.css
  21. 3
      server/layouts/default.html.eco
  22. 37
      server/partials/header.html.eco

2
server/documents/collection.html.eco

@ -107,7 +107,7 @@ type : 'Semantic'
<div class="item">
<div class="image">
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<tr><th>Name</th>
<th>Status</th>

10
server/documents/collections/table.html.eco

@ -6,7 +6,6 @@ title : 'Table'
description : 'Tables display collections of data grouped into rows'
type : 'UI Collection'
---
<script src="/javascript/library/tablesort.js"></script>
<script src="/javascript/table.js"></script>
<%- @partial('header') %>
@ -25,7 +24,14 @@ type : 'UI Collection'
<div class="example">
<h4 class="ui header">Table</h4>
<p>A standard table</p>
<div class="ui ignored info message">
<div class="ui ignored positive icon message">
<i class="mobile icon"></i>
<div class="content">
<h3 class="header">Responsive Element</h3>
<p>Tables are designed to be responsive. Table cells will stack when a mobile viewport size is reached.</p>
</div>
</div>
<div class="ui ignored message">
<p>This example uses a <a href="/elements/segment.html">segment</a> to add padding and a background color.</p>
</div>
<table class="ui sortable table segment">

2
server/documents/introduction/definitions.html.eco

@ -49,7 +49,7 @@ type : 'UI Introduction'
<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">
<table class="ui celled sortable definition table segment">
<tr>
<td class="three wide">All UI</td>
<td>

170
server/documents/module.html.eco

@ -13,19 +13,133 @@ type : 'Semantic'
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="active item">Settings</a>
<a class="active item">Design Pattern</a>
<a class="item">Behaviors</a>
<a class="item">Settings</a>
</div>
</div>
<h2 class="ui dividing header">Design Pattern</h2>
<p>All official javascript modules in Semantic are designed using a singular design pattern. This pattern allows several useful features common to all javascript components</p>
<a class="ui secondary labeled icon button" href="/spec/docs/module.commented.html">
<i class="book icon"></i>
View Commented Example
</a>
<div class="ui relaxed list">
<div class="item">
<i class="check icon"></i>
<div class="content">
<div class="header">Run-time Performance Analysis</div>
<p>Semantic modules all provide the ability to log performance traces to the console, allowing you to see which aspects of the module are more or less performant and to track total init time <code>onDomReady</code></p>
</div>
</div>
<div class="item">
<i class="check icon"></i>
<div class="content">
<div class="header">Human Readable Traces</div>
<p>Unlike other component libraries which hides explanations of behavior in inline comments which can only be read by combing the source, semantic modules provide run-time debug output to the javascript console telling you what each component is doing as it is doing it.</p>
</div>
</div>
<div class="item">
<i class="check icon"></i>
<div class="content">
<div class="header">Settings can be overwritten after initialization</div>
<p>Semantic provides methods to set default settings, set settings at initialization, and set settings after initialization, allowing complete flexibility over component behaviors.</p>
</div>
</div>
<div class="item">
<i class="check icon"></i>
<div class="content">
<div class="header">All modules include an initialize and destroy method</div>
<p>All events and metadata are namespaced and can be removed after initialization, modules automatically handle destroy/init events to allow users to lazy-initialize a plugin multiple times with no issues.</p>
</div>
</div>
<div class="item">
<i class="check icon"></i>
<div class="content">
<div class="header">Instance available in metadata</div>
<p>Modules store their instance in metadata meaning that, in a pinch, you can directly modify the instance of a UI element by modifying its properties.</p>
</div>
</div>
</div>
<h2 class="ui dividing header">Behaviors</h2>
<p>Behaviors are an elements API. These can be invoke functionality or return aspects of the current state for an element</p>
<h3 class="ui header">Triggering a Behavior</h3>
<p>Behaviors are triggered in Semantic using a familiar syntax. API behaviors can be called using spaced words, camelcase or dot notation. The preferred method however is <b>spaced words</b>. Method lookup is done internally.</p>
<div class="code" data-title="Using Behaviors Programatically">
// generically
$('.ui.element')
.module('method', valueOne, valueTwo)
;
// Sets a popup to top left position with an offset of negative five
$('.ui.popup')
.popup('set position', 'top left', -5)
;
</div>
<h3 class="ui header">Common Behaviors</h3>
<p>All modules have a set of core behaviors which allow you to configure the component</p>
<table class="ui celled definition sortable table segment">
<thead>
<th>Name</th>
<th>Usage</th>
</thead>
<tbody>
<tr>
<td>initialize</td>
<td>Initializes an element, adding page event handlers and init data</td>
</tr>
<tr>
<td>destroy</td>
<td>Removes all changes to the page made by initialization</td>
</tr>
<tr>
<td>refresh</td>
<td>Refreshes cached values for a component</td>
</tr>
<tr>
<td>setting(setting, value)</td>
<td>Allows you to modify or read a component setting</td>
</tr>
<tr>
<td>invoke(query, passedArguments, instance)</td>
<td>Internal method used for translating sentence case method into an internal method</td>
</tr>
<tr>
<td>log(comment, values)</td>
<td>Displays a log if a user has logging enabled</td>
</tr>
<tr>
<td>verbose(comment, values)</td>
<td>Displays a log if a user has verbose logging enabled</td>
</tr>
<tr>
<td>error(name)</td>
<td>Displays a name error message from the component's settings</td>
</tr>
<tr>
<td>performance log(comment, value)</td>
<td>Adds a performance trace for an element</td>
</tr>
<tr>
<td>performance display</td>
<td>Displays current element performance trace</td>
</tr>
</tbody>
</table>
<h2 class="ui dividing header">Settings</h2>
<p>Settings in UI widgets are any part of a widget definition which is mutable. Most UI widgets have a set of common settings which are useful across all plugins.
<p>Unlike many javascript components, anything arbitrary in Semantic is a setting. This means no need to dig inside the internals of the component to alter an expected css selector or class name, simply alter the settings object</p>
<h3 class="ui header">Common Settings</h3>
<table class="ui celled table segment">
<thead>
<th>Name</th>
<th>Usage</th>
</thead>
<p>That means class names, selectors, error output, dom metadata etc can all be controlled by altering the settings object.</p>
<p>The following is a list of common settings usually found in each javascript module.
<table class="ui celled sortable definition table segment">
<thead>
<th>Name</th>
<th>Usage</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Name used in debug logs to differentiate this widget from other debug statements.</td>
@ -67,38 +181,50 @@ type : 'Semantic'
</table>
<h3 class="ui header">Changing Settings</h3>
<ol class="ui list">
<li>A settings object can be passed in when initializing the plugin
<p>The following examples use <a href="/modules/popup.html">popup</a> as an example for how to modify settings</p>
<div class="ui ordered very relaxed list">
<div class="item">
<div class="header">Setting module defaults</div>
Default settings for the module can be overridden by modifying <b>$.fn.module.settings</b>.
<br><div class="code">$.fn.popup.settings.moduleName = 'Godzilla';</div>
</div>
<div class="item">
<div class="header">At initialization</div>
A settings object can be passed in when initializing the plugin
<br>
<div class="code">
$('.foo')
.module({
moduleName: 'Godzilla',
verbose: true
.popup({
moduleName : 'Godzilla',
verbose : true
})
;
</div>
</li>
<li>Default settings for the module can be overridden by modifying $.fn.module.settings.
<br><div class="code">$.fn.module.settings.moduleName = 'Godzilla';</div>
</li>
<li>Settings can be changed after a module is initialized by calling the 'settings' method on the module with either a settings object or a name, value pair.
</div>
<div class="item">
<div class="header">After initialization</div>
Settings can be changed after a module is initialized by calling the 'settings' method on the module with either a settings object or a name, value pair.
<br>
<div class="code">
$('.foo')
// lets initialize that!
.module()
.popup()
// oh wait forgot something
.module('setting', 'moduleName', 'Godzilla')
.popup('setting', 'moduleName', 'Godzilla')
// and some more things
.popup('setting', {
debug : true,
verbose : true
})
;
</div>
</li>
</ol>
</div>
</div>
<h3 class="ui header">Reading Settings</h3>
<p>Settings can also be read programmatically:
<div class="code">
$('.foo').module('setting', 'moduleName');
// outputs godzilla
$('.foo').popup('setting', 'moduleName');
</div>
</div>
</body>

709
server/documents/modules/accordion.html.eco

@ -8,187 +8,238 @@ type : 'UI Module'
---
<script src="/javascript/accordion.js"></script>
<%- @partial('header') %>
<%- @partial('header', { tabs: 'module' }) %>
<div class="main container">
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="active item">Types</a>
<a class="item">Examples</a>
<a class="item">Variations</a>
<a class="item">Usage</a>
<a class="item">Behavior</a>
<a class="item">Settings</a>
</div>
</div>
<div class="ui active tab" data-tab="definition">
<h2 class="ui dividing header">Types</h2>
<div class="example">
<h4 class="ui header">Accordion</h4>
<p>A standard accordion</p>
<div class="ui accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="active item">Types</a>
<a class="item">Variations</a>
<a class="item">Behaviors</a>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Basic</h4>
<p>A basic accordion does not add any extra formatting</p>
<div class="ui basic accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
<h2 class="ui dividing header">Types</h2>
<div class="example">
<h4 class="ui header">Accordion</h4>
<p>A standard accordion</p>
<div class="ui accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
</div>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="example">
<h4 class="ui header">Basic</h4>
<p>A basic accordion does not add any extra formatting</p>
<div class="ui basic accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
</div>
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
</div>
<h2 class="ui dividing header">Variations</h2>
<div class="example">
<h4 class="ui header">Fluid</h4>
<p>An accordion can take up the width of its container</p>
<div class="ui fluid accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
</div>
</div>
</div>
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').accordion('behavior name', argumentOne, argumentTwo)</code>
<table class="ui definition celled table segment">
<tr>
<td>open (index)</td>
<td>Opens accordion content at index</td>
</tr>
<tr>
<td>close (index)</td>
<td>Closes accordion content at index</td>
</tr>
<tr>
<td>toggle (index)</td>
<td>Closes accordion content at index</td>
</tr>
</table>
</div>
<h2 class="ui dividing header">Examples</h2>
<div class="ui tab" data-tab="examples">
<div class="example">
<h4 class="ui header">Form</h4>
<p>An accordion can be used anywhere where content can be shown or hidden. For example, to show optional form fields.</p>
<div class="ui basic accordion form">
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
<div class="example">
<h4 class="ui header">Form</h4>
<p>An accordion can be used anywhere where content can be shown or hidden. For example, to show optional form fields.</p>
<div class="ui basic accordion form">
<div class="two fields">
<div class="field">
<label>First Name</label>
<input placeholder="First Name" type="text">
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
</div>
</div>
<div class="field">
<label>Last Name</label>
<input placeholder="Last Name" type="text">
<div class="title">
<i class="icon dropdown"></i>
Optional Details
</div>
</div>
<div class="title">
<i class="icon dropdown"></i>
Optional Details
</div>
<div class="content">
<div class="field">
<label>Maiden Name</label>
<input placeholder="Maiden Name" type="text">
<div class="content">
<div class="field">
<label>Maiden Name</label>
<input placeholder="Maiden Name" type="text">
</div>
</div>
</div>
</div>
</div>
<div class="example">
<h4 class="ui header">Menu</h4>
<p>An accordion can be used to create content drawers inside a menu</p>
<div class="ui basic vertical accordion menu">
<div class="item">
<a class="active title">
<i class="dropdown icon"></i>
Size
</a>
<div class="active content menu">
<div class="ui form item">
<div class="grouped inline fields">
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="small" />
<label></label>
<div class="example">
<h4 class="ui header">Menu</h4>
<p>An accordion can be used to create content drawers inside a menu</p>
<div class="ui basic vertical accordion menu">
<div class="item">
<a class="active title">
<i class="dropdown icon"></i>
Size
</a>
<div class="active content menu">
<div class="ui form item">
<div class="grouped inline fields">
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="small" />
<label></label>
</div>
<label>Small</label>
</div>
<label>Small</label>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="medium" />
<label></label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="medium" />
<label></label>
</div>
<label>Medium</label>
</div>
<label>Medium</label>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="large" />
<label></label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="large" />
<label></label>
</div>
<label>Large</label>
</div>
<label>Large</label>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="x-large" />
<label></label>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="size" value="x-large" />
<label></label>
</div>
<label>X-Large</label>
</div>
<label>X-Large</label>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<a class="active title">
<i class="dropdown icon"></i>
Colors
</a>
<div class="active content menu">
<div class="ui form item">
<div class="grouped inline fields">
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="small" />
<label></label>
<div class="item">
<a class="active title">
<i class="dropdown icon"></i>
Colors
</a>
<div class="active content menu">
<div class="ui form item">
<div class="grouped inline fields">
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="small" />
<label></label>
</div>
<label>Red</label>
</div>
<label>Red</label>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="medium" />
<label></label>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="medium" />
<label></label>
</div>
<label>Orange</label>
</div>
<label>Orange</label>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="large" />
<label></label>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="large" />
<label></label>
</div>
<label>Green</label>
</div>
<label>Green</label>
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="x-large" />
<label></label>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="x-large" />
<label></label>
</div>
<label>Blue</label>
</div>
<label>Blue</label>
</div>
</div>
</div>
@ -196,225 +247,169 @@ type : 'UI Module'
</div>
</div>
</div>
<h2 class="ui dividing header">Variations </h2>
<div class="example">
<h4 class="ui header">Fluid</h4>
<p>An accordion can take up the width of its container</p>
<div class="ui fluid accordion">
<div class="active title">
<i class="dropdown icon"></i>
What is a dog?
</div>
<div class="active content">
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
What kinds of dogs are there?
</div>
<div class="content">
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
</div>
<div class="title">
<i class="dropdown icon"></i>
How do you acquire a dog?
</div>
<div class="content">
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
</div>
</div>
</div>
<div class="ui tab" data-tab="usage">
<h2 class="ui dividing header">Usage</h2>
<h3 class="ui header">Initializing an accordion</h3>
<div class="code">
<h3 class="ui header">Initializing an accordion</h3>
<div class="code">
$('.ui.accordion')
.accordion()
;
</div>
</div>
<h2 class="ui dividing header">Behavior</h2>
<div class="ui tab" data-tab="settings">
All the following behaviors can be called using the syntax <code>$('.foo').accordion('behavior name', argumentOne, argumentTwo)</code>
<h3 class="ui header">
Accordion Settings
<div class="sub header">Accordion settings modify its behavior</div>
</h3>
<table class="ui sortable celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>exclusive</td>
<td>true</td>
<td>Set to false to allow multiple sections to be open at the same time</td>
</tr>
<tr>
<td>collapsible</td>
<td>true</td>
<td>Set to false to require an accordion to always have a section open</td>
</tr>
<tr>
<td>duration</td>
<td>500</td>
<td>Duration in ms of opening animation</td>
</tr>
<tr>
<td>easing</td>
<td>easeInOutQuint</td>
<td>EaseInOutQuint is included with accordion, for additional options consider <a href="http://gsgd.co.uk/sandbox/jquery/easing/">jQuery easing</a>)</td>
</tr>
</tbody>
</table>
<table class="ui definition celled table segment">
<tr>
<td>open (index)</td>
<td>Opens accordion content at index</td>
</tr>
<tr>
<td>close (index)</td>
<td>Closes accordion content at index</td>
</tr>
<tr>
<td>toggle (index)</td>
<td>Closes accordion content at index</td>
</tr>
</table>
<h3 class="ui header">
Callbacks
<div class="sub header">Callback settings specify a function to occur after a specific behavior.</div>
</h3>
<h2 class="ui dividing header">Settings</h3>
<table class="ui sortable celled definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>onOpen</td>
<td>active content</td>
<td>Callback on element open</td>
</tr>
<tr>
<td>onClose</td>
<td>active content</td>
<td>Callback on element close</td>
</tr>
<tr>
<td>onChange</td>
<td>active content</td>
<td>Callback on element open or close</td>
</tr>
</tbody>
</table>
<h3 class="ui header">
Accordion Settings
<div class="sub header">Accordion settings modify its behavior</div>
</h3>
<table class="ui red celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>exclusive</td>
<td>true</td>
<td>Set to false to allow multiple sections to be open at the same time</td>
</tr>
<tr>
<td>collapsible</td>
<td>true</td>
<td>Set to false to require an accordion to always have a section open</td>
</tr>
<tr>
<td>duration</td>
<td>500</td>
<td>Duration in ms of opening animation</td>
</tr>
<tr>
<td>easing</td>
<td>easeInOutQuint</td>
<td>EaseInOutQuint is included with accordion, for additional options consider <a href="http://gsgd.co.uk/sandbox/jquery/easing/">jQuery easing</a>)</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
Callbacks
<div class="sub header">Callback settings specify a function to occur after a specific behavior.</div>
</h3>
<table class="ui celled green definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>onOpen</td>
<td>active content</td>
<td>Callback on element open</td>
</tr>
<tr>
<td>onClose</td>
<td>active content</td>
<td>Callback on element close</td>
</tr>
<tr>
<td>onChange</td>
<td>active content</td>
<td>Callback on element open or close</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
</h3>
<table class="ui celled purple definition table segment">
<thead>
<th>Setting</th>
<th class="six wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>namespace</td>
<td>accordion</td>
<td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
</tr>
<tr>
<td>selector</td>
<td>
<div class="code" data-type="css">{
title : '.title',
content : '.content'
}
</div>
</td>
<td>Object containing selectors used by module.</td>
</tr>
<tr>
<td>className</td>
<td>
<div class="code">
className : {
active : 'active'
},
</div>
</td>
<td>Class names used to attach style to state</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
</h3>
<table class="ui sortable celled definition table segment">
<thead>
<th>Setting</th>
<th class="six wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>namespace</td>
<td>accordion</td>
<td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
</tr>
<tr>
<td>selector</td>
<td>
<div class="code" data-type="css">{
title : '.title',
content : '.content'
}
</div>
</td>
<td>Object containing selectors used by module.</td>
</tr>
<tr>
<td>className</td>
<td>
<div class="code">
className : {
active : 'active'
},
</div>
</td>
<td>Class names used to attach style to state</td>
</tr>
</tbody>
</table>
<h3 class="ui header">
Debug Settings
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<h3 class="ui header">
Debug Settings
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Accordion</td>
<td>Name used in debug logs</td>
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>performance</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>verbose</td>
<td>True</td>
<td>Provides ancillary debug output to console</td>
</tr>
<tr>
<td>errors</td>
<td colspan="2">
<div class="code">
error : {
method : 'The method you called is not defined.',
notFound : 'There were no elements that matched the specified selector'
}
</div>
</td>
</tr>
</tbody>
</table>
<table class="ui sortable celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Accordion</td>
<td>Name used in debug logs</td>
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>performance</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>verbose</td>
<td>True</td>
<td>Provides ancillary debug output to console</td>
</tr>
<tr>
<td>errors</td>
<td colspan="2">
<div class="code">
error : {
method : 'The method you called is not defined.',
notFound : 'There were no elements that matched the specified selector'
}
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>

6
server/documents/modules/checkbox.html.eco

@ -238,7 +238,7 @@ type : 'UI Module'
</div>
<h3 class="ui header">Settings</h3>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th colspan="3">Checkbox Settings</th>
</thead>
@ -256,7 +256,7 @@ type : 'UI Module'
</tbody>
</table>
<table class="ui teal celled definition table segment">
<table class="ui teal celled sortable definition table segment">
<thead>
<th colspan="3">Callbacks</th>
</thead>
@ -281,7 +281,7 @@ type : 'UI Module'
<h4 class="ui header">DOM Settings</h4>
<p>DOM settings specify how this module should interface with the DOM</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

8
server/documents/modules/dropdown.html.eco

@ -454,7 +454,7 @@ type : 'UI Module'
<h4 class="ui header">Dropdown Settings</h4>
<p>Dropdown settings modify the dropdown's behavior</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -526,7 +526,7 @@ type : 'UI Module'
<h4 class="ui header">Callbacks</h4>
<p>Callback settings specify a function to occur after a specific behavior.</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
@ -557,7 +557,7 @@ type : 'UI Module'
<h4 class="ui header">DOM Settings</h4>
<p>DOM settings specify how this module should interface with the DOM</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -615,7 +615,7 @@ type : 'UI Module'
<h4 class="ui header">Debug Settings</h4>
<p>Debug settings controls debug output to the console</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

6
server/documents/modules/form.html.eco

@ -271,7 +271,7 @@ type : 'UI Behavior'
<div class="sub header">Form settings modify the form validation behavior</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -315,7 +315,7 @@ type : 'UI Behavior'
<div class="sub header">Validation rules are a set of conditions required to validate a field</div>
</h3>
<div class="ui info message">Validation rules are found in <code>settings.rules</code>, to add new global validation rules, modify <code>$.fn.form.settings.rules</code> to include your function.</div>
<table class="ui teal celled definition table segment">
<table class="ui teal celled sortable definition table segment">
<thead>
<th class="four wide">Name</th>
<th>Arguments</th>
@ -506,7 +506,7 @@ type : 'UI Behavior'
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<table class="ui blue celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

8
server/documents/modules/modal.html.eco

@ -338,7 +338,7 @@ type : 'UI Module'
<h4 class="ui header">Modal Settings</h4>
<p>Modal settings modify the modal's behavior</p>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -392,7 +392,7 @@ type : 'UI Module'
<h4 class="ui header">Callbacks</h4>
<p>Callback settings specify a function to occur after a specific behavior.</p>
<table class="ui green celled definition table segment">
<table class="ui green celled sortable definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
@ -424,7 +424,7 @@ type : 'UI Module'
<h4 class="ui header">DOM Settings</h4>
<p>DOM settings specify how this module should interface with the DOM</p>
<table class="ui purple celled definition table segment">
<table class="ui purple celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -464,7 +464,7 @@ type : 'UI Module'
<h4 class="ui header">Debug Settings</h4>
<p>Debug settings controls debug output to the console</p>
<table class="ui blue celled definition table segment">
<table class="ui blue celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

115
server/documents/modules/popup.html.eco

@ -18,26 +18,30 @@ type : 'UI Module'
<div class="ui vertical pointing secondary menu">
<a class="active item">Types</a>
<a class="item">Variations</a>
<a class="item">Behaviors</a>
</div>
</div>
<h2 class="ui dividing header">Types</h2>
<h2 class="ui dividing header">
Types
</h2>
<div class="example">
<h3 class="ui header">Popup</h3>
<p>A standard popup</p>
<i class="large heart circular icon link" data-content="Hello, I am a pop-up."></i>
<i class="heart circular icon link" data-content="Hello, I am a pop-up."></i>
</div>
<div class="example">
<h3 class="ui header">Title</h3>
<p>A popup can be formatted with a title</p>
<i class="circular heart icon link" data-title="Dog Breeds" data-content="There are many types of dogs. We don't have time to list them all"></i>
<img src="/images/demo/photo.jpg" data-title="PonyDog22" data-content="Ponydog has been a member for 22 days" class="ui avatar image"> PonyDog22
</div>
<div class="example">
<h3 class="ui header">HTML</h3>
<p>A popup can be formatted with html</p>
<i class="circular heart icon link" data-html="<div class='ui red button'>Button</div>"></i>
<i class="circular heart icon link" data-html="Average Rating: <div class='ui star rating'><i class='active icon'></i><i class='active icon'></i><i class='active icon'></i><i class='icon'></i><i class='icon'></i></div>"></i>
</div>
<h2 class="ui dividing header">Variations</h2>
@ -54,6 +58,47 @@ type : 'UI Module'
<p>A popup can have its colors inverted</p>
<i class="circular heart icon link" data-content="Hello. This is an inverted popup" data-variation="inverted"></i>
</div>
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').sidebar('behavior name', argumentOne, argumentTwo)</code>
<table class="ui definition celled table segment">
<tr>
<td>show</td>
<td>Shows popup</td>
</tr>
<tr>
<td>hide</td>
<td>Hides popup</td>
</tr>
<tr>
<td>hide all</td>
<td>Hides all visible pop ups on the page</td>
</tr>
<tr>
<td>toggle</td>
<td>Toggles visibility of popup</td>
</tr>
<tr>
<td>is visible</td>
<td>Returns whether popup is visible</td>
</tr>
<tr>
<td>is hidden</td>
<td>Returns whether popup is hidden</td>
</tr>
<tr>
<td>exists</td>
<td>Returns whether popup is created and inserted into the page</td>
</tr>
<tr>
<td>set position(position)</td>
<td>Repositions a popup</td>
</tr>
<tr>
<td>remove</td>
<td>Removes popup from the page</td>
</tr>
</table>
</div>
@ -91,12 +136,12 @@ type : 'UI Module'
</ul>
</div>
</div>
<h4 class="ui header">Initializing with javascript content</h4>
<h4 class="ui header">Initializing with metadata</h4>
<div class="code" data-type="html">
<i class="heart icon" title="Hello I am a popup"></i>
</div>
<div class="ui horizontal divider">Or</div>
<h4 class="ui header">Initializing with metadata</h4>
<h4 class="ui header">Initializing with javascript content</h4>
<div class="code">
$('.ui.popup')
.popup({
@ -193,7 +238,7 @@ type : 'UI Module'
<div class="example">
<h3 class="ui header">Specifying an offset</h3>
<p>A popup position can be adjusted manually by specifying an offset propery using <code>data-offset="value"</code></p>
<p>A popup position can be adjusted manually by specifying an offset property using <code>data-offset="value"</code></p>
<i class="heart circular icon link" data-offset="50" data-content="As expected this popup is way off to the right"></i>
</div>
@ -236,54 +281,6 @@ type : 'UI Module'
</div>
</div>
<div class="ui tab" data-tab="behaviors">
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').sidebar('behavior name', argumentOne, argumentTwo)</code>
<table class="ui definition celled table segment">
<tr>
<td>attach events(selector, event)</td>
<td>Attaches sidebar action to given selector. Default event if none specified is toggle</td>
</tr>
<tr>
<td>show</td>
<td>Shows popup</td>
</tr>
<tr>
<td>hide</td>
<td>Hides popup</td>
</tr>
<tr>
<td>hide all</td>
<td>Hides all visible pop ups on the page</td>
</tr>
<tr>
<td>toggle</td>
<td>Toggles visibility of popup</td>
</tr>
<tr>
<td>is visible</td>
<td>Returns whether popup is visible</td>
</tr>
<tr>
<td>is hidden</td>
<td>Returns whether popup is hidden</td>
</tr>
<tr>
<td>exists</td>
<td>Returns whether popup is created and inserted into the page</td>
</tr>
<tr>
<td>set position</td>
<td>Repositions a popup</td>
</tr>
<tr>
<td>remove</td>
<td>Removes popup from the page</td>
</tr>
</table>
</div>
<div class="ui tab" data-tab="settings">
<h2 class="ui dividing header">Settings</h2>
@ -292,7 +289,7 @@ type : 'UI Module'
Popup Settings
<div class="sub header">Settings to configure popup behavior</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -370,7 +367,7 @@ type : 'UI Module'
Content Settings
<div class="sub header">Settings to specify popup contents</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th>Description</th>
@ -399,7 +396,7 @@ type : 'UI Module'
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
</h3>
<table class="ui celled purple definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="six wide">Default</th>
@ -462,7 +459,7 @@ type : 'UI Module'
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

8
server/documents/modules/rating.html.eco

@ -262,7 +262,7 @@ type : 'UI Module'
<h4 class="ui header">Rating Settings</h4>
<p>Rating settings modify the rating's behavior</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -291,7 +291,7 @@ type : 'UI Module'
<h4 class="ui header">Callbacks</h4>
<p>Callback settings specify a function to occur after a specific behavior.</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
@ -312,7 +312,7 @@ type : 'UI Module'
<h4 class="ui header">DOM Settings</h4>
<p>DOM settings specify how this module should interface with the DOM</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -355,7 +355,7 @@ type : 'UI Module'
<h4 class="ui header">Debug Settings</h4>
<p>Debug settings controls debug output to the console</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

6
server/documents/modules/shape.html.eco

@ -222,7 +222,7 @@ type : 'UI Module'
;</div>
<h3 class="ui header">Defaults</h3>
<table class="ui celled definition table">
<table class="ui celled sortable definition table">
<thead>
<th colspan="3">Shape Settings</th>
</thead>
@ -260,7 +260,7 @@ type : 'UI Module'
<td>Object containing class names used by module.</td>
</tr>
</table>
<table class="ui celled definition table">
<table class="ui celled sortable definition table">
<thead>
<th colspan="3">Callbacks</th>
</thead>
@ -275,7 +275,7 @@ type : 'UI Module'
<td>Callback after side is changed. This context is new side.</td>
</tr>
</table>
<table class="ui celled definition table">
<table class="ui celled sortable definition table">
<thead>
<th colspan="3">UI Module Settings</th>
</thead>

4
server/documents/modules/sidebar.html.eco

@ -272,7 +272,7 @@ type : 'UI Module'
Transition Settings
<div class="sub header">Form settings modify the transition behavior</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -339,7 +339,7 @@ type : 'UI Module'
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<table class="ui blue celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

4
server/documents/modules/transition.html.eco

@ -277,7 +277,7 @@ type : 'UI Module'
Transition Settings
<div class="sub header">Form settings modify the transition behavior</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -371,7 +371,7 @@ type : 'UI Module'
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<table class="ui blue celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

8
server/draft/chat.html

@ -83,7 +83,7 @@ type : 'UI Module'
<h4 class="ui header">Chatroom Settings</h4>
<p>Chatroom settings modify the chatroom's behavior</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -139,7 +139,7 @@ type : 'UI Module'
<h4 class="ui header">Callbacks</h4>
<p>Callback settings specify a function to occur after a specific behavior.</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
@ -160,7 +160,7 @@ type : 'UI Module'
<h4 class="ui header">DOM Settings</h4>
<p>DOM settings specify how this module should interface with the DOM</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -203,7 +203,7 @@ type : 'UI Module'
<h4 class="ui header">Debug Settings</h4>
<p>Debug settings controls debug output to the console</p>
<table class="ui celled definition table segment">
<table class="ui celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

4
server/draft/tab.html.eco

@ -273,7 +273,7 @@ type : 'UI Module'
Transition Settings
<div class="sub header">Form settings modify the transition behavior</div>
</h3>
<table class="ui red celled definition table segment">
<table class="ui red celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
@ -340,7 +340,7 @@ type : 'UI Module'
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<table class="ui blue celled sortable definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>

2
server/files/javascript/popup.js

@ -5,7 +5,7 @@ semantic.accordion.ready = function() {
// selector cache
var
$popup = $('.example .heart.icon'),
$popup = $('.main .ui[data-content], .main .ui[data-html], .main i[data-content], .main i[data-html]'),
// alias
handler
;

6
server/files/javascript/semantic.js

@ -30,6 +30,7 @@ semantic.ready = function() {
$peek = $('.peek'),
$peekItem = $peek.children('.menu').children('a.item'),
$peekSubItem = $peek.find('.item .menu .item'),
$sortableTables = $('.sortable.table'),
$ui = $('.ui').not('.hover, .down'),
$swap = $('.theme.menu .item'),
@ -41,7 +42,7 @@ semantic.ready = function() {
$menuPopup = $('.ui.main.menu .popup.item'),
$menuDropdown = $('.ui.main.menu .dropdown'),
$pageTabs = $('.tab.segment .tabular.menu .item'),
$pageTabs = $('.tab.segment .menu .item'),
$downloadDropdown = $('.download.buttons .dropdown'),
@ -672,6 +673,9 @@ semantic.ready = function() {
}
})
;
$sortableTables
.tablesort()
;
$menuDropdown
.dropdown({

8
server/files/javascript/table.js

@ -4,16 +4,12 @@ semantic.table = {};
semantic.table.ready = function() {
// selector cache
var
$sortTable = $('.sortable.table'),
var
// alias
handler
;
$sortTable
.tablesort()
;
};

19
server/files/stylesheets/semantic.css

@ -94,13 +94,13 @@ pre {
background-color: #F0F0F0;
}
code {
background-color: rgba(0, 0, 0, 0.07);
background-color: rgba(0, 0, 0, 0.02);
border: 1px solid rgba(0, 0, 0, 0.1);
display: inline-block;
font-family: Courier New;
font-size: 14px;
margin: 0.25em;
padding: 0.125em 0.25em;
padding: 0.125em 0.5em;
vertical-align: middle;
}
pre code {
@ -160,12 +160,17 @@ a:hover {
#example > .tab.segment {
padding-bottom: 0em;
}
#example > .tab.segment .vertical.menu {
display: none;
margin: 2rem 0em 1rem;
}
#example > .tab.segment .tabular.menu {
margin: 2rem 0em 0em;
border-bottom: none;
}
#example > .tab.segment .tabular.menu .active.item {
background-color: #FAFAFA;
border-bottom-color: #FAFAFA;
}
@ -396,7 +401,7 @@ body.guide .main.container > * {
#example .advertisement {
float: none;
display: table-cell;
vertical-align: middle;
vertical-align: top;
padding-left: 2em;
}
#example #carbonads-container {
@ -1013,6 +1018,7 @@ body.guide .main.container > * {
display: none;
}
#example .example:first-child,
#example h2 + .example,
#example h3 + .example,
#example h4 + .example {
@ -1374,6 +1380,13 @@ body.progress .ui.progress .bar {
#example .fixed .next {
display: none;
}
#example > .tab.segment .tabular.menu {
display: none;
}
#example > .tab.segment .vertical.menu {
display: block;
}
}
@media only screen and (max-width : 450px) {
#example .main.menu .icon.item {

3
server/layouts/default.html.eco

@ -77,6 +77,7 @@
<script src="/javascript/library/history.js"></script>
<script src="/javascript/library/easing.js"></script>
<script src="/javascript/library/ace/ace.js"></script>
<script src="/javascript/library/tablesort.js"></script>
<script src="/javascript/library/waypoints.js"></script>
<script src="/build/uncompressed/modules/behavior/api.js"></script>
@ -155,7 +156,7 @@
</div>
</div>
<div class="item">
<b>Modules</b>
<a href="/module.html"><b>Modules</b></a>
<div class="menu">
<% for element in uiModules: %>
<a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>

37
server/partials/header.html.eco

@ -1,4 +1,4 @@
<% @tabs = { definition: 'Definition', usage: 'Usage', examples: 'Examples', behaviors: 'Behaviors', settings: 'Settings' } if @tabs == 'module' %>
<% @tabs = { definition: 'Definition', usage: 'Usage', examples: 'Examples', settings: 'Settings' } if @tabs == 'module' %>
<div class="<% if @tabs?: %>tab <% end %>segment">
<div class="container">
@ -12,24 +12,35 @@
<p><%=@document.description %></p>
<% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection' or @document.type is 'UI Module': %>
<div class="ui basic labeled icon toggle overview button">
Definition
Overview
<i class="book icon"></i>
</div>
<% end %>
<% index = 0 %>
<% if @tabs?: %>
<div class="ui tabular menu">
<% for id, name of @tabs: %>
<a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
<% index++ %>
<% end %>
</div>
<% end %>
</div>
<div class="advertisement">
<div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div><script type="text/javascript">var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = "http://engine.carbonads.com/z/51619/azcarbon_2_1_0_HORIZ"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script></div></div>
</div>
<% if @tabs?: %>
<% index = 0 %>
<% tabCount = 0 %>
<% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
<% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
<% for id, name of @tabs: %>
<% tabCount++ %>
<% end %>
<div class="<%= numbers[tabCount] %> item tabular ui menu">
<% for id, name of @tabs: %>
<a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
<% index++ %>
<% end %>
</div>
<% index = 0 %>
<div class="fluid vertical ui menu">
<% for id, name of @tabs: %>
<a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
<% index++ %>
<% end %>
</div>
<% end %>
</div>
</div>
Loading…
Cancel
Save