From: Svjatoslav Agejenko Date: Fri, 17 Oct 2014 19:46:25 +0000 (+0300) Subject: better table-less and responsive layout X-Git-Tag: meviz-1.0~52 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=4d5a88dcfde63a2250b0a9f430ef07744df99720;p=meviz.git better table-less and responsive layout --- diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java index 915c7c8..8ae1002 100755 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java @@ -39,24 +39,10 @@ public class MixedLayout implements Layout { public static final String encoding = "UTF-8"; - int currentColumn = 0; - - int horizontalColumnsLimit = 2; - private AbstractIndexer indexer; private IndexingContext indexingContext; - public void columnAdded() { - currentColumn++; - if (currentColumn > horizontalColumnsLimit) { - - currentColumn = 0; - - filesHtml.append("\n"); - } - } - @Override public void enlistDirectory(final AbstractFile directory) { dirHtml.append(""); @@ -69,21 +55,16 @@ public class MixedLayout implements Layout { @Override public void enlistFile(final AbstractFile file) { - finishRow(); final String fullFileName = file.fileName; - filesHtml.append("\n"); - filesHtml.append(" " + fullFileName + "\n"); filesHtml.append("  (" + FilePathParser.getFileSizeDescription(file.getFileLength()) - + ")\n"); - filesHtml.append("\n"); + + ")
\n"); } @@ -98,7 +79,7 @@ public class MixedLayout implements Layout { final List recommendedDimensions = Picture .getThumbnailDimensions(imageSize); - Dimension listingDimension = new Dimension(500, 500); + Dimension listingDimension = new Dimension(1500, 450); if (listingDimension.width > imageSize.width) if (listingDimension.height > imageSize.height) @@ -107,9 +88,8 @@ public class MixedLayout implements Layout { final String listingThumbnailUrl = indexer.getThumbnailUrl(picture, listingDimension, indexingContext); - startcolumn(); - - filesHtml.append("
"); + filesHtml.append("\n"); @@ -133,9 +113,8 @@ public class MixedLayout implements Layout { filesHtml.append(""); } - filesHtml.append(")\n"); - - columnAdded(); + filesHtml.append(")\n"); + filesHtml.append(""); } catch (final Exception e) { logger.error( @@ -154,14 +133,8 @@ public class MixedLayout implements Layout { final GeneralFile file = (GeneralFile) abstractFile; - finishRow(); - filesHtml - .append("\n"); - filesHtml.append("\n"); - - filesHtml.append("