feat: smaller column width to fit 2 columns in landscape mobiles
parent
8888b9f446
commit
7870e89bc0
|
@ -283,6 +283,7 @@ export default {
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
showLimit: 50,
|
showLimit: 50,
|
||||||
|
columnWidth: 280,
|
||||||
dragCounter: 0,
|
dragCounter: 0,
|
||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
itemWeight: 0,
|
itemWeight: 0,
|
||||||
|
@ -599,7 +600,7 @@ export default {
|
||||||
colunmsResize() {
|
colunmsResize() {
|
||||||
// Update the columns size based on the window width.
|
// Update the columns size based on the window width.
|
||||||
let columns = Math.floor(
|
let columns = Math.floor(
|
||||||
document.querySelector("main").offsetWidth / 300
|
document.querySelector("main").offsetWidth / this.columnWidth
|
||||||
);
|
);
|
||||||
let items = css(["#listing.mosaic .item", ".mosaic#listing .item"]);
|
let items = css(["#listing.mosaic .item", ".mosaic#listing .item"]);
|
||||||
if (columns === 0) columns = 1;
|
if (columns === 0) columns = 1;
|
||||||
|
|
Loading…
Reference in New Issue