worked on responsivness

This commit is contained in:
didier amyot committed 2016-02-07 11:34:54 -05:00
1 parent 0c63722d68
commit 35f22534f9
5 files changed
+76 -34

No files matched your search

+34 -16
View File
@@ -2,9 +2,9 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer'], fu
var mainPageLogo = {};
mainPageLogo.view = function(){
return m('div.uk-grid', [
m('div.uk-width-1-3.uk-push-1-3', [
m('div.uk-cover-background', {style: 'height: 500px; background-size: 500px; background-image: url(images/phenix_logo.png);'})
return m('div.uk-grid.uk-hidden-small', [
m('div.uk-large-1-3.uk-medium-2-3.uk-container-center', [
m('div.uk-cover-background', {style: 'height: 500px; width: 500px; background-size: 500px; background-image: url(images/phenix_logo.png);'})
])
]);
};
@@ -16,8 +16,9 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer'], fu
m('div.uk-panel-badge.uk-badge', [
m('i.fa.fa-newspaper-o')
]),
m('h3.uk-panel-title', 'Nouvelles')
], util.loremIpsum());
m('h3.uk-panel-title', 'Nouvelles'),
m('p', util.loremIpsum())
]);
};
var nextGameDaySchedule = {};
@@ -43,7 +44,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer'], fu
nextGameDaySchedule._getGamesRow = function(game){
return m('tr', [
m('td', game.date),
m('td', util.formatDate(game.jsDate)),
m('td', game.time),
m('td', game.away),
m('td', game.home)
@@ -66,9 +67,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer'], fu
mainPageSchedule.view = function(){
return m('div.uk-panel.uk-panel-box',[
m('div.uk-panel-badge.uk-badge', [
m('i.fa.fa-clock-o')
]),
m('div.uk-panel-badge.uk-badge', m('i.fa.fa-clock-o')),
m('h3.uk-panel-title', 'Horaire'),
m.component(nextGameDaySchedule)
]);
@@ -107,19 +106,38 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer'], fu
var mainPageBottom = {};
mainPageBottom.view = function(){
return m('div.uk-grid',[
m('div.uk-width-1-5'),
m('div.uk-width-1-5', mainPageNews.view()),
m('div.uk-width-1-5', mainPageSchedule.view()),
m('div.uk-width-1-5', mainMap.view())
mainPageBottom.regularSizeView = function(){
return m('div.uk-grid.uk-hidden-small.uk-grid-match', [
m('div.uk-width-large-1-5.uk-hidden-medium'),
m('div.uk-width-large-1-5.uk-width-medium-1-3', m.component(mainPageNews)),
m('div.uk-width-large-1-5.uk-width-medium-1-3', m.component(mainPageSchedule)),
m('div.uk-width-large-1-5.uk-width-medium-1-3', m.component(mainMap))
]);
};
mainPageBottom.smallSizeView = function(){
return m('div.uk-visible-small',
[
m('div.uk-grid', m('div.uk-width-small-1-1', m.component(mainPageNews))),
m('div.uk-grid', m('div.uk-width-small-1-1', m.component(mainPageSchedule))),
m('div.uk-grid', m('div.uk-width-small-1-1', m.component(mainMap)))
]);
};
mainPageBottom.view = function(){
return m('div.uk-margin-top.uk-margin-bottom', [
mainPageBottom.regularSizeView(),
mainPageBottom.smallSizeView()
]);
};
var mainPage = {};
mainPage.view = function(){
return [topNavBar.view(),
return [
topNavBar.view(),
mainPageLogo.view(),
mainPageBottom.view(),
footer.view()