Last active
October 6, 2020 01:37
-
-
Save mastastealth/6de6fb20165f1029a39953af67e324bd to your computer and use it in GitHub Desktop.
Octane Mini Quiz
This file contains 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
import Component from '@glimmer/component'; | |
export default class Notes extends Component { | |
get itemCount() { | |
return `(${this.items?.length || 0})`; | |
} | |
} |
This file contains 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
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
@tracked inputValue = ''; | |
@tracked items = [ | |
"Ask about this.", | |
"Ask about that." | |
] | |
@action | |
submit() { | |
this.items.push(this.inputValue); | |
this.inputValue = ''; | |
} | |
} |
This file contains 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
body { | |
background: #EEF; | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
h1 { text-align: center; } | |
ol { | |
background: #FFE; | |
border: 1px solid goldenrod; | |
margin-bottom: 50px; | |
padding: 15px; | |
list-style-position: inside; | |
margin: 0 auto 20px; | |
max-width: 50%; | |
} | |
.note-block { | |
background: white; | |
border: 1px solid #333; | |
border-radius: 4px; | |
box-shadow: 0 0 4px rgba(255, 0, 255, 0.2); | |
margin: 0 auto; | |
padding: 10px; | |
max-width: 50%; | |
} | |
.note-item-empty { | |
color: #999; | |
font-style: italic; | |
} | |
input { max-width: 100%; } | |
.note-block hr { margin: 20px 0; } |
This file contains 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
{ | |
"version": "0.17.1", | |
"EmberENV": { | |
"FEATURES": {}, | |
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": true, | |
"_APPLICATION_TEMPLATE_WRAPPER": true, | |
"_JQUERY_INTEGRATION": true | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js", | |
"ember": "3.18.1", | |
"ember-template-compiler": "3.18.1", | |
"ember-testing": "3.18.1" | |
}, | |
"addons": { | |
"@glimmer/component": "1.0.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment