improved dropdown nav for cell phones
This commit is contained in:
1 parent
d7ce36f1bc
commit
325360084b
2 files changed
+7
-7
No files matched your search
@@ -15,7 +15,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer', 'ar
|
||||
var article = _.get(articles, 0, {});
|
||||
return m('div.uk-panel.uk-panel-box',[
|
||||
m('div.uk-panel-badge.uk-badge', [
|
||||
m('i.fa.fa-newspaper-o')
|
||||
m('i.fa.fa-newspaper-o', {style: {'font-size': '1.7em'}})
|
||||
]),
|
||||
m('h3.uk-panel-title', m('a.uk-link-muted', {href: '#/nouvelles'}, article.title)),
|
||||
m('p', article.smallBody || article.body)
|
||||
@@ -74,7 +74,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer', 'ar
|
||||
|
||||
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-calendar', {style: {'font-size': '1.7em'}})),
|
||||
m('h3.uk-panel-title', m('a.uk-link-muted', {href: '#/calendrier'}, 'Horaire')),
|
||||
m.component(nextGameDaySchedule)
|
||||
]);
|
||||
@@ -104,7 +104,7 @@ define(['m', '_', 'util', 'resultParser', 'views/topNavBar', 'views/footer', 'ar
|
||||
mainMap.view = function(){
|
||||
return m('div.uk-panel.uk-panel-box',[
|
||||
m('div.uk-panel-badge.uk-badge', [
|
||||
m('i.fa.fa-map-o')
|
||||
m('i.fa.fa-map-o', {style: {'font-size': '1.7em'}})
|
||||
]),
|
||||
m('h3.uk-panel-title', 'Parc Walter-Stewart'),
|
||||
mainMap.getMap()
|
||||
|
||||
@@ -52,7 +52,7 @@ define(['m', '_', 'util'], function (m, _, util) {
|
||||
topNavBar._getSmallItem = function(item){
|
||||
var class_ = topNavBar._isActive(item.path) ? 'uk-active' : '';
|
||||
var url = topNavBar._getUrlForId(item.path);
|
||||
return m("li", {class: class_},
|
||||
return m("li.uk-align-left", {class: class_},
|
||||
topNavBar._getItemIcon(item), ' ',
|
||||
m("a", {href: url},
|
||||
item.name
|
||||
@@ -75,8 +75,8 @@ define(['m', '_', 'util'], function (m, _, util) {
|
||||
};
|
||||
|
||||
topNavBar.dropdown = function(){
|
||||
return m('div.uk-dropdown.uk-dropdown-navbar.uk-dropdown-bottom',
|
||||
m('ul.uk-nav.uk-nav-navbar'),
|
||||
return m('div.uk-dropdown',
|
||||
m('ul.uk-nav.uk-nav-navbar.uk-dropdown-navbar'),
|
||||
_.map(topNavBar._urlMapping, topNavBar._getSmallItem)
|
||||
);
|
||||
};
|
||||
@@ -107,7 +107,7 @@ define(['m', '_', 'util'], function (m, _, util) {
|
||||
var attrs = {class: class_, onclick: topNavBar.toggleDropdown(model)};
|
||||
var ret = [
|
||||
m('li.uk-parent', util.facebookLink()),
|
||||
m('li.uk-parent', attrs, m('a', m('i.fa.fa-bars')), topNavBar.dropdown()),
|
||||
m('li.uk-parent[data-uk-dropdown][aria-expanded]', attrs, m('a', m('i.fa.fa-bars'), ' Menu'), topNavBar.dropdown()),
|
||||
];
|
||||
if(model.openDropdown){
|
||||
ret.push(topNavBar.clickElsewhere(model));
|
||||
|
||||
Reference in new issue
Block a user