diff --git a/server/documents/elements/segment.html.eco b/server/documents/elements/segment.html.eco index fc8df1759..abe1e9adb 100755 --- a/server/documents/elements/segment.html.eco +++ b/server/documents/elements/segment.html.eco @@ -35,7 +35,7 @@ themes : ['default', 'GitHub']

Piled

A segment can be formatted to look like a pile of pages

-

A header

+

A header

Te eum doming eirmod, nominati pertinacia argumentum ad his. Ex eam alia facete scriptorem, est autem aliquip detraxit at. Usu ocurreret referrentur at, cu epicurei appellantur vix. Cum ea laoreet recteque electram, eos choro alterum definiebas in. Vim dolorum definiebas an. Mei ex natum rebum iisque.

Audiam quaerendum eu sea, pro omittam definiebas ex. Te est latine definitiones. Quot wisi nulla ex duo. Vis sint solet expetenda ne, his te phaedrum referrentur consectetuer. Id vix fabulas oporteat, ei quo vide phaedrum, vim vivendum maiestatis in.

diff --git a/server/documents/index.html.eco b/server/documents/index.html.eco index dea8c1a89..f53c27a7c 100755 --- a/server/documents/index.html.eco +++ b/server/documents/index.html.eco @@ -52,7 +52,7 @@ type : 'Semantic'
Semantic is tag agnostic meaning you can use any html tags with UI elements.
-
+
Semantic
@@ -215,8 +215,8 @@ type : 'Semantic'
-
<%= uiElements.length %>
-
UI Elements
+
<%= uiElements.length %>
+
UI Elements
<% for element in uiElements: %> @@ -228,8 +228,8 @@ type : 'Semantic'
-
<%= uiCollections.length %>
-
UI Collections
+
<%= uiCollections.length %>
+
UI Collections
<% for element in uiCollections: %> @@ -241,8 +241,8 @@ type : 'Semantic'
-
<%= uiViews.length %>
-
UI Views
+
<%= uiViews.length %>
+
UI Views
<% for element in uiViews: %> @@ -254,8 +254,8 @@ type : 'Semantic'
-
<%= uiModules.length %>
-
UI Modules
+
<%= uiModules.length %>
+
UI Modules
<% for element in uiModules: %> diff --git a/server/documents/views/statistic.html.eco b/server/documents/views/statistic.html.eco new file mode 100644 index 000000000..dff20969d --- /dev/null +++ b/server/documents/views/statistic.html.eco @@ -0,0 +1,203 @@ +--- +layout : 'default' +css : 'stat' + +title : 'Statistic' +description : 'A statistic is used to present a single value measurement of an attribute' +type : 'UI View' + +element : 'statistic' +elementType : 'view' + +themes : ['Default'] +--- + +<%- @partial('header') %> + + + + +
+ +
+ +
+ +

Types

+ +
+

Statistic

+

A statistic

+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+ +
+

Statistic

+

A group of statistics

+
+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+
+ 31 +
+
+ Famous Dogs in Films +
+
+
+
+ 22 +
+
+ US Presidents Owned Dogs +
+
+
+
+ +

Content

+ +
+

Value

+

A statistic can contain a numeric, icon, image, or text value

+
+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+
+ Two Hundred +
+
+ Dogs I've Owned +
+
+
+
+ +
+
+ Current Mood +
+
+
+
+ + 11 +
+
+ Puppies +
+
+
+
+ +
+

Label

+

A statistic can contain a label to help provide context for the presented value

+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+ + +

Variations

+ +
+

Horizontal Statistic

+

A statistic can present its measurement horizontally

+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+
+
+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+
+ 31 +
+
+ Famous Dogs in Films +
+
+
+
+ 22 +
+
+ US Presidents Owned Dogs +
+
+
+
+ +
+

Inverted

+

A statistic can be formatted to fit on a dark background

+
+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+
+ +
+

Floated

+

An statistic can sit to the left or right of other content

