Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Commit 4848a51

Browse files
committed
intro - getting started and features
1 parent 402f59b commit 4848a51

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

‎src/helpers/intro.js

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export default class VueBuildIntro {
2727
this.all.positionYStart = -200
2828
this.all.positionYEnd = 200
2929
this.slogan = this.slogan()
30-
this.gettingStarted = this.getStarted()
30+
this.gettingStarted = this.linkText('Getting Started', 'getting-started')
31+
this.gettingStarted.x = (this.width / 2) - 100
32+
this.gettingStarted.y = (this.height) - 75
33+
this.features = this.linkText('Features', 'features')
34+
this.features.x = (this.width / 2) + 100
35+
this.features.y = (this.height) - 75
3136

3237
// Make a container to hold all v's
3338
this.app.stage.addChild(this.all) // Add to state
@@ -150,7 +155,7 @@ export default class VueBuildIntro {
150155
dropShadowBlur: 50
151156
})
152157

153-
var text = new PIXI.Text('Super Simple Cli', style)
158+
var text = new PIXI.Text('Ultra Simple Cli', style)
154159
text.pivot.x = text.width / 2
155160
text.pivot.y = text.height
156161
text.x = this.width / 2
@@ -161,40 +166,41 @@ export default class VueBuildIntro {
161166
return text
162167
}
163168

164-
getStarted() {
169+
linkText(textStr,link) {
165170
var box = new PIXI.Container()
166171
var style = new PIXI.TextStyle({
167172
fontFamily: 'Helvetica',
168-
fontSize: 35,
173+
fontSize: 28,
169174
fontWeight: 'bold',
170-
fill: this.primaryColor
175+
fill: this.secondaryColor
171176
})
172177

173-
var text = new PIXI.Text('Getting Started', style)
178+
var text = new PIXI.Text(textStr, style)
174179
text.pivot.x = text.width / 2
175180
text.pivot.y = text.height
176181
text.x = this.width / 2
177182
text.y = this.height / 2
178183

179-
var rect = new PIXI.Graphics()
180-
rect.beginFill(this.secondaryColor, 1)
181-
rect.drawRect(0, 0, 300, 75)
182-
rect.endFill()
183-
rect.pivot.x = rect.width / 2
184-
rect.pivot.y = rect.height
185-
rect.x = this.width / 2
186-
rect.y = this.height / 2
184+
var arrow = new PIXI.Graphics()
185+
arrow.lineStyle(4, this.secondaryColor, 1)
186+
arrow.moveTo(0, 0)
187+
arrow.lineTo(50, 25)
188+
arrow.lineTo(100, 0)
189+
arrow.pivot.x = arrow.width / 2
190+
arrow.pivot.y = arrow.height
191+
arrow.x = this.width / 2
192+
arrow.y = (this.height / 2) + 40
187193

188194
box.interactive = true
189195
box.on('click', () => {
190-
this.callback('getting-started')
196+
this.callback(link)
191197
})
192198

193199
// Set box
194-
box.addChild(rect)
200+
box.addChild(arrow)
195201
box.addChild(text)
196-
box.pivot.x = box.width / 2
197-
box.pivot.y = box.height
202+
box.pivot.x = this.width / 2
203+
box.pivot.y = this.height/2
198204
box.x = this.width / 2
199205
box.y = this.height / 2
200206

@@ -232,7 +238,6 @@ export default class VueBuildIntro {
232238
.then(() => {
233239
this.slideAllUp()
234240
this.slideSloganUp()
235-
this.slideGettingStartedUp()
236241
})
237242
}
238243

@@ -486,19 +491,6 @@ export default class VueBuildIntro {
486491
})
487492
}
488493

489-
slideGettingStartedUp (timing = 2, delay = 0.5) {
490-
return new Promise((resolve, reject) => {
491-
TweenMax.to(this.gettingStarted, timing, {
492-
delay: delay,
493-
y: 600,
494-
ease: Power3.easeInOut,
495-
onComplete: () => {
496-
resolve()
497-
}
498-
})
499-
})
500-
}
501-
502494
getRandomNum (min, max) {
503495
return Math.random() * (max - min) + min
504496
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /