blocks 3.0.0.rc4 → 3.0.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -2
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +3 -0
  5. data/CHANGELOG.rdoc +7 -0
  6. data/Gemfile +10 -3
  7. data/README.md +25 -9
  8. data/_config.yml +20 -0
  9. data/bin/deploy_docs +2 -0
  10. data/docs/.gitignore +4 -0
  11. data/docs/404.html +23 -0
  12. data/docs/_includes/acknowledgements.md +13 -0
  13. data/docs/_includes/caller-id.md +3 -0
  14. data/docs/_includes/configuration.md +3 -0
  15. data/docs/_includes/custom-builders.md +3 -0
  16. data/docs/_includes/defining.md +615 -0
  17. data/docs/_includes/demos/hooks-and-wrappers-output.html +109 -0
  18. data/docs/_includes/hooks.md +1156 -0
  19. data/docs/_includes/installation.md +25 -0
  20. data/docs/_includes/introduction.md +18 -0
  21. data/docs/_includes/option-merging.md +5 -0
  22. data/docs/_includes/rendering.md +622 -0
  23. data/docs/_includes/reserved-keywords.md +59 -0
  24. data/docs/_includes/skipping.md +403 -0
  25. data/docs/_includes/slate/assets.html +34 -0
  26. data/docs/_includes/slate/language-tabs.html +11 -0
  27. data/docs/_includes/templating.md +48 -0
  28. data/docs/_includes/templating/bootstrap_4_cards.md +753 -0
  29. data/docs/_includes/use-cases.md +23 -0
  30. data/docs/_includes/wip.md +34 -0
  31. data/docs/_includes/wrappers.md +629 -0
  32. data/docs/_layouts/slate.html +75 -0
  33. data/docs/_plugins/gem_version.rb +11 -0
  34. data/docs/_plugins/highlight_with_div.rb +25 -0
  35. data/docs/_sass/_default_styling.scss +627 -0
  36. data/docs/_sass/_icon-font.scss +26 -0
  37. data/docs/_sass/_normalize.scss +427 -0
  38. data/docs/_sass/_styling_overrides.scss +31 -0
  39. data/docs/_sass/_syntax.scss +78 -0
  40. data/docs/_sass/_variable_overrides.scss +10 -0
  41. data/docs/_sass/_variables.scss +105 -0
  42. data/docs/assets/javascripts/script.js +18 -0
  43. data/docs/assets/stylesheets/formChanges.less +106 -0
  44. data/docs/assets/stylesheets/style.css +46 -0
  45. data/docs/fonts/slate.eot +0 -0
  46. data/docs/fonts/slate.svg +14 -0
  47. data/docs/fonts/slate.ttf +0 -0
  48. data/docs/fonts/slate.woff +0 -0
  49. data/docs/fonts/slate.woff2 +0 -0
  50. data/docs/hooks.html +149 -0
  51. data/docs/hooks_and_wrappers_demo.html +313 -0
  52. data/docs/images/favicon.ico +0 -0
  53. data/docs/images/logo.png +0 -0
  54. data/docs/images/navbar.png +0 -0
  55. data/docs/images/placeholder.jpg +0 -0
  56. data/docs/images/render_strategies.png +0 -0
  57. data/docs/images/templating.png +0 -0
  58. data/docs/index.md +32 -0
  59. data/docs/javascripts/all.js +4 -0
  60. data/docs/javascripts/all_nosearch.js +3 -0
  61. data/docs/javascripts/app/lang.js +166 -0
  62. data/docs/javascripts/app/search.js +75 -0
  63. data/docs/javascripts/app/toc.js +57 -0
  64. data/docs/javascripts/demos/hooks_and_wrappers.js +9 -0
  65. data/docs/javascripts/lib/energize.js +169 -0
  66. data/docs/javascripts/lib/imagesloaded.min.js +7 -0
  67. data/docs/javascripts/lib/jquery.highlight.js +108 -0
  68. data/docs/javascripts/lib/jquery.js +9831 -0
  69. data/docs/javascripts/lib/jquery.tocify.js +1042 -0
  70. data/docs/javascripts/lib/jquery_ui.js +566 -0
  71. data/docs/javascripts/lib/lunr.js +1910 -0
  72. data/docs/stylesheets/demos/hooks_and_wrappers.scss +32 -0
  73. data/docs/stylesheets/print.scss +150 -0
  74. data/docs/stylesheets/screen.scss +10 -0
  75. data/lib/blocks/action_view_extensions/view_extensions.rb +1 -0
  76. data/lib/blocks/renderers/renderer.rb +1 -0
  77. data/lib/blocks/renderers/runtime_context.rb +30 -17
  78. data/lib/blocks/utilities/hash_with_render_strategy.rb +3 -0
  79. data/lib/blocks/version.rb +1 -1
  80. metadata +70 -2
