├── vendor └── .gitkeep ├── app ├── components │ ├── .gitkeep │ └── browsers │ │ ├── version-details.js │ │ ├── version-form.js │ │ └── browser-form.js ├── helpers │ └── .gitkeep ├── models │ ├── .gitkeep │ ├── browsers │ │ └── browser │ │ │ └── version.js │ ├── browser.js │ └── version.js ├── routes │ ├── .gitkeep │ ├── browsers │ │ ├── browser │ │ │ ├── versions.js │ │ │ └── index.js │ │ ├── index.js │ │ └── browser.js │ ├── browsers.js │ └── application.js ├── controllers │ ├── .gitkeep │ ├── browsers.js │ ├── application.js │ ├── protected.js │ └── browsers │ │ ├── browser │ │ └── versions.js │ │ ├── browser.js │ │ └── index.js ├── templates │ ├── components │ │ ├── .gitkeep │ │ └── browsers │ │ │ ├── version-details.hbs │ │ │ ├── browser-form.hbs │ │ │ └── version-form.hbs │ ├── browsers.hbs │ ├── error.hbs │ ├── browsers │ │ ├── browser │ │ │ └── versions.hbs │ │ ├── browser.hbs │ │ └── index.hbs │ ├── loading.hbs │ └── application.hbs ├── styles │ ├── utilities │ │ └── hidden.styl │ ├── blocks │ │ ├── version.styl │ │ ├── nav-main.styl │ │ ├── box.styl │ │ ├── panel.styl │ │ ├── list-short.styl │ │ ├── loading.styl │ │ ├── form.styl │ │ └── spinner.styl │ ├── includes │ │ ├── mixins.styl │ │ └── variables.styl │ ├── elements │ │ ├── tables.styl │ │ ├── document.styl │ │ ├── sectioning.styl │ │ ├── media.styl │ │ ├── text.styl │ │ ├── forms.styl │ │ └── opensans.styl │ └── app.styl ├── router.js ├── torii-providers │ └── bcnext.js ├── app.js ├── adapters │ └── application.js ├── index.html └── torii-adapters │ └── application.js ├── tests ├── unit │ ├── .gitkeep │ ├── routes │ │ ├── browsers-test.js │ │ ├── application-test.js │ │ └── browsers │ │ │ ├── browser-test.js │ │ │ └── browser │ │ │ ├── index-test.js │ │ │ └── versions-test.js │ ├── models │ │ ├── browser-test.js │ │ ├── version-test.js │ │ └── browsers │ │ │ └── browser │ │ │ └── version-test.js │ ├── adapters │ │ └── application-test.js │ └── controllers │ │ ├── browsers-test.js │ │ ├── application-test.js │ │ └── browsers │ │ ├── index-test.js │ │ ├── browser-test.js │ │ └── browser │ │ └── versions-test.js ├── integration │ ├── .gitkeep │ └── components │ │ └── browsers │ │ ├── browser-form-test.js │ │ ├── version-form-test.js │ │ └── version-details-test.js ├── test-helper.js ├── helpers │ ├── destroy-app.js │ ├── resolver.js │ ├── start-app.js │ └── module-for-acceptance.js ├── .jshintrc └── index.html ├── .watchmanconfig ├── public ├── robots.txt ├── assets │ ├── fonts │ │ ├── OpenSans-Bold-webfont.eot │ │ ├── OpenSans-Bold-webfont.ttf │ │ ├── OpenSans-Bold-webfont.woff │ │ ├── OpenSans-Bold-webfont.woff2 │ │ ├── OpenSans-Italic-webfont.eot │ │ ├── OpenSans-Italic-webfont.ttf │ │ ├── OpenSans-Light-webfont.eot │ │ ├── OpenSans-Light-webfont.ttf │ │ ├── OpenSans-Light-webfont.woff │ │ ├── OpenSans-Italic-webfont.woff │ │ ├── OpenSans-Italic-webfont.woff2 │ │ ├── OpenSans-Light-webfont.woff2 │ │ ├── OpenSans-Regular-webfont.eot │ │ ├── OpenSans-Regular-webfont.ttf │ │ ├── OpenSans-Regular-webfont.woff │ │ ├── OpenSans-Regular-webfont.woff2 │ │ ├── OpenSans-BoldItalic-webfont.eot │ │ ├── OpenSans-BoldItalic-webfont.ttf │ │ ├── OpenSans-BoldItalic-webfont.woff │ │ ├── OpenSans-LightItalic-webfont.eot │ │ ├── OpenSans-LightItalic-webfont.ttf │ │ ├── OpenSans-BoldItalic-webfont.woff2 │ │ ├── OpenSans-LightItalic-webfont.woff │ │ └── OpenSans-LightItalic-webfont.woff2 │ └── scripts.js └── crossdomain.xml ├── .bowerrc ├── testem.json ├── .ember-cli ├── .gitignore ├── .travis.yml ├── bower.json ├── .jshintrc ├── .editorconfig ├── ember-cli-build.js ├── package.json ├── config └── environment.js └── README.md /vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/helpers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/routes/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/unit/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/integration/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/templates/components/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/templates/browsers.hbs: -------------------------------------------------------------------------------- 1 | {{outlet}} 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": ["tmp", "dist"] 3 | } 4 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # http://www.robotstxt.org 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components", 3 | "analytics": false 4 | } 5 | -------------------------------------------------------------------------------- /app/styles/utilities/hidden.styl: -------------------------------------------------------------------------------- 1 | [hidden], 2 | .hidden { 3 | display: none; 4 | } 5 | -------------------------------------------------------------------------------- /app/controllers/browsers.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /app/templates/components/browsers/version-details.hbs: -------------------------------------------------------------------------------- 1 | {{browsers/version-form version=version isEditing=false}} 2 | -------------------------------------------------------------------------------- /app/controllers/application.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /app/controllers/protected.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | 5 | }); 6 | -------------------------------------------------------------------------------- /app/routes/browsers/browser/versions.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Route.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /app/styles/blocks/version.styl: -------------------------------------------------------------------------------- 1 | .version { 2 | margin-bottom: $spacing; 3 | border-bottom: 1px solid #000; 4 | } 5 | -------------------------------------------------------------------------------- /app/models/browsers/browser/version.js: -------------------------------------------------------------------------------- 1 | import DS from 'ember-data'; 2 | 3 | export default DS.Model.extend({ 4 | 5 | }); 6 | -------------------------------------------------------------------------------- /app/styles/includes/mixins.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Mixins 3 | ====================================================================== */ 4 | -------------------------------------------------------------------------------- /app/components/browsers/version-details.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Component.extend({ 4 | }); 5 | -------------------------------------------------------------------------------- /app/templates/error.hbs: -------------------------------------------------------------------------------- 1 |
2 |

Error :(

3 |

Sorry I can't be more specific.

4 |
5 | -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Bold-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Bold-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Bold-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Bold-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Italic-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Italic-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Light-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Light-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Light-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Italic-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Italic-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Light-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Regular-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Regular-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Regular-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-Regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-Regular-webfont.woff2 -------------------------------------------------------------------------------- /tests/test-helper.js: -------------------------------------------------------------------------------- 1 | import resolver from './helpers/resolver'; 2 | import { 3 | setResolver 4 | } from 'ember-qunit'; 5 | 6 | setResolver(resolver); 7 | -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-BoldItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-BoldItalic-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-BoldItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-BoldItalic-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-BoldItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-BoldItalic-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-LightItalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-LightItalic-webfont.eot -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-LightItalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-LightItalic-webfont.ttf -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-BoldItalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-BoldItalic-webfont.woff2 -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-LightItalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-LightItalic-webfont.woff -------------------------------------------------------------------------------- /public/assets/fonts/OpenSans-LightItalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdn/browsercompat-cm/master/public/assets/fonts/OpenSans-LightItalic-webfont.woff2 -------------------------------------------------------------------------------- /tests/helpers/destroy-app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default function destroyApp(application) { 4 | Ember.run(application, 'destroy'); 5 | } 6 | -------------------------------------------------------------------------------- /app/styles/elements/tables.styl: -------------------------------------------------------------------------------- 1 | table { 2 | /* normalize */ 3 | border-collapse: collapse; 4 | border-spacing: 0; 5 | } 6 | 7 | td, 8 | th { 9 | /* normalize */ 10 | padding: 0; 11 | } 12 | -------------------------------------------------------------------------------- /app/styles/blocks/nav-main.styl: -------------------------------------------------------------------------------- 1 | .nav-main { 2 | border-bottom: 1px solid #000; 3 | margin-bottom: $spacing; 4 | 5 | ul { 6 | padding-left: 0; 7 | } 8 | 9 | li { 10 | display: inline-block; 11 | margin-right: $spacing; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /testem.json: -------------------------------------------------------------------------------- 1 | { 2 | "framework": "qunit", 3 | "test_page": "tests/index.html?hidepassed", 4 | "disable_watching": true, 5 | "launch_in_ci": [ 6 | "PhantomJS" 7 | ], 8 | "launch_in_dev": [ 9 | "PhantomJS", 10 | "Chrome" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /app/routes/browsers/browser/index.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Route.extend({ 4 | beforeModel: function() { 5 | // forward from this page to the list of versions 6 | this.transitionTo('browsers.browser.versions'); 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /app/templates/browsers/browser/versions.hbs: -------------------------------------------------------------------------------- 1 |

Versions

2 | 3 | {{#each model.versionsReversed as |version|}} 4 | {{browsers/version-form 5 | version=version 6 | saveVersion=(action "saveVersion" version)}} 7 | {{else}} 8 | No versions found. 9 | {{/each}} -------------------------------------------------------------------------------- /public/assets/scripts.js: -------------------------------------------------------------------------------- 1 | $(document).ajaxStart(function() { 2 | $('body').addClass('loading'); 3 | $('#loading').text('Loading.'); 4 | }); 5 | 6 | $(document).ajaxStop(function() { 7 | $('body').removeClass('loading'); 8 | $('#loading').text(''); 9 | }); 10 | -------------------------------------------------------------------------------- /app/styles/blocks/box.styl: -------------------------------------------------------------------------------- 1 | .box { 2 | background-color: lighten($grey, 80%); 3 | padding: $spacing; 4 | 5 | :first-child { 6 | margin-top: 0; 7 | } 8 | 9 | :last-child { 10 | margin-bottom: 0; 11 | } 12 | } 13 | 14 | .box-error { 15 | background-color: lighten($red, 80%); 16 | } 17 | -------------------------------------------------------------------------------- /app/templates/loading.hbs: -------------------------------------------------------------------------------- 1 |
Loading data.
2 | 13 | -------------------------------------------------------------------------------- /.ember-cli: -------------------------------------------------------------------------------- 1 | { 2 | /** 3 | Ember CLI sends analytics information by default. The data is completely 4 | anonymous, but there are times when you might want to disable this behavior. 5 | 6 | Setting `disableAnalytics` to true will prevent any data from being sent. 7 | */ 8 | "disableAnalytics": false 9 | } 10 | -------------------------------------------------------------------------------- /app/styles/blocks/panel.styl: -------------------------------------------------------------------------------- 1 | .panel { 2 | position: relative; 3 | border: 1px solid #000; 4 | padding: $spacing; 5 | 6 | :first-child, 7 | :first-child :first-child { 8 | margin-top: 0; 9 | } 10 | } 11 | 12 | .panel-actions { 13 | position: absolute; 14 | top: $spacing; 15 | right: $spacing; 16 | } 17 | -------------------------------------------------------------------------------- /tests/helpers/resolver.js: -------------------------------------------------------------------------------- 1 | import Resolver from 'ember/resolver'; 2 | import config from '../../config/environment'; 3 | 4 | const resolver = Resolver.create(); 5 | 6 | resolver.namespace = { 7 | modulePrefix: config.modulePrefix, 8 | podModulePrefix: config.podModulePrefix 9 | }; 10 | 11 | export default resolver; 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | 7 | # dependencies 8 | /node_modules 9 | /bower_components 10 | 11 | # misc 12 | /.sass-cache 13 | /connect.lock 14 | /coverage/* 15 | /libpeerconnection.log 16 | npm-debug.log 17 | testem.log 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /app/templates/browsers/browser.hbs: -------------------------------------------------------------------------------- 1 | {{browsers/browser-form 2 | browser=model 3 | saveBrowser=(action "saveBrowser" model)}} 4 | 5 | {{outlet}} 6 | 7 | 8 | {{#if session.isAuthenticated}} 9 | 10 |

New Version

11 | 12 | {{browsers/version-form 13 | version=model 14 | saveVersion=(action "addVersion" model)}} 15 | 16 | {{/if}} -------------------------------------------------------------------------------- /app/controllers/browsers/browser/versions.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | actions: { 5 | saveVersion: function(params) { 6 | console.log('Attempt to save version'); 7 | var version = params; 8 | version.save(); 9 | 10 | return true; 11 | }, 12 | } 13 | }); 14 | -------------------------------------------------------------------------------- /app/styles/elements/document.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Styles for overall document. 3 | ====================================================================== */ 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | font-family: $font-family-site; 9 | 10 | /* normalize */ 11 | -ms-text-size-adjust: 100%; 12 | -webkit-text-size-adjust: 100%; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /tests/unit/routes/browsers-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('route:browsers', 'Unit | Route | browsers', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let route = this.subject(); 10 | assert.ok(route); 11 | }); 12 | -------------------------------------------------------------------------------- /tests/unit/routes/application-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('route:application', 'Unit | Route | application', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let route = this.subject(); 10 | assert.ok(route); 11 | }); 12 | -------------------------------------------------------------------------------- /app/models/browser.js: -------------------------------------------------------------------------------- 1 | import DS from 'ember-data'; 2 | 3 | export default DS.Model.extend({ 4 | slug: DS.attr('string'), 5 | name: DS.attr(), 6 | note: DS.attr(), 7 | versions: DS.hasMany('versions', {async: true}), 8 | // computed 9 | versionsReversed: function() { 10 | return this.get('versions').toArray().reverse(); 11 | }.property('versions.[]'), 12 | }); 13 | 14 | -------------------------------------------------------------------------------- /tests/unit/models/browser-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForModel, test } from 'ember-qunit'; 2 | 3 | moduleForModel('browser', 'Unit | Model | browser', { 4 | // Specify the other units that are required for this test. 5 | needs: [] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let model = this.subject(); 10 | // let store = this.store(); 11 | assert.ok(!!model); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/unit/models/version-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForModel, test } from 'ember-qunit'; 2 | 3 | moduleForModel('version', 'Unit | Model | version', { 4 | // Specify the other units that are required for this test. 5 | needs: [] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let model = this.subject(); 10 | // let store = this.store(); 11 | assert.ok(!!model); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/unit/routes/browsers/browser-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('route:browsers/browser', 'Unit | Route | browsers/browser', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let route = this.subject(); 10 | assert.ok(route); 11 | }); 12 | -------------------------------------------------------------------------------- /app/routes/browsers/index.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Route.extend({ 4 | model: function() { 5 | return this.store.findAll('browser'); 6 | }, 7 | actions: { 8 | didTransition: function() { 9 | // update document title 10 | var browser = this.modelFor('browsers.browser'); 11 | document.title = "Browsers"; 12 | }, 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /tests/unit/routes/browsers/browser/index-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('route:browsers/browser/index', 'Unit | Route | browsers/browser/index', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let route = this.subject(); 10 | assert.ok(route); 11 | }); 12 | -------------------------------------------------------------------------------- /app/router.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import config from './config/environment'; 3 | 4 | const Router = Ember.Router.extend({ 5 | location: config.locationType 6 | }); 7 | 8 | Router.map(function() { 9 | this.route('browsers', function() { 10 | this.route('browser', {path: ':browser_id'}, function() { 11 | this.route('versions'); 12 | }); 13 | }); 14 | }); 15 | 16 | export default Router; 17 | -------------------------------------------------------------------------------- /tests/unit/routes/browsers/browser/versions-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('route:browsers/browser/versions', 'Unit | Route | browsers/browser/versions', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let route = this.subject(); 10 | assert.ok(route); 11 | }); 12 | -------------------------------------------------------------------------------- /app/routes/browsers.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Browser from '../models/browser'; 3 | import Version from '../models/version'; 4 | 5 | export default Ember.Route.extend({ 6 | model: function() { 7 | return this.store.findAll('browser'); 8 | }, 9 | actions: { 10 | didTransition: function() { 11 | // update document title 12 | document.title = 'Browsers'; 13 | }, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /app/styles/blocks/list-short.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Compact list styles 3 | ====================================================================== */ 4 | 5 | .list-short { 6 | overflow: hidden; 7 | 8 | dt { 9 | display: inline-block; 10 | margin-right: $spacing; 11 | font-weight: bold; 12 | } 13 | 14 | dd { 15 | display: inline-block; 16 | margin-right: $spacing; 17 | margin-left: 0; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | language: node_js 3 | node_js: 4 | - "0.12" 5 | 6 | sudo: false 7 | 8 | cache: 9 | directories: 10 | - node_modules 11 | 12 | before_install: 13 | - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH 14 | - "npm config set spin false" 15 | - "npm install -g npm@^2" 16 | 17 | install: 18 | - npm install -g bower 19 | - npm install 20 | - bower install 21 | 22 | script: 23 | - npm test 24 | -------------------------------------------------------------------------------- /tests/unit/adapters/application-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('adapter:application', 'Unit | Adapter | application', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['serializer:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let adapter = this.subject(); 11 | assert.ok(adapter); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/unit/controllers/browsers-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('controller:browsers', 'Unit | Controller | browsers', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let controller = this.subject(); 11 | assert.ok(controller); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/unit/models/browsers/browser/version-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForModel, test } from 'ember-qunit'; 2 | 3 | moduleForModel('browsers/browser/version', 'Unit | Model | browsers/browser/version', { 4 | // Specify the other units that are required for this test. 5 | needs: [] 6 | }); 7 | 8 | test('it exists', function(assert) { 9 | let model = this.subject(); 10 | // let store = this.store(); 11 | assert.ok(!!model); 12 | }); 13 | -------------------------------------------------------------------------------- /app/routes/browsers/browser.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Route.extend({ 4 | model: function(params) { 5 | return this.store.findRecord('browser', params.browser_id); 6 | }, 7 | actions: { 8 | didTransition: function() { 9 | // update document title 10 | var browser = this.modelFor('browsers.browser'); 11 | document.title = `${browser.get('name.en')}`; 12 | } 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /app/templates/browsers/index.hbs: -------------------------------------------------------------------------------- 1 |

Browsers

2 | 3 | 12 | 13 | 14 | {{#if session.isAuthenticated}} 15 | 16 |

New Browser

17 | 18 | {{browsers/browser-form 19 | browser=model 20 | saveBrowser=(action "addBrowser" model)}} 21 | 22 | {{/if}} -------------------------------------------------------------------------------- /tests/unit/controllers/application-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('controller:application', 'Unit | Controller | application', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let controller = this.subject(); 11 | assert.ok(controller); 12 | }); 13 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browsercompat-cm", 3 | "dependencies": { 4 | "ember": "2.3.0", 5 | "ember-cli-shims": "0.1.0", 6 | "ember-cli-test-loader": "0.2.1", 7 | "ember-load-initializers": "0.1.7", 8 | "ember-qunit": "0.4.16", 9 | "ember-qunit-notifications": "0.1.0", 10 | "ember-resolver": "~0.1.20", 11 | "jquery": "1.11.3", 12 | "loader.js": "ember-cli/loader.js#3.4.0", 13 | "qunit": "~1.20.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/unit/controllers/browsers/index-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('controller:browsers/index', 'Unit | Controller | browsers/index', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let controller = this.subject(); 11 | assert.ok(controller); 12 | }); 13 | -------------------------------------------------------------------------------- /tests/unit/controllers/browsers/browser-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('controller:browsers/browser', 'Unit | Controller | browsers/browser', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let controller = this.subject(); 11 | assert.ok(controller); 12 | }); 13 | -------------------------------------------------------------------------------- /app/torii-providers/bcnext.js: -------------------------------------------------------------------------------- 1 | import Oauth2 from 'torii/providers/oauth2-bearer'; 2 | 3 | // extend oauth2 object to create Bcnext provider 4 | var Bcnext = Oauth2.extend({ 5 | 'name': 'bcnext', 6 | 'baseUrl': 'https://bcnext.herokuapp.com/oauth2/authorize/', 7 | 'responseParams': ['expires_in', 'state', 'token_type', 'access_token', 'scope'], 8 | 'responseType': 'token', 9 | 'redirectUri': 'http://localhost:4200' 10 | }); 11 | 12 | export default Bcnext; 13 | -------------------------------------------------------------------------------- /tests/unit/controllers/browsers/browser/versions-test.js: -------------------------------------------------------------------------------- 1 | import { moduleFor, test } from 'ember-qunit'; 2 | 3 | moduleFor('controller:browsers/browser/versions', 'Unit | Controller | browsers/browser/versions', { 4 | // Specify the other units that are required for this test. 5 | // needs: ['controller:foo'] 6 | }); 7 | 8 | // Replace this with your real tests. 9 | test('it exists', function(assert) { 10 | let controller = this.subject(); 11 | assert.ok(controller); 12 | }); 13 | -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Resolver from 'ember/resolver'; 3 | import loadInitializers from 'ember/load-initializers'; 4 | import config from './config/environment'; 5 | 6 | let App; 7 | 8 | Ember.MODEL_FACTORY_INJECTIONS = true; 9 | 10 | App = Ember.Application.extend({ 11 | modulePrefix: config.modulePrefix, 12 | podModulePrefix: config.podModulePrefix, 13 | Resolver 14 | }); 15 | 16 | loadInitializers(App, config.modulePrefix); 17 | 18 | export default App; 19 | -------------------------------------------------------------------------------- /app/routes/application.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Route.extend({ 4 | beforeModel: function() { 5 | return this.get('session').fetch().then(function() { 6 | //console.log('session fetched'); 7 | }, function() { 8 | //console.log('no session to fetch'); 9 | }); 10 | }, 11 | actions: { 12 | signin: function() { 13 | this.get('session').open('bcnext'); 14 | }, 15 | signout: function() { 16 | this.get('session').close('bcnext'); 17 | } 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /app/styles/blocks/loading.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Loading indicator 3 | ====================================================================== */ 4 | 5 | #loading { 6 | opacity: 0; 7 | visibility: hidden; 8 | position: absolute; 9 | z-index: 999; 10 | top:0; 11 | right:0; 12 | bottom:0; 13 | left:0; 14 | padding-top: 45vh; 15 | background: rgba(0,0,0,0.5); 16 | color: #fff; 17 | font-size: 50px; 18 | text-align: center; 19 | transition: visibility 0.5s, opacity 0.5s; 20 | } 21 | 22 | .loading #loading { 23 | opacity: 1; 24 | visibility: visible; 25 | } 26 | -------------------------------------------------------------------------------- /app/controllers/browsers/browser.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | actions: { 5 | saveBrowser: function(params) { 6 | console.log('Attempt to save browser'); 7 | var browser = params; 8 | browser.save(); 9 | 10 | return true; 11 | }, 12 | addVersion: function(params) { 13 | console.log('Attempt to add version'); 14 | var controller = this; 15 | 16 | var version = this.store.createRecord('version', params); 17 | // TODO: empty the form 18 | 19 | }, 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /tests/helpers/start-app.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import Application from '../../app'; 3 | import config from '../../config/environment'; 4 | 5 | export default function startApp(attrs) { 6 | let application; 7 | 8 | let attributes = Ember.merge({}, config.APP); 9 | attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; 10 | 11 | Ember.run(() => { 12 | application = Application.create(attributes); 13 | application.setupForTesting(); 14 | application.injectTestHelpers(); 15 | }); 16 | 17 | return application; 18 | } 19 | -------------------------------------------------------------------------------- /app/adapters/application.js: -------------------------------------------------------------------------------- 1 | import DS from 'ember-data'; 2 | import ENV from '../config/environment'; 3 | 4 | export default DS.JSONAPIAdapter.extend({ 5 | host: ENV.apiHost, 6 | namespace: ENV.apiNameSpace, 7 | session: Ember.inject.service('session'), 8 | headers: Ember.computed('session.token', function() { 9 | var token = this.get('session.token'); 10 | console.log('session.token', token) 11 | if(token) { 12 | return { 13 | 'Authorization': 'Bearer ' + this.get('session.token'), 14 | }; 15 | } else { 16 | return; 17 | } 18 | }) 19 | }); 20 | -------------------------------------------------------------------------------- /app/templates/application.hbs: -------------------------------------------------------------------------------- 1 |
2 | 18 |
19 | 20 |
21 | {{outlet}} 22 |
23 | -------------------------------------------------------------------------------- /app/components/browsers/version-form.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Component.extend({ 4 | tagName: 'form', 5 | classNames: ['form'], 6 | classNameBindings: ['isEditing', 'isDisplay'], 7 | 8 | isEditing: false, 9 | isDisplay: Ember.computed.not('isEditing'), 10 | actions: { 11 | editVersion: function() { 12 | this.set('isEditing', true); 13 | }, 14 | cancelVersion: function() { 15 | this.set('isEditing', false); 16 | }, 17 | saveVersion: function() { 18 | this.get('saveVersion')(); 19 | this.set('isEditing', false); 20 | } 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /tests/helpers/module-for-acceptance.js: -------------------------------------------------------------------------------- 1 | import { module } from 'qunit'; 2 | import startApp from '../helpers/start-app'; 3 | import destroyApp from '../helpers/destroy-app'; 4 | 5 | export default function(name, options = {}) { 6 | module(name, { 7 | beforeEach() { 8 | this.application = startApp(); 9 | 10 | if (options.beforeEach) { 11 | options.beforeEach.apply(this, arguments); 12 | } 13 | }, 14 | 15 | afterEach() { 16 | destroyApp(this.application); 17 | 18 | if (options.afterEach) { 19 | options.afterEach.apply(this, arguments); 20 | } 21 | } 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /app/styles/elements/sectioning.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Sectioning elements - things that contribute to document outline 3 | section, article, aside, header, footer, main (main is not actually sectioning, 4 | did you know that?), hr (hr is sectioning in HTML5, did you know that?) 5 | ====================================================================== */ 6 | 7 | article, 8 | aside, 9 | details, 10 | footer, 11 | header, 12 | main, 13 | menu, 14 | nav, 15 | section, 16 | summary { 17 | /* normalize */ 18 | display: block; 19 | } 20 | 21 | hr { 22 | /* normalize */ 23 | box-sizing: content-box; 24 | height: 0; 25 | overflow: visible; 26 | } 27 | -------------------------------------------------------------------------------- /public/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "-Promise" 6 | ], 7 | "browser": true, 8 | "boss": true, 9 | "curly": true, 10 | "debug": false, 11 | "devel": true, 12 | "eqeqeq": true, 13 | "evil": true, 14 | "forin": false, 15 | "immed": false, 16 | "laxbreak": false, 17 | "newcap": true, 18 | "noarg": true, 19 | "noempty": false, 20 | "nonew": false, 21 | "nomen": false, 22 | "onevar": false, 23 | "plusplus": false, 24 | "regexp": false, 25 | "undef": true, 26 | "sub": true, 27 | "strict": false, 28 | "white": false, 29 | "eqnull": true, 30 | "esnext": true, 31 | "unused": true 32 | } 33 | -------------------------------------------------------------------------------- /app/styles/elements/media.styl: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ====================================================================== */ 4 | 5 | figcaption, 6 | figure { 7 | /* normalize */ 8 | display: block; 9 | } 10 | 11 | figure { 12 | /* normalize */ 13 | margin: 1em 40px; 14 | } 15 | 16 | audio, 17 | canvas, 18 | progress, 19 | video { 20 | /* normalize */ 21 | display: inline-block; 22 | vertical-align: baseline; 23 | } 24 | 25 | audio:not([controls]) { 26 | /* normalize */ 27 | display: none; 28 | height: 0; 29 | } 30 | 31 | img { 32 | /* normalize */ 33 | border: 0; 34 | } 35 | 36 | 37 | svg:not(:root) { 38 | /* normalize */ 39 | overflow: hidden; 40 | } 41 | -------------------------------------------------------------------------------- /app/controllers/browsers/index.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Controller.extend({ 4 | name: '', 5 | actions: { 6 | addBrowser: function(params) { 7 | console.log('Attempt to add browser'); 8 | var controller = this; 9 | 10 | var browser = this.store.createRecord('browser', this.get('params')); 11 | browser.save().then(function() { 12 | // empty the form 13 | controller.set('name', ''); 14 | controller.set('slug', ''); 15 | controller.set('note', ''); 16 | // go to new page 17 | route.transitionTo('browsers.browser.versions', browser); 18 | }); 19 | }, 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.js] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [*.hbs] 21 | insert_final_newline = false 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [*.css] 26 | indent_style = space 27 | indent_size = 2 28 | 29 | [*.html] 30 | indent_style = space 31 | indent_size = 2 32 | 33 | [*.{diff,md}] 34 | trim_trailing_whitespace = false 35 | -------------------------------------------------------------------------------- /app/models/version.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | import DS from 'ember-data'; 3 | 4 | export default DS.Model.extend({ 5 | browser: DS.belongsTo('browser', {async: true}), 6 | version: DS.attr('string'), 7 | release_day: DS.attr('date'), 8 | retirement_day: DS.attr('date'), 9 | status: DS.attr('string'), 10 | release_notes_uri: DS.attr(), 11 | note: DS.attr(), 12 | order: DS.attr('number'), 13 | supports: DS.attr(), 14 | //supports: DS.hasMany('supports', {async: true}), 15 | //computed 16 | isFuture: Ember.computed.equal('status', 'future'), 17 | isBeta: Ember.computed.equal('status', 'beta'), 18 | isCurrent: Ember.computed.equal('status', 'current'), 19 | isRetired: Ember.computed.equal('status', 'retired'), 20 | isNull: Ember.computed.equal('status', '') 21 | }); 22 | -------------------------------------------------------------------------------- /app/components/browsers/browser-form.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | export default Ember.Component.extend({ 4 | tagName: 'form', 5 | classNames: ['form'], 6 | classNameBindings: ['isEditing', 'isDisplay'], 7 | 8 | isEditing: false, 9 | isDisplay: Ember.computed.not('isEditing'), 10 | actions: { 11 | editBrowser: function() { 12 | console.log('editBrowser'); 13 | this.set('isEditing', true); 14 | }, 15 | cancelBrowser: function() { 16 | console.log('cancelBrowser'); 17 | // TODO: set form fields back to model 18 | this.set('isEditing', false); 19 | }, 20 | saveBrowser: function() { 21 | console.log('saveBrowser triggered'); 22 | this.get('saveBrowser')(); 23 | this.set('isEditing', false); 24 | } 25 | } 26 | }); 27 | -------------------------------------------------------------------------------- /tests/integration/components/browsers/browser-form-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('browsers/browser-form', 'Integration | Component | browsers/browser form', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL + 12 | 13 | this.render(hbs`{{browsers/browser-form}}`); 14 | 15 | assert.equal(this.$().text().trim(), ''); 16 | 17 | // Template block usage:" + EOL + 18 | this.render(hbs` 19 | {{#browsers/browser-form}} 20 | template block text 21 | {{/browsers/browser-form}} 22 | `); 23 | 24 | assert.equal(this.$().text().trim(), 'template block text'); 25 | }); 26 | -------------------------------------------------------------------------------- /tests/integration/components/browsers/version-form-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('browsers/version-form', 'Integration | Component | browsers/version form', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL + 12 | 13 | this.render(hbs`{{browsers/version-form}}`); 14 | 15 | assert.equal(this.$().text().trim(), ''); 16 | 17 | // Template block usage:" + EOL + 18 | this.render(hbs` 19 | {{#browsers/version-form}} 20 | template block text 21 | {{/browsers/version-form}} 22 | `); 23 | 24 | assert.equal(this.$().text().trim(), 'template block text'); 25 | }); 26 | -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BrowsercompatCm 7 | 8 | 9 | 10 | {{content-for 'head'}} 11 | 12 | 13 | 14 | 15 | {{content-for 'head-footer'}} 16 | 17 | 18 | {{content-for 'body'}} 19 | 20 |
Loading.
21 | 22 | 23 | 24 | 25 | {{content-for 'body-footer'}} 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/integration/components/browsers/version-details-test.js: -------------------------------------------------------------------------------- 1 | import { moduleForComponent, test } from 'ember-qunit'; 2 | import hbs from 'htmlbars-inline-precompile'; 3 | 4 | moduleForComponent('browsers/version-details', 'Integration | Component | browsers/version details', { 5 | integration: true 6 | }); 7 | 8 | test('it renders', function(assert) { 9 | 10 | // Set any properties with this.set('myProperty', 'value'); 11 | // Handle any actions with this.on('myAction', function(val) { ... });" + EOL + EOL + 12 | 13 | this.render(hbs`{{browsers/version-details}}`); 14 | 15 | assert.equal(this.$().text().trim(), ''); 16 | 17 | // Template block usage:" + EOL + 18 | this.render(hbs` 19 | {{#browsers/version-details}} 20 | template block text 21 | {{/browsers/version-details}} 22 | `); 23 | 24 | assert.equal(this.$().text().trim(), 'template block text'); 25 | }); 26 | -------------------------------------------------------------------------------- /ember-cli-build.js: -------------------------------------------------------------------------------- 1 | /*jshint node:true*/ 2 | /* global require, module */ 3 | var EmberApp = require('ember-cli/lib/broccoli/ember-app'); 4 | 5 | module.exports = function(defaults) { 6 | var app = new EmberApp(defaults, { 7 | // Add options here 8 | }); 9 | 10 | // Use `app.import` to add additional libraries to the generated 11 | // output files. 12 | // 13 | // If you need to use different assets in different 14 | // environments, specify an object as the first parameter. That 15 | // object's keys should be the environment name and the values 16 | // should be the asset to use in that environment. 17 | // 18 | // If the library that you are including contains AMD or ES6 19 | // modules that you would like to import into your application 20 | // please specify an object with the list of modules as keys 21 | // along with the exports of each module as its value. 22 | 23 | return app.toTree(); 24 | }; 25 | -------------------------------------------------------------------------------- /app/templates/components/browsers/browser-form.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{input type="text" id="name" value=browser.name.en disabled=isDisplay}} 4 |
5 | 6 |
7 | 8 | {{input type="text" id="slug" value=browser.slug disabled=isDisplay}} 9 |
10 | 11 |
12 | 13 | {{input type="text" id="note" value=browser.note.en disabled=isDisplay}} 14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 | {{#if isDisplay}} 22 | 23 | {{else}} 24 | 25 | {{/if}} 26 |
27 | -------------------------------------------------------------------------------- /app/torii-adapters/application.js: -------------------------------------------------------------------------------- 1 | import Ember from 'ember'; 2 | 3 | function fetchUser(token) { 4 | return new Ember.RSVP.Promise(function (resolve, reject) { 5 | return Ember.$.get( 'https://bcnext.herokuapp.com/api/v2/users/me', { 6 | access_token: token 7 | }).then (function(response){ 8 | resolve({ 9 | username: response.data.attributes.username, 10 | token: token }); 11 | }, function(error){ 12 | reject(error); 13 | }); 14 | }) 15 | } 16 | 17 | export default Ember.Object.extend({ 18 | open: function(authorization) { 19 | var token = authorization.authorizationToken.access_token; 20 | window.localStorage.setItem('session-token', token); 21 | return fetchUser(token); 22 | }, 23 | fetch: function() { 24 | var token = window.localStorage.getItem('session-token'); 25 | return fetchUser(token); 26 | }, 27 | close: function() { 28 | window.localStorage.removeItem('session-token'); 29 | } 30 | }); 31 | -------------------------------------------------------------------------------- /tests/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "location", 6 | "setTimeout", 7 | "$", 8 | "-Promise", 9 | "define", 10 | "console", 11 | "visit", 12 | "exists", 13 | "fillIn", 14 | "click", 15 | "keyEvent", 16 | "triggerEvent", 17 | "find", 18 | "findWithAssert", 19 | "wait", 20 | "DS", 21 | "andThen", 22 | "currentURL", 23 | "currentPath", 24 | "currentRouteName" 25 | ], 26 | "node": false, 27 | "browser": false, 28 | "boss": true, 29 | "curly": true, 30 | "debug": false, 31 | "devel": false, 32 | "eqeqeq": true, 33 | "evil": true, 34 | "forin": false, 35 | "immed": false, 36 | "laxbreak": false, 37 | "newcap": true, 38 | "noarg": true, 39 | "noempty": false, 40 | "nonew": false, 41 | "nomen": false, 42 | "onevar": false, 43 | "plusplus": false, 44 | "regexp": false, 45 | "undef": true, 46 | "sub": true, 47 | "strict": false, 48 | "white": false, 49 | "eqnull": true, 50 | "esnext": true, 51 | "unused": true 52 | } 53 | -------------------------------------------------------------------------------- /tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BrowsercompatCm Tests 7 | 8 | 9 | 10 | {{content-for 'head'}} 11 | {{content-for 'test-head'}} 12 | 13 | 14 | 15 | 16 | 17 | {{content-for 'head-footer'}} 18 | {{content-for 'test-head-footer'}} 19 | 20 | 21 | {{content-for 'body'}} 22 | {{content-for 'test-body'}} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | {{content-for 'body-footer'}} 32 | {{content-for 'test-body-footer'}} 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/styles/includes/variables.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Variables 3 | ====================================================================== */ 4 | 5 | $font-heading = 30px; 6 | 7 | /* 8 | Colors 9 | ---------------------------------------------------------------------- */ 10 | $red = #ea3b28; 11 | $yellow = #ffcb00; 12 | $green = #70a300; 13 | $blue = #0095dd; 14 | $grey = #c7ccce; 15 | $orange = #c55200; 16 | 17 | /* 18 | Grid & Spacing 19 | ---------------------------------------------------------------------- */ 20 | $spacing = 20px; 21 | $form-spacing = 5px; 22 | 23 | /* 24 | Breakpoints & Media Queries 25 | ---------------------------------------------------------------------- */ 26 | 27 | 28 | /* 29 | Animations 30 | ---------------------------------------------------------------------- */ 31 | 32 | 33 | /* 34 | Paths 35 | ---------------------------------------------------------------------- */ 36 | $path-to-fonts = '/assets/fonts/'; 37 | 38 | /* 39 | Fonts 40 | ---------------------------------------------------------------------- */ 41 | $font-weight-light = 200; 42 | $font-family-site = 'Open Sans', Arial, sans-serif; 43 | $font-family-tiny = 'Helvetica', Arial, sans-serif; 44 | $font-family-code-block = Consolas, Monaco, 'Andale Mono', monospace; 45 | $font-family-code-inline = Consolas, "Liberation Mono", Courier, monospace; 46 | -------------------------------------------------------------------------------- /app/styles/elements/text.styl: -------------------------------------------------------------------------------- 1 | 2 | 3 | h1, h2, h3, h4, h5, h6 { 4 | font-weight: $font-weight-light; 5 | } 6 | 7 | a { 8 | /* normalize */ 9 | background-color: transparent; 10 | } 11 | 12 | a:active, 13 | a:hover { 14 | /* normalize */ 15 | outline: 0; 16 | } 17 | 18 | abbr[title] { 19 | /* normalize */ 20 | border-bottom: none; 21 | text-decoration: underline; 22 | text-decoration: underline dotted; 23 | } 24 | 25 | b, 26 | strong { 27 | /* normalize */ 28 | font-weight: bolder; 29 | } 30 | 31 | dfn { 32 | /* normalize */ 33 | font-style: italic; 34 | } 35 | 36 | h1 { 37 | /* normalize */ 38 | font-size: 2em; 39 | margin: 0.67em 0; 40 | } 41 | 42 | pre { 43 | /* normalize */ 44 | overflow: auto; 45 | } 46 | 47 | code, 48 | kbd, 49 | pre, 50 | samp { 51 | /* normalize */ 52 | font-family: monospace, monospace; 53 | font-size: 1em; 54 | } 55 | 56 | mark { 57 | /* normalize */ 58 | background-color: #ff0; 59 | color: #000; 60 | } 61 | 62 | small { 63 | /* normalize */ 64 | font-size: 80%; 65 | } 66 | 67 | sub, 68 | sup { 69 | /* normalize */ 70 | font-size: 75%; 71 | line-height: 0; 72 | position: relative; 73 | vertical-align: baseline; 74 | } 75 | 76 | sup { 77 | /* normalize */ 78 | top: -0.5em; 79 | } 80 | 81 | sub { 82 | /* normalize */ 83 | bottom: -0.25em; 84 | } 85 | 86 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "browsercompat-cm", 3 | "version": "0.0.0", 4 | "description": "A browser based user interface for interacting with the Browser Compat API.", 5 | "private": true, 6 | "directories": { 7 | "doc": "doc", 8 | "test": "tests" 9 | }, 10 | "scripts": { 11 | "build": "ember build", 12 | "start": "ember server", 13 | "test": "ember test" 14 | }, 15 | "repository": "", 16 | "engines": { 17 | "node": ">= 0.10.0" 18 | }, 19 | "author": "", 20 | "license": "MIT", 21 | "devDependencies": { 22 | "broccoli-asset-rev": "^2.2.0", 23 | "ember-cli": "1.13.14", 24 | "ember-cli-app-version": "^1.0.0", 25 | "ember-cli-babel": "^5.1.5", 26 | "ember-cli-content-security-policy": "0.4.0", 27 | "ember-cli-dependency-checker": "^1.1.0", 28 | "ember-cli-htmlbars": "^1.0.1", 29 | "ember-cli-htmlbars-inline-precompile": "^0.3.1", 30 | "ember-cli-ic-ajax": "0.2.4", 31 | "ember-cli-inject-live-reload": "^1.3.1", 32 | "ember-cli-qunit": "^1.0.4", 33 | "ember-cli-release": "0.2.8", 34 | "ember-cli-sri": "^1.2.0", 35 | "ember-cli-stylus": "1.0.5", 36 | "ember-cli-uglify": "^1.2.0", 37 | "ember-data": "^2.3.0", 38 | "ember-disable-proxy-controllers": "^1.0.1", 39 | "ember-export-application-global": "^1.0.4", 40 | "torii": "^0.6.1" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/styles/app.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Includes 3 | ====================================================================== */ 4 | @require 'includes/variables'; 5 | @require 'includes/mixins'; 6 | 7 | /* 8 | CSS includes (be first in CSS file) 9 | ====================================================================== */ 10 | @require 'elements/opensans'; 11 | 12 | 13 | /* 14 | General element over-rides 15 | ====================================================================== */ 16 | @require 'elements/document'; 17 | @require 'elements/forms'; 18 | @require 'elements/media'; 19 | @require 'elements/sectioning'; 20 | @require 'elements/tables'; 21 | @require 'elements/text'; 22 | 23 | 24 | /* 25 | Utilities 26 | ====================================================================== */ 27 | @require 'utilities/hidden'; 28 | 29 | 30 | /* 31 | Blocks 32 | ====================================================================== */ 33 | 34 | /* 35 | Global blocks (header, footer, etc.) 36 | ---------------------------------------------------------------------- */ 37 | @require 'blocks/nav-main'; 38 | @require 'blocks/spinner'; 39 | @require 'blocks/loading'; 40 | 41 | /* 42 | ---------------------------------------------------------------------- */ 43 | @require 'blocks/panel'; 44 | @require 'blocks/form'; 45 | @require 'blocks/version'; 46 | @require 'blocks/loading'; 47 | @require 'blocks/list-short'; 48 | @require 'blocks/box'; 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/styles/blocks/form.styl: -------------------------------------------------------------------------------- 1 | $form-spacing = 10px; 2 | 3 | .form { 4 | position: relative; 5 | margin-bottom: $spacing; 6 | padding-bottom: $spacing; 7 | border: 1px solid #000; 8 | 9 | label { 10 | font-weight: bold; 11 | } 12 | 13 | input { 14 | max-width: 100%; 15 | } 16 | } 17 | 18 | .form-row { 19 | margin-bottom: $form-spacing; 20 | margin-left: $spacing + $form-spacing; 21 | 22 | &:first-child { 23 | margin-top: $spacing; 24 | } 25 | 26 | &:last-child { 27 | margin-bottom: 0; 28 | } 29 | 30 | label { 31 | display: block; 32 | margin-left: $form-spacing * -1; 33 | 34 | .is-display & { 35 | display: inline-block; 36 | } 37 | } 38 | } 39 | 40 | .form-row-heading { 41 | 42 | .is-display & { 43 | label { 44 | display: none; 45 | } 46 | input { 47 | margin-left: $form-spacing * -1; 48 | font-size: $font-heading; 49 | font-weight: normal; 50 | } 51 | } 52 | } 53 | 54 | .form-col { 55 | display: inline-block; 56 | margin-right: $spacing + $form-spacing; 57 | margin-bottom: $form-spacing; 58 | } 59 | 60 | .form-actions { 61 | margin: $spacing; 62 | } 63 | 64 | .form-actions-primary { 65 | 66 | } 67 | 68 | .form-actions-secondary { 69 | position: absolute; 70 | top: 0; 71 | right: 0; 72 | } 73 | 74 | .is-display { 75 | [disabled] { 76 | border: 1px solid transparent; 77 | padding: 0; 78 | background-color: #fff; 79 | color: #000; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /app/templates/components/browsers/version-form.hbs: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{input type="text" value=version.version disabled=isDisplay}} 4 |
5 | 6 |
7 | 8 | 16 |
17 | 18 |
19 |
20 | 21 | {{input type="text"value=version.release_day disabled=isDisplay}} 22 |
23 |
24 | 25 | {{input type="text" value=version.retirement_day disabled=isDisplay}} 26 |
27 |
28 | 29 |
30 | 31 | {{input type="text" value=version.note.en disabled=isDisplay}} 32 |
33 | 34 |
35 | 36 | {{input type="text" value=version.release_notes_uri disabled=isDisplay}} 37 |
38 | 39 |
40 | 41 |
42 | 43 |
44 | {{#if isDisplay}} 45 | 46 | {{else}} 47 | 48 | {{/if}} 49 |
50 | -------------------------------------------------------------------------------- /config/environment.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | 3 | module.exports = function(environment) { 4 | var ENV = { 5 | modulePrefix: 'browsercompat-cm', 6 | environment: environment, 7 | baseURL: '/', 8 | locationType: 'auto', 9 | apiHost: 'https://bcnext.herokuapp.com', 10 | apiNameSpace: 'api/v2', 11 | EmberENV: { 12 | FEATURES: { 13 | // Here you can enable experimental features on an ember canary build 14 | // e.g. 'with-controller': true 15 | } 16 | }, 17 | 18 | APP: { 19 | // Here you can pass flags/options to your application instance 20 | // when it is created 21 | }, 22 | contentSecurityPolicy: { 23 | 'connect-src': "'self' bcnext.herokuapp.com", 24 | }, 25 | torii: { 26 | sessionServiceName: 'session', 27 | providers: { 28 | 'bcnext': { 29 | apiKey: 'API_KEY', 30 | scope: 'read write', 31 | redirectUri: 'https://localhost:4200' 32 | } 33 | } 34 | } 35 | }; 36 | 37 | if (environment === 'development') { 38 | // ENV.APP.LOG_RESOLVER = true; 39 | // ENV.APP.LOG_ACTIVE_GENERATION = true; 40 | // ENV.APP.LOG_TRANSITIONS = true; 41 | // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; 42 | // ENV.APP.LOG_VIEW_LOOKUPS = true; 43 | } 44 | 45 | if (environment === 'test') { 46 | // Testem prefers this... 47 | ENV.baseURL = '/'; 48 | ENV.locationType = 'none'; 49 | 50 | // keep test console output quieter 51 | ENV.APP.LOG_ACTIVE_GENERATION = false; 52 | ENV.APP.LOG_VIEW_LOOKUPS = false; 53 | 54 | ENV.APP.rootElement = '#ember-testing'; 55 | } 56 | 57 | if (environment === 'production') { 58 | 59 | } 60 | 61 | return ENV; 62 | }; 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Browser Compat Contribution and Moderation UI 2 | 3 | A browser based user interface for interacting with the Browser Compat API. 4 | 5 | ## Status 6 | This project has been cancelled. The have been no code changes since March 7 | 2016. 8 | 9 | As of 2017, these are the current MDN data projects: 10 | 11 | * https://github.com/mdn/browser-compat-data 12 | * https://github.com/mdn/data 13 | 14 | ## Prerequisites 15 | 16 | You will need the following things properly installed on your computer. 17 | 18 | * [Git](http://git-scm.com/) 19 | * [Node.js](http://nodejs.org/) (with NPM) 20 | * [Bower](http://bower.io/) 21 | * [Ember CLI](http://www.ember-cli.com/) 22 | * [PhantomJS](http://phantomjs.org/) 23 | 24 | ## Installation 25 | 26 | * `git clone ` this repository 27 | * change into the new directory 28 | * `npm install` 29 | * `bower install` 30 | 31 | ## Running / Development 32 | 33 | * `ember server` 34 | * Visit your app at [http://localhost:4200](http://localhost:4200). 35 | 36 | ### Code Generators 37 | 38 | Make use of the many generators for code, try `ember help generate` for more details 39 | 40 | ### Running Tests 41 | 42 | * `ember test` 43 | * `ember test --server` 44 | 45 | ### Building 46 | 47 | * `ember build` (development) 48 | * `ember build --environment production` (production) 49 | 50 | ### Deploying 51 | 52 | Specify what it takes to deploy your app. 53 | 54 | ## Further Reading / Useful Links 55 | 56 | * [ember.js](http://emberjs.com/) 57 | * [ember-cli](http://www.ember-cli.com/) 58 | * Development Browser Extensions 59 | * [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi) 60 | * [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/) 61 | 62 | -------------------------------------------------------------------------------- /app/styles/blocks/spinner.styl: -------------------------------------------------------------------------------- 1 | .spinner { 2 | position:absolute; 3 | top: 50%; 4 | left: 50%; 5 | height: 0px; 6 | width: 0px; 7 | } 8 | 9 | .spinner span { 10 | position: absolute; 11 | top: -20px; 12 | left: -3px; 13 | display: block; 14 | height: 5px; 15 | width: 5px; 16 | border-radius: 100%; 17 | 18 | transform: rotate(45deg); 19 | transform-origin: 50% 300%; 20 | 21 | animation-name: chaos; 22 | animation-duration: 1s; 23 | animation-iteration-count: infinite; 24 | animation-direction: alternate; 25 | animation-fill-mode:backwards; 26 | } 27 | 28 | .spinner span:nth-of-type(1) { 29 | background-color: #76b900; 30 | transform: rotate(0deg); 31 | animation-delay: -1000ms; 32 | } 33 | 34 | .spinner span:nth-of-type(2) { 35 | background-color: #005bc4; 36 | transform: rotate(45deg); 37 | animation-delay: -750ms; 38 | } 39 | .spinner span:nth-of-type(3) { 40 | background-color: #f17c0e; 41 | transform: rotate(90deg); 42 | animation-delay: -500ms; 43 | } 44 | 45 | .spinner span:nth-of-type(4) { 46 | background-color: #d32939; 47 | transform: rotate(135deg); 48 | animation-delay: -250ms; 49 | } 50 | 51 | .spinner span:nth-of-type(5) { 52 | background-color: #577633; 53 | transform: rotate(180deg); 54 | animation-delay: 0s; 55 | } 56 | 57 | .spinner span:nth-of-type(6) { 58 | background-color: #003c79; 59 | transform: rotate(225deg); 60 | animation-delay: 250ms; 61 | } 62 | 63 | .spinner span:nth-of-type(7) { 64 | background-color: #432c5f; 65 | transform: rotate(270deg); 66 | animation-delay: 500ms; 67 | } 68 | 69 | .spinner span:nth-of-type(8) { 70 | background-color: #950000; 71 | transform: rotate(315deg); 72 | animation-delay: 750ms; 73 | } 74 | 75 | @keyframes chaos { 76 | 0% { 77 | opacity: 1; 78 | } 79 | 60% { 80 | opacity: 1; 81 | } 82 | 100% { 83 | transform: scale(3.0); 84 | opacity: 0; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /app/styles/elements/forms.styl: -------------------------------------------------------------------------------- 1 | /* 2 | Forms 3 | ====================================================================== */ 4 | 5 | button, 6 | input, 7 | optgroup, 8 | select, 9 | textarea { 10 | font-size: inherit; 11 | /* normalize */ 12 | margin: 0; 13 | font-family: inherit; 14 | } 15 | 16 | button { 17 | /* normalize */ 18 | overflow: visible; 19 | } 20 | 21 | button, 22 | select { 23 | /* normalize */ 24 | text-transform: none; 25 | } 26 | 27 | button, 28 | html input[type="button"], 29 | input[type="reset"], 30 | input[type="submit"] { 31 | /* normalize */ 32 | -webkit-appearance: button; 33 | cursor: pointer; 34 | } 35 | 36 | button[disabled], 37 | html input[disabled] { 38 | /* normalize */ 39 | cursor: default; 40 | } 41 | 42 | button::-moz-focus-inner, 43 | input::-moz-focus-inner { 44 | /* normalize */ 45 | border: 0; 46 | padding: 0; 47 | } 48 | 49 | button:-moz-focusring, 50 | input:-moz-focusring { 51 | /* normalize */ 52 | outline: 1px dotted ButtonText; 53 | } 54 | 55 | input { 56 | /* normalize */ 57 | line-height: normal; 58 | } 59 | 60 | input[type="checkbox"], 61 | input[type="radio"] { 62 | /* normalize */ 63 | box-sizing: border-box; 64 | padding: 0; 65 | } 66 | 67 | input[type="number"]::-webkit-inner-spin-button, 68 | input[type="number"]::-webkit-outer-spin-button { 69 | /* normalize */ 70 | height: auto; 71 | } 72 | 73 | input[type="search"] { 74 | /* normalize */ 75 | -webkit-appearance: textfield; 76 | } 77 | 78 | input[type="search"]::-webkit-search-cancel-button, 79 | input[type="search"]::-webkit-search-decoration { 80 | /* normalize */ 81 | -webkit-appearance: none; 82 | } 83 | 84 | fieldset { 85 | /* normalize */ 86 | border: 1px solid #c0c0c0; 87 | margin: 0 2px; 88 | padding: 0.35em 0.625em 0.75em; 89 | } 90 | 91 | legend { 92 | /* normalize */ 93 | border: 0; 94 | padding: 0; 95 | } 96 | 97 | textarea { 98 | /* normalize */ 99 | overflow: auto; 100 | } 101 | 102 | optgroup { 103 | /* normalize */ 104 | font-weight: bold; 105 | } 106 | -------------------------------------------------------------------------------- /app/styles/elements/opensans.styl: -------------------------------------------------------------------------------- 1 | @require '../includes/variables'; 2 | 3 | /* 4 | Light 5 | ====================================================================== */ 6 | 7 | @font-face { 8 | font-family: 'Open Sans'; 9 | src: url($path-to-fonts + 'OpenSans-Light-webfont.eot'); 10 | src: url($path-to-fonts + 'OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-Light-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-Light-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-Light-webfont.ttf') format('truetype'); 11 | font-weight: $font-weight-light; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Open Sans'; 17 | src: url($path-to-fonts + 'OpenSans-LightItalic-webfont.eot'); 18 | src: url($path-to-fonts + 'OpenSans-LightItalic-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-LightItalic-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-LightItalic-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-LightItalic-webfont.ttf') format('truetype'); 19 | font-weight: $font-weight-light; 20 | font-style: italic; 21 | } 22 | 23 | 24 | /* 25 | Regular 26 | ====================================================================== */ 27 | 28 | @font-face { 29 | font-family: 'Open Sans'; 30 | src: url($path-to-fonts + 'OpenSans-Regular-webfont.eot'); 31 | src: url($path-to-fonts + 'OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-Regular-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-Regular-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-Regular-webfont.ttf') format('truetype'); 32 | font-weight: normal; 33 | font-style: normal; 34 | } 35 | 36 | @font-face { 37 | font-family: 'Open Sans'; 38 | src: url($path-to-fonts + 'OpenSans-Italic-webfont.eot'); 39 | src: url($path-to-fonts + 'OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-Italic-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-Italic-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-Italic-webfont.ttf') format('truetype'); 40 | font-weight: normal; 41 | font-style: italic; 42 | } 43 | 44 | /* 45 | Bold 46 | ====================================================================== */ 47 | 48 | @font-face { 49 | font-family: 'Open Sans'; 50 | src: url($path-to-fonts + 'OpenSans-Bold-webfont.eot'); 51 | src: url($path-to-fonts + 'OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-Bold-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-Bold-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-Bold-webfont.ttf') format('truetype'); 52 | font-weight: bold; 53 | font-style: normal; 54 | } 55 | 56 | @font-face { 57 | font-family: 'Open Sans'; 58 | src: url($path-to-fonts + 'OpenSans-BoldItalic-webfont.eot'); 59 | src: url($path-to-fonts + 'OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'), url($path-to-fonts + 'OpenSans-BoldItalic-webfont.woff2') format('woff2'), url($path-to-fonts + 'OpenSans-BoldItalic-webfont.woff') format('woff'), url($path-to-fonts + 'OpenSans-BoldItalic-webfont.ttf') format('truetype'); 60 | font-weight: bold; 61 | font-style: italic; 62 | } 63 | --------------------------------------------------------------------------------