Browse Source

Highlight class names in code

intro
jlukic 9 years ago
parent
commit
ffd0100104
  1. 2
      server/documents/collections/grid.html.eco
  2. 6
      server/documents/collections/menu.html.eco
  3. 2
      server/documents/collections/message.html.eco
  4. 88
      server/documents/elements/button.html.eco
  5. 27
      server/documents/elements/container.html.eco
  6. 12
      server/documents/elements/divider.html.eco
  7. 488
      server/documents/elements/flag.html.eco
  8. 14
      server/documents/elements/header.html.eco
  9. 18
      server/documents/elements/icon.html.eco
  10. 9
      server/documents/elements/image.html.eco
  11. 2
      server/documents/elements/label.html.eco
  12. 2
      server/documents/elements/list.html.eco
  13. 2
      server/documents/globals/site.html.eco
  14. 4
      server/documents/introduction/layout.html.eco
  15. 2
      server/documents/modules/popup.html.eco
  16. 2
      server/documents/views/card.html.eco
  17. 2
      server/documents/views/feed.html.eco
  18. 2
      server/documents/views/statistic.html.eco
  19. 124
      server/files/javascript/docs.js
  20. 2
      server/files/javascript/library/cookie.min.js
  21. 767
      server/files/javascript/library/highlight.js
  22. 3
      server/files/javascript/library/highlight.languages.js
  23. 1
      server/files/javascript/library/highlight.languages.min.js
  24. 3
      server/files/javascript/library/highlight.min.js
  25. 212
      server/files/stylesheets/docs.css
  26. 12
      server/partials/library-javascript.html.eco

2
server/documents/collections/grid.html.eco

@ -290,7 +290,7 @@ themes : ['Default']
</div>
<div class="colored example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>Grids can use named <a href="#colored"><b>colors</b> variations</a> to add background colors, but only with <a href="#padded"><code>padded grid</code></a> that do not include negative margins.</p>
<p>To include a color that is not available in the default palette its perfectly fine to use CSS</p>
<div class="ui equal width center aligned padded grid">

6
server/documents/collections/menu.html.eco

@ -562,7 +562,7 @@ themes : ['Default', 'Chubby', 'GitHub', 'Material']
</div>
</div>
<div class="column">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<div class="ui link list">
<a class="item">Small</a>
<a class="item">Medium</a>
@ -571,7 +571,7 @@ themes : ['Default', 'Chubby', 'GitHub', 'Material']
</div>
</div>
<div class="column">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<div class="ui link list">
<a class="item">Neutrals</a>
<a class="item">Brights</a>
@ -829,7 +829,7 @@ themes : ['Default', 'Chubby', 'GitHub', 'Material']
</div>
</div>
<div class="example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>Additional colors can be specified.</p>
<div class="ui menu">
<a class="ui active red item">Red</a>

2
server/documents/collections/message.html.eco

@ -275,7 +275,7 @@ themes : ['Default', 'GitHub', 'Gmail']
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A message can have different sizes</p>
<div class="ui small message">
This is a very small message.

88
server/documents/elements/button.html.eco