@@ -0,0 +1,31 @@
1
+ body {
2
+ font-size: 14px;
3
+ }
4
+
5
+ .tocify-wrapper {
6
+ font-size: 14px;
7
+ & > img {
8
+ width: 80%;
9
+ margin: 1.8vw;
10
+ @media (max-width: $tablet-width) {
11
+ margin: 6vw;
12
+ }
13
+ }
14
+ & .tocify-subheader .tocify-item>a {
15
+ font-size: 13px;
16
+ }
17
+ }
18
+
19
+ .tocify-wrapper .tocify-item>a, .tocify-wrapper .toc-footer li {
20
+ padding: 5px $nav-padding 5px $nav-padding;
21
+ }
22
+
23
+ ul.search-results {
24
+ padding: 0;
25
+ }
26
+
27
+ .content > aside, aside.warning, aside.success {
28
+ text-shadow: none;
29
+ color: #FFFFFF;
30
+ font-weight: 500;
31
+ }
@@ -0,0 +1,78 @@
1
+ .highlight table td { padding: 5px; }
2
+ .highlight table pre { margin: 0; }
3
+ .highlight, .highlight .w {
4
+ color: #f8f8f2;
5
+ background-color: #272822;
6
+ }
7
+ .highlight .err {
8
+ color: #272822;
9
+ background-color: #f92672;
10
+ }
11
+ .highlight .c, .highlight .cd, .highlight .cm, .highlight .c1, .highlight .cs {
12
+ color: #75715e;
13
+ }
14
+ .highlight .cp {
15
+ color: #f4bf75;
16
+ }
17
+ .highlight .nt {
18
+ color: #f4bf75;
19
+ }
20
+ .highlight .o, .highlight .ow {
21
+ color: #f8f8f2;
22
+ }
23
+ .highlight .p, .highlight .pi {
24
+ color: #f8f8f2;
25
+ }
26
+ .highlight .gi {
27
+ color: #a6e22e;
28
+ }
29
+ .highlight .gd {
30
+ color: #f92672;
31
+ }
32
+ .highlight .gh {
33
+ color: #66d9ef;
34
+ background-color: #272822;
35
+ font-weight: bold;
36
+ }
37
+ .highlight .k, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kv {
38
+ color: #ae81ff;
39
+ }
40
+ .highlight .kc {
41
+ color: #fd971f;
42
+ }
43
+ .highlight .kt {
44
+ color: #fd971f;
45
+ }
46
+ .highlight .kd {
47
+ color: #fd971f;
48
+ }
49
+ .highlight .s, .highlight .sb, .highlight .sc, .highlight .sd, .highlight .s2, .highlight .sh, .highlight .sx, .highlight .s1 {
50
+ color: #a6e22e;
51
+ }
52
+ .highlight .sr {
53
+ color: #a1efe4;
54
+ }
55
+ .highlight .si {
56
+ color: #cc6633;
57
+ }
58
+ .highlight .se {
59
+ color: #cc6633;
60
+ }
61
+ .highlight .nn {
62
+ color: #f4bf75;
63
+ }
64
+ .highlight .nc {
65
+ color: #f4bf75;
66
+ }
67
+ .highlight .no {
68
+ color: #f4bf75;
69
+ }
70
+ .highlight .na {
71
+ color: #66d9ef;
72
+ }
73
+ .highlight .m, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo, .highlight .mb, .highlight .mx {
74
+ color: #a6e22e;
75
+ }
76
+ .highlight .ss {
77
+ color: #a6e22e;
78
+ }
@@ -0,0 +1,10 @@
1
+ $main-bg: #F9F9F9;
2
+
3
+ $nav-bg: #BEBEBE;
4
+ $nav-active-bg: #60A9C5;
5
+ $nav-subitem-bg: #A9A9A9;
6
+ $nav-width: 275px;
7
+ $examples-width: 50%;
8
+
9
+ $aside-warning-bg: #C24722;
10
+ $aside-notice-bg: #3a839f;
@@ -0,0 +1,105 @@
1
+ /*
2
+ Copyright 2008-2013 Concur Technologies, Inc.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may
5
+ not use this file except in compliance with the License. You may obtain
6
+ a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ License for the specific language governing permissions and limitations
14
+ under the License.
15
+ */
16
+
17
+
18
+ ////////////////////////////////////////////////////////////////////////////////
19
+ // CUSTOMIZE SLATE
20
+ ////////////////////////////////////////////////////////////////////////////////
21
+ // Use these settings to help adjust the appearance of Slate
22
+
23
+
24
+ // BACKGROUND COLORS
25
+ ////////////////////
26
+ $nav-bg: #393939 !default;
27
+ $examples-bg: #393939;
28
+ $code-bg: #292929;
29
+ $code-annotation-bg: #1c1c1c;
30
+ $nav-subitem-bg: #262626 !default;
31
+ $nav-active-bg: #2467af !default;
32
+ $lang-select-border: #000;
33
+ $lang-select-bg: #222;
34
+ $lang-select-active-bg: $examples-bg; // feel free to change this to blue or something
35
+ $lang-select-pressed-bg: #111; // color of language tab bg when mouse is pressed
36
+ $main-bg: #eaf2f6 !default;
37
+ $aside-notice-bg: #8fbcd4 !default;
38
+ $aside-warning-bg: #c97a7e !default;
39
+ $aside-success-bg: #6ac174;
40
+ $search-notice-bg: #c97a7e;
41
+
42
+
43
+ // TEXT COLORS
44
+ ////////////////////
45
+ $main-text: #333; // main content text color
46
+ $nav-text: #fff;
47
+ $nav-active-text: #fff;
48
+ $lang-select-text: #fff; // color of unselected language tab text
49
+ $lang-select-active-text: #fff; // color of selected language tab text
50
+ $lang-select-pressed-text: #fff; // color of language tab text when mouse is pressed
51
+
52
+
53
+ // SIZES
54
+ ////////////////////
55
+ $nav-width: 230px !default; // width of the navbar
56
+ $examples-width: 50% !default; // portion of the screen taken up by code examples
57
+ $logo-margin: 20px; // margin between nav items and logo, ignored if search is active
58
+ $main-padding: 28px; // padding to left and right of content & examples
59
+ $nav-padding: 15px; // padding to left and right of navbar
60
+ $nav-v-padding: 10px; // padding used vertically around search boxes and results
61
+ $nav-indent: 10px; // extra padding for ToC subitems
62
+ $code-annotation-padding: 13px; // padding inside code annotations
63
+ $h1-margin-bottom: 21px; // padding under the largest header tags
64
+ $tablet-width: 1200px; // min width before reverting to tablet size
65
+ $phone-width: $tablet-width - $nav-width; // min width before reverting to mobile size
66
+
67
+
68
+ // FONTS
69
+ ////////////////////
70
+ %default-font {
71
+ font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;
72
+ font-size: 13px;
73
+ }
74
+
75
+ %header-font {
76
+ @extend %default-font;
77
+ font-weight: bold;
78
+ }
79
+
80
+ %code-font {
81
+ font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
82
+ font-size: 12px;
83
+ line-height: 1.5;
84
+ }
85
+
86
+
87
+ // OTHER
88
+ ////////////////////
89
+ $nav-active-shadow: #000;
90
+ $nav-footer-border-color: #666;
91
+ $nav-embossed-border-top: #000;
92
+ $nav-embossed-border-bottom: #939393;
93
+ $main-embossed-text-shadow: 0px 1px 0px #fff;
94
+ $search-box-border-color: #666;
95
+
96
+
97
+ ////////////////////////////////////////////////////////////////////////////////
98
+ // INTERNAL
99
+ ////////////////////////////////////////////////////////////////////////////////
100
+ // These settings are probably best left alone.
101
+
102
+ %break-words {
103
+ word-break: break-all;
104
+ hyphens: auto;
105
+ }
@@ -0,0 +1,18 @@
1
+ (function() {
2
+
3
+ var app = angular.module('MainApp', ['ngAnimate']);
4
+
5
+ app.controller('MainCtrl', function($scope) {
6
+
7
+ $scope.CheckControlSize = function() {
8
+ if ($scope.inputSize == 'frm-sm') {
9
+ $scope.inputSize = 'sm';
10
+ }
11
+ if ($scope.inputSize == 'frm-lg') {
12
+ $scope.inputSize = 'lg';
13
+ }
14
+ }
15
+
16
+ });
17
+
18
+ }());
@@ -0,0 +1,106 @@
1
+ //recreate local variables
2
+ @input-height-base: 34px;
3
+ @input-height-small: 30px;
4
+ @input-height-large: 46px;
5
+ @padding-base-horizontal: 12px;
6
+ @grid-gutter-width: 30px;
7
+ @screen-sm-min: 768px;
8
+
9
+
10
+ .has-feedback {
11
+ // Right Icon Input Padding improvements
12
+ // when the padding mirrors the input height, it makes the icon look like it
13
+ // occupies a square on the side of the control
14
+ .form-control{
15
+ padding-right: @input-height-base;
16
+ }
17
+ .form-control.input-sm,
18
+ &.form-group-sm .form-control{
19
+ padding-right: @input-height-small;
20
+ }
21
+ .form-control.input-lg,
22
+ &.form-group-lg .form-control {
23
+ padding-right: @input-height-large;
24
+ }
25
+ }
26
+ .has-feedback-left {
27
+ // Left Icon Input Padding
28
+ .form-control {
29
+ //reset changes to right
30
+ padding-right: @padding-base-horizontal;
31
+ padding-left: @input-height-base;
32
+ }
33
+ .form-control.input-sm,
34
+ &.form-group-sm .form-control{
35
+ padding-left: @input-height-small;
36
+ }
37
+ .form-control.input-lg,
38
+ &.form-group-lg .form-control {
39
+ padding-left: @input-height-large;
40
+ }
41
+ }
42
+
43
+ // Left Align Icon
44
+ .has-feedback-left .form-control-feedback {
45
+ left: 0;
46
+ }
47
+
48
+ // Set Icon Line Height for vertical centering
49
+ // If using font awesome, library is likely to come after bootstrap library and
50
+ // override line-height set here. I'm inclined to use !important to make it
51
+ // easier for these line heights to persist in the case the icons are being
52
+ // used explicitly within an input box.
53
+ .form-control-feedback {
54
+ line-height: @input-height-base !important;
55
+ }
56
+ .input-sm + .form-control-feedback,
57
+ .form-horizontal .form-group-sm .form-control-feedback {
58
+ width: @input-height-small;
59
+ height: @input-height-small;
60
+ line-height: @input-height-small !important;
61
+ }
62
+ .input-lg + .form-control-feedback,
63
+ .form-horizontal .form-group-lg .form-control-feedback {
64
+ width: @input-height-large;
65
+ height: @input-height-large;
66
+ line-height: @input-height-large !important;
67
+ }
68
+
69
+
70
+ // Move Icon to top
71
+ // Added to first selector. If the form-control-feedback is not a sibling,
72
+ // but a child of a sibling, we want to move it up when there is no label.
73
+ .has-feedback label {
74
+ &.sr-only ~ .form-control-feedback,
75
+ &.sr-only ~ div .form-control-feedback {
76
+ top: 0;
77
+ }
78
+ }
79
+
80
+ .form-inline {
81
+ @media (min-width: @screen-sm-min) {
82
+ // Allow left aligned icon in inline form
83
+ .inline-feedback {
84
+ // enable absolute positioning
85
+ position: relative;
86
+ display: inline-block;
87
+ }
88
+
89
+ // Re-override the feedback icon.
90
+ .has-feedback .form-control-feedback {
91
+ top: 0;
92
+ }
93
+ }
94
+ }
95
+
96
+ .form-horizontal {
97
+ .has-feedback-left .form-control-feedback {
98
+ left: (@grid-gutter-width / 2);
99
+ }
100
+ }
101
+
102
+
103
+
104
+
105
+
106
+
@@ -0,0 +1,46 @@
1
+ /* Styles for Demo */
2
+ body {
3
+ background: #FAFCFF;
4
+ background-image: url('http://i.imgur.com/57EjZOf.png');
5
+ }
6
+ pre.prettyprint {
7
+ width: 600px;
8
+ overflow: auto;
9
+ }
10
+ pre.prettyprint > code {
11
+ width: initial;
12
+ word-wrap: normal;
13
+ white-space: pre;
14
+ }
15
+
16
+ /* fix height so won't jump around page */
17
+ .demo-space {
18
+ height: 100px;
19
+ }
20
+
21
+ .animate-show {
22
+ -webkit-transition:all ease-out 2s;
23
+ -moz-transition:all ease-out 2s;
24
+ -o-transition:all ease-out 2s;
25
+ transition:all ease-out 2s;
26
+
27
+ line-height:20px;
28
+ opacity:1;
29
+
30
+ }
31
+ .animate-show.ng-hide-remove.ng-hide-remove-active {
32
+ background: #37ff25; /* green */
33
+ }
34
+ .animate-show.ng-hide-add.ng-hide-add-active {
35
+ background: #ff2537; /* red */
36
+ }
37
+
38
+ .animate-show.ng-hide {
39
+ line-height:0;
40
+ opacity:0;
41
+ }
42
+
43
+ .settingsForm .form-group {
44
+ padding-bottom: 5px;
45
+ border-bottom: 1px solid lightgrey;
46
+ }
Binary file
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="slate" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M438.857 877.714q119.429 0 220.286-58.857t159.714-159.714 58.857-220.286-58.857-220.286-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857zM512 165.143v108.571q0 8-5.143 13.429t-12.571 5.429h-109.714q-7.429 0-13.143-5.714t-5.714-13.143v-108.571q0-7.429 5.714-13.143t13.143-5.714h109.714q7.429 0 12.571 5.429t5.143 13.429zM510.857 361.714l10.286 354.857q0 6.857-5.714 10.286-5.714 4.571-13.714 4.571h-125.714q-8 0-13.714-4.571-5.714-3.429-5.714-10.286l9.714-354.857q0-5.714 5.714-10t13.714-4.286h105.714q8 0 13.429 4.286t6 10z" />
11
+ <glyph unicode="&#xe602;" d="M585.143 164.571v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 676.571v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
12
+ <glyph unicode="&#xe606;" d="M733.714 531.428q0 16-10.286 26.286l-52 51.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-233.143-232.571-129.143 129.143q-10.857 10.857-25.714 10.857t-25.714-10.857l-52-51.429q-10.286-10.286-10.286-26.286 0-15.429 10.286-25.714l206.857-206.857q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l310.286 310.286q10.286 10.286 10.286 25.714zM877.714 438.857q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
13
+ <glyph unicode="&#xe607;" d="M658.286 475.428q0 105.714-75.143 180.857t-180.857 75.143-180.857-75.143-75.143-180.857 75.143-180.857 180.857-75.143 180.857 75.143 75.143 180.857zM950.857 0q0-29.714-21.714-51.429t-51.429-21.714q-30.857 0-51.429 21.714l-196 195.429q-102.286-70.857-228-70.857-81.714 0-156.286 31.714t-128.571 85.714-85.714 128.571-31.714 156.286 31.714 156.286 85.714 128.571 128.571 85.714 156.286 31.714 156.286-31.714 128.571-85.714 85.714-128.571 31.714-156.286q0-125.714-70.857-228l196-196q21.143-21.143 21.143-51.429z" horiz-adv-x="951" />
14
+ </font></defs></svg>
Binary file
Binary file
Binary file
@@ -0,0 +1,149 @@
1
+ <!DOCTYPE html>
2
+ <html ng-app="MainApp">
3
+
4
+ <head>
5
+ <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css" />
6
+ <link rel="stylesheet/less" type="text/css" href="assets/stylesheets/formChanges.less" />
7
+ <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
8
+ <link rel="stylesheet/less" type="text/css" href="assets/stylesheets/script.css" />
9
+
10
+ <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.7.3/less.min.js"></script>
11
+ <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.15/angular.min.js"></script>
12
+ <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.15/angular-animate.js"></script>
13
+ <script src="assets/javascripts/script.js"></script>
14
+ </head>
15
+
16
+ <body ng-controller="MainCtrl" ng-init="icons = 'glyph'; side = 'right'; useLabel = true; inputSize = 'reg'; formType = 'basic'; validation = 'none';">
17
+ <div class="container">
18
+
19
+ <h2>Settings</h2>
20
+
21
+ <form class="form-horizontal settingsForm" role="form">
22
+ <div class="form-group">
23
+ <label for="icons" class="col-xs-2 control-label">Icon Side:</label>
24
+ <div class="col-xs-10">
25
+ <label class="radio-inline">
26
+ <input type="radio" name="side" ng-model="side" value="left" >Left
27
+ </label>
28
+ <label class="radio-inline">
29
+ <input type="radio" name="side" ng-model="side" value="right" >Right
30
+ </label>
31
+ </div>
32
+ </div>
33
+ <div class="form-group">
34
+ <label for="icons" class="col-xs-2 control-label">Icon Set:</label>
35
+ <div class="col-xs-10">
36
+ <label class="radio-inline">
37
+ <input type="radio" name="icons" ng-model="icons" value="glyph" >Glypicon
38
+ </label>
39
+ <label class="radio-inline">
40
+ <input type="radio" name="icons" ng-model="icons" value="fa">Font Awesome
41
+ </label>
42
+ </div>
43
+ </div>
44
+ <div class="form-group">
45
+ <label for="icons" class="col-xs-2 control-label">Has Label:</label>
46
+ <div class="col-xs-10">
47
+ <div class="checkbox">
48
+ <label>
49
+ <input type="checkbox" ng-model="useLabel"> Use a Label
50
+ </label>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ <div class="form-group">
55
+ <label for="icons" class="col-xs-2 control-label">Control Size:</label>
56
+ <div class="col-xs-10">
57
+ <label class="radio-inline">
58
+ <input type="radio" name="inputSize" ng-model="inputSize" value="reg" >default
59
+ </label>
60
+ <label class="radio-inline">
61
+ <input type="radio" name="inputSize" ng-model="inputSize" value="sm" >input-sm
62
+ </label>
63
+ <label class="radio-inline">
64
+ <input type="radio" name="inputSize" ng-model="inputSize" value="lg" >input-lg
65
+ </label>
66
+ <label class="radio-inline" title="For Horizontal Form">
67
+ <input type="radio" name="inputSize" ng-model="inputSize" value="frm-sm" ng-disabled="formType != 'horizontal'" >form-sm
68
+ </label>
69
+ <label class="radio-inline" title="For Horizontal Form">
70
+ <input type="radio" name="inputSize" ng-model="inputSize" value="frm-lg" ng-disabled="formType != 'horizontal'">form-lg
71
+ </label>
72
+ </div>
73
+ </div>
74
+ <div class="form-group">
75
+ <label for="icons" class="col-xs-2 control-label">Form Type:</label>
76
+ <div class="col-xs-10">
77
+ <label class="radio-inline">
78
+ <input type="radio" name="formType" ng-model="formType" value="basic"
79
+ ng-click="CheckControlSize();">Basic
80
+ </label>
81
+ <label class="radio-inline">
82
+ <input type="radio" name="formType" ng-model="formType" value="horizontal" >Horizontal
83
+ </label>
84
+ <label class="radio-inline">
85
+ <input type="radio" name="formType" ng-model="formType" value="inline"
86
+ ng-click="CheckControlSize();">Inline
87
+ </label>
88
+ </div>
89
+ </div>
90
+ <div class="form-group">
91
+ <label for="icons" class="col-xs-2 control-label">Validation State:</label>
92
+ <div class="col-xs-10">
93
+ <label class="radio-inline">
94
+ <input type="radio" name="validation" ng-model="validation" value="none" >None
95
+ </label>
96
+ <label class="radio-inline">
97
+ <input type="radio" name="validation" ng-model="validation" value="success" >has-success
98
+ </label>
99
+ <label class="radio-inline">
100
+ <input type="radio" name="validation" ng-model="validation" value="warning" >has-warning
101
+ </label>
102
+ <label class="radio-inline">
103
+ <input type="radio" name="validation" ng-model="validation" value="error" >has-error
104
+ </label>
105
+ </div>
106
+ </div>
107
+ </form>
108
+
109
+
110
+
111
+ <h2>Demo</h2>
112
+
113
+ <div class="well demo-space">
114
+ <form role="form" ng-class="{'form-horizontal' : formType == 'horizontal', 'form-inline' : formType == 'inline'}">
115
+ <div class="form-group has-feedback"
116
+ ng-class="{'has-feedback-left' : side == 'left', 'form-group-sm' : inputSize == 'frm-sm', 'form-group-lg' : inputSize == 'frm-lg', 'has-success' : validation == 'success', 'has-warning' : validation == 'warning', 'has-error' : validation == 'error'}">
117
+ <label class="control-label"
118
+ ng-class="{'sr-only' : useLabel == false , 'col-sm-2' : formType == 'horizontal' && useLabel == true }">Username</label>
119
+ <div ng-class="{'inline-feedback' : formType == 'inline', 'col-sm-10' : formType == 'horizontal' && useLabel == true, 'col-sm-12' : formType == 'horizontal' && useLabel == false}">
120
+ <input type="text" class="form-control" placeholder="Username"
121
+ ng-class="{'input-sm' : inputSize == 'sm', 'input-lg' : inputSize == 'lg'}"/>
122
+ <i class="form-control-feedback" ng-class="{'glyphicon glyphicon-user' : icons == 'glyph', 'fa fa-user': icons == 'fa' } "></i>
123
+ </div>
124
+ </div>
125
+ </form>
126
+ </div>
127
+
128
+
129
+ <h2>Code</h2>
130
+
131
+ <pre class="prettyprint"><code>&lt;form role=&quot;form&quot;<span class="animate-show" ng-show="formType == 'horizontal'" > class="form-horizontal"</span><span class="animate-show" ng-show="formType == 'inline'" > class="form-inline"</span>&gt;
132
+ &lt;div class=&quot;form-group has-feedback<span class="animate-show" ng-show="validation == 'success'" > has-success</span><span class="animate-show" ng-show="validation == 'warning'" > has-warning</span><span class="animate-show" ng-show="validation == 'error'" > has-error</span><span class="animate-show" ng-show="side == 'left'" > has-feedback-left</span><span class="animate-show" ng-show="inputSize == 'frm-sm'" > form-group-sm</span><span class="animate-show" ng-show="inputSize == 'frm-lg'" > form-group-lg</span>&quot;&gt;
133
+ &lt;label class=&quot;control-label<span class="animate-show" ng-show="useLabel == false" > sr-only</span><span class="animate-show" ng-show="formType == 'horizontal' && useLabel == true" > col-sm-2</span>&quot;&gt;Username&lt;/label&gt;<span class="animate-show" ng-show="formType == 'horizontal'" >
134
+ &lt;div class=&quot;<span class="animate-show" ng-show="useLabel == true" > col-sm-10</span><span class="animate-show" ng-show="useLabel == false" > col-sm-12</span>&quot;&gt;</span><span class="animate-show" ng-show="formType == 'inline' && side == 'left'" >
135
+ &lt;div class=&quot;inline-feedback&quot;&gt;</span>
136
+ <span class="animate-show" ng-show="formType == 'horizontal' || (formType == 'inline' && side == 'left')" > </span>&lt;input type=&quot;text&quot; class=&quot;form-control<span class="animate-show" ng-show="inputSize == 'sm'" > input-sm</span><span class="animate-show" ng-show="inputSize == 'lg'" > input-lg</span>&quot; placeholder=&quot;Username&quot; /&gt;
137
+ <span class="animate-show" ng-show="formType == 'horizontal' || (formType == 'inline' && side == 'left')" > </span>&lt;i class=&quot;form-control-feedback<span class="animate-show" ng-show="icons == 'glyph'" > glyphicon glyphicon-user</span><span class="animate-show" ng-show="icons == 'fa'" > fa fa-user</span>&quot;&gt;&lt;/i&gt;<span class="animate-show" ng-show="formType == 'horizontal' || (formType == 'inline' && side == 'left')" >
138
+ &lt;/div&gt;</span>
139
+ &lt;/div&gt;
140
+ &lt;/form&gt;</code></pre>
141
+
142
+
143
+
144
+
145
+
146
+ </div>
147
+ </body>
148
+
149
+ </html>