A simple proof of concept where CSS3 animations with animation-fill-mode: forwards
is used to fade in elements created and added to DOM with JavaScript.
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
{ | |
"id": "dagens", | |
"title": "Dagens", | |
"logo": "", // URL? Inside or outside configuration object? | |
"schedule": { | |
// Representation of what weekdays/time of day an issue should be published (as a guideline) | |
}, | |
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
function hideVirtualKeyboard(os) | |
{ | |
$('input, textarea').blur(); | |
if(os === 'iOS') | |
document.activeElement.blur(); | |
if(os === 'Android') | |
{ | |
var $field = $('<input type="text">'); |
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
{ | |
"palette": { | |
"colors": [ | |
{ | |
"label": "Økonomi", | |
"color": { | |
"primary": "#0000ff", | |
"secondary": "0000cc" | |
} | |
}, |
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
Show hidden characters
{ | |
"caret_style": "phase", | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"font_size": 12.0, | |
"highlight_line": true, | |
"ignored_packages": | |
[ |
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
module.exports = function(grunt) | |
{ | |
grunt.initConfig( | |
{ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
css: { | |
files: ['www/assets/css/sass/**/*.scss'], | |
tasks: ['sass', 'autoprefixer', 'imageEmbed'] |
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
module.exports = function(grunt) | |
{ | |
grunt.initConfig( | |
{ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
css: { | |
files: ['www/assets/css/sass/**/*.scss'], | |
tasks: ['sass', 'autoprefixer', 'imageEmbed'] |
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
module.exports = function(grunt) | |
{ | |
grunt.initConfig( | |
{ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
css: { | |
files: [ | |
'www/assets/css/sass/*.scss', |
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
// Sanitizing the data – it’s exactly the same coming from cache or from the API at the point where it’s set into the model | |
this.model | |
.set(data) | |
.trigger('change'); | |
// In the initialize function | |
this.model.on('change', this.render, this); // this works | |
this.model.on('change', this.renderSubViews, this); // this does not even fire |
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
define( | |
['marionette', 'model/publication', 'collection/issues', 'view/detail/publication', 'hbs!template/region/main-content'], | |
function(Marionette, PublicationModel, IssueCollection, PublicationCompositeView, MainContentRegionTemplate) | |
{ | |
var MainContentRegionView = Marionette.ItemView.extend( | |
{ | |
el: '#content', | |
// Use this template initially, with a spinner or something | |
template: MainContentRegionTemplate, |