From 101f06b50b7e767aa1580d7d2bd48c8b1233cc83 Mon Sep 17 00:00:00 2001 From: Max Hurl Date: Fri, 5 Oct 2012 17:00:24 +0100 Subject: Added dabapps styling to html api --- .../static/rest_framework/css/default.css | 125 ++++++++++++++++++--- rest_framework/static/rest_framework/img/grid.png | Bin 0 -> 1458 bytes rest_framework/templates/rest_framework/base.html | 15 ++- 3 files changed, 118 insertions(+), 22 deletions(-) create mode 100644 rest_framework/static/rest_framework/img/grid.png (limited to 'rest_framework') diff --git a/rest_framework/static/rest_framework/css/default.css b/rest_framework/static/rest_framework/css/default.css index b569b1f5..4d61ac8f 100644 --- a/rest_framework/static/rest_framework/css/default.css +++ b/rest_framework/static/rest_framework/css/default.css @@ -1,15 +1,6 @@ -body { - padding-top: 0; - padding-bottom: 1em; -} /* The navbar is fixed at >= 980px wide, so add padding to the body to prevent content running up underneath it. */ -@media (min-width:980px) { - body { - padding-top: 60px; - } -} h1 { font-weight: 500; @@ -22,14 +13,6 @@ h2, h3 { .resource-description, .response-info { margin-bottom: 2em; } - -#footer { - border-top: 1px solid #eee; - margin-top: 2em; - padding-top: 1em; - text-align: right; -} - .version:before { content: "v"; opacity: 0.6; @@ -68,4 +51,110 @@ pre { .page-header { border-bottom: none; padding-bottom: 0px; -} \ No newline at end of file +} + + +/*=== dabapps bootstrap styles ====*/ + +html{ + width:100%; + background: none; +} + +body, .navbar .navbar-inner .container-fluid{ + max-width: 1150px; + margin: 0 auto; +} + +body{ + background: url("../img/grid.png") repeat-x; + background-attachment: fixed; +} + +#content{ + margin: 40px 0 0 0; +} +/* custom navigation styles */ +.wrapper .navbar{ + width:100%; + position: absolute; + left:0; +} + +.navbar .navbar-inner{ + background: #2C2C2C; + color: white; + border: none; + border-top: 5px solid #A30000; + border-radius: 0px; +} + +.navbar .navbar-inner .nav li, .navbar .navbar-inner .nav li a, .navbar .navbar-inner .brand{ + color: white; +} + +.nav-list > .active > a, .nav-list > .active > a:hover { + background: #2c2c2c; +} + +.navbar .navbar-inner .dropdown-menu li a, .navbar .navbar-inner .dropdown-menu li{ + color: #A30000; +} +.navbar .navbar-inner .dropdown-menu li a:hover{ + background: #eeeeee; + color: #c20000; +} + +/* custom general page styles */ +.hero-unit h2, .hero-unit h1{ + color: #A30000; +} + +body a, body a{ + color: #A30000; +} + +body a:hover{ + color: #c20000; +} + +#content a span{ + text-decoration: underline; + } + +/* sticky footer and footer */ +html, body { + height: 100%; +} +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -60px; +} + + +#footer, #push { + height: 60px; /* .push must be the same height as .footer */ +} + +#footer{ + text-align: right; +} + +#footer p { + text-align: center; + color: gray; + border-top: 1px solid #DDD; + padding-top: 10px; +} + +#footer a { + color: gray; + font-weight: bold; +} + +#footer a:hover { + color: gray; +} + diff --git a/rest_framework/static/rest_framework/img/grid.png b/rest_framework/static/rest_framework/img/grid.png new file mode 100644 index 00000000..878c3ed5 Binary files /dev/null and b/rest_framework/static/rest_framework/img/grid.png differ diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index a5e08942..f213554b 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -25,10 +25,12 @@ +
+ {% block navbar %} - + +
+ {% block footer %} {% endblock %} - - {% block script %} -- cgit v1.2.3