uikit-rails 0.0.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -3
- data/Gemfile +2 -1
- data/LICENSE.txt +21 -0
- data/README.md +65 -0
- data/Rakefile +0 -1
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/javascripts/components/accordion.js +174 -0
- data/assets/javascripts/components/accordion.min.js +2 -0
- data/assets/javascripts/components/autocomplete.js +334 -0
- data/assets/javascripts/components/autocomplete.min.js +2 -0
- data/assets/javascripts/components/datepicker.js +3166 -0
- data/assets/javascripts/components/datepicker.min.js +3 -0
- data/assets/javascripts/components/form-password.js +67 -0
- data/assets/javascripts/components/form-password.min.js +2 -0
- data/assets/javascripts/components/form-select.js +70 -0
- data/assets/javascripts/components/form-select.min.js +2 -0
- data/assets/javascripts/components/grid.js +527 -0
- data/assets/javascripts/components/grid.min.js +2 -0
- data/assets/javascripts/components/htmleditor.js +623 -0
- data/assets/javascripts/components/htmleditor.min.js +2 -0
- data/assets/javascripts/components/lightbox.js +555 -0
- data/assets/javascripts/components/lightbox.min.js +2 -0
- data/assets/javascripts/components/nestable.js +638 -0
- data/assets/javascripts/components/nestable.min.js +2 -0
- data/assets/javascripts/components/notify.js +189 -0
- data/assets/javascripts/components/notify.min.js +2 -0
- data/assets/javascripts/components/pagination.js +147 -0
- data/assets/javascripts/components/pagination.min.js +2 -0
- data/assets/javascripts/components/parallax.js +435 -0
- data/assets/javascripts/components/parallax.min.js +2 -0
- data/assets/javascripts/components/search.js +92 -0
- data/assets/javascripts/components/search.min.js +2 -0
- data/assets/javascripts/components/slider.js +531 -0
- data/assets/javascripts/components/slider.min.js +2 -0
- data/assets/javascripts/components/slideset.js +506 -0
- data/assets/javascripts/components/slideset.min.js +2 -0
- data/assets/javascripts/components/slideshow-fx.js +375 -0
- data/assets/javascripts/components/slideshow-fx.min.js +2 -0
- data/assets/javascripts/components/slideshow.js +562 -0
- data/assets/javascripts/components/slideshow.min.js +2 -0
- data/assets/javascripts/components/sortable.js +688 -0
- data/assets/javascripts/components/sortable.min.js +2 -0
- data/assets/javascripts/components/sticky.js +359 -0
- data/assets/javascripts/components/sticky.min.js +2 -0
- data/assets/javascripts/components/timepicker.js +192 -0
- data/assets/javascripts/components/timepicker.min.js +2 -0
- data/assets/javascripts/components/tooltip.js +234 -0
- data/assets/javascripts/components/tooltip.min.js +2 -0
- data/assets/javascripts/components/upload.js +260 -0
- data/assets/javascripts/components/upload.min.js +2 -0
- data/assets/javascripts/core/alert.js +66 -0
- data/assets/javascripts/core/alert.min.js +2 -0
- data/assets/javascripts/core/button.js +157 -0
- data/assets/javascripts/core/button.min.js +2 -0
- data/assets/javascripts/core/core.js +730 -0
- data/assets/javascripts/core/core.min.js +2 -0
- data/assets/javascripts/core/cover.js +95 -0
- data/assets/javascripts/core/cover.min.js +2 -0
- data/assets/javascripts/core/dropdown.js +514 -0
- data/assets/javascripts/core/dropdown.min.js +2 -0
- data/assets/javascripts/core/grid.js +114 -0
- data/assets/javascripts/core/grid.min.js +2 -0
- data/assets/javascripts/core/modal.js +384 -0
- data/assets/javascripts/core/modal.min.js +2 -0
- data/assets/javascripts/core/nav.js +136 -0
- data/assets/javascripts/core/nav.min.js +2 -0
- data/assets/javascripts/core/offcanvas.js +180 -0
- data/assets/javascripts/core/offcanvas.min.js +2 -0
- data/assets/javascripts/core/scrollspy.js +208 -0
- data/assets/javascripts/core/scrollspy.min.js +2 -0
- data/assets/javascripts/core/smooth-scroll.js +62 -0
- data/assets/javascripts/core/smooth-scroll.min.js +2 -0
- data/assets/javascripts/core/switcher.js +309 -0
- data/assets/javascripts/core/switcher.min.js +2 -0
- data/assets/javascripts/core/tab.js +167 -0
- data/assets/javascripts/core/tab.min.js +2 -0
- data/assets/javascripts/core/toggle.js +120 -0
- data/assets/javascripts/core/toggle.min.js +2 -0
- data/assets/javascripts/core/touch.js +175 -0
- data/assets/javascripts/core/touch.min.js +2 -0
- data/assets/javascripts/core/utility.js +289 -0
- data/assets/javascripts/core/utility.min.js +2 -0
- data/assets/javascripts/uikit-components.js +23 -0
- data/assets/javascripts/uikit.js +3706 -0
- data/assets/javascripts/uikit.min.js +3 -0
- data/assets/stylesheets/components/accordion.scss +94 -0
- data/assets/stylesheets/components/autocomplete.scss +102 -0
- data/assets/stylesheets/components/datepicker.scss +197 -0
- data/assets/stylesheets/components/dotnav.scss +212 -0
- data/assets/stylesheets/components/form-advanced.scss +128 -0
- data/assets/stylesheets/components/form-file.scss +63 -0
- data/assets/stylesheets/components/form-password.scss +74 -0
- data/assets/stylesheets/components/form-select.scss +66 -0
- data/assets/stylesheets/components/htmleditor.scss +269 -0
- data/assets/stylesheets/components/nestable.scss +229 -0
- data/assets/stylesheets/components/notify.scss +190 -0
- data/assets/stylesheets/components/placeholder.scss +66 -0
- data/assets/stylesheets/components/progress.scss +173 -0
- data/assets/stylesheets/components/search.scss +309 -0
- data/assets/stylesheets/components/slidenav.scss +183 -0
- data/assets/stylesheets/components/slider.scss +131 -0
- data/assets/stylesheets/components/slideshow.scss +208 -0
- data/assets/stylesheets/components/sortable.scss +122 -0
- data/assets/stylesheets/components/sticky.scss +64 -0
- data/assets/stylesheets/components/tooltip.scss +177 -0
- data/assets/stylesheets/components/upload.scss +34 -0
- data/assets/stylesheets/core/alert.scss +141 -0
- data/assets/stylesheets/core/animation.scss +599 -0
- data/assets/stylesheets/core/article.scss +139 -0
- data/assets/stylesheets/core/badge.scss +110 -0
- data/assets/stylesheets/core/base-noconflict.scss +397 -0
- data/assets/stylesheets/core/base.scss +541 -0
- data/assets/stylesheets/core/block.scss +153 -0
- data/assets/stylesheets/core/breadcrumb.scss +86 -0
- data/assets/stylesheets/core/button.scss +406 -0
- data/assets/stylesheets/core/close.scss +132 -0
- data/assets/stylesheets/core/column.scss +209 -0
- data/assets/stylesheets/core/comment.scss +172 -0
- data/assets/stylesheets/core/contrast.scss +493 -0
- data/assets/stylesheets/core/cover.scss +70 -0
- data/assets/stylesheets/core/description-list.scss +71 -0
- data/assets/stylesheets/core/dropdown.scss +280 -0
- data/assets/stylesheets/core/flex.scss +320 -0
- data/assets/stylesheets/core/form.scss +627 -0
- data/assets/stylesheets/core/grid.scss +688 -0
- data/assets/stylesheets/core/icon.scss +897 -0
- data/assets/stylesheets/core/list.scss +102 -0
- data/assets/stylesheets/core/modal.scss +341 -0
- data/assets/stylesheets/core/nav.scss +468 -0
- data/assets/stylesheets/core/navbar.scss +325 -0
- data/assets/stylesheets/core/offcanvas.scss +168 -0
- data/assets/stylesheets/core/overlay.scss +534 -0
- data/assets/stylesheets/core/pagination.scss +197 -0
- data/assets/stylesheets/core/panel.scss +332 -0
- data/assets/stylesheets/core/print.scss +59 -0
- data/assets/stylesheets/core/subnav.scss +213 -0
- data/assets/stylesheets/core/switcher.scss +38 -0
- data/assets/stylesheets/core/tab.scss +368 -0
- data/assets/stylesheets/core/table.scss +147 -0
- data/assets/stylesheets/core/text.scss +128 -0
- data/assets/stylesheets/core/thumbnail.scss +122 -0
- data/assets/stylesheets/core/thumbnav.scss +122 -0
- data/assets/stylesheets/core/utility.scss +606 -0
- data/assets/stylesheets/core/variables.scss +23 -0
- data/assets/stylesheets/uikit-components.scss +22 -0
- data/assets/stylesheets/uikit-mixins.scss +327 -0
- data/assets/stylesheets/uikit-variables.scss +817 -0
- data/assets/stylesheets/uikit.scss +56 -0
- data/lib/uikit-rails.rb +2 -2
- data/lib/uikit-rails/engine.rb +11 -1
- data/lib/uikit-rails/version.rb +1 -3
- data/uikit-rails.gemspec +15 -16
- metadata +169 -44
- data/README.rb +0 -1
- data/vendor/assets/javascripts/ui.card.js +0 -115
- data/vendor/assets/javascripts/ui.color-picker.js +0 -351
- data/vendor/assets/javascripts/ui.confirmation.js +0 -133
- data/vendor/assets/javascripts/ui.dialog.js +0 -252
- data/vendor/assets/javascripts/ui.emitter.js +0 -99
- data/vendor/assets/javascripts/ui.js +0 -1641
- data/vendor/assets/javascripts/ui.menu.js +0 -238
- data/vendor/assets/javascripts/ui.notification.js +0 -240
- data/vendor/assets/javascripts/ui.overlay.js +0 -79
- data/vendor/assets/javascripts/ui.split-button.js +0 -108
- data/vendor/assets/stylesheets/ui.card.css +0 -55
- data/vendor/assets/stylesheets/ui.color-picker.css +0 -6
- data/vendor/assets/stylesheets/ui.confirmation.css +0 -7
- data/vendor/assets/stylesheets/ui.css +0 -337
- data/vendor/assets/stylesheets/ui.dialog.css +0 -92
- data/vendor/assets/stylesheets/ui.menu.css +0 -32
- data/vendor/assets/stylesheets/ui.notification.css +0 -107
- data/vendor/assets/stylesheets/ui.overlay.css +0 -16
- data/vendor/assets/stylesheets/ui.split-button.css +0 -27
@@ -0,0 +1,128 @@
|
|
1
|
+
// Name: Form advanced
|
2
|
+
// Description: Custom appearance of radio and checkbox buttons
|
3
|
+
//
|
4
|
+
// Component: `uk-form`
|
5
|
+
//
|
6
|
+
// ========================================================================
|
7
|
+
|
8
|
+
|
9
|
+
// Variables
|
10
|
+
// ========================================================================
|
11
|
+
|
12
|
+
$form-advanced-size: 14px !default;
|
13
|
+
$form-advanced-border: #aaa !default;
|
14
|
+
$form-advanced-border-width: 1px !default;
|
15
|
+
$form-advanced-margin-top: -4px !default;
|
16
|
+
$form-advanced-color: transparent !default;
|
17
|
+
|
18
|
+
$form-advanced-checked-color: #00a8e6 !default;
|
19
|
+
|
20
|
+
$form-advanced-radio-size: 8px !default;
|
21
|
+
|
22
|
+
$form-advanced-checkbox-icon: "\f00c" !default;
|
23
|
+
$form-advanced-checkbox-indeterminate-icon: "\f068" !default;
|
24
|
+
$form-advanced-checkbox-font-size: 12px !default;
|
25
|
+
|
26
|
+
$form-advanced-disabled-border: #ddd !default;
|
27
|
+
$form-advanced-disabled-color: #aaa !default;
|
28
|
+
|
29
|
+
|
30
|
+
/* ========================================================================
|
31
|
+
Component: Form advanced
|
32
|
+
Note: Only works in Webkit at the moment
|
33
|
+
========================================================================== */
|
34
|
+
|
35
|
+
/*
|
36
|
+
* 1. Style
|
37
|
+
* 2. Makes box more robust so it clips the child element
|
38
|
+
* 3. Vertical alignment
|
39
|
+
* 4. Remove default style
|
40
|
+
* 5. Fix black background on iOS
|
41
|
+
*/
|
42
|
+
|
43
|
+
|
44
|
+
.uk-form input[type="radio"],
|
45
|
+
.uk-form input[type="checkbox"] {
|
46
|
+
/* 1 */
|
47
|
+
display: inline-block;
|
48
|
+
height: $form-advanced-size;
|
49
|
+
width: $form-advanced-size;
|
50
|
+
border: $form-advanced-border-width solid $form-advanced-border;
|
51
|
+
/* 2 */
|
52
|
+
overflow: hidden;
|
53
|
+
/* 3 */
|
54
|
+
margin-top: $form-advanced-margin-top;
|
55
|
+
vertical-align: middle;
|
56
|
+
/* 4 */
|
57
|
+
-webkit-appearance: none;
|
58
|
+
outline: 0;
|
59
|
+
/* 5 */
|
60
|
+
background: $form-advanced-color;
|
61
|
+
@include hook-form-advanced();
|
62
|
+
}
|
63
|
+
|
64
|
+
/* Radio */
|
65
|
+
.uk-form input[type="radio"] { border-radius: 50%; }
|
66
|
+
|
67
|
+
/*
|
68
|
+
* Checked
|
69
|
+
*/
|
70
|
+
|
71
|
+
.uk-form input[type=radio]:before,
|
72
|
+
.uk-form input[type=checkbox]:before {
|
73
|
+
display: block;
|
74
|
+
@include hook-form-advanced-checked();
|
75
|
+
}
|
76
|
+
|
77
|
+
/* Radio */
|
78
|
+
.uk-form input[type=radio]:checked:before {
|
79
|
+
content: '';
|
80
|
+
width: $form-advanced-radio-size;
|
81
|
+
height: $form-advanced-radio-size;
|
82
|
+
margin: (($form-advanced-size - (2 * $form-advanced-border-width) - $form-advanced-radio-size) / 2) auto 0;
|
83
|
+
border-radius: 50%;
|
84
|
+
background: $form-advanced-checked-color;
|
85
|
+
@include hook-form-advanced-radio();
|
86
|
+
}
|
87
|
+
|
88
|
+
/* Checkbox */
|
89
|
+
.uk-form input[type=checkbox]:checked:before,
|
90
|
+
.uk-form input[type=checkbox]:indeterminate:before {
|
91
|
+
content: $form-advanced-checkbox-icon;
|
92
|
+
font-family: FontAwesome;
|
93
|
+
font-size: $form-advanced-checkbox-font-size;
|
94
|
+
-webkit-font-smoothing: antialiased;
|
95
|
+
text-align: center;
|
96
|
+
line-height: $form-advanced-size - (2 * $form-advanced-border-width);
|
97
|
+
color: $form-advanced-checked-color;
|
98
|
+
@include hook-form-advanced-checkbox();
|
99
|
+
}
|
100
|
+
|
101
|
+
.uk-form input[type=checkbox]:indeterminate:before { content: $form-advanced-checkbox-indeterminate-icon; }
|
102
|
+
|
103
|
+
/*
|
104
|
+
* Disabled
|
105
|
+
*/
|
106
|
+
|
107
|
+
.uk-form input[type=radio]:disabled,
|
108
|
+
.uk-form input[type=checkbox]:disabled {
|
109
|
+
border-color: $form-advanced-disabled-border;
|
110
|
+
@include hook-form-advanced-disabled();
|
111
|
+
}
|
112
|
+
|
113
|
+
.uk-form input[type=radio]:disabled:checked:before { background-color: $form-advanced-disabled-color; }
|
114
|
+
.uk-form input[type=checkbox]:disabled:checked:before,
|
115
|
+
.uk-form input[type=checkbox]:disabled:indeterminate:before { color: $form-advanced-disabled-color; }
|
116
|
+
|
117
|
+
|
118
|
+
// Hooks
|
119
|
+
// ========================================================================
|
120
|
+
|
121
|
+
@include hook-form-advanced-misc();
|
122
|
+
|
123
|
+
// @mixin hook-form-advanced(){}
|
124
|
+
// @mixin hook-form-advanced-checked(){}
|
125
|
+
// @mixin hook-form-advanced-radio(){}
|
126
|
+
// @mixin hook-form-advanced-checkbox(){}
|
127
|
+
// @mixin hook-form-advanced-disabled(){}
|
128
|
+
// @mixin hook-form-advanced-misc(){}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
// Name: Form file
|
2
|
+
// Description: Extends form component
|
3
|
+
//
|
4
|
+
// Component: `uk-form`
|
5
|
+
//
|
6
|
+
// Sub-objects: `uk-form-file`
|
7
|
+
//
|
8
|
+
// Markup:
|
9
|
+
//
|
10
|
+
// <!-- uk-form-file -->
|
11
|
+
// <div class="uk-form-file">
|
12
|
+
// <button class="uk-button"></button>
|
13
|
+
// <input type="file">
|
14
|
+
// </div>
|
15
|
+
//
|
16
|
+
// ========================================================================
|
17
|
+
|
18
|
+
|
19
|
+
/* ========================================================================
|
20
|
+
Component: Form file
|
21
|
+
========================================================================== */
|
22
|
+
|
23
|
+
/*
|
24
|
+
* 1. Behave like form elements
|
25
|
+
* 2. Create position context for dropdowns
|
26
|
+
* 3. Clip content
|
27
|
+
*/
|
28
|
+
|
29
|
+
.uk-form-file {
|
30
|
+
/* 1 */
|
31
|
+
display: inline-block;
|
32
|
+
vertical-align: middle;
|
33
|
+
/* 2 */
|
34
|
+
position: relative;
|
35
|
+
/* 3 */
|
36
|
+
overflow: hidden;
|
37
|
+
}
|
38
|
+
|
39
|
+
/*
|
40
|
+
* 1. Required for Firefox
|
41
|
+
* 2. Expand height and required for the cursor
|
42
|
+
*/
|
43
|
+
|
44
|
+
.uk-form-file input[type="file"] {
|
45
|
+
position: absolute;
|
46
|
+
top: 0;
|
47
|
+
z-index: 1;
|
48
|
+
width: 100%;
|
49
|
+
opacity: 0;
|
50
|
+
cursor: pointer;
|
51
|
+
/* 1 */
|
52
|
+
left: 0;
|
53
|
+
/* 2 */
|
54
|
+
font-size: 500px;
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
// Hooks
|
59
|
+
// ========================================================================
|
60
|
+
|
61
|
+
@include hook-form-file-misc();
|
62
|
+
|
63
|
+
// @mixin hook-form-file-misc(){}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
// Name: Form password
|
2
|
+
// Description: Extends form component
|
3
|
+
//
|
4
|
+
// Component: `uk-form`
|
5
|
+
//
|
6
|
+
// Sub-objects: `uk-form-password`
|
7
|
+
//
|
8
|
+
// Markup:
|
9
|
+
//
|
10
|
+
// <!-- uk-form-password -->
|
11
|
+
// <form class="uk-form">
|
12
|
+
// <div class="uk-form-password">
|
13
|
+
// <input type="password">
|
14
|
+
// <a href="" class="uk-form-password-toggle" data-uk-form-password></a>
|
15
|
+
// </div>
|
16
|
+
// </form>
|
17
|
+
//
|
18
|
+
// ========================================================================
|
19
|
+
|
20
|
+
|
21
|
+
// Variables
|
22
|
+
// ========================================================================
|
23
|
+
|
24
|
+
$form-password-font-size: 13px !default;
|
25
|
+
$form-password-line-height: $form-password-font-size !default;
|
26
|
+
$form-password-color: #999 !default;
|
27
|
+
$form-password-hover-color: #999 !default;
|
28
|
+
$form-password-padding: 50px !default;
|
29
|
+
|
30
|
+
|
31
|
+
/* ========================================================================
|
32
|
+
Component: Form password
|
33
|
+
========================================================================== */
|
34
|
+
|
35
|
+
/*
|
36
|
+
* 1. Container width fits its content
|
37
|
+
* 2. Create position context
|
38
|
+
* 3. Prevent `inline-block` consequences
|
39
|
+
*/
|
40
|
+
|
41
|
+
.uk-form-password {
|
42
|
+
/* 1 */
|
43
|
+
display: inline-block;
|
44
|
+
/* 2 */
|
45
|
+
position: relative;
|
46
|
+
/* 3 */
|
47
|
+
max-width: 100%;
|
48
|
+
}
|
49
|
+
|
50
|
+
.uk-form-password-toggle {
|
51
|
+
display: block;
|
52
|
+
position: absolute;
|
53
|
+
top: 50%;
|
54
|
+
right: 10px;
|
55
|
+
margin-top: -(floor($form-password-line-height/2));
|
56
|
+
font-size: $form-password-font-size;
|
57
|
+
line-height: $form-password-line-height;
|
58
|
+
color: $form-password-color;
|
59
|
+
}
|
60
|
+
|
61
|
+
.uk-form-password-toggle:hover {
|
62
|
+
color: $form-password-hover-color;
|
63
|
+
text-decoration: none;
|
64
|
+
}
|
65
|
+
|
66
|
+
.uk-form-password > input { padding-right: $form-password-padding !important; }
|
67
|
+
|
68
|
+
|
69
|
+
// Hooks
|
70
|
+
// ========================================================================
|
71
|
+
|
72
|
+
@include hook-form-password-misc();
|
73
|
+
|
74
|
+
// @mixin hook-form-password-misc(){}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
// Name: Form select
|
2
|
+
// Description: Extends form component
|
3
|
+
//
|
4
|
+
// Component: `uk-form`
|
5
|
+
//
|
6
|
+
// Sub-objects: `uk-form-select`
|
7
|
+
//
|
8
|
+
// Markup:
|
9
|
+
//
|
10
|
+
// <!-- uk-form-select -->
|
11
|
+
// <div class="uk-form-select" data-uk-form-select>
|
12
|
+
// <span></span>
|
13
|
+
// <select>
|
14
|
+
// <option value=""></option>
|
15
|
+
// </select>
|
16
|
+
// </div>
|
17
|
+
//
|
18
|
+
// ========================================================================
|
19
|
+
|
20
|
+
|
21
|
+
/* ========================================================================
|
22
|
+
Component: Form select
|
23
|
+
========================================================================== */
|
24
|
+
|
25
|
+
/*
|
26
|
+
* 1. Behave like form elements
|
27
|
+
* 2. Create position context for dropdowns
|
28
|
+
* 3. Clip content
|
29
|
+
*/
|
30
|
+
|
31
|
+
.uk-form-select {
|
32
|
+
/* 1 */
|
33
|
+
display: inline-block;
|
34
|
+
vertical-align: middle;
|
35
|
+
/* 2 */
|
36
|
+
position: relative;
|
37
|
+
/* 3 */
|
38
|
+
overflow: hidden;
|
39
|
+
}
|
40
|
+
|
41
|
+
/*
|
42
|
+
* 1. Required for Firefox
|
43
|
+
* 1. Required for Webkit to make `height` work
|
44
|
+
*/
|
45
|
+
|
46
|
+
.uk-form-select select {
|
47
|
+
position: absolute;
|
48
|
+
top: 0;
|
49
|
+
z-index: 1;
|
50
|
+
width: 100%;
|
51
|
+
height: 100%;
|
52
|
+
opacity: 0;
|
53
|
+
cursor: pointer;
|
54
|
+
/* 1 */
|
55
|
+
left: 0;
|
56
|
+
/* 2 */
|
57
|
+
-webkit-appearance: none;
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
// Hooks
|
62
|
+
// ========================================================================
|
63
|
+
|
64
|
+
@include hook-form-select-misc();
|
65
|
+
|
66
|
+
// @mixin hook-form-select-misc(){}
|
@@ -0,0 +1,269 @@
|
|
1
|
+
// Name: HTML editor
|
2
|
+
// Description: Defines styles for an HTML editor
|
3
|
+
//
|
4
|
+
// Component: `uk-htmleditor`
|
5
|
+
//
|
6
|
+
// Sub-objects: `uk-htmleditor-navbar`
|
7
|
+
// `uk-htmleditor-navbar-nav`
|
8
|
+
// `uk-htmleditor-navbar-flip`
|
9
|
+
// `uk-htmleditor-button-code
|
10
|
+
// `uk-htmleditor-button-preview`
|
11
|
+
// `uk-htmleditor-content`
|
12
|
+
// `uk-htmleditor-code`
|
13
|
+
// `uk-htmleditor-preview`
|
14
|
+
// `uk-htmleditor-iframe`
|
15
|
+
//
|
16
|
+
// Modifier: `uk-htmleditor-fullscreen`
|
17
|
+
// `[data-mode='tab']`
|
18
|
+
// `[data-mode='split']`
|
19
|
+
//
|
20
|
+
// States: `uk-active`
|
21
|
+
//
|
22
|
+
// ========================================================================
|
23
|
+
|
24
|
+
|
25
|
+
// Variables
|
26
|
+
// ========================================================================
|
27
|
+
|
28
|
+
$htmleditor-navbar-background: #eee !default;
|
29
|
+
|
30
|
+
$htmleditor-navbar-nav-height: 40px !default;
|
31
|
+
$htmleditor-navbar-nav-padding-horizontal: 15px !default;
|
32
|
+
$htmleditor-navbar-nav-line-height: $htmleditor-navbar-nav-height !default;
|
33
|
+
$htmleditor-navbar-nav-color: #444 !default;
|
34
|
+
|
35
|
+
$htmleditor-navbar-nav-hover-background: #f5f5f5 !default;
|
36
|
+
$htmleditor-navbar-nav-hover-color: #444 !default;
|
37
|
+
$htmleditor-navbar-nav-onclick-background: #ddd !default;
|
38
|
+
$htmleditor-navbar-nav-onclick-color: #444 !default;
|
39
|
+
$htmleditor-navbar-nav-active-background: #f5f5f5 !default;
|
40
|
+
$htmleditor-navbar-nav-active-color: #444 !default;
|
41
|
+
|
42
|
+
$htmleditor-content-border: #ddd !default;
|
43
|
+
$htmleditor-content-background: #fff !default;
|
44
|
+
$htmleditor-content-padding: 20px !default;
|
45
|
+
$htmleditor-content-split-border: #eee !default;
|
46
|
+
|
47
|
+
$htmleditor-fullscreen-z-index: 990 !default;
|
48
|
+
$htmleditor-fullscreen-content-top: $htmleditor-navbar-nav-height !default;
|
49
|
+
$htmleditor-fullscreen-icon-resize: "\f066" !default;
|
50
|
+
|
51
|
+
|
52
|
+
/* ========================================================================
|
53
|
+
Component: HTML editor
|
54
|
+
========================================================================== */
|
55
|
+
|
56
|
+
.uk-htmleditor {
|
57
|
+
@include hook-htmleditor();
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
/* Sub-object `uk-htmleditor-navbar`
|
62
|
+
========================================================================== */
|
63
|
+
|
64
|
+
.uk-htmleditor-navbar {
|
65
|
+
background: $htmleditor-navbar-background;
|
66
|
+
@include hook-htmleditor-navbar();
|
67
|
+
}
|
68
|
+
|
69
|
+
/*
|
70
|
+
* Micro clearfix
|
71
|
+
*/
|
72
|
+
|
73
|
+
.uk-htmleditor-navbar:before,
|
74
|
+
.uk-htmleditor-navbar:after {
|
75
|
+
content: "";
|
76
|
+
display: table;
|
77
|
+
}
|
78
|
+
|
79
|
+
.uk-htmleditor-navbar:after { clear: both; }
|
80
|
+
|
81
|
+
|
82
|
+
/* Sub-object `uk-htmleditor-navbar-nav`
|
83
|
+
========================================================================== */
|
84
|
+
|
85
|
+
.uk-htmleditor-navbar-nav {
|
86
|
+
margin: 0;
|
87
|
+
padding: 0;
|
88
|
+
list-style: none;
|
89
|
+
float: left;
|
90
|
+
}
|
91
|
+
|
92
|
+
.uk-htmleditor-navbar-nav > li { float: left; }
|
93
|
+
|
94
|
+
/*
|
95
|
+
* 1. Dimensions
|
96
|
+
* 2. Style
|
97
|
+
*/
|
98
|
+
|
99
|
+
.uk-htmleditor-navbar-nav > li > a {
|
100
|
+
display: block;
|
101
|
+
box-sizing: border-box;
|
102
|
+
text-decoration: none;
|
103
|
+
/* 1 */
|
104
|
+
height: $htmleditor-navbar-nav-height;
|
105
|
+
padding: 0 $htmleditor-navbar-nav-padding-horizontal;
|
106
|
+
line-height: $htmleditor-navbar-nav-line-height;
|
107
|
+
/* 2 */
|
108
|
+
color: $htmleditor-navbar-nav-color;
|
109
|
+
font-size: 11px;
|
110
|
+
cursor: pointer;
|
111
|
+
@include hook-htmleditor-navbar-nav();
|
112
|
+
}
|
113
|
+
|
114
|
+
/*
|
115
|
+
* Hover
|
116
|
+
* 1. Apply hover style also to focus state
|
117
|
+
* 2. Remove default focus style
|
118
|
+
*/
|
119
|
+
|
120
|
+
.uk-htmleditor-navbar-nav > li:hover > a,
|
121
|
+
.uk-htmleditor-navbar-nav > li > a:focus { // 1
|
122
|
+
background-color: $htmleditor-navbar-nav-hover-background;
|
123
|
+
color: $htmleditor-navbar-nav-hover-color;
|
124
|
+
outline: none; /* 2 */
|
125
|
+
@include hook-htmleditor-navbar-nav-hover();
|
126
|
+
}
|
127
|
+
|
128
|
+
/* OnClick */
|
129
|
+
.uk-htmleditor-navbar-nav > li > a:active {
|
130
|
+
background-color: $htmleditor-navbar-nav-onclick-background;
|
131
|
+
color: $htmleditor-navbar-nav-onclick-color;
|
132
|
+
@include hook-htmleditor-navbar-nav-onclick();
|
133
|
+
}
|
134
|
+
|
135
|
+
/* Active */
|
136
|
+
.uk-htmleditor-navbar-nav > li.uk-active > a {
|
137
|
+
background-color: $htmleditor-navbar-nav-active-background;
|
138
|
+
color: $htmleditor-navbar-nav-active-color;
|
139
|
+
@include hook-htmleditor-navbar-nav-active();
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
/* Sub-object: `uk-htmleditor-navbar-flip`
|
144
|
+
========================================================================== */
|
145
|
+
|
146
|
+
.uk-htmleditor-navbar-flip { float: right; }
|
147
|
+
|
148
|
+
|
149
|
+
/* Sub-object for special buttons
|
150
|
+
========================================================================== */
|
151
|
+
|
152
|
+
[data-mode='split'] .uk-htmleditor-button-code,
|
153
|
+
[data-mode='split'] .uk-htmleditor-button-preview { display: none; }
|
154
|
+
|
155
|
+
|
156
|
+
/* Sub-object `uk-htmleditor-content`
|
157
|
+
========================================================================== */
|
158
|
+
|
159
|
+
.uk-htmleditor-content {
|
160
|
+
border-left: 1px solid $htmleditor-content-border;
|
161
|
+
border-right: 1px solid $htmleditor-content-border;
|
162
|
+
border-bottom: 1px solid $htmleditor-content-border;
|
163
|
+
background: $htmleditor-content-background;
|
164
|
+
@include hook-htmleditor-content();
|
165
|
+
}
|
166
|
+
|
167
|
+
/*
|
168
|
+
* Micro clearfix
|
169
|
+
*/
|
170
|
+
|
171
|
+
.uk-htmleditor-content:before,
|
172
|
+
.uk-htmleditor-content:after {
|
173
|
+
content: "";
|
174
|
+
display: table;
|
175
|
+
}
|
176
|
+
|
177
|
+
.uk-htmleditor-content:after { clear: both; }
|
178
|
+
|
179
|
+
|
180
|
+
/* Modifier `uk-htmleditor-fullscreen`
|
181
|
+
========================================================================== */
|
182
|
+
|
183
|
+
.uk-htmleditor-fullscreen {
|
184
|
+
position: fixed;
|
185
|
+
top: 0;
|
186
|
+
left: 0;
|
187
|
+
right: 0;
|
188
|
+
bottom: 0;
|
189
|
+
z-index: $htmleditor-fullscreen-z-index;
|
190
|
+
}
|
191
|
+
|
192
|
+
.uk-htmleditor-fullscreen .uk-htmleditor-content {
|
193
|
+
position: absolute;
|
194
|
+
top: $htmleditor-fullscreen-content-top;
|
195
|
+
left: 0;
|
196
|
+
right: 0;
|
197
|
+
bottom: 0;
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
.uk-htmleditor-fullscreen .uk-icon-expand:before { content: $htmleditor-fullscreen-icon-resize; }
|
202
|
+
|
203
|
+
|
204
|
+
/* Sub-objects `uk-htmleditor-code` and `uk-htmleditor-preview`
|
205
|
+
========================================================================== */
|
206
|
+
|
207
|
+
.uk-htmleditor-code,
|
208
|
+
.uk-htmleditor-preview { box-sizing: border-box; }
|
209
|
+
|
210
|
+
.uk-htmleditor-preview {
|
211
|
+
padding: $htmleditor-content-padding;
|
212
|
+
overflow-y: scroll;
|
213
|
+
position: relative;
|
214
|
+
}
|
215
|
+
|
216
|
+
/*
|
217
|
+
* Tab view
|
218
|
+
*/
|
219
|
+
|
220
|
+
[data-mode='tab'][data-active-tab='code'] .uk-htmleditor-preview,
|
221
|
+
[data-mode='tab'][data-active-tab='preview'] .uk-htmleditor-code { display: none; }
|
222
|
+
|
223
|
+
/*
|
224
|
+
* Split view
|
225
|
+
*/
|
226
|
+
|
227
|
+
[data-mode='split'] .uk-htmleditor-code,
|
228
|
+
[data-mode='split'] .uk-htmleditor-preview {
|
229
|
+
float: left;
|
230
|
+
width: 50%;
|
231
|
+
}
|
232
|
+
|
233
|
+
[data-mode='split'] .uk-htmleditor-code { border-right: 1px solid $htmleditor-content-split-border; }
|
234
|
+
|
235
|
+
|
236
|
+
/* Sub-object `uk-htmleditor-iframe`
|
237
|
+
========================================================================== */
|
238
|
+
|
239
|
+
.uk-htmleditor-iframe {
|
240
|
+
position: absolute;
|
241
|
+
top: 0;
|
242
|
+
left: 0;
|
243
|
+
width: 100%;
|
244
|
+
height: 100%;
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
/* CodeMirror modifications
|
249
|
+
========================================================================== */
|
250
|
+
|
251
|
+
.uk-htmleditor .CodeMirror {
|
252
|
+
padding: 10px;
|
253
|
+
box-sizing: border-box;
|
254
|
+
}
|
255
|
+
|
256
|
+
|
257
|
+
// Hooks
|
258
|
+
// ========================================================================
|
259
|
+
|
260
|
+
@include hook-htmleditor-misc();
|
261
|
+
|
262
|
+
// @mixin hook-htmleditor(){}
|
263
|
+
// @mixin hook-htmleditor-navbar(){}
|
264
|
+
// @mixin hook-htmleditor-navbar-nav(){}
|
265
|
+
// @mixin hook-htmleditor-navbar-nav-hover(){}
|
266
|
+
// @mixin hook-htmleditor-navbar-nav-onclick(){}
|
267
|
+
// @mixin hook-htmleditor-navbar-nav-active(){}
|
268
|
+
// @mixin hook-htmleditor-content(){}
|
269
|
+
// @mixin hook-htmleditor-misc(){}
|