weui-rails 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43604b54e86105c686d1a08e199993b445648e88
4
- data.tar.gz: 5493d118eba93a7e69b51a3d0c81cbb854dcf360
3
+ metadata.gz: 947e0601b71acdee75beb2b522b147f8636979e7
4
+ data.tar.gz: 3f7662cee31fef3e8f78ca463ac582d2f12bde82
5
5
  SHA512:
6
- metadata.gz: e444af667f3241effcca4cf892c6a3bc10546a40dbc5645c54d520e5196e4f5bf7dc5d21d8ce47c85eab7ae46660c8bf2e79441728e2e229348832e6ad5e2f11
7
- data.tar.gz: 7e37eea0c5b576ace84d93e29adaa64f9b71f49f87695f49dac83c212eed07819577f87fb8d397de92da052b69246da1d6b1bee37f751939b56235e015ce6649
6
+ metadata.gz: 6701d744c7dc6485a52f8d01866b8b475842f321b1cc9fa5b539fc9248945883ac72ecb7f525df2812ec1c47cfce0438ad05b1977e82ccfbb88a2fcf0feffc21
7
+ data.tar.gz: d994f36f1617f1d55c3f284bce0fb5717753ba9b667f33163ed539974b0214a9c557e0ba500f1dabceb613a02064f6376c625dddd995bf1ef05c295628cbed4c
@@ -1,5 +1,5 @@
1
1
  module Weui
2
2
  module Rails
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -21,9 +21,18 @@
21
21
  // article
22
22
  @import "./widget/weui_page/weui_article";
23
23
 
24
- //progress
24
+ // tab
25
+ @import "./widget/weui_tab/weui_tab";
26
+
27
+ // progress
25
28
  @import "./widget/weui_progress/weui_progress";
26
29
 
30
+ // card
31
+ @import "./widget/weui_panel/weui_panel";
32
+
33
+ // media box
34
+ @import "./widget/weui_media_box/weui_media_box";
35
+
27
36
  // grid
28
37
  @import "./widget/weui_grid/weui_grid";
29
38
 
@@ -34,3 +43,6 @@
34
43
 
35
44
  //action sheet
36
45
  @import "./widget/weui_tips/weui_actionsheet";
46
+
47
+ //searchbar
48
+ @import "./widget/weui_searchbar/weui_searchbar";
@@ -2,6 +2,7 @@
2
2
  @import "./mixin/mobile";
3
3
  @import "./mixin/setOnepx";
4
4
  @import "./mixin/setArrow";
5
+ @import "./mixin/text";
5
6
 
6
7
  // variable
7
8
  @import "./variable/global";
@@ -46,6 +46,6 @@
46
46
  height: 100%;
47
47
  border-right: 1px solid $c;
48
48
  color: $c;
49
- transform-origin: 0 100%;
49
+ transform-origin: 100% 0;
50
50
  transform: scaleX(0.5);
51
51
  }
@@ -6,7 +6,7 @@
6
6
  word-wrap: normal;
7
7
  }
8
8
 
