From 101f06b50b7e767aa1580d7d2bd48c8b1233cc83 Mon Sep 17 00:00:00 2001 From: Max Hurl Date: Fri, 5 Oct 2012 17:00:24 +0100 Subject: [PATCH] Added dabapps styling to html api --- docs/static/css/default.css | 2 +- .../static/rest_framework/css/default.css | 125 +++++++++++++++--- .../static/rest_framework/img/grid.png | Bin 0 -> 1458 bytes .../templates/rest_framework/base.html | 15 ++- 4 files changed, 119 insertions(+), 23 deletions(-) create mode 100644 rest_framework/static/rest_framework/img/grid.png diff --git a/docs/static/css/default.css b/docs/static/css/default.css index a62d43e1a..742a41477 100644 --- a/docs/static/css/default.css +++ b/docs/static/css/default.css @@ -222,11 +222,11 @@ html, body { padding-bottom: 70px; } - footer, .push { height: 60px; /* .push must be the same height as .footer */ } + footer p { text-align: center; color: gray; diff --git a/rest_framework/static/rest_framework/css/default.css b/rest_framework/static/rest_framework/css/default.css index b569b1f5c..4d61ac8f7 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 0000000000000000000000000000000000000000..878c3ed5c196539c4e2da35b7787ab08e98b9cca GIT binary patch literal 1458 zcmeAS@N?(olHy`uVBq!ia0vp^Q49=>MjUKFR#nCEMj*vm;1OBOz`!jG!i)^F=12fl zLsS+C#C9D4%n8IWc}2f)ZEm(l45;BJwtuC;Xu7MDalsFrAb+- z$t7TS!;J%bz$r0ZA4%9oA5*oBKFCE#E`)d=EDH3$9hZ$hJS^?Fp4#&|GB7Z|@^o^SSJTd6tq0S!DeK!2h*Tl*`P5Yzc8-3Bx*#7*P z_lIZyDoaaS`}OwX=Dx>2?#BS1xgR(Q!d=p|X>EOCN` zXA4VQu*xH8*v`wH|7Kg_&!-n1cjuav&3^o%1B-!38l2qsw5vX{)ww9+?vCFTf>ud~ zg*GO3KC`e=!r@T3xzf`*c)d-IUlfFk;PBjy4K6tmi!A&4@cAEP$Px9s?lqTci7~T+ z-}^{4afY_30{uixxSHt*N>9t^Tda&0H5mQ_1`yCs#p`NH*8Km)_~-KFoNo=!_8c#s zWAa>N-HQ`bo%5fbxey)esBZQ2{nIXNu`Os-bmok|{*PU&?;Wq;K7ViC-rR_~+KOL= zH4)jidxUns0>)Izao*FaI~PF{%uT~Dk@j=8|5Dta{K8wv>d|%Hcb{Lgz3+r2sU6kg zmTAw9&-`i8w14I8wx>P5N6NF;+MlVs*O$JfT6WJou)_P>@A@uXTleG5F;Ur%rwkr} z9Cy=jOL!Yh{`u60)j+55f37_IN$UUe9sghL7uuB@5hwlYz5Q2Eoi? z8|G~6tcc3~n|batFcfpX-rfHA^NYK3=QY>WxaPaUGs?d6cXxkJIsW|O^e4z^d}6ZQ z{XhH5lWzwfnEw0KbC6*c*P{6UH^(HL+Z_Lz)%(e&^e>X(pJ#64-W$DObB_40RoL^? hufEOi_HxMn +
+ {% block navbar %} - + +
+ {% block footer %} {% endblock %} - - {% block script %}