summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-04-30 21:56:46 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-04-30 21:56:46 +0200
commitaa7507f98fb202506a9e36e3df7b590913129ca0 (patch)
tree8dd7e524ed384542b230e71d4df990369587cd1f
parentFixed #65 (diff)
downloadpyload-aa7507f98fb202506a9e36e3df7b590913129ca0.tar.xz
cleaned header + more responsive
-rw-r--r--module/web/api_app.py1
-rw-r--r--module/web/static/css/default/base.less1
-rw-r--r--module/web/static/css/default/common.less6
-rw-r--r--module/web/static/css/default/dashboard.less4
-rw-r--r--module/web/static/css/default/style.less90
-rw-r--r--module/web/static/img/default/bgpatterndark.pngbin6199 -> 0 bytes
-rw-r--r--module/web/templates/default/base.html114
7 files changed, 83 insertions, 133 deletions
diff --git a/module/web/api_app.py b/module/web/api_app.py
index 52903e92b..690cf73aa 100644
--- a/module/web/api_app.py
+++ b/module/web/api_app.py
@@ -28,6 +28,7 @@ def call_api(func, args=""):
s = request.environ.get('beaker.session')
auth = parse_auth(request.get_header('Authorization', ''))
+ # TODO: session as GET
if 'session' in request.POST:
# removes "' so it works on json strings
s = s.get_by_id(remove_chars(request.POST['session'], "'\""))
diff --git a/module/web/static/css/default/base.less b/module/web/static/css/default/base.less
index f3be924c6..46275c8ed 100644
--- a/module/web/static/css/default/base.less
+++ b/module/web/static/css/default/base.less
@@ -18,7 +18,6 @@ body {
font-family: 'Abel', sans-serif;
font-size: 16px;
background: url("../../img/default/bgpattern.png") repeat scroll 0 0 transparent;
- min-width: @min-width;
}
h1, h2, h3 {
diff --git a/module/web/static/css/default/common.less b/module/web/static/css/default/common.less
index a6b9a1e21..1383af75f 100644
--- a/module/web/static/css/default/common.less
+++ b/module/web/static/css/default/common.less
@@ -2,17 +2,13 @@
Definitions
*/
-/*
- Bootstrap size: Phones to tablets, min value when scrollbar appears
-*/
-@min-width: 767px;
/*
Threshold for slightly larger screen
*/
@large-screen: 1150px;
-@header-height: 75px;
+@header-height: 70px;
@actionbar-height: 40px;
@footer-height: 100px;
diff --git a/module/web/static/css/default/dashboard.less b/module/web/static/css/default/dashboard.less
index cf6e0d410..db92c3118 100644
--- a/module/web/static/css/default/dashboard.less
+++ b/module/web/static/css/default/dashboard.less
@@ -54,6 +54,10 @@
cursor: pointer;
}
+ & > i {
+ vertical-align: middle;
+ }
+
.progress {
position: absolute;
height: @frame-bottom;
diff --git a/module/web/static/css/default/style.less b/module/web/static/css/default/style.less
index 4a195542e..9357ba83a 100644
--- a/module/web/static/css/default/style.less
+++ b/module/web/static/css/default/style.less
@@ -6,19 +6,22 @@
*/
header { // background-color: @greyDark;
- background: url("../../img/default/bgpatterndark.png") repeat;
+ .gradient(to bottom, #222222, #111111);
height: @header-height;
position: fixed;
top: 0;
vertical-align: top;
width: 100%;
z-index: 10;
- min-width: @min-width;
color: #ffffff;
-}
-header a {
- color: #ffffff;
+ a {
+ color: #ffffff;
+ }
+ .container-fluid, .row-fluid {
+ height: @header-height;
+ }
+
}
header:before {
@@ -33,17 +36,6 @@ header:before {
.default-shadow;
}
-header div.left {
- position: relative;
- padding-left: 20px;
- height: @header-height;
- float: left; // border-right: 1px solid;
-}
-
-header div.right {
- padding-right: 20px;
-}
-
header span.title {
color: white;
float: left;
@@ -56,69 +48,31 @@ header span.title {
header .logo {
float: left;
margin-right: 10px;
- margin-top: 12px;
+ margin-top: 10px;
width: 105px;
height: 107px;
background: url("../../img/default/logo.png") no-repeat;
}
-.header_block {
- float: right; // font-family: SansationRegular, sans-serif;
- margin: 10px 8px 0;
+.header-block {
+ float: left;
line-height: 18px;
font-size: small;
-
- .btn {
- margin-top: 6px;
- }
-
-}
-
-.iconbar {
- display: inline-block;
- width: 100%;
- text-align: center;
- text-shadow: @blue 2px 2px 2px;
-
- i {
- cursor: pointer;
- }
-
- i:hover {
- color: @yellow;
- }
-
+ margin-top: 6px;
}
-// Responsive Borders
-.header_block.left-border {
- background: url("../../img/default/box-separator.png") repeat-y;
- padding-left: 1%;
+.status-block {
+ float: right !important;
}
-.header_block.right-border {
- background: url("../../img/default/box-separator.png") repeat-y right;
- padding-right: 1%;
-
- .pull-right {
- color: @yellow;
- }
-
-}
-
-@media (max-width: @large-screen) {
- .header_block {
- background: none !important;
- padding: 0 !important;
- }
+// Right left buttons
+.pull-right .btn {
+ margin-top: 6px;
}
#progress-area {
position: relative;
- float: right;
- width: 26%;
- margin-top: 12px;
- margin-right: 15px;
+ margin-top: 8px;
line-height: 16px;
#progress-info {
@@ -207,8 +161,8 @@ header .logo {
#speedgraph {
float: right;
- width: 14%;
- height: 60px; // similiar as header_box
+ width: 40%;
+ height: @header-height - 16px;
margin: 8px 8px 0 8px;
font-family: sans-serif
}
@@ -324,11 +278,9 @@ header .logo {
*/
footer {
// Same gradient as navbar
-// .gradient(top, #222222, #111111);
- background: url("../../img/default/bgpatterndark.png") repeat;
+ .gradient(top, #222222, #111111);
color: @grey;
min-height: @footer-height;
- min-width: @min-width;
margin-top: -@footer-height;
position: relative;
width: 100%;
diff --git a/module/web/static/img/default/bgpatterndark.png b/module/web/static/img/default/bgpatterndark.png
deleted file mode 100644
index b6d7536d0..000000000
--- a/module/web/static/img/default/bgpatterndark.png
+++ /dev/null
Binary files differ
diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html
index 2618b64c0..50269d4c7 100644
--- a/module/web/templates/default/base.html
+++ b/module/web/templates/default/base.html
@@ -50,7 +50,7 @@
<%/if%>
<i class="iconf-list pull-right"></i>
-{# TODO: active animation #}
+ {# TODO: active animation #}
<div class="progress" id="globalprogress">
<%= if single %>
<div class="bar" style="width: <% percent %>%">
@@ -113,70 +113,68 @@
<body>
<div id="wrap">
<header>
- <div class="left">
- <div class="logo"></div>
- <span class="title visible-large-screen">pyLoad</span>
- </div>
- <div class="right">
- {% if user %}
- <div class="header_block">
- {# <a class="header-link" href="/settings"><i class="icon-cog icon-white"></i> Settings</a>#}
- {# <a class="header-link" href="#"><i class="icon-list-alt icon-white"></i> Accounts</a>#}
- <span class="iconbar">
- <i class="iconf-play iconf-large"></i>&nbsp; Running&nbsp;&nbsp;
- <i class="iconf-repeat iconf-large"></i>&nbsp; Reconnect
- </span>
- <br>
- <a class="btn btn-success btn-grabber" href="#"><i class="icon-plus icon-white"></i> Add</a>
-
- <div class="btn-group">
- <a class="btn btn-blue" href="#"><i class="icon-user icon-white"></i> User</a>
- <a class="btn btn-blue dropdown-toggle" data-toggle="dropdown" href="#"><span
- class="caret"></span></a>
- <ul class="dropdown-menu" style="right: 0; left: -100%">
- <li><a href="/"><i class="iconf-list-alt"></i> Dashboard</a></li>
- <li><a href="/settings"><i class="iconf-wrench"></i> Settings</a></li>
- <li><a href="/accounts"><i class="iconf-key"></i> Accounts</a></li>
- <li><a href="/admin"><i class="iconf-cogs"></i> Admin</a></li>
- <li class="divider"></li>
- <li><a href="/logout"><i class="iconf-signout"></i> Logout</a></li>
- </ul>
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span3">
+ <div class="logo"></div>
+ <span class="title visible-large-screen">pyLoad</span>
+ </div>
+ {% if user %}
+ <div class="span4 offset1">
+ <div id="progress-area">
+ <span id="progress-info">
+ </span>
+
+ <div class="popover bottom">
+ <div class="arrow"></div>
+ <div class="popover-inner">
+ <h3 class="popover-title">
+ Running...
+ <button type="button" class="close" aria-hidden="true">&times;</button>
+ </h3>
+ <div class="popover-content">
+ <ul class="progress-list"></ul>
+ </div>
+ </div>
+ </div>
+ </div>
</div>
+ <div class="span4">
+ <div class="header-block">
+ <i class="icon-download-alt icon-white"></i> Max. Speed:<br>
+ <i class=" icon-off icon-white"></i> Running:<br>
+ <i class="icon-refresh icon-white"></i> Reconnect:<br>
+ </div>
- </div>
+ <div class="pull-right">
+ <div class="btn-group">
+ <a class="btn btn-blue btn-small" href="#"><i class="icon-user icon-white"></i> User</a>
+ <a class="btn btn-blue btn-small dropdown-toggle" data-toggle="dropdown" href="#"><span
+ class="caret"></span></a>
+ <ul class="dropdown-menu" style="right: 0; left: -100%">
+ <li><a href="/"><i class="iconf-list-alt"></i> Dashboard</a></li>
+ <li><a href="/settings"><i class="iconf-wrench"></i> Settings</a></li>
+ <li><a href="/accounts"><i class="iconf-key"></i> Accounts</a></li>
+ <li><a href="/admin"><i class="iconf-cogs"></i> Admin</a></li>
+ <li class="divider"></li>
+ <li><a href="/logout"><i class="iconf-signout"></i> Logout</a></li>
+ </ul>
+ </div>
- <div id="speedgraph" class="visible-desktop"></div>
+ <a class="btn btn-success btn-grabber btn-small btn-block" href="#">
+ <i class="icon-plus icon-white"></i> Add
+ </a>
+ </div>
- <div class="header_block right-border status-block">
- </div>
- <div class="header_block left-border">
- <i class="icon-download-alt icon-white"></i> Max. Speed:<br>
- <i class=" icon-off icon-white"></i> Running:<br>
- <i class="icon-refresh icon-white"></i> Reconnect:<br>
- </div>
+ <div id="speedgraph" class="visible-desktop"></div>
- <div id="progress-area">
- <span id="progress-info">
- </span>
- <div class="popover bottom">
- <div class="arrow"></div>
- <div class="popover-inner">
- <h3 class="popover-title">
- Running...
- <button type="button" class="close" aria-hidden="true">&times;</button>
- </h3>
- <div class="popover-content">
- <ul class="progress-list"></ul>
- </div>
- </div>
+ <div class="header-block status-block"></div>
</div>
- </div>
- {% endif %}
- </div>
- <div id="notification-area">
- </div>
- <div id="selection-area">
+ {% endif %}
+ </div>
</div>
+ <div id="notification-area"></div>
+ <div id="selection-area"></div>
</header>
<div id="content-container" class="container-fluid">
<div class="row-fluid">