diff --git a/website/custom.html b/website/custom.html index d7a5aae3..8e00496b 100644 --- a/website/custom.html +++ b/website/custom.html @@ -264,6 +264,113 @@ window.onload = function() {
+

Alternating bands, bigger previews, and custom paragraph +typesetting

+ +

The author's description for the following code: +

+ It uses the "Alternating Results Background" from that page, + plus my own layout which incorporates a larger view of image + files. The 'large image' is scaled down from the actual + image, rather than a scaled up version of the thumbnail. +
+

+ +

The header fragment has the javascript for + alternating backgrounds, and the CSS code:

+ +
+<!-- Custom Header -->
+<script type="text/javascript">
+  function altRows() {
+      var rows = document.getElementsByClassName("rclresult");
+      for (i = 0; i < rows.length; i++) {
+          if (i % 2 == 0) {
+              rows[i].style.backgroundColor = "#f0f0f0";
+          }
+      }
+  }
+  window.onload = function() {
+      altRows();
+  }
+</script>
+
+<style type="text/css">
+.thumbnail { 
+   display:block;
+   position:relative;
+   padding: 4px;
+   width: auto; /* set width of thumbnail image in 'paragraph' code - not here */
+   border:none;
+   z-index:0;
+   }
+.thumbnail:hover {
+   border:none;
+   background-color: transparent;
+   z-index: 50;
+   }
+.thumbnail span {
+   position: absolute;
+   left: -9999px;
+   visibility: hidden;
+   }
+.thumbnail span img {
+   max-width:256px;  /* set 'large image' max width/height - advise keeping these  */
+   max-height:256px; /* the same to avoid inadvertently changing the aspect ratio  */
+   width:auto;   /* leave set to auto */
+   height:auto;  /* leave set to auto */
+   background-color: gray;
+   padding: 1px;
+   border: 1px solid black;
+   }
+.thumbnail:hover span {
+   visibility: visible;
+   top: 4px;   /* top/left positions 'large image' relative to top left */
+   left: 88px; /* of parent thumbnail (plus padding)                    */
+   }
+</style>
+<!-- End of Custom Header -->
+
+ +

And the paragraph format:

+ +
+<!-- Custom Paragraph -->
+<table>
+  <tr>
+    <td>
+      <a class="thumbnail" href="#">
+        <img src="%I" width="64px" height="auto">   <!-- set width of thumbnail -->
+        <span>
+          <img src="%U">
+        </span>
+      </a>
+    <td>
+      <table>
+        <tr>
+          <td>
+            <div>
+              <b>%T</b></br>
+              %L</br>
+              <p><font color="grey">%A </font><font color="#CD6688"><i>%K</i></font></p>
+              <font color="green"><font size=1>
+              %U</br>
+              %R — %S—%D — %M
+              </font></font></br>
+            </div>
+          </td>
+        </tr>
+      </table>
+    </td>
+  </tr>
+</table>
+<!-- End Custom Paragraph -->
+
+ +

Result:

+
+ +

A simpler format, suggested in Bitbucket issue #69

diff --git a/website/resparpics/pip.png b/website/resparpics/pip.png
new file mode 100644
index 00000000..76869fa5
Binary files /dev/null and b/website/resparpics/pip.png differ