Skip to content

Commit 2e31128

Browse files
committed
dress up demo
1 parent 1ca9df5 commit 2e31128

File tree

4 files changed

+10628
-15
lines changed

4 files changed

+10628
-15
lines changed

demo/public/index.js

Lines changed: 10279 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/public/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/src/App.vue

Lines changed: 94 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
<template>
22
<div>
3-
My App.vue comp
4-
53
<file-selector
6-
accept-extensions=".jpg"
4+
accept-extensions=".jpg,.svg"
75
:height="300"
6+
:max-file-size="2 * 1024 * 1024"
87
@validated="handleFilesValidated"
98
@changed="handleFilesChanged"
109
>
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>
1226
</file-selector>
1327
</div>
1428
</template>
@@ -28,4 +42,79 @@ export default {
2842
},
2943
},
3044
};
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

Comments
 (0)