Testing double collumn grid-item.

This commit is contained in:
kor 2018-07-18 02:36:13 +12:00
parent 96d4448015
commit 4e5c7e8b81
2 changed files with 23 additions and 2 deletions

View File

@ -122,7 +122,7 @@ body {
clear: both;
}
.grid-item {
.grid-item, .grid-item--width2 {
width: 350px;
margin-bottom: 20px;
border-radius: 3px;
@ -133,6 +133,14 @@ body {
float:left;
box-sizing: border-box;
}
@media screen and (min-width: 886px) {
.grid-item--width2 {
width: 720px;
}
/*html {
background:#000;
}*/
}
.grid-item:hover {
background:#bbb;
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, .1);

View File

@ -8,6 +8,7 @@ function ViewMasonry()
// SETTINGS
this.statsNumTags = 5;
this.statsNumTypes = 10;
this.doDoubleWide = true;
// SETTINGS
this.useMasonry = true;
@ -54,7 +55,19 @@ function ViewMasonry()
{
let value = db[key];
let entry = `<div class="grid-item" id="${this.divNamePre + db[key].DIID}">`;
let itemClass = "grid-item";
if (this.doDoubleWide)
{
if (typeof value.QOTE !== 'undefined')
{
if (Array.isArray(value.QOTE) && value.QOTE.length > 4)
{
itemClass = "grid-item grid-item--width2";
}
}
}
let entry = `<div class="${itemClass}" id="${this.divNamePre + db[key].DIID}">`;
entry += `<div class="title">${key.to_properCase()}</div>`;
// LINK