βŒˆβŒ‹ βŽ‡ branch:  freshcode


Artifact [643befb8c5]

Artifact 643befb8c5dd892e693d57a0053e6f7747ba7360:

  • File page_names.php — part of check-in [f1a7b0b015] at 2015-04-05 18:19:25 on branch trunk — Fixed "TUV" link. And raise preview size to 120x90 now. (user: mario size: 1362)

<?php
/**
 * type: page
 * title: Browse Projects by Name
 * description: Alphabetical project lists
 * version: 0.4
 *
 * Minimal column styling, just project base names used,
 *
 */


include("template/header.php");
?><section id=main class=container-width>
</article>
<aside class=pagination-links style="margin-bottom: 20pt;">
  <a href="names/AC">ABC</a>
  <a href="names/DF">DEF</a>
  <a href="names/GJ">GHIJ</a>
  <a href="names/KL">KL</a>
  <a href="names/MN">MN</a>
  <a href="names/OQ">OPQ</a>
  <a href="names/RS">RS</a>
  <a href="names/TUV">TUV</a>
  <a href="names/WZ">WXYZ</a>
  <a href="names/09">0-9</a>
</aside>
<article class=project-name-columns><?php


// Letter slicing (AZ or 09)
$letters = $_GET->name->length…2->strtolower->default("name", "ac");
$letters = range($letters[0], $letters[1]);

// Fetch project names from letter group
$names = db("
   SELECT name, SUBSTR(description, 1, 150) AS description
     FROM release
    WHERE substr(name, 1, 1) IN (??)
  AND NOT deleted
 GROUP BY name
 ORDER BY name
", $letters);

// Show
foreach ($names as $proj) {
    $proj = array_map("input::_html", $proj);
    print "<a href=/projects/$proj[name] title=\"$proj[description]…\"><img src='img/screenshot/$proj[name].jpeg' width=120 height=90 align=top> $proj[name]</a> <br> ";
}


?></section><?php
include("template/bottom.php");


?>