weui-rails 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +28 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +89 -0
- data/Rakefile +2 -0
- data/assets/stylesheets/_weui.scss +32 -0
- data/assets/stylesheets/base/fn.scss +13 -0
- data/assets/stylesheets/base/mixin/_mobile.scss +20 -0
- data/assets/stylesheets/base/mixin/_setArrow.scss +97 -0
- data/assets/stylesheets/base/mixin/_setChecked.scss +21 -0
- data/assets/stylesheets/base/mixin/_setOnepx.scss +47 -0
- data/assets/stylesheets/base/mixin/_text.scss +15 -0
- data/assets/stylesheets/base/reset.scss +24 -0
- data/assets/stylesheets/base/variable/_global.scss +32 -0
- data/assets/stylesheets/base/variable/_monokai.scss +11 -0
- data/assets/stylesheets/base/variable/_weui_button.scss +21 -0
- data/assets/stylesheets/base/variable/_weui_cell.scss +12 -0
- data/assets/stylesheets/base/variable/_weui_msg.scss +7 -0
- data/assets/stylesheets/base/variable/weui_progress.scss +5 -0
- data/assets/stylesheets/icon/weui_font.scss +62 -0
- data/assets/stylesheets/icon/weui_icon_font.scss +73 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_default.scss +13 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_disabled.scss +9 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_global.scss +36 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_plain.scss +30 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_primary.scss +12 -0
- data/assets/stylesheets/widget/weui_button/weui_btn_warn.scss +12 -0
- data/assets/stylesheets/widget/weui_button/weui_button.scss +58 -0
- data/assets/stylesheets/widget/weui_cell/weui_access.scss +22 -0
- data/assets/stylesheets/widget/weui_cell/weui_cell_global.scss +68 -0
- data/assets/stylesheets/widget/weui_cell/weui_check.scss +4 -0
- data/assets/stylesheets/widget/weui_cell/weui_check/weui_check_common.scss +10 -0
- data/assets/stylesheets/widget/weui_cell/weui_check/weui_checkbox.scss +35 -0
- data/assets/stylesheets/widget/weui_cell/weui_check/weui_radio.scss +27 -0
- data/assets/stylesheets/widget/weui_cell/weui_form.scss +6 -0
- data/assets/stylesheets/widget/weui_cell/weui_form/weui_form_common.scss +64 -0
- data/assets/stylesheets/widget/weui_cell/weui_form/weui_select.scss +38 -0
- data/assets/stylesheets/widget/weui_cell/weui_form/weui_select_after.scss +6 -0
- data/assets/stylesheets/widget/weui_cell/weui_form/weui_select_before.scss +30 -0
- data/assets/stylesheets/widget/weui_cell/weui_form/weui_vcode.scss +14 -0
- data/assets/stylesheets/widget/weui_cell/weui_switch.scss +51 -0
- data/assets/stylesheets/widget/weui_page/weui_article.scss +23 -0
- data/assets/stylesheets/widget/weui_page/weui_msg.scss +48 -0
- data/assets/stylesheets/widget/weui_progress/weui_progress.scss +23 -0
- data/assets/stylesheets/widget/weui_tips/weui_actionsheet.scss +43 -0
- data/assets/stylesheets/widget/weui_tips/weui_dialog.scss +93 -0
- data/assets/stylesheets/widget/weui_tips/weui_mask.scss +35 -0
- data/assets/stylesheets/widget/weui_tips/weui_toast.scss +349 -0
- data/lib/weui-rails.rb +13 -0
- data/lib/weui-rails/version.rb +5 -0
- data/weui-rails.gemspec +18 -0
- data/weui-rails.sublime-project +16 -0
- metadata +96 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
@import "../../../base/fn";
|
2
|
+
|
3
|
+
.weui_cells_checkbox {
|
4
|
+
.weui_cell_hd {
|
5
|
+
padding-right: $weuiCellInnerGapH;
|
6
|
+
}
|
7
|
+
.weui_cell {
|
8
|
+
&:active {
|
9
|
+
background-color: #ECECEC;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
.weui_icon_checked {
|
13
|
+
&:before {
|
14
|
+
content: '\EA01';
|
15
|
+
color: #C9C9C9;
|
16
|
+
font-size: 23px;
|
17
|
+
display: block;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
// method2 accessbility
|
23
|
+
.weui_check {
|
24
|
+
// checkbox
|
25
|
+
.weui_cells_checkbox & {
|
26
|
+
&:checked {
|
27
|
+
& + .weui_icon_checked {
|
28
|
+
&:before {
|
29
|
+
content: '\EA06';
|
30
|
+
color: #09BB07;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
@import "../../../base/fn";
|
2
|
+
|
3
|
+
// method2 accessbility
|
4
|
+
.weui_cells_radio{
|
5
|
+
.weui_cell_ft {
|
6
|
+
padding-left: $weuiCellInnerGapH;
|
7
|
+
}
|
8
|
+
.weui_cell {
|
9
|
+
&:active {
|
10
|
+
background-color: #ECECEC;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
.weui_check {
|
15
|
+
// radio
|
16
|
+
.weui_cells_radio & {
|
17
|
+
&:checked {
|
18
|
+
& + .weui_icon_checked {
|
19
|
+
&:before {
|
20
|
+
content: '\EA08';
|
21
|
+
color: #09BB07;
|
22
|
+
font-size: 16px;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
@import "../../../base/fn";
|
2
|
+
|
3
|
+
.weui_label{
|
4
|
+
display:block;
|
5
|
+
width:3em;
|
6
|
+
}
|
7
|
+
.weui_input {
|
8
|
+
width: 100%;
|
9
|
+
border: 0;
|
10
|
+
outline: 0;
|
11
|
+
-webkit-appearance: none;
|
12
|
+
background-color: transparent;
|
13
|
+
font-size: inherit;
|
14
|
+
color: inherit;
|
15
|
+
height: $weuiCellLineHeight + em;
|
16
|
+
line-height: $weuiCellLineHeight;
|
17
|
+
|
18
|
+
// hides the spin-button
|
19
|
+
&::-webkit-outer-spin-button, &::-webkit-inner-spin-button{
|
20
|
+
-webkit-appearance: none;
|
21
|
+
margin: 0;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
.weui_textarea {
|
25
|
+
display: block;
|
26
|
+
border: 0;
|
27
|
+
resize: none;
|
28
|
+
width: 100%;
|
29
|
+
font-size: 1em;
|
30
|
+
line-height: inherit;
|
31
|
+
outline: 0;
|
32
|
+
}
|
33
|
+
.weui_toptips {
|
34
|
+
display:none;
|
35
|
+
position: fixed;
|
36
|
+
transform: translateZ(0);
|
37
|
+
width: 100%;
|
38
|
+
top: 0;
|
39
|
+
line-height: 2.3;
|
40
|
+
font-size:14px;
|
41
|
+
text-align: center;
|
42
|
+
color: #FFF;
|
43
|
+
z-index: 2;
|
44
|
+
&.weui_warn {
|
45
|
+
background-color: $globalWarnColor;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
.weui_cells_form {
|
49
|
+
.weui_cell_warn{
|
50
|
+
color: $globalWarnColor;
|
51
|
+
.weui_icon_warn{
|
52
|
+
display:inline-block;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
.weui_cell_hd {
|
56
|
+
padding-right: 1em;
|
57
|
+
}
|
58
|
+
.weui_cell_ft{
|
59
|
+
font-size:0;
|
60
|
+
}
|
61
|
+
.weui_icon_warn{
|
62
|
+
display:none;
|
63
|
+
}
|
64
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
@import "../../../base/fn";
|
2
|
+
|
3
|
+
.weui_cell_select {
|
4
|
+
padding: 0;
|
5
|
+
.weui_select {
|
6
|
+
padding-right: 30px;
|
7
|
+
}
|
8
|
+
.weui_access_icon {
|
9
|
+
// position: absolute;
|
10
|
+
// top: 50%;
|
11
|
+
// right: $weuiCellGapH;
|
12
|
+
// margin-top: -12px;
|
13
|
+
}
|
14
|
+
.weui_cell_bd{
|
15
|
+
&:after{
|
16
|
+
content: " ";
|
17
|
+
@include setArrow_Wap(right, 6px, #C8C8CD, 2px);
|
18
|
+
|
19
|
+
position: absolute;
|
20
|
+
top: 50%;
|
21
|
+
right: $weuiCellGapH;
|
22
|
+
margin-top: -3px;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.weui_select {
|
28
|
+
-webkit-appearance: none;
|
29
|
+
border: 0;
|
30
|
+
outline: 0;
|
31
|
+
background-color: transparent;
|
32
|
+
width: 100%;
|
33
|
+
font-size: inherit;
|
34
|
+
height: 43px;
|
35
|
+
position: relative;
|
36
|
+
z-index: 1;
|
37
|
+
padding-left: $weuiCellGapH;
|
38
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
@import "../../../base/fn";
|
2
|
+
@import "weui_select";
|
3
|
+
|
4
|
+
.weui_select_before {
|
5
|
+
padding-right: $weuiCellGapH;
|
6
|
+
.weui_select{
|
7
|
+
width:auto;
|
8
|
+
}
|
9
|
+
.weui_cell_hd {
|
10
|
+
position: relative;
|
11
|
+
&:after {
|
12
|
+
@include setRightLine($weuiCellBorderColor);
|
13
|
+
}
|
14
|
+
&:before{
|
15
|
+
content: " ";
|
16
|
+
@include setArrow_Wap(right, 6px, #C8C8CD, 2px);
|
17
|
+
|
18
|
+
position: absolute;
|
19
|
+
top: 50%;
|
20
|
+
right: $weuiCellGapH;
|
21
|
+
margin-top: -3px;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
.weui_cell_bd {
|
25
|
+
padding-left: $weuiCellGapH;
|
26
|
+
&:after{
|
27
|
+
display:none;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
@import "../../base/fn";
|
2
|
+
$weuiSwitchHeight: 32px;
|
3
|
+
.weui_cell_switch{
|
4
|
+
padding-top: ($weuiCellHeight - $weuiSwitchHeight) / 2;
|
5
|
+
padding-bottom: ($weuiCellHeight - $weuiSwitchHeight) / 2;
|
6
|
+
}
|
7
|
+
.weui_switch{
|
8
|
+
appearance: none;
|
9
|
+
position: relative;
|
10
|
+
width: 52px;
|
11
|
+
height: $weuiSwitchHeight;
|
12
|
+
border: 1px solid #DFDFDF;
|
13
|
+
outline: 0;
|
14
|
+
border-radius: 16px;
|
15
|
+
box-sizing: border-box;
|
16
|
+
background: #DFDFDF;
|
17
|
+
&:before{
|
18
|
+
content: " ";
|
19
|
+
position: absolute;
|
20
|
+
top: 0;
|
21
|
+
left: 0;
|
22
|
+
width: 50px;
|
23
|
+
height: $weuiSwitchHeight - 2;
|
24
|
+
border-radius: 15px;
|
25
|
+
background-color: #FDFDFD;
|
26
|
+
transition:transform .3s;
|
27
|
+
}
|
28
|
+
&:after{
|
29
|
+
content: " ";
|
30
|
+
position: absolute;
|
31
|
+
top: 0;
|
32
|
+
left: 0;
|
33
|
+
width: $weuiSwitchHeight - 2;
|
34
|
+
height: $weuiSwitchHeight - 2;
|
35
|
+
border-radius: 15px;
|
36
|
+
background-color: #FFFFFF;
|
37
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
38
|
+
transition:transform .3s;
|
39
|
+
}
|
40
|
+
|
41
|
+
&:checked{
|
42
|
+
border-color: #04BE02;
|
43
|
+
background-color: #04BE02;
|
44
|
+
&:before{
|
45
|
+
transform: scale(0);
|
46
|
+
}
|
47
|
+
&:after{
|
48
|
+
transform: translateX(20px);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@import "../../base/fn";
|
2
|
+
|
3
|
+
.weui_article {
|
4
|
+
padding: 20px 15px;
|
5
|
+
font-size: 15px;
|
6
|
+
section {
|
7
|
+
margin-bottom: 1.5em;
|
8
|
+
}
|
9
|
+
h1 {
|
10
|
+
font-size: 17px;
|
11
|
+
font-weight:400;
|
12
|
+
margin-bottom: .75em;
|
13
|
+
}
|
14
|
+
h2 {
|
15
|
+
font-size: 16px;
|
16
|
+
font-weight:400;
|
17
|
+
margin-bottom: .3em;
|
18
|
+
}
|
19
|
+
h3 {
|
20
|
+
font-weight:400;
|
21
|
+
font-size: 15px;
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
@import "../../base/fn";
|
2
|
+
@import "../weui_button/weui_button";
|
3
|
+
|
4
|
+
.weui_msg {
|
5
|
+
padding-top: $weuiMsgPaddingTop;
|
6
|
+
text-align: center;
|
7
|
+
|
8
|
+
.weui_icon_area {
|
9
|
+
margin-bottom: $weuiMsgIconGap;
|
10
|
+
}
|
11
|
+
|
12
|
+
.weui_text_area {
|
13
|
+
margin-bottom: $weuiMsgTextGap;
|
14
|
+
padding:0 20px;
|
15
|
+
}
|
16
|
+
.weui_msg_title {
|
17
|
+
margin-bottom: $weuiMsgTitleGap;
|
18
|
+
font-weight: 400;
|
19
|
+
font-size: 20px;
|
20
|
+
}
|
21
|
+
.weui_msg_desc {
|
22
|
+
font-size: 14px;
|
23
|
+
color: $globalDescColor;
|
24
|
+
}
|
25
|
+
|
26
|
+
.weui_opr_area {
|
27
|
+
margin-bottom: $weuiMsgOprGap;
|
28
|
+
}
|
29
|
+
|
30
|
+
.weui_extra_area {
|
31
|
+
margin-bottom: $weuiMsgExtraAreaGap;
|
32
|
+
font-size:14px;
|
33
|
+
color:$globalTextColor;
|
34
|
+
a {
|
35
|
+
color:$globalLinkColor;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
@media screen and (min-height: $weuiMsgExtraAreaOfMinHeight) {
|
41
|
+
.weui_extra_area {
|
42
|
+
position: fixed;
|
43
|
+
left: 0;
|
44
|
+
bottom: 0;
|
45
|
+
width: 100%;
|
46
|
+
text-align: center;
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
@import "../../base/fn";
|
2
|
+
|
3
|
+
.weui_progress {
|
4
|
+
display: flex;
|
5
|
+
align-items: center;
|
6
|
+
}
|
7
|
+
|
8
|
+
.weui_progress_bar {
|
9
|
+
background-color: $weuiProgressBg;
|
10
|
+
height: $weuiProgressHeight;
|
11
|
+
flex: 1;
|
12
|
+
}
|
13
|
+
|
14
|
+
.weui_progress_inner_bar {
|
15
|
+
width: 0;
|
16
|
+
height: 100%;
|
17
|
+
background-color: $weuiProgressColor;
|
18
|
+
}
|
19
|
+
|
20
|
+
.weui_progress_opr {
|
21
|
+
margin-left: 15px;
|
22
|
+
font-size: 0;
|
23
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
@import "../../base/fn";
|
2
|
+
$bgColor: #ECECEC;
|
3
|
+
.weui_actionsheet {
|
4
|
+
position: fixed;
|
5
|
+
left: 0;
|
6
|
+
bottom: 0;
|
7
|
+
transform: translate(0, 100%);
|
8
|
+
backface-visibility: hidden;
|
9
|
+
z-index: 2;
|
10
|
+
width: 100%;
|
11
|
+
background-color: $pageDefaultBackgroundColor;
|
12
|
+
//slide up animation
|
13
|
+
transition: transform .3s;
|
14
|
+
}
|
15
|
+
.weui_actionsheet_menu{
|
16
|
+
background-color: #FFFFFF;
|
17
|
+
}
|
18
|
+
.weui_actionsheet_action {
|
19
|
+
margin-top: 6px;
|
20
|
+
background-color: #FFFFFF;
|
21
|
+
}
|
22
|
+
.weui_actionsheet_cell {
|
23
|
+
position: relative;
|
24
|
+
padding: 10px 0;
|
25
|
+
text-align: center;
|
26
|
+
font-size: 18px;
|
27
|
+
&:before {
|
28
|
+
@include setTopLine($weuiCellBorderColor);
|
29
|
+
}
|
30
|
+
&:active{
|
31
|
+
background-color: $bgColor;
|
32
|
+
}
|
33
|
+
&:first-child{
|
34
|
+
&:before{
|
35
|
+
display: none;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
//actionSheet aniamtion
|
41
|
+
.weui_actionsheet_toggle{
|
42
|
+
transform: translate(0, 0);
|
43
|
+
}
|