init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
[menu]
|
||||
empty_title = No news yet…
|
||||
empty = Welcome to your news feed, here you will see all the posts published by your contacts and in the communities you have subscribed.
|
||||
|
||||
all = All
|
||||
mine = My publications
|
||||
contacts = Contacts
|
||||
add_post = Write a new post…
|
||||
@@ -0,0 +1,23 @@
|
||||
#menu_widget {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
#menu_refresh {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
#menu_widget > div {
|
||||
padding: 0 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
#menu_refresh li.refreshing {
|
||||
background: linear-gradient(to right, rgb(var(--movim-background-main)) 8%, rgba(var(--movim-background), 0.5) 18%, rgb(var(--movim-background-main)) 33%);
|
||||
animation: 1.5s shine linear infinite;
|
||||
background-size: 200% 100%;
|
||||
}
|
||||
|
||||
#menu_refresh li.refreshing span.primary i {
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
var Menu = {
|
||||
init: function() {
|
||||
let parts = MovimUtils.urlParts();
|
||||
let page = parts.params[0] !== undefined ? parseInt(parts.params[0]) : 0;
|
||||
|
||||
if (parts.hash != '') {
|
||||
switch (parts.hash) {
|
||||
case 'communities':
|
||||
Menu_ajaxHttpGetCommunities(page);
|
||||
break;
|
||||
case 'contacts':
|
||||
Menu_ajaxHttpGetContacts(page);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
Menu_ajaxHttpGetAll(page);
|
||||
}
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
document.querySelector('#menu_refresh li').classList.add('refreshing');
|
||||
Menu_ajaxHttpGetAll();
|
||||
},
|
||||
|
||||
setLoad: function(tab) {
|
||||
tab.innerHTML = '<i class="material-symbols spin">autorenew</i>';
|
||||
}
|
||||
};
|
||||
|
||||
MovimWebsocket.attach(function() {
|
||||
Menu.init();
|
||||
Notif_ajaxClear('news');
|
||||
Notif.current('news');
|
||||
});
|
||||
Reference in New Issue
Block a user