version 1 trubox!

This commit is contained in:
Karen 2011-09-30 20:06:30 +05:30
parent 94409d7fe1
commit 0f289b6d1a
25 changed files with 9602 additions and 1 deletions

View File

@ -2,4 +2,4 @@
from django.shortcuts import render_to_response
def index(request):
return render_to_response("index.html", {})
return render_to_response("home.html", {})

View File

@ -9,6 +9,8 @@ ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
LOCAL_DEVELOPMENT = True
PROJECT_PATH = os.path.dirname(__file__)
MANAGERS = ADMINS

209
trubox/static/css/main.css Normal file
View File

@ -0,0 +1,209 @@
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
background: #e9e9e9;
color: #000;
font-size:14px;
}
a:link {
color:#414958;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #4E5869;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}
.container {
width: 90%;
max-width: 1260px; /*change this*/
min-width: 780px; /*change this*/
background: #FFF;
margin: 0 auto;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
.header {
background-color:#0387b8; /*formerly add03b*/
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
width:100%;
position:relative;
margin-bottom:2%; }
#logo {
display:block;
padding:10px 10px;
}
#search {
width:350px;
height:30px;
border:1px solid #f0f0f0;
padding:2px 2px 2px 4px;
font-family:Arial, Helvetica, 'DejaVu Sans', sans-serif;
font-size:14px;
color:#7d7d7d;
-moz-border-radius:8px;
-webkit-border-radius:8px;
border-radius:8px;
-moz-box-shadow:2px 2px 6px #666;
-webkit-box-shadow:2px 2px 6px #666;
box-shadow:2px 2px 6px #666;
position:absolute; /*problem on resizing windowd*/
top:30px;
left:0;
right:0;
margin:0 auto;
}
#formLogin
{position:absolute;
right:10px;
top:35px;
}
#contentContainer
{width:96%;
margin:0 auto;
border-top:1px solid #e3e3e3;
border-left:1px solid #999;
border-right:1px solid #999;
margin-top:1%;
margin-bottom:1%;}
.sidebar1 {
float: left;
width: 25%;
padding-bottom: 10px;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
border-right:1px solid #e3e3e3;
border-left:1px solid #e3e3e3;
}
.box1
{width:90%;
height:200px;
margin:0 auto;
margin-top:20px;
background-color:#add03b;
}
.content {
width: 50%;
float: left;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
.boxMiddle
{width:90%;
height:400px;
margin:0 auto;
background-color:#0387b8;
margin-top:20px;
}
.sidebar2 {
float: left;
width: 25%;
border-right:1px solid #e3e3e3;
border-left:1px solid #e3e3e3;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
}
/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
}
/* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
.nav {
list-style: none; /* this removes the list marker */
border-top: 1px solid #999; /* this creates the top border for the links - all others are placed using a bottom border on the LI */
margin-bottom: 15px; /* this creates the space between the navigation on the content below */
width:96%;
margin-left:2%;
background: -moz-linear-gradient(
top,
#0387b8 0%,
#02151c);
background: -webkit-gradient(
linear, left top, left bottom,
from(#0387b8),
to(#02151c));
}
ul.nav li a{
border-bottom: 1px solid #666; /* this creates the button separation */
float:left; /*add clear both somewhere*/
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #e3e3e3;
padding: 10px 20px;
background: -moz-linear-gradient(
top,
#0387b8 0%,
#02151c);
background: -webkit-gradient(
linear, left top, left bottom,
from(#0387b8),
to(#02151c));
/*border-radius: 9px;
-moz-border-radius: 9px;
-webkit-border-radius: 9px;*/
border: 0px solid #f6892a;
-moz-box-shadow:
0px 1px 3px rgba(000,000,000,0.5),
inset 0px 0px 2px rgba(255,255,255,0);
-webkit-box-shadow:
0px 1px 3px rgba(000,000,000,0.5),
inset 0px 0px 2px rgba(255,255,255,0);
/*text-shadow:
0px -1px 0px rgba(000,000,000,0.2),
0px 1px 0px rgba(255,255,255,0.4);*/
text-decoration:none;}
/*ul.nav a, ul.nav a:visited {
padding: 5px 5px 5px 15px;
display: block; text-decoration: none;
}*/
/*<ul.nav a:hover, ul.nav a:active, ul.nav a:focus {
background: #6F7D94;
color: #FFF;
}*/
.footer {
width:100%;
margin:0 auto;
padding-top:20px;
padding-bottom:20px;
background-color: #003;
color:#e3e3e3;
position: relative;/* this gives IE6 hasLayout to properly clear */
clear:both;
}
.footer p
{text-align:center;
}
.clear { /* if required; can be removed later*/
clear:both;
}
-->

View File

@ -0,0 +1,44 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}

View File

@ -0,0 +1,13 @@
#slider-code { height: 320px; overflow:hidden; margin:0 auto; width:96%; border:1px double #e3e3e3;}
#slider-code .viewport { float: left; width: 100%; height: 235px; overflow: hidden; position: relative; }
#slider-code .buttons a { display: block; margin: 30px 10px 0 0; float: left; }
#slider-code .next{ margin: 30px 0 0 10px; }
#slider-code .disable { visibility: hidden; }
#slider-code .overview { list-style: none; padding: 0; margin: 0; position: absolute; left: 0; top: 0; }
#slider-code .overview li{ float: left; margin: 0 20px 0 0; height: 225px; width: 300px; border: /*1px solid #dcdcdc;*/ }
#slider-code .pager { overflow:hidden; list-style: none; clear: both; margin: 0 auto; width:90%; }
#slider-code .pager li { float: left; }
#slider-code .pagenum { background-color: #fff; text-decoration: none; text-align: center; padding: 5px; color: #555555; font-size: 14px; font-weight: bold; display: block; }
#slider-code .active { color: #fff; background-color: #555555; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

9047
trubox/static/js/jquery-1.6.4.js vendored Normal file

File diff suppressed because it is too large Load Diff

4
trubox/static/js/jquery-1.6.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,116 @@
/*!
* Tiny Carousel 1.9
* http://www.baijs.nl/tinycarousel
*
* Copyright 2010, Maarten Baijs
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/gpl-2.0.php
*
* Date: 01 / 06 / 2011
* Depends on library: jQuery
*/
(function($){
$.tiny = $.tiny || { };
$.tiny.carousel = {
options: {
start: 1, // where should the carousel start?
display: 1, // how many blocks do you want to move at 1 time?
axis: 'x', // vertical or horizontal scroller? ( x || y ).
controls: true, // show left and right navigation buttons.
pager: false, // is there a page number navigation present?
interval: false, // move to another block on intervals.
intervaltime: 3000, // interval time in milliseconds.
rewind: false, // If interval is true and rewind is true it will play in reverse if the last slide is reached.
animation: true, // false is instant, true is animate.
duration: 1000, // how fast must the animation move in ms?
callback: null // function that executes after every move.
}
};
$.fn.tinycarousel = function(options) {
var options = $.extend({}, $.tiny.carousel.options, options);
this.each(function(){ $(this).data('tcl', new Carousel($(this), options)); });
return this;
};
$.fn.tinycarousel_start = function(){ $(this).data('tcl').start(); };
$.fn.tinycarousel_stop = function(){ $(this).data('tcl').stop(); };
$.fn.tinycarousel_move = function(iNum){ $(this).data('tcl').move(iNum-1,true); };
function Carousel(root, options){
var oSelf = this;
var oViewport = $('.viewport:first', root);
var oContent = $('.overview:first', root);
var oPages = oContent.children();
var oBtnNext = $('.next:first', root);
var oBtnPrev = $('.prev:first', root);
var oPager = $('.pager:first', root);
var iPageSize, iSteps, iCurrent, oTimer, bPause, bForward = true, bAxis = options.axis == 'x';
function initialize(){
iPageSize = bAxis ? $(oPages[0]).outerWidth(true) : $(oPages[0]).outerHeight(true);
var iLeftover = Math.ceil(((bAxis ? oViewport.outerWidth() : oViewport.outerHeight()) / (iPageSize * options.display)) -1);
iSteps = Math.max(1, Math.ceil(oPages.length / options.display) - iLeftover);
iCurrent = Math.min(iSteps, Math.max(1, options.start)) -2;
oContent.css(bAxis ? 'width' : 'height', (iPageSize * oPages.length));
oSelf.move(1);
setEvents();
return oSelf;
};
function setEvents(){
if(options.controls && oBtnPrev.length > 0 && oBtnNext.length > 0){
oBtnPrev.click(function(){oSelf.move(-1); return false;});
oBtnNext.click(function(){oSelf.move( 1); return false;});
}
if(options.interval){ root.hover(oSelf.stop,oSelf.start); }
if(options.pager && oPager.length > 0){ $('a',oPager).click(setPager); }
};
function setButtons(){
if(options.controls){
oBtnPrev.toggleClass('disable', !(iCurrent > 0));
oBtnNext.toggleClass('disable', !(iCurrent +1 < iSteps));
}
if(options.pager){
var oNumbers = $('.pagenum', oPager);
oNumbers.removeClass('active');
$(oNumbers[iCurrent]).addClass('active');
}
};
function setPager(oEvent){
if($(this).hasClass('pagenum')){ oSelf.move(parseInt(this.rel), true); }
return false;
};
function setTimer(){
if(options.interval && !bPause){
clearTimeout(oTimer);
oTimer = setTimeout(function(){
iCurrent = iCurrent +1 == iSteps ? -1 : iCurrent;
bForward = iCurrent +1 == iSteps ? false : iCurrent == 0 ? true : bForward;
oSelf.move(bForward ? 1 : -1);
}, options.intervaltime);
}
};
this.stop = function(){ clearTimeout(oTimer); bPause = true; };
this.start = function(){ bPause = false; setTimer(); };
this.move = function(iDirection, bPublic){
iCurrent = bPublic ? iDirection : iCurrent += iDirection;
if(iCurrent > -1 && iCurrent < iSteps){
var oPosition = {};
oPosition[bAxis ? 'left' : 'top'] = -(iCurrent * (iPageSize * options.display));
oContent.animate(oPosition,{
queue: false,
duration: options.animation ? options.duration : 0,
complete: function(){
if(typeof options.callback == 'function')
options.callback.call(this, oPages[iCurrent], iCurrent);
}
});
setButtons();
setTimer();
}
};
return initialize();
};
})(jQuery);

View File

@ -0,0 +1 @@
(function($){$.tiny=$.tiny||{};$.tiny.carousel={options:{start:1,display:1,axis:'x',controls:true,pager:false,interval:false,intervaltime:3000,rewind:false,animation:true,duration:1000,callback:null}};$.fn.tinycarousel=function(options){var options=$.extend({},$.tiny.carousel.options,options);this.each(function(){$(this).data('tcl',new Carousel($(this),options));});return this;};$.fn.tinycarousel_start=function(){$(this).data('tcl').start();};$.fn.tinycarousel_stop=function(){$(this).data('tcl').stop();};$.fn.tinycarousel_move=function(iNum){$(this).data('tcl').move(iNum-1,true);};function Carousel(root,options){var oSelf=this;var oViewport=$('.viewport:first',root);var oContent=$('.overview:first',root);var oPages=oContent.children();var oBtnNext=$('.next:first',root);var oBtnPrev=$('.prev:first',root);var oPager=$('.pager:first',root);var iPageSize,iSteps,iCurrent,oTimer,bPause,bForward=true,bAxis=options.axis=='x';function initialize(){iPageSize=bAxis?$(oPages[0]).outerWidth(true):$(oPages[0]).outerHeight(true);var iLeftover=Math.ceil(((bAxis?oViewport.outerWidth():oViewport.outerHeight())/(iPageSize*options.display))-1);iSteps=Math.max(1,Math.ceil(oPages.length/options.display)-iLeftover);iCurrent=Math.min(iSteps,Math.max(1,options.start))-2;oContent.css(bAxis?'width':'height',(iPageSize*oPages.length));oSelf.move(1);setEvents();return oSelf;};function setEvents(){if(options.controls&&oBtnPrev.length>0&&oBtnNext.length>0){oBtnPrev.click(function(){oSelf.move(-1);return false;});oBtnNext.click(function(){oSelf.move(1);return false;});}if(options.interval){root.hover(oSelf.stop,oSelf.start);}if(options.pager&&oPager.length>0){$('a',oPager).click(setPager);}};function setButtons(){if(options.controls){oBtnPrev.toggleClass('disable',!(iCurrent>0));oBtnNext.toggleClass('disable',!(iCurrent+1<iSteps));}if(options.pager){var oNumbers=$('.pagenum',oPager);oNumbers.removeClass('active');$(oNumbers[iCurrent]).addClass('active');}};function setPager(oEvent){if($(this).hasClass('pagenum')){oSelf.move(parseInt(this.rel),true);}return false;};function setTimer(){if(options.interval&&!bPause){clearTimeout(oTimer);oTimer=setTimeout(function(){iCurrent=iCurrent+1==iSteps?-1:iCurrent;bForward=iCurrent+1==iSteps?false:iCurrent==0?true:bForward;oSelf.move(bForward?1:-1);},options.intervaltime);}};this.stop=function(){clearTimeout(oTimer);bPause=true;};this.start=function(){bPause=false;setTimer();};this.move=function(iDirection,bPublic){iCurrent=bPublic?iDirection:iCurrent+=iDirection;if(iCurrent>-1&&iCurrent<iSteps){var oPosition={};oPosition[bAxis?'left':'top']=-(iCurrent*(iPageSize*options.display));oContent.animate(oPosition,{queue:false,duration:options.animation?options.duration:0,complete:function(){if(typeof options.callback=='function')options.callback.call(this,oPages[iCurrent],iCurrent);}});setButtons();setTimer();}};return initialize();};})(jQuery);

View File

@ -0,0 +1,64 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{% block title %} {% endblock %}</title>
<link rel="stylesheet" href="/static/css/reset.css" type="text/css" />
<link rel="stylesheet" href="/static/css/main.css" type="text/css" />
<script type="text/javascript" src="/static/js/jquery-1.6.4.min.js"></script>
{% block extra_head %}
{% endblock %}
</head>
<body>
<div class="container">
<div class="header">
<a href="#">
<img src="/static/images/truboxx-logo.png" alt="trubox-logo" width="280" height="78" id="logo"></a>
<form action="" method="get">
<input type="text" placeholder="search for a gadget" name="field" id="search"/>
</form>
<form action="" method="post" id="formLogin">
<input type="password" name="password">
<input type="button" value="login">
<input type="button" value="New User?">
<!--<a href="" id="forgotPassword">Forgot Password?</a>-->
</form>
<ul class="nav">
<li><a href="#">Link one</a></li>
<li><a href="#">Link two</a></li>
<li><a href="#">Link three</a></li>
<li><a href="#">Link four</a></li>
<li><a href="#">Link five</a></li>
<li><a href="#">Link six</a></li>
<li><a href="#">Link seven</a></li>
<li><a href="#">Link eight</a></li>
<li><a href="#">Link nine</a></li>
<li><a href="#">Link ten</a></li>
</ul>
</div><!-- HEADER CLOSING -->
{% block content %}
{% endblock %}
<div class="footer">
<p>Copyright 2011</p>
</div><!-- FOOTER CLOSING-->
</div><!-- CONTAINER CLOSING-->
</body>
</html>

View File

@ -0,0 +1,89 @@
{% extends 'base.html' %}
{% block title %}PLEASE ADD TITLES HERE{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/slider.css" type="text/css" />
<script type="text/javascript" src="/static/js/jquery.tinycarousel.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#slider-code').tinycarousel({ pager: true });
});
</script>
{% endblock %}
{% block content %}
<div id="slider-code">
<a href="#" class="buttons prev"><img src="images/previous.png" width="50" height="50" alt="previous-button" class="nextButton"></a>
<div class="viewport">
<ul class="overview">
<li><img src="/static/images/sliderdummy1a.jpg"></li>
<li><img src="/static/images/sliderdummy2a.jpg"></li>
<li><img src="/static/images/sliderdummy3a.jpg"></li>
<li><img src="/static/images/sliderdummy4a.jpg"></li>
<li><img src="/static/images/sliderdummy5a.jpg"></li>
</ul>
</div><!-- VIEPORT CLOSING -->
<a href="#" class="buttons next"><img src="/static/images/next.png" width="50" height="50" alt="next-button"></a>
<ul class="pager">
<li><a rel="0" class="pagenum" href="#">1</a></li>
<li><a rel="1" class="pagenum" href="#">2</a></li>
<li><a rel="2" class="pagenum" href="#">3</a></li>
<li><a rel="3" class="pagenum" href="#">4</a></li>
<li><a rel="4" class="pagenum" href="#">5</a></li>
<li><a rel="5" class="pagenum" href="#">6</a></li>
</ul>
</div><!-- SLIDER-CODE CLOSING -->
<div id="contentContainer">
<div class="sidebar1">
<div class="box1">
</div>
<div class="box1">
</div>
<div class="box1">
</div>
</div><!-- SIDEBAR 1 CLOSING-->
<div class="content">
<div class="boxMiddle">
</div>
<!--<h1>Instructions</h1>
<p>Be aware that the CSS for these layouts is heavily commented. If you do most of your work in Design view, have a peek at the code to get tips on working with the CSS for the liquid layouts. You can remove these comments before you launch your site. To learn more about the techniques used in these CSS Layouts, read this article at Adobe's Developer Center - <a href="http://www.adobe.com/go/adc_css_layouts">http://www.adobe.com/go/adc_css_layouts</a>.</p>
<h2>Clearing Method</h2>
<p>Because all the columns are floated, this layout uses a clear:both declaration in the .footer rule. This clearing technique forces the .container to understand where the columns end in order to show any borders or background colors you place on the .container. If your design requires you to remove the .footer from the .container, you'll need to use a different clearing method. The most reliable will be to add a &lt;br class=&quot;clearfloat&quot; /&gt; or &lt;div class=&quot;clearfloat&quot;&gt;&lt;/div&gt; after your final floated column (but before the .container closes). This will have the same clearing effect.</p>
<h3>Logo Replacement</h3>
<p>An image placeholder was used in this layout in the .header where you'll likely want to place a logo. It is recommended that you remove the placeholder and replace it with your own linked logo. </p>
<p> Be aware that if you use the Property inspector to navigate to your logo image using the SRC field (instead of removing and replacing the placeholder), you should remove the inline background and display properties. These inline styles are only used to make the logo placeholder show up in browsers for demonstration purposes. </p>
<p>To remove the inline styles, make sure your CSS Styles panel is set to Current. Select the image, and in the Properties pane of the CSS Styles panel, right click and delete the display and background properties. (Of course, you can always go directly into the code and delete the inline styles from the image or placeholder there.)</p>
<h4>Internet Explorer Conditional Comments</h4>
<p>These liquid layouts contain an Internet Explorer Conditional Comment (IECC) to correct two issues. </p>
<ol>
<li>Browsers are inconsistent in the way they round div sizes in percent-based layouts. If the browser must render a number like 144.5px or 564.5px, they have to round it to the nearest whole number. Safari and Opera round down, Internet Explorer rounds up and Firefox rounds one column up and one down filling the container completely. These rounding issues can cause inconsistencies in some layouts. In this IECC there is a 1px negative margin to fix IE. You may move it to any of the columns (and on either the left or right) to suit your layout needs.</li>
<li>The zoom property was added to the anchor within the navigation list since, in some cases, extra white space will be rendered in IE6 and IE7. Zoom gives IE its proprietary hasLayout property to fix this issue.</li>
</ol>-->
</div><!-- CONTENT CLOSING -->
<div class="sidebar2">
<div class="box1">
</div>
<div class="box1">
</div>
<div class="box1">
</div>
<!--<p>By nature, the background color on any div will only show for the length of the content. If you'd like a dividing line instead of a color, place a border on the side of the .content div (but only if it will always contain more content).--></p>
</div><!-- SIDEBAR 2 CLOSING -->
</div><!-- CONTENT CONTAINER CLOSING -->
{% endblock %}

View File

@ -4,6 +4,10 @@ from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
import settings
import os
from os.path import join
urlpatterns = patterns('',
# Example:
# (r'^trubox/', include('trubox.foo.urls')),
@ -14,3 +18,11 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
if settings.LOCAL_DEVELOPMENT:
#
urlpatterns += patterns('',
#
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': join(settings.PROJECT_PATH, "static")}),
#
)