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 229ed13

Browse files
committed
work in progress
1 parent 639d6dc commit 229ed13

File tree

2 files changed

+68
-7
lines changed

2 files changed

+68
-7
lines changed

‎src/components/logo.vue

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<script>
2+
export default {
3+
data () {
4+
return {
5+
canvas: null
6+
}
7+
},
8+
mounted () {
9+
this.canvas = document.getElementById('canvasLogo')
10+
11+
let v = this.v()
12+
let angle = 0
13+
console.log(v)
14+
// v.scale(0.2, 0.2)
15+
16+
window.setInterval(() => {
17+
v.vTop.save()
18+
angle = (angle + 1) % 360
19+
v.vTop.rotate(angle * Math.PI / 180)
20+
v.vTop.restore()
21+
// console.log('hello')
22+
}, 5)
23+
},
24+
methods: {
25+
v () {
26+
var vTop = this.canvas.getContext('2d')
27+
vTop.beginPath()
28+
vTop.fillStyle = '#35495E'
29+
vTop.moveTo(80, 0)
30+
vTop.lineTo(200, 205)
31+
vTop.lineTo(320, 0)
32+
vTop.lineTo(250, 0)
33+
vTop.lineTo(200, 80)
34+
vTop.lineTo(155, 0)
35+
vTop.lineTo(80, 0)
36+
vTop.fill()
37+
38+
var vBottom = this.canvas.getContext('2d')
39+
vBottom.beginPath()
40+
vBottom.fillStyle = '#41B883'
41+
vBottom.moveTo(0, 0)
42+
vBottom.lineTo(200, 345)
43+
vBottom.lineTo(400, 0)
44+
vBottom.lineTo(320, 0)
45+
vBottom.lineTo(200, 205)
46+
vBottom.lineTo(80, 0)
47+
vBottom.lineTo(0, 0)
48+
vBottom.fill()
49+
50+
return { vTop, vBottom }
51+
}
52+
}
53+
}
54+
</script>
55+
56+
<template>
57+
<div class="logo">
58+
<canvas id="canvasLogo" width="500" height="500" style="border: solid 1px #cccccc;"></canvas>ue-build
59+
</div>
60+
</template>

‎src/index.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<script>
22
import nav from './components/nav.vue'
3-
import logo from './assets/images/logo.png'
3+
import logo from './components/logo.vue'
4+
45
export default {
56
data: function () {
67
return {
78
logo
89
}
910
},
11+
components: {
12+
logo,
13+
navBar: nav
14+
},
1015
mounted () {
1116
// Lets redirect to path
1217
if (this.$route.query.p) {
@@ -17,18 +22,14 @@
1722
isHome () {
1823
return this.$route.path === '/'
1924
}
20-
},
21-
components: {
22-
navBar: nav
23-
},
24-
methods: {}
25+
}
2526
}
2627
</script>
2728

2829
<template>
2930
<div class="app">
3031
<div class="header" :class="{'large': isHome}">
31-
<divclass="logo"><img:src="logo" />ue-build</div>
32+
<logo />
3233
<div class="tagline">Taking the frustrating build process and clutter out of your application</div>
3334
</div>
3435
<div class="container">

0 commit comments

Comments
(0)

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