Disabled tree.

This commit is contained in:
Lars Jung 2011-07-01 15:32:22 +02:00
parent 067e0970f8
commit 8ee98ed7bd
12 changed files with 64 additions and 65 deletions

View File

@ -1,4 +1,4 @@
# h5ai v0.5   ·   a beautified Apache index
# h5ai v0.5.1   ·   a beautified Apache index
## Screenshots
@ -47,6 +47,12 @@ please respect their rights.
## Changelog
### v0.5.1
*2011-07-01*
* disabled tree sidebar for now, since it had unwanted side effects
### v0.5
*2011-07-01*

View File

@ -3,7 +3,7 @@ custom = true
# project
project.name = h5ai
project.version = 0.5
project.version = 0.5.1
# src

View File

@ -9,6 +9,7 @@
li {
white-space: nowrap;
clear: both;
&.header a {
padding-bottom: 18px;
@ -51,6 +52,7 @@
.icon {
text-align: center;
width: 16px;
//float: left;
img {
padding-top: 4px;
@ -64,16 +66,20 @@
.label {
width: 682px;
white-space: nowrap;
//word-wrap: break-word;
//float: left;
}
.date {
text-align: right;
width: 160px;
white-space: nowrap;
//float: right;
}
.size {
text-align: right;
width: 70px;
white-space: nowrap;
//float: right;
}
}
}

View File

@ -1,32 +1,32 @@
.border-radius ( @radius: 5px ) {
.border-radius ( @radius ) {
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
border-radius: @radius;
}
.box-shadow ( @x: 10px, @y: 10px, @blur: 5px, @color: #ccc ) {
-moz-box-shadow: @x @y @blur @color;
-webkit-box-shadow: @x @y @blur @color;
box-shadow: @x @y @blur @color;
.box-shadow ( @shadow ) {
-moz-box-shadow: @shadow;
-webkit-box-shadow: @shadow;
box-shadow: @shadow;
}
.transition ( @transitions ) {
-moz-transition: @transitions;
-ms-transition: @transitions;
-o-transition: @transitions;
-webkit-transition: @transitions;
transition: @transitions;
.transition ( @transition ) {
-moz-transition: @transition;
-ms-transition: @transition;
-o-transition: @transition;
-webkit-transition: @transition;
transition: @transition;
}
.transform ( @transforms ) {
-moz-transform: @transforms;
-o-transform: @transforms;
-webkit-transform: @transforms;
transform: @transforms;
.transform ( @transform ) {
-moz-transform: @transform;
-o-transform: @transform;
-webkit-transform: @transform;
transform: @transform;
}

View File

@ -10,7 +10,7 @@
border: 1px solid rgb(225,225,225);
border-left: none;
.border-radius ( 0 15px 15px 0 );
.box-shadow( 0, 0, 30px, #999 );
.box-shadow( 0 0 30px #999 );
.entry {
> a, > a.visited {
@ -51,6 +51,9 @@
color: #c55;
}
}
&.file {
display: none;
}
&.current {
> a, > a:visited {
border: 1px solid rgba(0,0,0,0.1);

View File

@ -41,7 +41,7 @@ body > nav {
font-size: 0.85em;
background-color: rgb(240,240,240);
border-bottom: 1px solid rgb(225,225,225);
.box-shadow( 0, 0, 30px, #555 );
.box-shadow( 0 0 30px #555 );
span.jsDisabledFallback {
display: block;
@ -135,7 +135,7 @@ body > footer {
color: #999;
font-size: 0.85em;
text-align: center;
.box-shadow( 0, 0, 30px, #555 );
.box-shadow( 0 0 30px #555 );
a, a:visited {
color: #555;

View File

@ -10,7 +10,7 @@
$( function() {
window.setTimeout( function() {
$.h5aiTree = new H5aiTree();
// $.h5aiTree = new H5aiTree();
}, 1 );
} );
@ -39,8 +39,8 @@
var match = pathnameRegEx.exec( pathname );
return [ match[1], match[3] ];
};
function checkCrumb() {
$( "li.crumb a" ).each( function() {
@ -108,7 +108,7 @@
walkBack( pathname, function( walkbackedPathname ) {
var entry = new Entry( walkbackedPathname );
fetchFoldersRecursive( walkbackedPathname, function ( content ) {
fetchEntriesRecursive( walkbackedPathname, function ( content ) {
entry.content = content;
callback( entry );
} );
@ -134,42 +134,22 @@
};
function fetchFoldersRecursive( pathname, callback ) {
function fetchEntriesRecursive( pathname, callback ) {
fetchFolders( pathname, false, function ( folders ) {
if ( folders instanceof Array ) {
for ( idx in folders ) {
fetchEntries( pathname, false, function ( entries ) {
if ( entries instanceof Array ) {
for ( idx in entries ) {
( function ( entry ) {
if ( entry.isFolder ) {
fetchFoldersRecursive( entry.absHref, function( content ) {
fetchEntriesRecursive( entry.absHref, function( content ) {
entry.content = content;
callback( folders );
callback( entries );
} );
};
} ) ( folders[idx] );
} ) ( entries[idx] );
};
};
callback( folders );
} );
};
function fetchFolders( pathname, includeParent, callback ) {
fetchEntries( pathname, includeParent, function ( entries ) {
if ( entries instanceof Array ) {
var folders = [];
for ( idx in entries ) {
var entry = entries[idx];
if ( entry.isFolder ) {
folders.push( entry );
};
};
callback( folders );
} else {
callback( entries );
};
callback( entries );
} );
};
@ -272,13 +252,14 @@
this.isComplete = function () {
if ( this.content === undefined ) {
return false;
};
if ( this.content instanceof Array ) {
for ( idx in this.content ) {
if ( !this.content[idx].isComplete() ) {
return false;
if ( this.isFolder ) {
if ( this.content === undefined ) {
return false;
} else if ( this.content instanceof Array ) {
for ( idx in this.content ) {
if ( !this.content[idx].isComplete() ) {
return false;
};
};
};
};
@ -297,6 +278,7 @@
.append( $( "<span class='label'>" + this.label + "</span>" ) );
if ( this.isFolder ) {
$entry.addClass( "folder" );
if ( this.absHref === document.location.pathname ) {
$a.find( ".icon img" ).attr( "src", "/h5ai/images/folder-open.png" );
$entry.addClass( "current" );
@ -315,6 +297,8 @@
$a.append( $( "<span class='hint error'>" + this.content + "</span>" ) );
$entry.addClass( "notListable" );
};
} else {
$entry.addClass( "file" );
};
} catch( err ) {

View File

@ -1,5 +1,5 @@
################################
# h5ai 0.5
# h5ai 0.5.1
# customized .htaccess
################################

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
<img class="techclass" src="/h5ai/images/html5-storage.png" alt="html5-storage" />
<img class="techclass" src="/h5ai/images/html5-css3.png" alt="html5-css3" />
</a>
<a href="http://larsjung.de/h5ai" target="_blank" title="h5ai 0.5">h5ai</a>
<a href="http://larsjung.de/h5ai" target="_blank" title="h5ai 0.5.1">h5ai</a>
using
<a href="http://tiheum.deviantart.com/art/Faenza-Icons-173323228" target="_blank" title="icon theme for Gnome">Faenza icons</a>
</footer>

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Directory index · styled with h5ai</title>
<meta name="h5ai-version" content="h5ai 0.5">
<meta name="h5ai-version" content="h5ai 0.5.1">
<meta name="description" content="Directory index styled with h5ai (http://larsjung.de/h5ai)">
<meta name="keywords" content="directory, index, autoindex, h5ai">
<link rel="shortcut icon" type="image/png" href="/h5ai/images/h5ai-16x16.png">

File diff suppressed because one or more lines are too long