Skip to content

Commit 21b1079

Browse files
committed
✨Having finished all the functions
1 parent c1f7fcb commit 21b1079

File tree

10 files changed

+311
-73
lines changed

10 files changed

+311
-73
lines changed

package-lock.json

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

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@
2828
"@tarojs/taro-swan": "^1.2.1",
2929
"@tarojs/taro-tt": "^1.2.1",
3030
"@tarojs/taro-weapp": "^1.2.1",
31-
"nervjs": "^1.3.9",
32-
"nerv-devtools": "^1.3.9"
31+
"axios": "^0.18.0",
32+
"base64-img": "^1.0.4",
33+
"fs": "0.0.1-security",
34+
"nerv-devtools": "^1.3.9",
35+
"nervjs": "^1.3.9"
3336
},
3437
"devDependencies": {
3538
"@types/react": "^16.4.6",

src/app.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class App extends Component {
2424
'pages/index/index',
2525
'pages/uploadPhoto/uploadPhoto',
2626
'pages/selectPhoto/selectPhoto',
27-
'pages/generatePhoto/generatePhoto'
27+
'pages/generatePhoto/generatePhoto',
28+
// 'pages/downloadPhoto/downloadPhoto',
29+
2830
],
2931
window: {
3032
backgroundTextStyle: 'light',

src/pages/generatePhoto/generatePhoto.less

Lines changed: 148 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
width: 84vw;
4444
height: 114vw;
4545
overflow: hidden;
46-
z-index: 10;
46+
z-index: 1000;
4747
}
4848
.photoBg {
4949
background-size: cover;
@@ -53,7 +53,7 @@
5353
width: 84vw;
5454
height: 114vw;
5555
overflow: hidden;
56-
z-index: 100;
56+
z-index: 10;
5757
}
5858
.photo {
5959
position: relative;
@@ -70,7 +70,7 @@
7070
top: 5vh;
7171
width: 20vw;
7272
height: auto;
73-
z-index: 100;
73+
z-index: 1000000;
7474
}
7575
.saveText {
7676
position: absolute;
@@ -123,3 +123,148 @@
123123
transform: translate(0px, 0px);
124124
}
125125
}
126+
127+
128+
@color-1: #0079ff;
129+
@color-2: #ff1b61;
130+
@color-3: #fff200;
131+
@color-4: #ffffff;
132+
133+
@ball-size: 25px;
134+
@jump: 0.75em;
135+
@diam: 2 * @jump;
136+
137+
@duration: 1.2s;
138+
139+
.loader {
140+
position: absolute;
141+
top: 50vw;
142+
left:50vw;
143+
width: 0;
144+
height: 0;
145+
margin: 4em auto;
146+
animation: anim-rotate @duration infinite ease;
147+
z-index: 100000;
148+
149+
/* Variations */
150+
//animation: anim-rotate @duration infinite linear;
151+
//animation: anim-rotate @duration infinite cubic-bezier(.1,.3,.3,.1);
152+
//animation: anim-rotate @duration linear infinite alternate;
153+
//animation: anim-rotate 0 infinite;
154+
155+
&:before,
156+
&:after {
157+
content: "";
158+
position: absolute;
159+
width: @ball-size;
160+
height: @ball-size;
161+
top: 70%;
162+
left: 50%;
163+
margin-top: -@ball-size / 2;
164+
margin-left: -@ball-size / 2;
165+
border-radius: @ball-size / 2;
166+
opacity: 0.9;
167+
}
168+
169+
&::before {
170+
background: @color-1;
171+
transform: translate(-@jump, -@jump) scale(1);
172+
box-shadow: @diam @diam 0 @color-2;
173+
animation: anim-1-2 @duration infinite ease;
174+
}
175+
176+
&:after {
177+
background: @color-3;
178+
transform: translate(@jump, -@jump) scale(1);
179+
box-shadow: -@diam @diam 0 @color-4;
180+
animation: anim-3-4 @duration infinite ease;
181+
}
182+
}
183+
184+
@keyframes anim-1-2 {
185+
50% {
186+
transform: scale(1.3) translate(0, 0);
187+
box-shadow: 0 0 0 @color-2;
188+
opacity: 0.8;
189+
}
190+
}
191+
192+
@keyframes anim-3-4 {
193+
50% {
194+
transform: scale(1.3) translate(0, 0);
195+
box-shadow: 0 0 0 @color-4;
196+
opacity: 0.8;
197+
}
198+
}
199+
200+
@keyframes anim-rotate {
201+
0% {
202+
transform: rotate(0deg);
203+
}
204+
50% {
205+
transform: rotate(360deg);
206+
}
207+
100% {
208+
transform: rotate(720deg);
209+
}
210+
211+
}
212+
213+
/* -------------- loader6 -------------- */
214+
215+
.loader6{
216+
position: relative;
217+
width: 25px;
218+
height: 25px;
219+
220+
top: 46%;
221+
top: -webkit-calc(50% - 6px);
222+
top: calc(50% - 6px);
223+
left: 46%;
224+
left: -webkit-calc(50% - 6px);
225+
left: calc(50% - 6px);
226+
227+
border-radius: 50px;
228+
background-color: @color-3;
229+
-webkit-transform-origin: 50% 50%;
230+
transform-origin: 50% 50% ;
231+
-webkit-animation: loader6 1s ease-in-out infinite;
232+
animation: loader6 1s ease-in-out infinite;
233+
z-index: 10000;
234+
}
235+
236+
.loader6:before{
237+
content: "";
238+
position: absolute;
239+
background-color: @color-4;
240+
top: 0px;
241+
left: -60px;
242+
height: 25px;
243+
width: 25px;
244+
border-radius: 12px;
245+
}
246+
247+
.loader6:after{
248+
content: "";
249+
position: absolute;
250+
background-color: @color-2;
251+
top: 0px;
252+
left: 60px;
253+
height: 25px;
254+
width: 25px;
255+
border-radius: 12px;
256+
257+
}
258+
259+
260+
@-webkit-keyframes loader6{
261+
0%{-webkit-transform:rotate(0deg);}
262+
50%{-webkit-transform:rotate(180deg);}
263+
100%{-webkit-transform:rotate(180deg);}
264+
}
265+
266+
@keyframes loader6{
267+
0%{transform:rotate(0deg);}
268+
50%{transform:rotate(180deg);}
269+
100%{transform:rotate(180deg);}
270+
}

0 commit comments

Comments
 (0)