9
- @mixin ellipsis($type, $line) {
9
+ @mixin ellipsisLn($line) {
10
10
  overflow: hidden;
11
11
  text-overflow: ellipsis;
12
12
  display: -webkit-box;
@@ -21,7 +21,6 @@
21
21
 
22
22
  &:before {
23
23
  @include setRightLine($weuiGridBorderColor);
24
- right: -1px;
25
24
  }
26
25
  &:after {
27
26
  @include setBottomLine($weuiGridBorderColor);
@@ -0,0 +1,94 @@
1
+ @import "../../base/fn";
2
+
3
+ $lineColor: #E5E5E5;
4
+ $grayColor: #999999;
5
+
6
+ .weui_media_box {
7
+ padding: 15px;
8
+ position: relative;
9
+ &:before {
10
+ @include setTopLine($lineColor);
11
+ left: 15px;
12
+ }
13
+ &:first-child {
14
+ &:before {
15
+ display: none
16
+ }
17
+ }
18
+
19
+ a & {
20
+ color:#000000;
21
+ @include setTapColor();
22
+ &:active {
23
+ background-color: #ECECEC;
24
+ }
25
+ }
26
+
27
+ .weui_media_title {
28
+ font-weight: 400;
29
+ font-size: 17px;
30
+ @include ellipsis();
31
+ word-wrap: break-word;
32
+ word-break: break-all;
33
+ }
34
+ .weui_media_desc {
35
+ color: $grayColor;
36
+ font-size: 13px;
37
+ line-height: 1.2;
38
+ @include ellipsisLn(2);
39
+ }
40
+
41
+ &.weui_media_text {
42
+ .weui_media_title {
43
+ margin-bottom: 8px;
44
+ }
45
+ .weui_media_info {
46
+ margin-top: 15px;
47
+ padding-bottom: 5px;
48
+ font-size: 13px;
49
+ color: #CECECE;
50
+ line-height: 1em;
51
+ list-style: none;
52
+ overflow: hidden;
53
+ }
54
+ .weui_media_info_meta {
55
+ float: left;
56
+ padding-right: 1em;
57
+ &.weui_media_info_meta_extra {
58
+ padding-left: 1em;
59
+ border-left: 1px solid #CECECE;
60
+ }
61
+ }
62
+
63
+ }
64
+ &.weui_media_appmsg {
65
+ display: flex;
66
+ align-items: center;
67
+ .weui_media_hd {
68
+ margin-right: .8em;
69
+ width: 60px;
70
+ height: 60px;
71
+ line-height: 60px;
72
+ text-align: center;
73
+ }
74
+ .weui_media_appmsg_thumb {
75
+ width: 100%;
76
+ max-height: 100%;
77
+ vertical-align: middle;
78
+ }
79
+ .weui_media_bd {
80
+ flex: 1;
81
+ }
82
+ }
83
+ &.weui_media_small_appmsg {
84
+ padding: 0;
85
+ .weui_cells {
86
+ margin-top: 0;
87
+ &:before {
88
+ display: none;
89
+ }
90
+ }
91
+ .weui_cells_access {
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,64 @@
1
+ @import "../../base/fn";
2
+
3
+ $lineColor: #E5E5E5;
4
+ $grayColor: #999999;
5
+
6
+ .weui_panel {
7
+ background-color: #FFFFFF;
8
+ margin-top: 10px;
9
+ &:first-child {
10
+ margin-top: 0;
11
+ }
12
+
13
+ position: relative;
14
+ overflow: hidden;
15
+ &:before {
16
+ @include setTopLine($lineColor);
17
+ }
18
+ &:after {
19
+ @include setBottomLine($lineColor);
20
+ }
21
+ }
22
+
23
+ .weui_panel_hd {
24
+ padding: 14px 15px 10px;
25
+ color: $grayColor;
26
+ font-size: 13px;
27
+ position: relative;
28
+ &:after {
29
+ @include setBottomLine($lineColor);
30
+ left: 15px;
31
+ }
32
+ }
33
+
34
+ .weui_panel_ft {
35
+ padding: 10px 15px 12px;
36
+ color: $grayColor;
37
+ font-size: 14px;
38
+ position: relative;
39
+ &:before {
40
+ @include setTopLine($lineColor);
41
+ left: 15px;
42
+ }
43
+ .weui_panel_access & {
44
+ display: block;
45
+ color: #586C94;
46
+ @include setTapColor();
47
+ &:active {
48
+ background-color:#ECECEC;
49
+ }
50
+ &:after {
51
+ content: " ";
52
+ @include setArrow_Wap(right, 6px, #C7C7CC, 2px);
53
+ position: absolute;
54
+ right: 15px;
55
+ top: 50%;
56
+ margin-top: -4px;
57
+ }
58
+ }
59
+ }
60
+
61
+
62
+
63
+
64
+
@@ -0,0 +1,113 @@
1
+ @import "../../base/fn";
2
+ .weui_search_bar {
3
+ padding: 8px 10px;
4
+ display: flex;
5
+ box-sizing: border-box;
6
+ background-color: #EFEFF4;
7
+ z-index: 2;
8
+ &:before {
9
+ @include setTopLine();
10
+ }
11
+ &:after {
12
+ @include setBottomLine();
13
+ }
14
+ &.weui_search_focusing {
15
+ .weui_search_cancel {
16
+ display: block;
17
+ }
18
+ .weui_search_text {
19
+ display: none;
20
+ }
21
+ }
22
+ }
23
+ .weui_search_outer {
24
+ position: relative;
25
+ flex: auto;
26
+ background-color: #EFEFF4;
27
+ &:after {
28
+ content: '';
29
+ position: absolute;
30
+ left: 0;
31
+ top:0;
32
+ width: 200%;
33
+ height: 200%;
34
+ transform: scale(.5);
35
+ transform-origin: 0 0;
36
+ border-radius: 10px;
37
+ border: 1px solid #E6E6EA;
38
+ box-sizing: border-box;
39
+ background: #FFFFFF;
40
+ }
41
+ }
42
+ .weui_search_inner {
43
+ position: relative;
44
+ padding-left: 30px;
45
+ padding-right: 30px;
46
+ height: 100%;
47
+ width: 100%;
48
+ box-sizing: border-box;
49
+ z-index: 1;
50
+ .weui_search_input {
51
+ padding: 4px 0;
52
+ width: 100%;
53
+ height: 20/14em;
54
+ border: 0;
55
+ font-size: 14px;
56
+ line-height: 20/14em;
57
+ box-sizing: content-box;
58
+ background: transparent;
59
+ &:focus {
60
+ outline: none;
61
+ }
62
+ }
63
+ .weui_icon_search {
64
+ position: absolute;
65
+ left: 10px;
66
+ top: -2px;
67
+ line-height: 28px;
68
+ }
69
+ .weui_icon_clear {
70
+ position: absolute;
71
+ top: -2px;
72
+ right: 0;
73
+ padding: 0 10px;
74
+ line-height: 28px;
75
+ }
76
+ }
77
+ .weui_search_text {
78
+ position: absolute;
79
+ top: 1px;
80
+ right: 1px;
81
+ bottom: 1px;
82
+ left: 1px;
83
+ z-index: 2;
84
+ border-radius: 3px;
85
+ text-align: center;
86
+ color: #9B9B9B;
87
+ background: #FFFFFF;
88
+ span {
89
+ display: inline-block;
90
+ font-size: 14px;
91
+ vertical-align: middle;
92
+ }
93
+ .weui_icon_search {
94
+ margin-right: 5px;
95
+ }
96
+ }
97
+ .weui_search_cancel {
98
+ display: none;
99
+ margin-left: 10px;
100
+ line-height: 28px;
101
+ color: #09BB07;
102
+ }
103
+ .weui_search_input:not(:valid) ~ .weui_icon_clear {
104
+ display: none;
105
+ }
106
+
107
+ //干掉input[search]默认的clear button
108
+ input[type="search"]::-webkit-search-decoration,
109
+ input[type="search"]::-webkit-search-cancel-button,
110
+ input[type="search"]::-webkit-search-results-button,
111
+ input[type="search"]::-webkit-search-results-decoration {
112
+ display: none;
113
+ }
@@ -0,0 +1,46 @@
1
+ @import "../../base/fn";
2
+
3
+ .weui_navbar {
4
+ display: flex;
5
+ position: absolute;
6
+ top: 0;
7
+ width: 100%;
8
+ background-color: #fafafa;
9
+
10
+ &:after {
11
+ @include setBottomLine($globalBorderColor);
12
+ }
13
+
14
+ & + .weui_tab_bd {
15
+ padding-top: 50px;
16
+ padding-bottom: 0;
17
+ }
18
+ }
19
+
20
+ .weui_navbar_item {
21
+ position: relative;
22
+ display: block;
23
+ flex: 1;
24
+ padding: 13px 0;
25
+ text-align: center;
26
+ font-size: 15px;
27
+ -webkit-tap-highlight-color: transparent;
28
+
29
+ &:active {
30
+ background-color: #ededed;
31
+ }
32
+
33
+ &.weui_bar_item_on {
34
+ background-color: #f5f5f5;
35
+ }
36
+
37
+ &:after {
38
+ @include setRightLine(#cccccc);
39
+ }
40
+
41
+ &:last-child {
42
+ &:after {
43
+ display: none;
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,48 @@
1
+ @import "../../base/fn";
2
+
3
+ .weui_tabbar {
4
+ display: flex;
5
+ position: absolute;
6
+ bottom: 0;
7
+ width: 100%;
8
+ background-color: #f7f7fa;
9
+
10
+ &:before {
11
+ @include setTopLine(#979797);
12
+ }
13
+ }
14
+
15
+ .weui_tabbar_item {
16
+ display: block;
17
+ flex: 1;
18
+ padding: 7px 0 0;
19
+ -webkit-tap-highlight-color: transparent;
20
+
21
+ &.weui_bar_item_on {
22
+ .weui_tabbar_label {
23
+ color: #09BB07;
24
+ }
25
+ }
26
+ }
27
+
28
+ .weui_tabbar_icon {
29
+ margin: 0 auto;
30
+ width: 24px;
31
+ height: 24px;
32
+
33
+ img {
34
+ display: block;
35
+ width: 100%;
36
+ height: 100%;
37
+ }
38
+
39
+ & + .weui_tabbar_label {
40
+ margin-top: 5px;
41
+ }
42
+ }
43
+
44
+ .weui_tabbar_label {
45
+ text-align: center;
46
+ color: $globalTextColor;
47
+ font-size: 12px;
48
+ }
@@ -0,0 +1,20 @@
1
+ @import "../../base/fn";
2
+ @import "tabbar";
3
+ @import "navbar";
4
+
5
+ .weui_tab {
6
+ position: relative;
7
+ height: 100%;
8
+ }
9
+
10
+ .weui_tab_bd {
11
+ box-sizing: border-box;
12
+ height: 100%;
13
+ padding-bottom: 55px;
14
+ overflow: auto;
15
+ -webkit-overflow-scrolling: touch;
16
+ }
17
+
18
+ .weui_tab_bd_item {
19
+ display: none;
20
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weui-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Guo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-21 00:00:00.000000000 Z
11
+ date: 2016-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -94,9 +94,15 @@ files:
94
94
  - vendor/assets/stylesheets/widget/weui_cell/weui_switch.scss
95
95
  - vendor/assets/stylesheets/widget/weui_cell/weui_uploader.scss
96
96
  - vendor/assets/stylesheets/widget/weui_grid/weui_grid.scss
97
+ - vendor/assets/stylesheets/widget/weui_media_box/weui_media_box.scss
97
98
  - vendor/assets/stylesheets/widget/weui_page/weui_article.scss
98
99
  - vendor/assets/stylesheets/widget/weui_page/weui_msg.scss
100
+ - vendor/assets/stylesheets/widget/weui_panel/weui_panel.scss
99
101
  - vendor/assets/stylesheets/widget/weui_progress/weui_progress.scss
102
+ - vendor/assets/stylesheets/widget/weui_searchbar/weui_searchbar.scss
103
+ - vendor/assets/stylesheets/widget/weui_tab/navbar.scss
104
+ - vendor/assets/stylesheets/widget/weui_tab/tabbar.scss
105
+ - vendor/assets/stylesheets/widget/weui_tab/weui_tab.scss
100
106
  - vendor/assets/stylesheets/widget/weui_tips/weui_actionsheet.scss
101
107
  - vendor/assets/stylesheets/widget/weui_tips/weui_dialog.scss
102
108
  - vendor/assets/stylesheets/widget/weui_tips/weui_mask.scss