diff --git a/rebuild.php b/rebuild.php
index 2819c61..11cbe4d 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -94,10 +94,10 @@ function hesc($sz) {
}
function text2html($sz) {
- $base = nl2br(hesc($sz));
+ $base = hesc($sz);
+ $base = preg_replace('~(https?://[^ \\r\\n\\t]+)~i', '\\1', $base);
- preg_replace('~(https?://.+\b)~i', '\1', $base);
- return $base;
+ return nl2br($base);
}
/**
@@ -108,6 +108,7 @@ class CProject {
private $dir;
public $projname;
public $shortdesc = '(no description)';
+ public $subtag = '';
private $longdesc = '';
private $images = array();
private $downloads = array();
@@ -126,6 +127,11 @@ class CProject {
if ($file == 'README.txt') {
$this->longdesc = file_get_contents($this->dir.'README.txt');
+ $matches = array();
+ if (preg_match('~Written in ([^\\r\\n]+)~', $this->longdesc, $matches)) {
+ $this->subtag = rtrim($matches[1], ' .');
+ }
+
$this->shortdesc = array_shift(explode("\n", $this->longdesc));
$this->shortdesc[0] = strtolower($this->shortdesc[0]); // cosmetic lowercase
continue;
@@ -328,6 +334,10 @@ function buildall() {
=hesc($pr->projname)?>,
=hesc($pr->shortdesc)?>
more...
+ subtag)) { ?>
+
+ =hesc($pr->subtag)?>
+
diff --git a/static/style.css b/static/style.css
index d9ff89d..16c25b0 100644
--- a/static/style.css
+++ b/static/style.css
@@ -56,6 +56,10 @@ html, body {
.projtable td {
padding: 4px;
}
+.projtable small {
+ color:grey;
+ font-style:italic;
+}
.projinfo {
position:relative;
@@ -74,7 +78,7 @@ html, body {
position:absolute;
right:0;
- width:60px;
+ width:62px; /* 60px + 2px border */
}
/* */
@@ -94,6 +98,7 @@ html, body {
height:60px;
opacity: 0.8;
transition:0.2s opacity;
+ border:1px solid lightgrey;
}
.thumbimage:hover {
opacity:1.0;