Skip to content

Instantly share code, notes, and snippets.

@speedsticko
Last active September 12, 2021 18:15
Show Gist options
  • Save speedsticko/5cd9985755e00ea342ca46c00fe88475 to your computer and use it in GitHub Desktop.
Save speedsticko/5cd9985755e00ea342ca46c00fe88475 to your computer and use it in GitHub Desktop.
Super Language Club
import Component from '@glimmer/component';
export default class extends Component {
}
import Component from '@glimmer/component';
export default class extends Component {
phrases = [
{text: "How are you?"},
{text: "Good morning"},
{text: "What is your chinese name?"},
{text: "Summer vacation"},
{text: "We/Us"},
{text: "When I call your name say 'here'"},
{text: "Good bye"},
{text: "See you next time"},
{text: "Talk you you later"},
{text: "See you soon"},
{text: "Have a good day"},
{text: "See you later"},
]
}
import Component from '@glimmer/component';
export default class extends Component {
}
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Super Language Club';
}
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
const Router = EmberRouter.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('index', { path: '/' });
this.route('lobby');
this.route('ocls', function(){
this.route('texts', function(){
this.route('text', { path: '/texts/:grade_id'});
});
this.route('exercises', function() {
this.route('exercise', { path: '/:grade_id' });
});
});
});
export default Router;
import Route from '@ember/routing/route';
export default Route.extend({
});
import Route from '@ember/routing/route';
export default Route.extend({
});
import Route from '@ember/routing/route';
export default Route.extend({
});
import Route from '@ember/routing/route';
export default Route.extend({
model(params) {
return { grade: params.grade_id};
}
});
import Route from '@ember/routing/route';
export default Route.extend({
});
<h1>{{this.appName}} - Learn language with friends</h1>
<LinkTo @route="lobby">Start Here</LinkTo> | <LinkTo @route="lobby">Lobby</LinkTo> | <LinkTo @route="lobby">Shop</LinkTo>
<br>
<LinkTo @route="lobby">Toolbox</LinkTo> | <LinkTo @route="lobby">Magic Parrot</LinkTo>
<br>
{{outlet}}
<br>
<br>
<div style="border: 1px solid hsla(170, 50%, 45%, 1)">
<div style="display:flex; justify-content:center; ">
<div style="">
<h5>Magic Parrot</h5>
<div>
Level: 0
<br/>
<a href="http://clipart-library.com/clipart/120376.htm"><img src="http://clipart-library.com/data_images/120376.png" width="192" height="120" /></a>
<h5>Stats</h5>
<ul>
<li>Listening</li>
<li>Reading</li>
<li>Speaking</li>
<li>Writing</li>
</ul>
</div>
</div>
<div style="flex:1">
<h5>Words and Phrases</h5>
<div>
Categories: Basics | Colours | Weather |
<!--MagicParrot::PhraseBook //-->
<div style="display:flex; gap: 10px; flex-wrap: wrap;">
{{#each this.phrases as |phrase|}}
<div style=" border: 1px solid hsla(270, 50%, 45%, 1)">
{{phrase.text}}
</div>
{{/each}}
</div>
</div>
</div>
</div>
</div>
<div style="border: 1px solid hsla(70, 50%, 45%, 1)">
<div style="display:flex">
<div>
<img src="https://free-images.com/tn/c0db/blue_dress_teacher_woman.jpg" />
</div>
<div>
<h3>Instructions | Questions | Challenges | Conversations </h3>
<p>
Good morning students! How are you doing today? <button>Hear</button>
</p>
</div>
</div>
<div>
<h3>Actions</h3>
<ul>
<li>Good</li>
<li>Not good</li>
<li>Yes</li>
<li>Mango</li>
</ul>
<button>Speak</button>
<button>Comment dit ton</button>
</div>
</div>
<h1>Lobby</h1>
<h3>Training</h3>
Basic vocabulary<br/>
Basic conversations
<h3>Challenges</h3>
Find the imposter<br/>
Scavenger hunt<br/>
<Teacher />
<br/>
<MagicParrot />
{
"version": "0.17.1",
"EmberENV": {
"FEATURES": {},
"_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false,
"_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.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment