File tree 2 files changed +40
-8
lines changed
2 files changed +40
-8
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <Page class =" page" actionBarHidden =" true" >
3
- <FixedAbsoluteLayout backgroundColor =" #eeeeee" width =" 100%" height =" 100%" >
4
- <Label class =" info" customTop =" 4.7%" customLeft =" 61.6%" width =" 20%" height =" 6%" backgroundColor =" #ff0000" >
5
- </Label >
6
- <Image src =" ~/static/image/triangle.png" customTop =" 50%" customLeft =" 50%" stretch =" none" />
7
- <Image src =" ~/static/image/triangle.png" customTop =" 51%" customLeft =" 51%" stretch =" none" />
2
+ <Page class =" page" actionBarHidden =" true" width =" 100%" height =" 100%" >
3
+ <FixedAbsoluteLayout class =" pageLayout" backgroundColor =" #eeeeee" width =" 99%" height =" 100%" >
4
+ <Label customTop =" 1%" customLeft =" 1%" width =" 50%" height =" 50%" backgroundColor =" #ffffff" />
5
+ <Button class =" info rates" customTop =" 4.7%" customLeft =" 61.6%" text =" Rates" textWrap =" true" />
6
+ <Button class =" info status" customTop =" 11.7%" customLeft =" 61.6%" text =" Status" textWrap =" true" />
8
7
</FixedAbsoluteLayout >
9
8
</Page >
10
9
</template >
24
23
// End custom common variables
25
24
26
25
// Custom styles
26
+ @function em ($number ) {
27
+ @if (min-width : 1080px ) {
28
+ @return $number * 14 ;
29
+ }
30
+ @if (min-width : 800px ) {
31
+ @return $number * 11 ;
32
+ }
33
+ @if (min-width : 600px ) {
34
+ @return $number * 9 ;
35
+ }
36
+ @if (min-width : 400px ) {
37
+ @return $number * 6 ;
38
+ }
39
+ @return $number * 5 ;
40
+ }
27
41
42
+ .page {
43
+ position : relative ;
44
+ }
45
+
46
+ .info {
47
+ background-color : white ;
48
+ width : 20% ;
49
+ height : 6% ;
50
+ padding : 0 ;
51
+ color : black ;
52
+ border-radius : 5px ;
53
+ font-size : em (1px );
54
+ & :active {
55
+ background-color : lightgray ;
56
+ }
57
+ }
28
58
</style >
Original file line number Diff line number Diff line change @@ -21,13 +21,15 @@ const AbsoluteLayout = (function(_super) {
21
21
22
22
AbsoluteLayout . prototype . setCustomLeft = function ( view , value ) {
23
23
var isPercent = typeof value === "string" && value . indexOf ( "%" ) >= 0 ;
24
- if ( isPercent ) absoluteLayout_01 . setLeft ( view , this . getMeasuredWidth ( ) * ( parseFloat ( value ) / 100 ) ) ;
24
+ var { width } = this . getActualSize ( ) ;
25
+ if ( isPercent ) absoluteLayout_01 . setLeft ( view , width * ( parseFloat ( value ) / 100 ) ) ;
25
26
else absoluteLayout_01 . setLeft ( view , value ) ;
26
27
} ;
27
28
28
29
AbsoluteLayout . prototype . setCustomTop = function ( view , value ) {
29
30
var isPercent = typeof value === "string" && value . indexOf ( "%" ) >= 0 ;
30
- if ( isPercent ) absoluteLayout_01 . setTop ( view , this . getMeasuredHeight ( ) * ( parseFloat ( value ) / 100 ) ) ;
31
+ var { height } = this . getActualSize ( ) ;
32
+ if ( isPercent ) absoluteLayout_01 . setTop ( view , height * ( parseFloat ( value ) / 100 ) ) ;
31
33
else absoluteLayout_01 . setTop ( view , value ) ;
32
34
} ;
33
35
You can’t perform that action at this time.
0 commit comments