Skip to content

Commit 2febde4

Browse files
committed
Do not always use full viewport to allow embedding angular-filemanager as a widget into other webapps.
1 parent c1ababb commit 2febde4

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

src/css/main.css

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
body {
2-
padding-top: 55px;
32
font-size: 14px;
3+
height: 100vh;
44
}
55

66
*,
@@ -10,6 +10,10 @@ body {
1010

1111
.navbar {
1212
min-height: 32px;
13+
margin-bottom: 0;
14+
border: 0;
15+
z-index: 1030;
16+
border-radius: 0;
1317
}
1418

1519
.navbar .navbar-toggle {
@@ -63,10 +67,6 @@ textarea.code {
6367
border-bottom: 1px solid #eee;
6468
}
6569

66-
.navbar-fixed-top {
67-
border: 0;
68-
}
69-
7070
.sidebar {
7171
display: none;
7272
}
@@ -282,20 +282,31 @@ table th > a:focus {
282282
font-weight: bold;
283283
}
284284

285+
.main {
286+
overflow-y: auto;
287+
}
288+
285289
@media (min-width: 768px) {
286290
.main {
287291
padding-right: 0;
288292
padding-left: 0;
289293
}
290294

295+
/* The view should fill all available vertical space */
296+
angular-filemanager > div,.row,.main,.sidebar {
297+
height: 100%;
298+
}
299+
300+
.container-fluid {
301+
height: -webkit-calc(100% - 55px);
302+
height: -moz-calc(100% - 55px);
303+
height: calc(100% - 55px);
304+
}
305+
291306
.sidebar {
292-
position: fixed;
293-
top: 50px;
294-
bottom: 0;
295-
left: 0;
296307
z-index: 1000;
297308
display: block;
298-
padding: 5px 0;
309+
padding: 0;
299310
overflow-x: hidden;
300311
overflow-y: auto;
301312
background-color: #f5f5f5;
@@ -313,4 +324,4 @@ table th > a:focus {
313324
.table.table-files .btn {
314325
display: none;
315326
}
316-
}
327+
}

src/templates/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<nav class="navbar navbar-inverse navbar-fixed-top">
1+
<nav class="navbar navbar-inverse">
22
<div class="container-fluid">
33
<div class="navbar-header">
44
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
@@ -39,4 +39,4 @@
3939
</div>
4040
</div>
4141
</div>
42-
</nav>
42+
</nav>

0 commit comments

Comments
 (0)