-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
52 lines (46 loc) · 1.62 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html lang="en">
<head>
<!-- Meta stuff -->
<meta charset="utf-8"/>
<title>Nice Things</title>
<meta name="description" content="Nice Things – a carefully curated collection of the most beautiful things on the planet."/>
<!-- Styles & scripts -->
<link rel="stylesheet" href="styles/main.css"/>
<script src="scripts/jquery.js"></script>
<script src="scripts/view.js?auto"></script>
<script src="http://use.typekit.com/feu7nwp.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-6426998-22']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<header role="banner">
<h1>Nice Things</h1>
<p>A project by <a href="http://twitter.com/lukejones" title="Luke Jones">Luke Jones</a></p>
</header><!--/banner-->
<ol>
<?php
$files = glob("./things/*.*");
array_multisort(array_map('filemtime', $files), SORT_NUMERIC, SORT_DESC, $files);
?>
<?php foreach ($files as $file) {
$caption = preg_replace( '/\s*\d+$/', '', pathinfo($file, PATHINFO_FILENAME) );
?>
<li>
<a title="<? echo $caption ?>" class="view" rel="nice-things" href="<?php echo $file; ?>">
<img src="createThumb.php?src=<?php echo $file; ?>&w=128&h=128" width="128" height="128"/>
</a>
</li>
<?php } ?>
</ol>
</body>
</html>