Skip to content

Commit bef79f4

Browse files
committed
no double folder tree
1 parent 52334ba commit bef79f4

File tree

4 files changed

+28
-34
lines changed

4 files changed

+28
-34
lines changed

public/css/lfm.css

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ a {
3434
}
3535

3636
#tree {
37+
background-color: white;
3738
width: 300px;
3839
}
3940

40-
#mobile_tree {
41-
background-color: white;
42-
position: absolute;
43-
z-index: 999;
44-
width: 300px;
45-
left: -300px;
41+
@media screen and (max-width: 991px) {
42+
#tree {
43+
position: absolute;
44+
z-index: 999;
45+
left: -300px;
46+
}
4647
}
4748

4849
#empty {

public/js/script.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ $('#to-previous').click(function () {
114114

115115
function toggleMobileTree(should_display) {
116116
if (should_display) {
117-
$('#mobile_tree').animate({'left': '0px'}, 1000, 'easeOutExpo', function () {
117+
$('#tree').animate({'left': '0px'}, 1000, 'easeOutExpo', function () {
118118
show_tree = true;
119119
});
120120
} else {
121-
$('#mobile_tree').animate({'left': '-' + $('#mobile_tree').width() + 'px'}, 1000, 'easeOutExpo', function () {
121+
$('#tree').animate({'left': '-' + $('#tree').width() + 'px'}, 1000, 'easeOutExpo', function () {
122122
show_tree = false;
123123
});
124124
}
@@ -242,10 +242,6 @@ function toggleActions() {
242242

243243
$(document).on('click', '#tree a', function (e) {
244244
goTo($(e.target).closest('a').data('path'));
245-
});
246-
247-
$(document).on('click', '#tree2 a', function (e) {
248-
goTo($(e.target).closest('a').data('path'));
249245
toggleMobileTree(false);
250246
});
251247

src/views/index.blade.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,8 @@
7272
</div>
7373
</nav>
7474

75-
<aside id="mobile_tree">
76-
<div class="mt-3 mx-3">
77-
<h1 style="font-size: 1.5rem;">Laravel File Manager</h1>
78-
<small class="d-block">Ver 2.0</small>
79-
<div class="row mt-3">
80-
<div class="col-3">
81-
<img src="https://www.unisharp.com/img/favicon_unisharp_logo.png">
82-
</div>
83-
84-
<div class="col-9">
85-
<p>Current usage :</p>
86-
<p>20 GB (Max : 1 TB)</p>
87-
</div>
88-
</div>
89-
<div class="progress mt-3" style="height: .5rem;">
90-
<div class="progress-bar progress-bar-striped progress-bar-animated w-75 bg-main" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
91-
</div>
92-
</div>
93-
<div id="tree2" class="mt-3"></div>
94-
</aside>
95-
9675
<div class="container-fluid pt-3 d-flex flex-row">
97-
<div id="tree" class="d-none d-lg-block"></div>
76+
<div id="tree"></div>
9877

9978
<div id="main">
10079
{{-- <div class="visible-xs" id="current_dir" style="padding: 5px 15px;background-color: #f8f8f8;color: #5e5e5e;"></div> --}}

src/views/tree.blade.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<div class="m-3 d-block d-lg-none">
2+
<h1 style="font-size: 1.5rem;">Laravel File Manager</h1>
3+
<small class="d-block">Ver 2.0</small>
4+
<div class="row mt-3">
5+
<div class="col-3">
6+
<img src="https://www.unisharp.com/img/favicon_unisharp_logo.png">
7+
</div>
8+
9+
<div class="col-9">
10+
<p>Current usage :</p>
11+
<p>20 GB (Max : 1 TB)</p>
12+
</div>
13+
</div>
14+
<div class="progress mt-3" style="height: .5rem;">
15+
<div class="progress-bar progress-bar-striped progress-bar-animated w-75 bg-main" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
16+
</div>
17+
</div>
18+
119
<ul class="nav nav-pills flex-column">
220
@foreach($root_folders as $root_folder)
321
<li class="nav-item active">

0 commit comments

Comments
 (0)