@ -39,7 +39,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
</div>
<div class="example">
<div class="example" data-class="primary, secondary">
<h4 class="ui header">Emphasis</h4>
<p>A button can be formatted to show different levels of emphasis</p>
<div class="ui ignored info message">Setting your brand colors to primary and secondary color variables in <code>site.variables</code> will allow you to use your color theming for UI elements</div>
@ -93,7 +93,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</button>
</div>
<div class="example">
<div class="example" data-class="labeled icon, right labeled icon">
<h4 class="ui header">Labeled Icon</h4>
<p>A button can have an icon and a label</p>
<button class="ui labeled icon button">
@ -183,7 +183,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Icons</h4>
<h4 class="ui header">Icon Buttons</h4>
<p>Button groups can show groups of icons</p>
<div class="ui icon buttons">
<button class="ui button"><i class="align left icon"></i></button>
@ -198,10 +198,11 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
</div>
<h2 class="ui dividing header">Contents</h2>
<div class="example">
<div class="example" data-class="or">
<h4 class="ui header">Conditionals</h4>
<p>Button groups can be separated by conditionals</p>
<p>Button groups can contain conditionals</p>
<div class="ui buttons">
<button class="ui button">Cancel</button>
<div class="or"></div>
@ -221,23 +222,6 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
<h2 class="ui dividing header">States</h2>
<div class="example">
<h4 class="ui header">Hover</h4>
<p>A button can change to show a user has hovered their mouse</p>
<button class="ui button">
Follow
</button>
</div>
<div class="example">
<h4 class="ui header">Down</h4>
<p>A button can change when pressed using touch or mouse events</p>
<button class="ui button">
<i class="user icon"></i>
Follow
</button>
</div>
<div class="example">
<h4 class="ui header">Active</h4>
<p>A button can show it is currently the active user selection</p>
@ -267,8 +251,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
<h2 class="ui dividing header">Variations</h2>
<div class="spaced example">
<div class="spaced example" data-class="facebook, twitter, google, vk, linkedin, instagram, youtube">
<h4 class="ui header">Social</h4>
<p>A button can be formatted to link to a social website</p>
<button class="ui facebook button">
@ -303,7 +286,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
<div class="spaced example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A button can have different sizes</p>
<button class="mini ui button">
Mini
@ -332,7 +315,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="spaced example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>A button can have different colors</p>
<button class="ui red button">Red</button>
<button class="ui orange button">Orange</button>
@ -373,21 +356,27 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Feedback</h4>
<p>A button can be positive or negative:</p>
<h4 class="ui header">Positive</h4>
<p>A button can hint towards a positive consequence</p>
<button class="positive ui button">Positive Button</button>
<button class="negative ui button">Negative Button</button>
</div>
<div class="example">
<h4 class="ui header">Negative</h4>
<p>A button can hint towards a negative consequence</p>
<button class="negative ui button">Negative Button</button>
</div>
<div class="example">
<h4 class="ui header">Fluid</h4>
<p>A button can fit parent container:</p>
<p>A button can take the width of its container</p>
<button class="fluid ui button">Fits container</button>
</div>
<div class="example">
<h4 class="ui header">Circular</h4>
<p>A button can be circular:</p>
<p>A button can be circular</p>
<button class="circular ui icon button">
<i class="icon settings"></i>
</button>
@ -442,7 +431,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
<h2 class="ui dividing header">Group Variations</h2>
<div class="example">
<h4 class="ui header">Vertical Group</h4>
<h4 class="ui header">Vertical Buttons</h4>
<p>Groups can be formatted to appear vertically</p>
<div class="ui vertical buttons">
<button class="ui button">Feed</button>
@ -453,7 +442,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Icon Group</h4>
<h4 class="ui header">Icon Buttons</h4>
<p>Groups can be formatted as icons</p>
<div class="ui icon buttons">
<button class="ui button">
@ -469,7 +458,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Labeled Icon Group</h4>
<h4 class="ui header">Labeled Icon Buttons</h4>
<p>Groups can be formatted as labeled icons</p>
<div class="ui vertical labeled icon buttons">
<button class="ui button">
@ -486,7 +475,7 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</button>
</div>
</div>
<div class="example">
<div class="example" data-class="labeled icon, ui button, ui buttons, right labeled icon">
<h4 class="ui header">Mixed Group</h4>
<p>Groups can be formatted to use multiple button types together</p>
<div class="ui buttons">
@ -506,40 +495,27 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Evenly Divided</h4>
<div class="example" data-class="one, two, three, four, five">
<h4 class="ui header">Equal Width</h4>
<p>Groups can have their widths divided evenly</p>
<div class="ui ignored info message">Evenly divided elements can either use the number or the word, i.e. 2 or "two"</div>
<div class="3 fluid ui buttons">
<div class="five ui buttons">
<button class="ui button">Overview</button>
<button class="ui button">Specs</button>
<button class="ui button">Warranty</button>
<button class="ui button">Reviews</button>
<button class="ui button">Support</button>
</div>
<div class="ui ignored divider"></div>
<div class="five fluid ui buttons">
<div class="three ui buttons">
<button class="ui button">Overview</button>
<button class="ui button">Specs</button>
<button class="ui button">Warranty</button>
<button class="ui button">Reviews</button>
<button class="ui button">Support</button>
</div>
<div class="ui ignored divider"></div>
<div class="9 fluid ui icon buttons">
<button class="ui button"><i class="backward icon"></i></button>
<button class="ui button"><i class="fast backward icon"></i></button>
<button class="ui button"><i class="step backward icon"></i></button>
<button class="ui button"><i class="play icon"></i></button>
<button class="ui button"><i class="stop icon"></i></button>
<button class="ui button"><i class="step forward icon"></i></button>
<button class="ui button"><i class="fast forward icon"></i></button>
<button class="ui button"><i class="forward icon"></i></button>
<button class="ui button"><i class="mute icon"></i></button>
</div>
</div>
<div class="example">
<h4 class="ui header">Colored Group</h4>
<h4 class="ui header">Colored Buttons</h4>
<p>Groups can have a shared color</p>
<div class="blue ui buttons">
<button class="ui button">One</button>
@ -549,8 +525,8 @@ themes : ['Default', 'Classic', 'Basic', 'Bootstrap3', 'Twitter', 'Raised',
</div>
<div class="example">
<h4 class="ui header">Basic Group</h4>
<p>A button group can be formatted to remove extra formatting</p>
<h4 class="ui header">Basic Buttons</h4>
<p>A button group can be less pronounced</p>
<div class="ui basic buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>

27
server/documents/elements/container.html.eco

@ -122,7 +122,7 @@ themes : ['Default']
<h2 class="ui dividing header">Types</h2>
<div class="no example">
<h4 class="ui header">Containers</h4>
<h4 class="ui header">Container</h4>
<p>A standard container</p>
</div>
@ -161,7 +161,7 @@ themes : ['Default']
<h4 class="ui header">Text Container</h4>
<p>A container can reduce its maximum width to more naturally accomodate a single column of text</p>
<div class="ui info message">
A text container is a simpler markup alternative to using a grid with a single column, and is designed specifically
A text container is a simpler markup alternative to using a grid with a single column, and is designed to have a reasonable maximum width for displaying flowing text
</div>
</div>
@ -216,9 +216,27 @@ themes : ['Default']
<h2 class="ui dividing header">Variations</h2>
<div class="example">
<div class="no example">
<h4 class="ui header">Text Alignment</h4>
<p>A container can specify its text alignment</p>
</div>
<div class="ui ignored code">
<div class="ui left aligned container">
<p></p>
</div>
<div class="ui center aligned container">
<p></p>
</div>
<div class="ui right aligned container">
<p></p>
</div>
<div class="ui justified container">
<p></p>
</div>
</div>
<div class="ui left aligned container">
Left Aligned
</div>
@ -268,9 +286,8 @@ themes : ['Default']
Aenean imperdiet. Etiam ultricies nisi vel augue.
Curabitur ullamcorper ultricies nisi.</p>
</div>
</div>
<div class="example">
<div class="no example">
<h4 class="ui header">Fluid</h4>
<p>A fluid container has no maximum width</p>
<div class="ui info message">Fluid containers are useful for setting text alignment, or other variations on unstyled content</div>

12
server/documents/elements/divider.html.eco

@ -22,7 +22,7 @@ themes : ['default']
<div class="example">
<h4 class="ui header">Divider</h4>
<p>A standard divider</p>
<div class="ignored ui warning message">If you are looking to add a divider in between grid rows, you can use the <code>ui divided grid</code> variation. For more information check out <a href="/collections/grid.html">the grid definition</a></div>
<div class="ignored ui warning message">To add a divider between parts of a grid use a <a href="/collections/grid.html#divided"><code>divided grid</code></a> variation.</div>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<div class="ui divider"></div>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
@ -32,12 +32,12 @@ themes : ['default']
<h4 class="ui header">Vertical Divider</h4>
<p>A divider can segment content vertically</p>
<div class="ui ignored message">
Vertical and horizontal dividers require you to add <code>position: relative</code> to the element that you would like to contain the divider
Vertical dividers requires <code>position: relative</code> on the element that you would like to contain the divider
</div>
<div class="ui info ignored message">
A vertical divider will automatically adjust to a horizontal divider at mobile resolutions when used inside a <a href="/collections/grid.html#stackable-grid">stackable grid</a>
A vertical divider will automatically swap to a horizontal divider at mobile resolutions when used inside a <a href="/collections/grid.html#stackable-grid"><code>stackable grid</code></a>
</div>
<div class="ui two column middle aligned very relaxed fitted stackable grid">
<div class="ui two column middle aligned very relaxed stackable grid">
<div class="column">
<div class="ui form">
<div class="field">
@ -91,12 +91,12 @@ themes : ['default']
</div>
</div>
<div class="another example">
<h4 class="ui horizontal header divider">
<h4 class="ui horizontal divider header">
<i class="tag icon"></i>
Description
</h4>
<p>Doggie treats are good for all times of the year. Proven to be eaten by 99.9% of all dogs worldwide.</p>
<h4 class="ui horizontal header divider">
<h4 class="ui horizontal divider header">
<i class="bar chart icon"></i>
Specifications
</h4>

488
server/documents/elements/flag.html.eco

File diff suppressed because it is too large

14
server/documents/elements/header.html.eco

@ -21,10 +21,10 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
<h2 class="ui dividing header">Types</h2>
<div class="example">
<div class="example" data-content="ui header">
<h4 class="ui header">Page (H1-H6)</h4>
<p class="header">Headers may be oriented to give the hierarchy of a section in the context of the page</p>
<div class="ignored info ui message">Page headings are absolutely sized using <a href="https://j.eremy.net/confused-about-rem-and-em/" target="_blank"><code>rem</code></a> and are not affected by surrounding content size.</div>
<div class="ignored info ui message">Page headings are sized using <a href="https://j.eremy.net/confused-about-rem-and-em/" target="_blank"><code>rem</code></a> and are not affected by surrounding content size.</div>
<h1 class="ui header">First header</h1>
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
<h2 class="ui header">Second header</h2>
@ -37,7 +37,7 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
<div class="example">
<div class="example" data-content="ui header">
<h4 class="ui header">Content</h4>
<p>Headers may be oriented to give the importance of a section in the context of the content that surrounds it</p>
<div class="ignored info ui message">Content headings are sized with <a href="https://j.eremy.net/confused-about-rem-and-em/" target="_blank"><code>em</code></a> and are based on the font-size of their container.</div>
@ -79,7 +79,7 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
<img class="ui centered wireframe image" src="/images/wireframe/centered-paragraph.png">
</div>
<div class="example">
<div class="example" data-class="sub">
<h4 class="ui header">Subheaders</h4>
<p>Headers may be formatted to label smaller or de-emphasized content.</p>
<h2 class="ui sub header">
@ -121,7 +121,7 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
<h4 class="ui header">Image</h4>
<p>A header may contain an <a href="/elements/image.html">image</a></p>
<h2 class="ui header">
<img src="/images/icons/school.png">
<img class="ui image" src="/images/icons/school.png">
<div class="content">
Learn More
</div>
@ -169,7 +169,7 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
<img class="ui wireframe image" src="/images/wireframe/short-paragraph.png">
</div>
<div class="example">
<div class="example" data-class="sub">
<h4 class="ui header">Subheader</h4>
<p>Headers may contain subheaders</p>
<h2 class="ui header">
@ -288,7 +288,7 @@ themes : ['Default', 'Classic', 'Bookish', 'Chubby', 'Material']
</div>
<div class="example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>A header can be formatted with different colors</p>
<h4 class="ui red header">Red</h4>
<h4 class="ui orange header">Orange</h4>

18
server/documents/elements/icon.html.eco

@ -1260,17 +1260,17 @@ themes : ['Default']
<div class="example">
<h4 class="ui header">Size</h4>
<p>An icon can vary in size</p>
<i class="small home icon"></i> Small
<i class="small home icon"></i>
<br>
<i class="home icon"></i> Medium
<i class="home icon"></i>
<br>
<i class="large home icon"></i> Large
<i class="large home icon"></i>
<br>
<i class="big home icon"></i> Big
<i class="big home icon"></i>
<br>
<i class="huge home icon"></i> Huge
<i class="huge home icon"></i>
<br>
<i class="massive home icon"></i> Massive
<i class="massive home icon"></i>
</div>
<div class="example">
@ -1317,7 +1317,7 @@ themes : ['Default']
</div>
<div class="example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>An icon can be formatted with different colors</p>
<i class="red users icon"></i>
<i class="orange users icon"></i>
@ -1356,7 +1356,7 @@ themes : ['Default']
<h2 class="ui dividing header">Groups</h2>
<div class="example">
<h4 class="ui header">Icon Group</h4>
<h4 class="ui header">Icons</h4>
<p>Several icons can be used together as a group</p>
<i class="huge icons">
<i class="big thin circle icon"></i>
@ -1373,7 +1373,7 @@ themes : ['Default']
<i class="user icon"></i>
</i>
</div>
<div class="example">
<div class="example" data-class="corner">
<h4 class="ui header">Corner Icon</h4>
<p>A group of icons can display a smaller corner icon</p>
<i class="huge icons">

9
server/documents/elements/image.html.eco

@ -18,11 +18,12 @@ themes : ['Default']
<div class="main ui container">
<h2 class="ui dividing header">Types</h2>
<div class="example">
<div class="example" data-class="image">
<h4 class="ui header">Image</h4>
<p>An image</p>
<div class="ui ignored message">
Unless a size if specified, images will use the original dimensions of the image, with a maximum width of its container size <code>max-width: 100%</code>.
Unless a size if specified, images will use the original dimensions of the image up to the size of its container.</code>.
</div>
<div class="ui ignored info message">
You can specify an <code>img</code> or <code>svg</code> as a <code>ui image</code> or use a child element.</code>
@ -144,7 +145,7 @@ themes : ['Default']
</div>
<div class="clearing example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>An image may appear at different sizes</p>
<div class="ui ignored info message">
Semantic uses arbitrary default values for image sizes from mini to massive. It is recommended to update these with values used in your project in <code>image.variables</code>.
@ -217,7 +218,7 @@ themes : ['Default']
<h2 class="ui dividing header">Groups</h2>
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A group of images can be formatted to have the same size.</p>
<div class="ui tiny images">
<img class="ui image" src="/images/wireframe/image.png">

2
server/documents/elements/label.html.eco

@ -369,7 +369,7 @@ themes : ['Default']
<h2 class="ui dividing header">Variations</h2>
<div class="example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>A label can have different colors</p>
<a class="ui red label">Red</a>
<a class="ui orange label">Orange</a>

2
server/documents/elements/list.html.eco

@ -762,7 +762,7 @@ themes : ['Default']
</div>
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A list can vary in size</p>
<div class="ui mini horizontal divided list">
<div class="item">

2
server/documents/globals/site.html.eco

@ -185,7 +185,7 @@ themes : ['Default', 'Material']
</div>
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A site can define a root em size, used for providing relative sizes for the rest of a site's content</p>
<div class="ui ignored info message">
<code>em</code> and <code>rem</code> are special units used to provide relative measurements for elements. <code>1em</code> defines what baseline size, <code>medium</code>, is for UI elements. Most elements are sized in <code>rem</code> which are affected by this value, however some UI can also be defined using <code>em</code> which will be based on the surrounding font size of the parent element.</p>

4
server/documents/introduction/layout.html.eco

@ -11,7 +11,8 @@ type : 'Introduction'
<%- @partial('header') %>
<div class="ui main intro container">
<h2 class="ui dividing header">Starter</h2>
<div class="ui three doubling cards">
<p>Examples to introduce components and their function</p>
<div class="ui three stackable doubling cards">
<a class="ui card" href="/examples/theming.html">
<div class="image">
<img src="/images/examples/theming.png">
@ -48,6 +49,7 @@ type : 'Introduction'
</div>
<h2 class="ui dividing header">Pages</h2>
<p>Starter page templates</p>
<div class="ui three doubling cards">
<a class="ui card" href="/examples/homepage.html">
<div class="image">

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

@ -361,7 +361,7 @@ themes : ['Default']
</div>
</div>
<div class="column">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<div class="ui link list">
<a class="item">Small</a>
<a class="item">Medium</a>

2
server/documents/views/card.html.eco

@ -622,7 +622,7 @@ themes : ['Default', 'Basic', 'Classic', 'Instagram']
</div>
<div class="example">
<h4 class="ui header">Colors</h4>
<h4 class="ui header">Colored</h4>
<p>A card can specify a color</p>
<div class="ui four cards">
<a class="red card">

2
server/documents/views/feed.html.eco

@ -245,7 +245,7 @@ themes : ['Default', 'Timeline']
<h2 class="ui dividing header">Variations</h2>
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A feed can have different sizes</p>
<div class="ui small feed">

2
server/documents/views/statistic.html.eco

@ -463,7 +463,7 @@ themes : ['Default']
</div>
<div class="example">
<h4 class="ui header">Sizes</h4>
<h4 class="ui header">Size</h4>
<p>A statistic can vary in size</p>
<div class="ui mini statistic">
<div class="value">

124
server/files/javascript/docs.js

@ -682,7 +682,7 @@ semantic.ready = function() {
$example = $(this).closest('.example'),
$annotation = $example.find('.annotation'),
$code = $annotation.find('.code'),
$intro = $example.children().not('.ignored, h4:first-child').filter('.ui').eq(0).prevAll(),
$intro = $example.children().not('.ignored, h4:first-child').filter('.ui, i:not(.code)').eq(0).prevAll(),
$ignored = $('i.code:last-child, .wireframe, .anchor, .code, .existing, .instructive, .language.label, .annotation, br, .ignore, .ignored'),
$demo = $example.children().not($intro).not($ignored),
code = ''
@ -728,10 +728,10 @@ semantic.ready = function() {
$example.data('code', code);
return code;
},
createCode: function(type) {
createCode: function() {
var
$example = $(this).closest('.example'),
$intro = $example.children().not('.ignored, h4:first-child').filter('.ui').eq(0).prevAll(),
$intro = $example.children().not('.ignored, h4:first-child').filter('.ui, i:not(.code)').eq(0).prevAll(),
$annotation = $example.find('.annotation'),
$code = $annotation.find('.code'),
$html = $example.children('.html'),
@ -777,16 +777,18 @@ semantic.ready = function() {
;
$.proxy(handler.initializeCode, $code)(true);
}
if( ($annotation.eq(0).is(':visible') || type == 'designer') && type != 'developer' ) {
if( $annotation.hasClass('visible') ) {
$annotation.transition('hide');
$html.removeClass('ui top attached segment');
handler.refreshSticky();
}
else {
$html.addClass('ui top attached segment');
$intro.css('display', '');
$annotation.transition('fade', handler.refreshSticky);
$annotation.transition('show');
}
setTimeout(function() {
handler.refreshSticky();
}, 1000);
},
refreshSticky: function() {
@ -823,10 +825,85 @@ semantic.ready = function() {
}
},
highlightClasses: function($code) {
var
$closestExample = $code.closest('.example'),
$example = ($closestExample.length === 0)
? $code.closest('.segment').prevAll('.example').not('.another').eq(0)
: ($closestExample.hasClass('another'))
? $closestExample.prevAll('.example').not('.another').eq(0)
: $closestExample,
$header = $example.find('h4').eq(0),
$attributes = $code.find('.attribute, .class'),
pageName = $.trim($('h1').eq(0).contents().filter(function() { return this.nodeType == 3; }).text().toLowerCase()),
name = handler.getText($header).toLowerCase(),
classes = $example.data('class') || ''
;
// Add title
if(name) {
if(name == pageName) {
name = 'ui ' + name;
}
classes = (classes === '')
? name
: classes + ',' + name
;
}
// Add common variations
classes = classes.replace('text alignment', "left aligned, right aligned, justified, center aligned");
classes = classes.replace('floating', "right floated,left floated,floated");
classes = classes.replace('vertically attached', "attached");
classes = classes.replace('horizontally attached', "attached");
classes = classes.replace('attached', "left attached,right attached,top attached,bottom attached,attached");
classes = classes.replace('size', "mini,tiny,small,medium,large,big,huge,massive");
classes = classes.replace('colored', "red,orange,yellow,olive,green,teal,blue,violet,purple,pink,brown,grey,black");
classes = (classes !== '')
? classes.split(',')
: []
;
// check each class value
$attributes.each(function() {
var
$attribute = $(this),
attributeHTML = $attribute.html(),
$value,
html,
newHTML
;
// only parse classes
if(attributeHTML.search('class') === -1) {
return true;
}
$value = $attribute.next('.value, .string').eq(0);
html = $value.html();
// check against each value
$.each(classes, function(index, className) {
className = $.trim(className);
if(className === '') {
return true;
}
if(pageName !== 'icon' && className == 'icon' && $value.prevAll('.title').html() == 'i') {
return true;
}
if(html.search(className) !== -1) {
newHTML = html.replace(className, '<b>' + className + '</b>');
return false;
}
});
if(newHTML) {
$value
.addClass('class')
.html(newHTML)
;
}
});
},
initializeCode: function(codeSample) {
var
$code = $(this).show(),
$codeTag = $('<code></code>'),
$codeTag = $('<code />'),
codeSample = codeSample || false,
code = $code.html(),
existingCode = $code.hasClass('existing'),
@ -854,6 +931,7 @@ semantic.ready = function() {
whiteSpace,
indent,
styledCode,
$example,
$label,
codeHeight
;
@ -865,7 +943,6 @@ semantic.ready = function() {
"'": '&#39;',
"/": '&#x2F;'
};
contentType = contentType.toLowerCase();
function escapeHTML(string) {
@ -889,34 +966,32 @@ semantic.ready = function() {
formattedCode = $.trim(code).replace(whiteSpace, '\n');
}
// escape html entities
if(contentType != 'javascript' && contentType != 'less') {
formattedCode = escapeHTML(formattedCode);
//formattedCode = escapeHTML(formattedCode);
}
// replace with <code>
// color code
formattedCode = window.hljs.highlightAuto(formattedCode);
// create <code> tag
$codeTag
.addClass($code.attr('class'))
.html(formattedCode)
;
$code
.replaceWith($codeTag)
.addClass(formattedCode.language)
.html(formattedCode.value)
;
// replace <div> with <code>
$code.replaceWith($codeTag);
$code = $codeTag;
$code
.html(formattedCode)
;
// wrap
$code = $code
.wrap('<div class="ui ' + name + ' segment"></div>')
.wrap('<pre></pre>')
;
// color code
window.hljs.highlightBlock($code[0]);
if(contentType == 'html') {
// add class emphasis to used classes
handler.highlightClasses($code);
}
// add label
if(title) {
@ -1032,6 +1107,7 @@ semantic.ready = function() {
// code highlighting languages
window.hljs.configure({
classPrefix : '',
languages : [
'xml',
'bash',

2
server/files/javascript/library/cookie.min.js

@ -0,0 +1,2 @@
/*! jquery.cookie v1.4.1 | MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});

767
server/files/javascript/library/highlight.js

@ -1,767 +0,0 @@
/*
Syntax highlighting with language autodetection.
https://highlightjs.org/
*/
(function(factory) {
// Setup highlight.js for different environments. First is Node.js or
// CommonJS.
if(typeof exports !== 'undefined') {
factory(exports);
} else {
// Export hljs globally even when using AMD for cases when this script
// is loaded with others that may still expect a global hljs.
window.hljs = factory({});
// Finally register the global hljs with AMD.
if(typeof define === 'function' && define.amd) {
define('hljs', [], function() {
return window.hljs;
});
}
}
}(function(hljs) {
/* Utility functions */
function escape(value) {
return value.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;');
}
function tag(node) {
return node.nodeName.toLowerCase();
}
function testRe(re, lexeme) {
var match = re && re.exec(lexeme);
return match && match.index == 0;
}
function isNotHighlighted(language) {
return /no-?highlight|plain|text/.test(language);
}
function blockLanguage(block) {
var i, match, length,
classes = block.className + ' ';
classes += block.parentNode ? block.parentNode.className : '';
// language-* takes precedence over non-prefixed class names and
match = /\blang(?:uage)?-([\w-]+)\b/.exec(classes);
if (match) {
return getLanguage(match[1]) ? match[1] : 'no-highlight';
}
classes = classes.split(/\s+/);
for(i = 0, length = classes.length; i < length; i++) {
if(getLanguage(classes[i]) || isNotHighlighted(classes[i])) {
return classes[i];
}
}
}
function inherit(parent, obj) {
var result = {}, key;
for (key in parent)
result[key] = parent[key];
if (obj)
for (key in obj)
result[key] = obj[key];
return result;
}
/* Stream merging */
function nodeStream(node) {
var result = [];
(function _nodeStream(node, offset) {
for (var child = node.firstChild; child; child = child.nextSibling) {
if (child.nodeType == 3)
offset += child.nodeValue.length;
else if (child.nodeType == 1) {
result.push({
event: 'start',
offset: offset,
node: child
});
offset = _nodeStream(child, offset);
// Prevent void elements from having an end tag that would actually
// double them in the output. There are more void elements in HTML
// but we list only those realistically expected in code display.
if (!tag(child).match(/br|hr|img|input/)) {
result.push({
event: 'stop',
offset: offset,
node: child
});
}
}
}
return offset;
})(node, 0);
return result;
}
function mergeStreams(original, highlighted, value) {
var processed = 0;
var result = '';
var nodeStack = [];
function selectStream() {
if (!original.length || !highlighted.length) {
return original.length ? original : highlighted;
}
if (original[0].offset != highlighted[0].offset) {
return (original[0].offset < highlighted[0].offset) ? original : highlighted;
}
/*
To avoid starting the stream just before it should stop the order is
ensured that original always starts first and closes last:
if (event1 == 'start' && event2 == 'start')
return original;
if (event1 == 'start' && event2 == 'stop')
return highlighted;
if (event1 == 'stop' && event2 == 'start')
return original;
if (event1 == 'stop' && event2 == 'stop')
return highlighted;
... which is collapsed to:
*/
return highlighted[0].event == 'start' ? original : highlighted;
}
function open(node) {
function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value) + '"';}
result += '<' + tag(node) + Array.prototype.map.call(node.attributes, attr_str).join('') + '>';
}
function close(node) {
result += '</' + tag(node) + '>';
}
function render(event) {
(event.event == 'start' ? open : close)(event.node);
}
while (original.length || highlighted.length) {
var stream = selectStream();
result += escape(value.substr(processed, stream[0].offset - processed));
processed = stream[0].offset;
if (stream == original) {
/*
On any opening or closing tag of the original markup we first close
the entire highlighted node stack, then render the original tag along
with all the following original tags at the same offset and then
reopen all the tags on the highlighted stack.
*/
nodeStack.reverse().forEach(close);
do {
render(stream.splice(0, 1)[0]);
stream = selectStream();
} while (stream == original && stream.length && stream[0].offset == processed);
nodeStack.reverse().forEach(open);
} else {
if (stream[0].event == 'start') {
nodeStack.push(stream[0].node);
} else {
nodeStack.pop();
}
render(stream.splice(0, 1)[0]);
}
}
return result + escape(value.substr(processed));
}
/* Initialization */
function compileLanguage(language) {
function reStr(re) {
return (re && re.source) || re;
}
function langRe(value, global) {
return new RegExp(
reStr(value),
'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')
);
}
function compileMode(mode, parent) {
if (mode.compiled)
return;
mode.compiled = true;
mode.keywords = mode.keywords || mode.beginKeywords;
if (mode.keywords) {
var compiled_keywords = {};
var flatten = function(className, str) {
if (language.case_insensitive) {
str = str.toLowerCase();
}
str.split(' ').forEach(function(kw) {
var pair = kw.split('|');
compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1];
});
};
if (typeof mode.keywords == 'string') { // string
flatten('keyword', mode.keywords);
} else {
Object.keys(mode.keywords).forEach(function (className) {
flatten(className, mode.keywords[className]);
});
}
mode.keywords = compiled_keywords;
}
mode.lexemesRe = langRe(mode.lexemes || /\b\w+\b/, true);
if (parent) {
if (mode.beginKeywords) {
mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b';
}
if (!mode.begin)
mode.begin = /\B|\b/;
mode.beginRe = langRe(mode.begin);
if (!mode.end && !mode.endsWithParent)
mode.end = /\B|\b/;
if (mode.end)
mode.endRe = langRe(mode.end);
mode.terminator_end = reStr(mode.end) || '';
if (mode.endsWithParent && parent.terminator_end)
mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end;
}
if (mode.illegal)
mode.illegalRe = langRe(mode.illegal);
if (mode.relevance === undefined)
mode.relevance = 1;
if (!mode.contains) {
mode.contains = [];
}
var expanded_contains = [];
mode.contains.forEach(function(c) {
if (c.variants) {
c.variants.forEach(function(v) {expanded_contains.push(inherit(c, v));});
} else {
expanded_contains.push(c == 'self' ? mode : c);
}
});
mode.contains = expanded_contains;
mode.contains.forEach(function(c) {compileMode(c, mode);});
if (mode.starts) {
compileMode(mode.starts, parent);
}
var terminators =
mode.contains.map(function(c) {
return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin;
})
.concat([mode.terminator_end, mode.illegal])
.map(reStr)
.filter(Boolean);
mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(/*s*/) {return null;}};
}
compileMode(language);
}
/*
Core highlighting function. Accepts a language name, or an alias, and a
string with the code to highlight. Returns an object with the following
properties:
- relevance (int)
- value (an HTML string with highlighting markup)
*/
function highlight(name, value, ignore_illegals, continuation) {
function subMode(lexeme, mode) {
for (var i = 0; i < mode.contains.length; i++) {
if (testRe(mode.contains[i].beginRe, lexeme)) {
return mode.contains[i];
}
}
}
function endOfMode(mode, lexeme) {
if (testRe(mode.endRe, lexeme)) {
while (mode.endsParent && mode.parent) {
mode = mode.parent;
}
return mode;
}
if (mode.endsWithParent) {
return endOfMode(mode.parent, lexeme);
}
}
function isIllegal(lexeme, mode) {
return !ignore_illegals && testRe(mode.illegalRe, lexeme);
}
function keywordMatch(mode, match) {
var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0];
return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str];
}
function buildSpan(classname, insideSpan, leaveOpen, noPrefix) {
var classPrefix = noPrefix ? '' : options.classPrefix,
openSpan = '<span class="' + classPrefix,
closeSpan = leaveOpen ? '' : '</span>';
openSpan += classname + '">';
return openSpan + insideSpan + closeSpan;
}
function processKeywords() {
if (!top.keywords)
return escape(mode_buffer);
var result = '';
var last_index = 0;
top.lexemesRe.lastIndex = 0;
var match = top.lexemesRe.exec(mode_buffer);
while (match) {
result += escape(mode_buffer.substr(last_index, match.index - last_index));
var keyword_match = keywordMatch(top, match);
if (keyword_match) {
relevance += keyword_match[1];
result += buildSpan(keyword_match[0], escape(match[0]));
} else {
result += escape(match[0]);
}
last_index = top.lexemesRe.lastIndex;
match = top.lexemesRe.exec(mode_buffer);
}
return result + escape(mode_buffer.substr(last_index));
}
function processSubLanguage() {
if (top.subLanguage && !languages[top.subLanguage]) {
return escape(mode_buffer);
}
var result = top.subLanguage ? highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : highlightAuto(mode_buffer);
// Counting embedded language score towards the host language may be disabled
// with zeroing the containing mode relevance. Usecase in point is Markdown that
// allows XML everywhere and makes every XML snippet to have a much larger Markdown
// score.
if (top.relevance > 0) {
relevance += result.relevance;
}
if (top.subLanguageMode == 'continuous') {
continuations[top.subLanguage] = result.top;
}
return buildSpan(result.language, result.value, false, true);
}
function processBuffer() {
return top.subLanguage !== undefined ? processSubLanguage() : processKeywords();
}
function startNewMode(mode, lexeme) {
var markup = mode.className? buildSpan(mode.className, '', true): '';
if (mode.returnBegin) {
result += markup;
mode_buffer = '';
} else if (mode.excludeBegin) {
result += escape(lexeme) + markup;
mode_buffer = '';
} else {
result += markup;
mode_buffer = lexeme;
}
top = Object.create(mode, {parent: {value: top}});
}
function processLexeme(buffer, lexeme) {
mode_buffer += buffer;
if (lexeme === undefined) {
result += processBuffer();
return 0;
}
var new_mode = subMode(lexeme, top);
if (new_mode) {
result += processBuffer();
startNewMode(new_mode, lexeme);
return new_mode.returnBegin ? 0 : lexeme.length;
}
var end_mode = endOfMode(top, lexeme);
if (end_mode) {
var origin = top;
if (!(origin.returnEnd || origin.excludeEnd)) {
mode_buffer += lexeme;
}
result += processBuffer();
do {
if (top.className) {
result += '</span>';
}
relevance += top.relevance;
top = top.parent;
} while (top != end_mode.parent);
if (origin.excludeEnd) {
result += escape(lexeme);
}
mode_buffer = '';
if (end_mode.starts) {
startNewMode(end_mode.starts, '');
}
return origin.returnEnd ? 0 : lexeme.length;
}
if (isIllegal(lexeme, top))
throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
/*
Parser should not reach this point as all types of lexemes should be caught
earlier, but if it does due to some bug make sure it advances at least one
character forward to prevent infinite looping.
*/
mode_buffer += lexeme;
return lexeme.length || 1;
}
var language = getLanguage(name);
if (!language) {
throw new Error('Unknown language: "' + name + '"');
}
compileLanguage(language);
var top = continuation || language;
var continuations = {}; // keep continuations for sub-languages
var result = '', current;
for(current = top; current != language; current = current.parent) {
if (current.className) {
result = buildSpan(current.className, '', true) + result;
}
}
var mode_buffer = '';
var relevance = 0;
try {
var match, count, index = 0;
while (true) {
top.terminators.lastIndex = index;
match = top.terminators.exec(value);
if (!match)
break;
count = processLexeme(value.substr(index, match.index - index), match[0]);
index = match.index + count;
}
processLexeme(value.substr(index));
for(current = top; current.parent; current = current.parent) { // close dangling modes
if (current.className) {
result += '</span>';
}
}
return {
relevance: relevance,
value: result,
language: name,
top: top
};
} catch (e) {
if (e.message.indexOf('Illegal') != -1) {
return {
relevance: 0,
value: escape(value)
};
} else {
throw e;
}
}
}
/*
Highlighting with language detection. Accepts a string with the code to
highlight. Returns an object with the following properties:
- language (detected language)
- relevance (int)
- value (an HTML string with highlighting markup)
- second_best (object with the same structure for second-best heuristically
detected language, may be absent)
*/
function highlightAuto(text, languageSubset) {
languageSubset = languageSubset || options.languages || Object.keys(languages);
var result = {
relevance: 0,
value: escape(text)
};
var second_best = result;
languageSubset.forEach(function(name) {
if (!getLanguage(name)) {
return;
}
var current = highlight(name, text, false);
current.language = name;
if (current.relevance > second_best.relevance) {
second_best = current;
}
if (current.relevance > result.relevance) {
second_best = result;
result = current;
}
});
if (second_best.language) {
result.second_best = second_best;
}
return result;
}
/*
Post-processing of the highlighted markup:
- replace TABs with something more useful
- replace real line-breaks with '<br>' for non-pre containers
*/
function fixMarkup(value) {
if (options.tabReplace) {
value = value.replace(/^((<[^>]+>|\t)+)/gm, function(match, p1 /*..., offset, s*/) {
return p1.replace(/\t/g, options.tabReplace);
});
}
if (options.useBR) {
value = value.replace(/\n/g, '<br>');
}
return value;
}
function buildClassName(prevClassName, currentLang, resultLang) {
var language = currentLang ? aliases[currentLang] : resultLang,
result = [prevClassName.trim()];
if (!prevClassName.match(/\bhljs\b/)) {
result.push('hljs');
}
if (prevClassName.indexOf(language) === -1) {
result.push(language);
}
return result.join(' ').trim();
}
/*
Applies highlighting to a DOM node containing code. Accepts a DOM node and
two optional parameters for fixMarkup.
*/
function highlightBlock(block) {
var language = blockLanguage(block);
console.log(language);
if (isNotHighlighted(language))
return;
var node;
if (options.useBR) {
node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(/<br[ \/]*>/g, '\n');
} else {
node = block;
}
var text = node.textContent;
var result = language ? highlight(language, text, true) : highlightAuto(text);
var originalStream = nodeStream(node);
if (originalStream.length) {
var resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
resultNode.innerHTML = result.value;
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
}
result.value = fixMarkup(result.value);
block.innerHTML = result.value;
block.className = buildClassName(block.className, language, result.language);
block.result = {
language: result.language,
re: result.relevance
};
if (result.second_best) {
block.second_best = {
language: result.second_best.language,
re: result.second_best.relevance
};
}
}
var options = {
classPrefix: 'hljs-',
tabReplace: null,
useBR: false,
languages: undefined
};
/*
Updates highlight.js global options with values passed in the form of an object
*/
function configure(user_options) {
options = inherit(options, user_options);
}
/*
Applies highlighting to all <pre><code>..</code></pre> blocks on a page.
*/
function initHighlighting() {
if (initHighlighting.called)
return;
initHighlighting.called = true;
var blocks = document.querySelectorAll('pre code');
Array.prototype.forEach.call(blocks, highlightBlock);
}
/*
Attaches highlighting to the page load event.
*/
function initHighlightingOnLoad() {
addEventListener('DOMContentLoaded', initHighlighting, false);
addEventListener('load', initHighlighting, false);
}
var languages = {};
var aliases = {};
function registerLanguage(name, language) {
var lang = languages[name] = language(hljs);
if (lang.aliases) {
lang.aliases.forEach(function(alias) {aliases[alias] = name;});
}
}
function listLanguages() {
return Object.keys(languages);
}
function getLanguage(name) {
return languages[name] || languages[aliases[name]];
}
/* Interface definition */
hljs.highlight = highlight;
hljs.highlightAuto = highlightAuto;
hljs.fixMarkup = fixMarkup;
hljs.highlightBlock = highlightBlock;
hljs.configure = configure;
hljs.initHighlighting = initHighlighting;
hljs.initHighlightingOnLoad = initHighlightingOnLoad;
hljs.registerLanguage = registerLanguage;
hljs.listLanguages = listLanguages;
hljs.getLanguage = getLanguage;
hljs.inherit = inherit;
// Common regexps
hljs.IDENT_RE = '[a-zA-Z]\\w*';
hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
hljs.C_NUMBER_RE = '\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
// Common modes
hljs.BACKSLASH_ESCAPE = {
begin: '\\\\[\\s\\S]', relevance: 0
};
hljs.APOS_STRING_MODE = {
className: 'string',
begin: '\'', end: '\'',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
};
hljs.QUOTE_STRING_MODE = {
className: 'string',
begin: '"', end: '"',
illegal: '\\n',
contains: [hljs.BACKSLASH_ESCAPE]
};
hljs.PHRASAL_WORDS_MODE = {
begin: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/
};
hljs.COMMENT = function (begin, end, inherits) {
var mode = hljs.inherit(
{
className: 'comment',
begin: begin, end: end,
contains: []
},
inherits || {}
);
mode.contains.push(hljs.PHRASAL_WORDS_MODE);
mode.contains.push({
className: 'doctag',
beginKeywords: "TODO FIXME NOTE BUG XXX",
relevance: 0
});
return mode;
};
hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$');
hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/');
hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$');
hljs.NUMBER_MODE = {
className: 'number',
begin: hljs.NUMBER_RE,
relevance: 0
};
hljs.C_NUMBER_MODE = {
className: 'number',
begin: hljs.C_NUMBER_RE,
relevance: 0
};
hljs.BINARY_NUMBER_MODE = {
className: 'number',
begin: hljs.BINARY_NUMBER_RE,
relevance: 0
};
hljs.CSS_NUMBER_MODE = {
className: 'number',
begin: hljs.NUMBER_RE + '(' +
'%|em|ex|ch|rem' +
'|vw|vh|vmin|vmax' +
'|cm|mm|in|pt|pc|px' +
'|deg|grad|rad|turn' +
'|s|ms' +
'|Hz|kHz' +
'|dpi|dpcm|dppx' +
')?',
relevance: 0
};
hljs.REGEXP_MODE = {
className: 'regexp',
begin: /\//, end: /\/[gimuy]*/,
illegal: /\n/,
contains: [
hljs.BACKSLASH_ESCAPE,
{
begin: /\[/, end: /\]/,
relevance: 0,
contains: [hljs.BACKSLASH_ESCAPE]
}
]
};
hljs.TITLE_MODE = {
className: 'title',
begin: hljs.IDENT_RE,
relevance: 0
};
hljs.UNDERSCORE_TITLE_MODE = {
className: 'title',
begin: hljs.UNDERSCORE_IDENT_RE,
relevance: 0
};
return hljs;
}));

3
server/files/javascript/library/highlight.languages.js

File diff suppressed because one or more lines are too long

1
server/files/javascript/library/highlight.languages.min.js

@ -1 +0,0 @@
window.hljs.registerLanguage("less",function(a){var b="[\\w-]+",c="("+b+"|@{"+b+"})+",d=[],e=[],f=function(a){return{className:"string",begin:"~?"+a+".*?"+a}},g=function(a,b,c){return{className:a,begin:b,relevance:c}},h=function(b,c,d){return a.inherit({className:b,begin:c+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},d)},i={begin:"\\(",end:"\\)",contains:e,relevance:0};e.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,f("'"),f('"'),a.CSS_NUMBER_MODE,g("hexcolor","#[0-9A-Fa-f]+\\b"),h("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),h("function",b),i,g("variable","@@?"+b,10),g("variable","@{"+b+"}"),g("built_in","~?`[^`]*?`"),{className:"attribute",begin:b+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var j=e.concat({begin:"{",end:"}",contains:d}),k={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(e)},l={className:"attribute",begin:c,end:":",excludeEnd:!0,contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:e,illegal:"[<=$]"}},m={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:e,relevance:0}},n={className:"variable",variants:[{begin:"@"+b+"\\s*:",relevance:15},{begin:"@"+b}],starts:{end:"[;}]",returnEnd:!0,contains:j}},o={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:c+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,k,g("keyword","all\\b"),g("variable","@{"+b+"}"),g("tag",c+"%?",0),g("id","#"+c),g("class","\\."+c,0),g("keyword","&",0),h("pseudo",":not"),h("keyword",":extend"),g("pseudo","::?"+c),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:j},{begin:"!important"}]};return d.push(a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,m,n,o,l),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:d}});

3
server/files/javascript/library/highlight.min.js

File diff suppressed because one or more lines are too long

212
server/files/stylesheets/docs.css

@ -584,6 +584,7 @@ blockquote .author {
padding: 0em;
max-height: 610px;
font-weight: normal;
transform: rotateZ(0deg);
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
}
@ -883,6 +884,9 @@ blockquote .author {
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0);
}
#example .example > .html > .top.attached.label {
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
display: none;
background-color: #F8F8F8;
box-shadow: 0px 0px 0px 1px #DDDDDD;
@ -916,13 +920,6 @@ blockquote .author {
UI Pages
*******************************/
/*--------------
Layouts
---------------*/
#example.layouts .main.container .right.rail .sticky {
display: none;
}
/*----------------
Getting Started
@ -1502,7 +1499,7 @@ body.progress.animated .ui.progress .bar {
*******************************/
.hljs {
code.code {
display: block;
overflow-x: auto;
padding: 0em;
@ -1515,140 +1512,165 @@ body.progress.animated .ui.progress .bar {
Hover Only
---------------*/
.hljs,
.hljs span {
code.code,
code.code span {
-moz-transition: 0.5s color ease;
-webkit-transition: 0.5s color ease;
-ms-transition: 0.5s color ease;
transition: 0.5s color ease;
}
.hljs {
code.code {
color: #333333;
}
.hljs.xml {
code.code.xml {
color: #555555;
}
.hljs.xml:hover {
code.code.xml:hover {
color: #333333;
}
/* Class Name */
.hljs-string,
.hljs-tag .hljs-value,
.hljs-phpdoc,
.hljs-dartdoc,
.tex .hljs-formula {
code .string,
code .tag .value,
code .phpdoc,
code .dartdoc,
code .tex .formula {
color: #008C79;
}
.code:hover .hljs-string,
.code:hover .hljs-tag .hljs-value,
.code:hover .hljs-phpdoc,
.code:hover .hljs-dartdoc,
.code:hover .tex .hljs-formula {
code:hover .string,
code:hover .tag .value,
code:hover .phpdoc,
code:hover .dartdoc,
code:hover .tex .formula {
color: #007b6b;
}
/* Comment */
.hljs-comment,
.hljs-template_comment,
.diff .hljs-header,
.hljs-javadoc {
code .comment,
code .template_comment,
code .diff .header,
code .javadoc {
color: #AAAAAA;
font-style: italic;
}
/* Properties */
.hljs-tag,
.hljs-rules .hljs-property,
.django .hljs-tag .hljs-keyword {
color: #D1D1D1;
code .tag,
code .rules .property,
code .django .tag .keyword {
color: #858188;
font-weight: normal;
}
.code:hover .hljs-tag,
.code:hover .hljs-rules .hljs-property,
.code:hover .django .hljs-tag .hljs-keyword {
code:hover .tag,
code:hover .rules .property,
code:hover .django .tag .keyword {
color: #892A6F;
font-weight: normal;
}
/* HTML Tag */
.hljs-tag .hljs-title {
color: #D1CDD4;
code .tag .title {
color: #858188;
font-weight: normal;
}
.code:hover .hljs-tag .hljs-title {
code:hover .tag .title {
color: #892A6F;
}
/* Attribute */
.hljs-attribute,
.hljs-variable,
.lisp .hljs-body {
color: #D1CECE;
code .attribute,
code .variable,
code .lisp .body {
color: #8D8A8A;
transition: color 0.3s;
}
.code:hover .hljs-attribute,
.code:hover .hljs-variable,
.code:hover .lisp .hljs-body {
code:hover .attribute,
code:hover .variable,
code:hover .lisp .body {
color: #934E4E;
}
/* CSS ID */
.hljs-title,
.hljs-id,
.scss .hljs-preprocessor {
color: #009FDA;
code .title,
code .id,
code .scss .preprocessor {
color: #9C989F;
font-weight: bold;
}
/* CSS Attribute */
.hljs-rule .hljs-attribute {
code .rule .attribute {
color: #892A6F;
}
.code:hover .hljs-rule .hljs-attribute {
code:hover .rule .attribute {
color: #892A6F;
}
/* CSS Value */
.hljs-number,
.hljs-hexcolor,
.ruby .hljs-constant {
code .number,
code .hexcolor,
code .ruby .constant {
color: #666666;
}
.code:hover .hljs-number,
.code:hover .hljs-hexcolor,
.code:hover .ruby .hljs-constant {
code:hover .number,
code:hover .hexcolor,
code:hover .ruby .constant {
color: #333333;
}
/* LESS */
.less .hljs-number,
.less .hljs-hexcolor,
.less .ruby .hljs-constant {
code.less .number,
code.less .hexcolor,
code.less .ruby .constant {
color: #005FAA;
}
.less:hover .hljs-number,
.less:hover .hljs-hexcolor,
.less:hover .ruby .hljs-constant {
code.less:hover .number,
code.less:hover .hexcolor,
code.less:hover .ruby .constant {
color: #005FAA;
}
/* LESS Variable */
.less .hljs-attribute,
.less .hljs-variable,
.less .lisp .hljs-body {
code.less .attribute,
code.less .variable,
code.less .lisp .body {
color: #333333;
transition: color 0.3s;
}
.less:hover .hljs-attribute,
.less:hover .hljs-variable,
.less:hover .lisp .hljs-body {
code.less:hover .attribute,
code.less:hover .variable,
code.less:hover .lisp .body {
color: #333333;
}
/* Emphasized Value */
code.code .class.string b,
code.code .class.value b {
padding: 0px;
font-weight: normal;
background-color: rgba(90, 90, 90, 0);
border-radius: 5px;
line-height: 1;
vertical-align: baseline;
display: inline-block;
transform: rotateZ(0deg);
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
code.code:hover .class.value {
/*color: #668C79;*/
}
code.code:hover .class.string b,
code.code:hover .class.value b {
background-color: rgba(98, 190, 169, 0.25);
color: #008078;
margin: 0px -2px;
padding: 2px 2px;
}
@ -1656,64 +1678,64 @@ body.progress.animated .ui.progress .bar {
Normal
---------------*/
.hljs-keyword,
.css .rule .hljs-keyword,
.hljs-winutils,
.javascript .hljs-title,
.nginx .hljs-title,
.hljs-subst,
.hljs-request,
.hljs-status {
code .keyword,
code .css .rule .keyword,
code .winutils,
code .javascript .title,
code .nginx .title,
code .subst,
code .request,
code .status {
color: #333;
font-weight: bold;
}
.javascript .hljs-title,
.hljs-list .hljs-keyword,
.hljs-subst {
code .javascript .title,
code .list .keyword,
code .subst {
font-weight: normal;
}
.hljs-class .hljs-title,
.hljs-type,
.vhdl .hljs-literal,
.tex .hljs-command {
code .class .title,
code .type,
code .vhdl .literal,
code .tex .command {
color: #458;
font-weight: bold;
}
.hljs-regexp {
code .regexp {
color: #009926;
}
.hljs-built_in {
code .built_in {
color: #0086b3;
}
.hljs-preprocessor,
.hljs-pragma,
.hljs-pi,
.hljs-doctype,
.hljs-shebang,
.hljs-cdata {
code .preprocessor,
code .pragma,
code .pi,
code .doctype,
code .shebang,
code .cdata {
color: #999;
font-weight: bold;
}
.hljs-deletion {
code .deletion {
background: #fdd;
}
.hljs-addition {
code .addition {
background: #dfd;
}
.diff .hljs-change {
code .diff .change {
background: #0086b3;
}
.hljs-chunk {
code .chunk {
color: #aaa;
}

12
server/partials/library-javascript.html.eco

@ -1,12 +1,16 @@
<% if 'development' in @getEnvironments(): %>
<script src="/javascript/library/jquery.js"></script>
<script src="/javascript/library/cookie.js"></script>
<script src="/javascript/library/easing.js"></script>
<script src="/javascript/library/highlight.min.js"></script>
<script src="/javascript/library/history.js"></script>
<script src="/javascript/library/tablesort.js"></script>
<% else: %>
<script src="/javascript/library/jquery.min.js"></script>
<% end %>
<script src="/javascript/library/cookie.js"></script>
<script src="/javascript/library/cookie.min.js"></script>
<script src="/javascript/library/easing.min.js"></script>
<script src="/javascript/library/highlight.min.js"></script>
<script src="/javascript/library/highlight.languages.min.js"></script>
<script src="/javascript/library/history.min.js"></script>
<script src="/javascript/library/tablesort.min.js"></script>
<% end %>

Loading…
Cancel
Save