File tree 3 files changed +15
-2
lines changed
3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,14 @@ const profile = new Vue({
11
11
localStorage . removeItem ( 'token' )
12
12
location . href = '/'
13
13
} ,
14
+ random_message ( ) {
15
+ const msg = [
16
+ "Let's do our best today." ,
17
+ "Sometimes breaks are important." ,
18
+ "It's important to continue." ,
19
+ ] ;
20
+ return msg [ Math . floor ( Math . random ( ) * msg . length ) ] ;
21
+ } ,
14
22
} ,
15
23
created ( ) {
16
24
const date = new Date ( )
Original file line number Diff line number Diff line change 6
6
7
7
< link rel ="manifest " href ="/manifest.json "/>
8
8
< link rel ="stylesheet " href ="/assets/css/style.css " type ="text/css " />
9
- < script src ="https://cdn.jsdelivr.net/npm/vue "> </ script >
9
+ < script src ="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js "> </ script >
10
10
< title > {{.Info.Title}}</ title >
11
11
{{end}}
Original file line number Diff line number Diff line change 12
12
< body >
13
13
< h1 class ="title-h1 "> {{ .Info.Title }} - User Page</ h1 >
14
14
< div id ="profile ">
15
- < div > </ div >
15
+ < div >
16
+ {{ `{{ user }}` }}, welcome!
17
+ </ div >
18
+ < div >
19
+ {{ `{{ random_message() }}` }}
20
+ </ div >
16
21
< button type ="button " name ="logout " @click ="logout() "> logout</ button >
17
22
</ div >
18
23
< script src ="assets/js/profile.js "> </ script >
You can’t perform that action at this time.
0 commit comments