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


Artifact Content

  • File page_names.php — part of check-in [686e87487e] at 2015-03-24 18:23:10 on branch trunk — Updated stylesheet to use table-layout for #main/#sidebar split. Padding still needs work. (user: mario

Artifact c0d833defb493201d8005ab23f93e7e752f45850:


<?php
/**
 * type: page
 * title: Browse Projects by Name
 * description: Alphabetical project lists
 * version: 0.3
 *
 * 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/AE">A-E</a>
  <a href="names/FH">F-H</a>
  <a href="names/IN">I-N</a>
  <a href="names/OQ">O-Q</a>
  <a href="names/RT">R-T</a>
  <a href="names/UZ">U-Z</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", "ae");
$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=100 height=75 align=top> $proj[name]</a> <br> ";
}


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


?>