+
+
+ 22 +
+
+ Breeds of Dog +
+
+
+ +
diff --git a/server/files/images/demo/transparent-dog.png b/server/files/images/demo/transparent-dog.png new file mode 100644 index 000000000..6ce51691f Binary files /dev/null and b/server/files/images/demo/transparent-dog.png differ diff --git a/src/definitions/views/statistic.less b/src/definitions/views/statistic.less index 66632658d..587190693 100755 --- a/src/definitions/views/statistic.less +++ b/src/definitions/views/statistic.less @@ -21,30 +21,176 @@ /******************************* Statistic *******************************/ + .ui.statistic { - margin: 1em 0em; - text-align: center; + display: @display; + margin: @margin; } -.ui.statistic:first-child { - margin-top: 0em; +/******************************* + Group +*******************************/ + +.ui.statistics { + display: @groupDisplay; + margin: @groupMargin; +} + +/* Clearing */ +.ui.statistics:after { + display: block; + content: ' '; + height: 0px; + clear: both; + overflow: hidden; + visibility: hidden; } -.ui.statistic:last-child { +.ui.statistics:first-child { + margin-top: 0em; +} +.ui.statistics:last-child { margin-bottom: 0em; } +/* Each */ +.ui.statistics > .statistic { + display: @elementDisplay; + float: @elementFloat; + margin: @elementMargin; +} + + /******************************* Content *******************************/ -.ui.statistic > .number { - font-size: 4em; - font-weight: 300; - color: rgba(0, 0, 0, 0.7); + +/*-------------- + Value +---------------*/ + +.ui.statistics .statistic > .value, +.ui.statistic > .value { + font-family: @valueFont; + font-size: @valueSize; + font-weight: @valueFontWeight; + line-height: @valueLineHeight; + color: @valueColor; + text-transform: @valueTextTransform; + text-align: @textAlign; +} + +/*-------------- + Label +---------------*/ + +.ui.statistics .statistic > .label, +.ui.statistic > .label { + margin-top: @labelDistance; + font-family: @labelFont; + font-size: @labelSize; + font-weight: @labelFontWeight; + color: @labelColor; + text-transform: @labelTextTransform; + text-align: @textAlign; +} + + +/******************************* + Types +*******************************/ + +/*-------------- + Icon Value +---------------*/ + +.ui.statistics .statistic > .value .icon, +.ui.statistic > .value .icon { + opacity: 1; +} + +/*-------------- + Text Value +---------------*/ + +.ui.statistics .statistic > .text.value, +.ui.statistic > .text.value { + font-size: 2em; + line-height: 1em; + min-height: 4rem; + text-align: left; +} +.ui.statistics .statistic > .text.value + .label, +.ui.statistic > .text.value + .label { + text-align: left; +} + +/*-------------- + Image Value +---------------*/ + +.ui.statistics .statistic > .value img, +.ui.statistic > .value img { + max-height: 4rem; + vertical-align: top; +} + + + +/******************************* + Variations +*******************************/ + +/*-------------- + Horizontal +---------------*/ + +.ui.horizontal.statistics, +.ui.horizontal.statistic { + display: block; + margin: 0em; +} +.ui.horizontal.statistics .statistic { + float: none; + margin: @horizontalGroupElementMargin; +} + +.ui.horizontal.statistics .statistic > .value, +.ui.horizontal.statistic > .value { + display: inline-block; + vertical-align: middle; + font-size: @horizontalValueSize; +} +.ui.horizontal.statistics .statistic > .label, +.ui.horizontal.statistic > .label { + display: inline-block; + vertical-align: middle; + margin: 0em 0em 0em @horizontalLabelDistance; +} + + + +/*-------------- + Floated +---------------*/ + +.ui.left.floated.statistic { + float: left; +} +.ui.right.floated.statistic { + float: right; +} + +/*-------------- + Inverted +---------------*/ + +.ui.inverted.statistic .value { + color: @invertedValueColor; } -.ui.statistic > .description { - opacity: 0.8; +.ui.inverted.statistic .label { + color: @invertedLabelColor; } .loadUIOverrides(); diff --git a/src/themes/packages/default/views/statistic.variables b/src/themes/packages/default/views/statistic.variables index a1f5708dc..454f14021 100644 --- a/src/themes/packages/default/views/statistic.variables +++ b/src/themes/packages/default/views/statistic.variables @@ -2,17 +2,60 @@ Statistic *******************************/ - /*------------------- View --------------------*/ +@display: inline-block; +@margin: 1em 0em; +@textAlign: center; + +/* Group */ +@groupDisplay: block; +@groupMargin: 1em -@horizontalSpacing; +@horizontalSpacing: 1.5em; +@rowSpacing: 2em; +@elementFloat: left; +@elementDisplay: block; +@elementMargin: 0em @horizontalSpacing @rowSpacing; + /*------------------- Elements --------------------*/ +/* Value */ +@valueFont: @pageFont; +@valueFontWeight: normal; +@valueLineHeight: 1em; +@valueSize: 4em; +@valueColor: @black; +@valueTextTransform: uppercase; +/* Label */ +@labelDistance: 0.25em; +@labelFont: @headerFont; +@labelFontWeight: normal; +@labelSize: 1em; +@labelColor: @unselectedTextColor; +@labelLineHeight: 1.33em; +@labelTextTransform: none; + +/*------------------- + Types +--------------------*/ + +@horizontalGroupElementMargin: 1em 0em; +@horizontalValueSize: 3em; +@horizontalLabelDistance: 0.75em; /*------------------- Variations ---------------------*/ \ No newline at end of file +--------------------*/ + +/* Floated */ + +/* Inverted */ +@invertedValueColor: @invertedTextColor; +@invertedLabelColor: @invertedLightTextColor; + +/* Size */