This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Vue({ | |
| el: '#app', | |
| data: { | |
| votes: 0 | |
| }, | |
| methods: | |
| { | |
| vote: function(writer) { | |
| this.$emit('voted') | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vue.component('food', { | |
| template: '#food', | |
| props: ['name'], | |
| methods: { | |
| vote: function() { | |
| this.$emit('voted') | |
| } | |
| }, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vue.component('food', { | |
| template: '#food', | |
| props: ['name'], | |
| data: function() { | |
| return { | |
| votes: 0 | |
| } | |
| }, | |
| methods: { | |
| vote: function(event) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var bus = new Vue(); | |
| Vue.component('food', { | |
| template: '#food', | |
| props: ['name'], | |
| data: function() { | |
| return { | |
| votes: 0 | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vue.component('story', { | |
| template: "#story-template", | |
| props: ['story', 'favorite'], | |
| methods: { | |
| upvote: function() { | |
| this.story.upvotes += 1; | |
| this.story.voted = true; | |
| }, | |
| markAsFavorite: function() { | |
| // 'update' is just the name of the custom event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vue.component('chariot', { | |
| props: ['chariot', 'current'], | |
| template: "#chariot-template", | |
| methods: { | |
| rideChariot: function(chariot) { | |
| this.$emit('select', chariot) | |
| }, | |
| }, | |
| computed: { | |
| //is true when the chariot has more horses than the current one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root = true | |
| [*] | |
| charset = utf-8 | |
| indent_style = space | |
| indent_size = 2 | |
| end_of_line = lf | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "printWidth": 120, | |
| "tabWidth": 4, | |
| "useTabs": false, | |
| "semi": false, | |
| "singleQuote": false, | |
| "trailingComma": "es5", | |
| "bracketSpacing": true, | |
| "jsxBracketSameLine": false, | |
| "overrides": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .monaco-icon-label[title~="Deleted"]::after { | |
| content: "D"; | |
| color: #FFF !important; | |
| background-color: rgb(173, 7, 7); | |
| } | |
| .monaco-icon-label[title~="Untracked"]::after { | |
| content: "U"; | |
| color: #FFF !important; | |
| background-color: rgb(1, 144, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ###### | |
| # Colors | |
| ###### | |
| GREEN='\033[0;32m' | |
| LIGHTGREEN='\033[1;32m' | |
| LIGHTBLUE='\033[01;34m' | |
| NC='\033[0m' | |
| main() { |
OlderNewer