mirror of
https://github.com/jimeh/dlist.git
synced 2026-02-19 07:56:41 +00:00
implemented a functional template system, and a simple WORKING template, and other smaller things and fixes...
git-svn-id: file:///Users/jimeh/Desktop/dlist/trunk@10 a5845835-ea0f-0410-a762-dd0bfe9bfde8
This commit is contained in:
@@ -3,44 +3,48 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||
<title>Index of <?= DIR_URL ?></title>
|
||||
<title>Index of <?=DIR_URL?></title>
|
||||
<style type="text/css" media="screen">
|
||||
/* <![CDATA[ */
|
||||
|
||||
<? include(TPL_PATH.'stylesheets/media.css') ?>
|
||||
|
||||
<? include(TPL_PATH.'stylesheets/screen.css') ?>
|
||||
/* ]]> */
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body id="index">
|
||||
<table border="0" cellspacing="1" cellpadding="3" id="list">
|
||||
<div id="header">
|
||||
Index of <?=DIR_URL?>
|
||||
</div>
|
||||
<table border="0" cellspacing="1" cellpadding="0" id="list">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Date Modified</th>
|
||||
<th>Permissions</th>
|
||||
<th>Owner</th>
|
||||
<th class="icon"></th>
|
||||
<th class="name">Name</th>
|
||||
<th class="size">Size</th>
|
||||
<th class="mtime">Date Modified</th>
|
||||
<th class="perms">Permissions</th>
|
||||
<th class="owner">Owner</th>
|
||||
</tr>
|
||||
<? if (!empty($dlist->parent) || $dlist->parent != '/'): $parent = $dlist->parent; ?>
|
||||
<? if (!empty($parent['name']) || $parent['name'] != '/'): ?>
|
||||
<tr>
|
||||
<td><img src="<?=icons_get_parent('large')?>" class="" alt="" /></td>
|
||||
<td><a href="../"><?=$parent['name']?></a></td>
|
||||
<td><?=$parent['size']?></td>
|
||||
<td><?=$parent['mtime']?></td>
|
||||
<td><?=$parent['perms']?></td>
|
||||
<td><?=$parent['owner']?></td>
|
||||
<td class="icon"><a href="../" title="Parent Directory"><img src="<?=Icon::get_parent($config->tpl_icon_size)?>" class="" alt="" /></a></td>
|
||||
<td class="name"><a href="../" title="Parent Directory">..</a></td>
|
||||
<td class="size"><?=$parent['size']?></td>
|
||||
<td class="mtime"><?=$parent['mtime']?></td>
|
||||
<td class="perms"><?=$parent['perms']?></td>
|
||||
<td class="owner"><?=$parent['owner']?></td>
|
||||
</tr>
|
||||
<? endif ?>
|
||||
<? foreach ($dlist->list as $key => $item): ?>
|
||||
<tr>
|
||||
<td><img src="<?=icons_get_url($item['ext'], 'large', $item['type'])?>" class="" alt="" /></td>
|
||||
<td><a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>"><?=$item['name']?></a></td>
|
||||
<td><?=$item['size']?></td>
|
||||
<td><?=$item['mtime']?></td>
|
||||
<td><?=$item['perms']?></td>
|
||||
<td><?=$item['owner']?></td>
|
||||
<td class="icon">
|
||||
<a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>" title="<?=$item['name']?>">
|
||||
<img src="<?=Icon::get_url($item['ext'], $config->tpl_icon_size, $item['type'])?>" class="" alt="" />
|
||||
</a>
|
||||
</td>
|
||||
<td class="name"><a href="<?=DIR_URL.$item['name']?><? if($item['type'] == 'dir') echo '/'; ?>"><?=$item['name']?></a></td>
|
||||
<td class="size"><?=$item['size']?></td>
|
||||
<td class="mtime"><?=$item['mtime']?></td>
|
||||
<td class="perms"><?=$item['perms']?></td>
|
||||
<td class="owner"><?=$item['owner']?></td>
|
||||
</tr>
|
||||
<? endforeach ?>
|
||||
</table>
|
||||
|
||||
@@ -21,7 +21,7 @@ Author: Jim Myhrberg
|
||||
|
||||
|
||||
//>After> core.define_constants
|
||||
$config->parse(TPL_PATH.'settings.php');
|
||||
$config->parse(TPL_PATH.'settings.php', true, 'tpl_');
|
||||
|
||||
|
||||
//==========================
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
$config = array(
|
||||
// 'key' => 'value
|
||||
'icon_size' => 'small',
|
||||
);
|
||||
|
||||
?>
|
||||
@@ -1,10 +0,0 @@
|
||||
BODY {
|
||||
background-color: #FFF;
|
||||
}
|
||||
#list {
|
||||
background-color: #666;
|
||||
}
|
||||
#list TH, #list TD {
|
||||
background-color: #FFF;
|
||||
padding: 5px;
|
||||
}
|
||||
74
templates/simple/stylesheets/screen.css
Normal file
74
templates/simple/stylesheets/screen.css
Normal file
@@ -0,0 +1,74 @@
|
||||
BODY {
|
||||
background-color: #FFF;
|
||||
color: #000;
|
||||
font: 11px "Lucida Grande", Tahoma, Verdana, sans-serif;
|
||||
margin: 0xp;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
#header {
|
||||
font: 20px "Myriad Pro", "Trebuchet MS", Verdana, sans-serif;
|
||||
padding: 15px 15px 20px 35px;
|
||||
}
|
||||
|
||||
#list {
|
||||
background-color: #777;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* List Headers */
|
||||
#list TH {
|
||||
background-color: #CCC;
|
||||
padding: 2px 5px 2px 5px;
|
||||
}
|
||||
#list TH.name {
|
||||
text-align: left;
|
||||
}
|
||||
#list TH.icon {
|
||||
padding: 2px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
#list TH.size {
|
||||
width: 75px;
|
||||
}
|
||||
#list TH.mtime {
|
||||
width: 175px;
|
||||
}
|
||||
#list TH.perms {
|
||||
width: 100px;
|
||||
}
|
||||
#list TH.owner {
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
/* List Cells */
|
||||
#list TD {
|
||||
background-color: #FFF;
|
||||
padding: 2px 5px 2px 5px;
|
||||
}
|
||||
#list TD.icon {
|
||||
padding: 2px;
|
||||
}
|
||||
#list TD.size {
|
||||
text-align: right;
|
||||
}
|
||||
#list TD.mtime {
|
||||
text-align: right;
|
||||
}
|
||||
#list TD.perms {
|
||||
|
||||
}
|
||||
#list TD.owner {
|
||||
|
||||
}
|
||||
|
||||
#list TD.name A {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#stats {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
Reference in New Issue
Block a user