Skip to content

Commit

Permalink
Added open class on directory clicking.
Browse files Browse the repository at this point in the history
  • Loading branch information
halgatewood committed Feb 23, 2018
1 parent 6d9f2e5 commit 6a526ce
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.php
Expand Up @@ -82,7 +82,7 @@
.block .file { padding-bottom: 5px; }
.block .data { line-height: 1.3em; color: #666; }
.block a { display: block; padding: 20px; transition: all 0.35s; }
.block a:hover, .block a:focus { text-decoration: none; background: #efefef; }
.block a:hover, .block a.open { text-decoration: none; background: #efefef; }

.bold { font-weight: 900; }
.upper { text-transform: uppercase; }
Expand Down Expand Up @@ -114,10 +114,10 @@
body.dark h1 { color: #fff; }
body.dark .wrap { background: #2b2a2a; }
body.dark .block { border-top: solid 1px #666; }
body.dark .block a:hover { background: #000; }
body.dark .block a:hover, body.dark .block a.open { background: #000; }
body.dark .note { color: #fff; }
body.dark .block .data { color: #fff; }
body.dark .sub { border-left: solid 5px #666; }
body.dark .sub { border-left: solid 5px #0e0e0e; }
</style>
</head>
<body class="<?php echo $color; ?>">
Expand Down Expand Up @@ -306,11 +306,12 @@ function build_blocks( $items, $folder )
?>

<?php if($toggle_sub_folders) { ?>
<script>
<script type="text/javascript">
$(document).ready(function()
{
$("a.dir").click(function(e)
{
$(this).toggleClass('open');
$('.sub[data-folder="' + $(this).attr('href') + '"]').slideToggle();
e.preventDefault();
});
Expand Down

1 comment on commit 6a526ce

@N0rdmann
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to fix directories with a . in their names beeing threated as files?

Please sign in to comment.