mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-29 15:26:27 +00:00
Improved site responsive
This commit is contained in:
parent
c973b33ac8
commit
499aefbc1d
@ -20,10 +20,27 @@ header .dropdown .fa-gear {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.main-header .alternate-latest-posts-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.main-header[forActiveUser="true"] .navbar-brand {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-header .alternate-latest-posts-button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.nav > li > a {
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
.navbar-custom-menu > .navbar-nav > li > .dropdown-menu {
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
|
@ -32,6 +32,9 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
//Add user name
|
||||
this.addUserName(navbarRightElemList);
|
||||
|
||||
//Alternate latest posts button
|
||||
this.addAlternateLatestPostsButton(navbarRightElemList);
|
||||
|
||||
//Add friends list button
|
||||
this.addFriendListButton(navbarRightElemList);
|
||||
|
||||
@ -128,6 +131,34 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
return dropdownContent;
|
||||
},
|
||||
|
||||
/**
|
||||
* Add alternate latest posts button
|
||||
* (if the screen is too small to display "Comunic")
|
||||
*
|
||||
* @param {HTMLElement} target The target for the ubutton
|
||||
*/
|
||||
addAlternateLatestPostsButton: function(target){
|
||||
//Create button
|
||||
var button = createElem2({
|
||||
type: "li",
|
||||
appendTo: target,
|
||||
class: "alternate-latest-posts-button"
|
||||
});
|
||||
|
||||
//Create link
|
||||
var link = createElem("a", button);
|
||||
createElem2({
|
||||
type: "i",
|
||||
appendTo: link,
|
||||
class: "fa fa-history"
|
||||
});
|
||||
|
||||
//Makes link lives
|
||||
link.addEventListener("click", function(){
|
||||
openPage("latest");
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Add friendsList toggle button
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user