Improved header appearance

This commit is contained in:
Pierre HUBERT 2018-07-07 07:27:55 +02:00
parent d32c1428cf
commit 0c20b97b2f
2 changed files with 30 additions and 10 deletions

View File

@ -4,9 +4,6 @@
* @author Pierre HUBERT * @author Pierre HUBERT
*/ */
.group-header {
}
.group-header .group-icon { .group-header .group-icon {
max-height: 150px; max-height: 150px;
@ -19,4 +16,17 @@
.group-header .col-info .fa { .group-header .col-info .fa {
margin-right: 10px; margin-right: 10px;
width: 10px; width: 10px;
}
.group-header .group-col-icon {
text-align: center;
}
.group-header .group-col-icon span {
display: block;
}
.group-header .col-md-4 {
display: table;
margin: auto;
} }

View File

@ -32,7 +32,7 @@ ComunicWeb.pages.groups.sections.header = {
var firstColumn = createElem2({ var firstColumn = createElem2({
appendTo: row, appendTo: row,
type: "div", type: "div",
class: "col-lg-8" class: "col-md-4 group-col-icon",
}); });
//Group icon //Group icon
@ -51,36 +51,46 @@ ComunicWeb.pages.groups.sections.header = {
innerHTML: info.name innerHTML: info.name
}); });
//Second column : information about the company
//Second column : Information about the company
var secondColumn = createElem2({ var secondColumn = createElem2({
appendTo: row, appendTo: row,
type: "div", type: "div",
class: "col-lg-4 col-info" class: "col-md-4"
});
add_p(secondColumn, "Column 2 : Group info");
//Third column : information about the group
var thirdColumn = createElem2({
appendTo: row,
type: "div",
class: "col-md-4 col-info"
}); });
//Add join date //Add join date
var joinDate = createElem2({ var joinDate = createElem2({
appendTo: secondColumn, appendTo: thirdColumn,
type: "div", type: "div",
innerHTML: '<i class="fa fa-clock-o"></i> Created '+ComunicWeb.common.date.timeDiffToStr(info.time_create)+' ago' innerHTML: '<i class="fa fa-clock-o"></i> Created '+ComunicWeb.common.date.timeDiffToStr(info.time_create)+' ago'
}); });
//Add number of members //Add number of members
var joinDate = createElem2({ var joinDate = createElem2({
appendTo: secondColumn, appendTo: thirdColumn,
type: "div", type: "div",
innerHTML: '<i class="fa fa-group"></i> '+ info.number_members+' members' innerHTML: '<i class="fa fa-group"></i> '+ info.number_members+' members'
}); });
//Display membership level //Display membership level
if(signed_in()) if(signed_in())
ComunicWeb.pages.groups.sections.membershipBlock.display(info, secondColumn); ComunicWeb.pages.groups.sections.membershipBlock.display(info, thirdColumn);
//If the user is an admin, add a link to configure the page //If the user is an admin, add a link to configure the page
if(signed_in() && info.membership == "administrator"){ if(signed_in() && info.membership == "administrator"){
var settingsLink = createElem2({ var settingsLink = createElem2({
appendTo: secondColumn, appendTo: thirdColumn,
type: "div", type: "div",
class: "a", class: "a",
innerHTML: " <i class='fa fa-gear'></i>Settings" innerHTML: " <i class='fa fa-gear'></i>Settings"