1
1
<template >
2
2
<div >
3
- My App.vue comp
4
-
5
3
<file-selector
6
- accept-extensions =" .jpg"
4
+ accept-extensions =" .jpg,.svg "
7
5
:height =" 300"
6
+ :max-file-size =" 2 * 1024 * 1024"
8
7
@validated =" handleFilesValidated"
9
8
@changed =" handleFilesChanged"
10
9
>
11
- hahahah
10
+ Select
11
+
12
+ <div slot =" top" class =" section-top" >
13
+ <p >
14
+ You can click the below button or drop files into this area.
15
+ </p >
16
+ Max file size allowed: 2 MB.<br />
17
+ File extensions: JPG, SVG.
18
+ </div >
19
+
20
+ <div slot =" bottom" class =" section-bottom" >
21
+ A project of
22
+ <a href =" https://imageglass.org/about" target =" _blank" >
23
+ Duong Dieu Phap
24
+ </a >
25
+ </div >
12
26
</file-selector >
13
27
</div >
14
28
</template >
@@ -28,4 +42,79 @@ export default {
28
42
},
29
43
},
30
44
};
31
- </script >
45
+ </script >
46
+
47
+
48
+ <style lang="scss">
49
+ $primColor : #820084 ;
50
+
51
+ html , body {
52
+ font-family : -apple-system , BlinkMacSystemFont, ' Segoe UI' , Roboto, Oxygen, Ubuntu, Cantarell, ' Open Sans' , ' Helvetica Neue' , sans-serif ;
53
+ font-size : 1rem ;
54
+ box-sizing : border-box ;
55
+ line-height : normal ;
56
+ }
57
+
58
+ body {
59
+ padding : 2rem ;
60
+
61
+ p {
62
+ margin-top : 0 ;
63
+ }
64
+
65
+ a , a :visited {
66
+ color : $primColor ;
67
+ }
68
+ }
69
+
70
+ .fs-file-selector {
71
+ .fs-droppable {
72
+ background-color : rgba ($primColor , 0.05 );
73
+ border-color : $primColor !important ;
74
+ border-width : 2px !important ;
75
+ border-radius : 1px !important ;
76
+ transition : all ease 300ms ;
77
+
78
+ & .fs-drag-enter {
79
+ transition : all ease 100ms ;
80
+ background-color : rgba ($primColor , 0.1 );
81
+ border-style : solid ;
82
+ box-shadow : inset 0 0 0 2px $primColor ;
83
+ transform : scale (0.99 );
84
+ }
85
+ }
86
+
87
+ .fs-btn-select {
88
+ background-color : #820084 ;
89
+ padding : 0.75rem 2rem ;
90
+ color : #fff ;
91
+ border-radius : 1px ;
92
+ transition : all ease 200ms ;
93
+
94
+ & :hover {
95
+ cursor : pointer ;
96
+ background-color : #960098 ;
97
+ }
98
+
99
+ & :active {
100
+ background-color : #6d006f ;
101
+ transform : scale (0.95 );
102
+ transition : all ease 60ms ;
103
+ }
104
+ }
105
+ }
106
+
107
+
108
+
109
+
110
+ .section-top {
111
+ margin-bottom : 2rem ;
112
+ color : #6f6f6f ;
113
+ font-size : 0.875rem ;
114
+ }
115
+ .section-bottom {
116
+ margin-top : 2rem ;
117
+ color : #6f6f6f ;
118
+ font-size : 0.875rem ;
119
+ }
120
+ </style >
0 commit comments