From 57eedfbebc481aab4040ecda57d23eabf828733f Mon Sep 17 00:00:00 2001 From: Jayaram Pai Date: Wed, 4 Dec 2013 00:00:26 +0530 Subject: basic filter and ajax-loader --- static/website/css/main.css | 57 ++++++++++---------- static/website/js/custom.js | 8 +++ static/website/templates/base.html | 3 +- static/website/templates/filter.html | 86 ++++++++++++++++++++++++++++++ static/website/templates/get-question.html | 74 +++++++++++++++++++++++++ static/website/templates/index.html | 30 ++++++++--- static/website/templates/new-question.html | 6 ++- 7 files changed, 225 insertions(+), 39 deletions(-) create mode 100644 static/website/templates/filter.html create mode 100644 static/website/templates/get-question.html (limited to 'static/website') diff --git a/static/website/css/main.css b/static/website/css/main.css index 315845d..cd42d84 100644 --- a/static/website/css/main.css +++ b/static/website/css/main.css @@ -16,55 +16,52 @@ padding: 15px 0 15px 0; border-bottom: 1px solid #f5f5f5; } -#content .question .title { +#content .question .title a{ padding: 0 0 7px 0; font-size: 1.3em; color: #424242; } -#content .question .title a { - color: #424242; -} -#content .question .category { - padding: 2px 5px; +#content .question .category a, +#content .question .tutorial a, +#content .question .minute_range a, +#content .question .second_range a { + padding: 3px 5px; margin: 0 10px 0 0; - background: #a26dc8; - color: #ffffff; -webkit-border-radius: 3px; -moz-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } -#content .question .tutorial { - padding: 2px 5px; - margin: 0 10px 0 0; +#content .question .category a { + background: #a26dc8; + color: #ffffff; +} +#content .question .tutorial a { background: #424242; color: #ffffff; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; } -#content .question .minute_range { - padding: 2px 5px; - margin: 0 10px 0 0; +#content .question .minute_range a { background: #f5f5f5; color: #424242; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; } -#content .question .second_range { - padding: 2px 5px; - margin: 0 10px 0 0; +#content .question .second_range a { background: #f5f5f5; color: #424242; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - -o-border-radius: 3px; - border-radius: 3px; } - +#content .reply { + position: relative; + border-bottom: 1px solid #f5f5f5; + padding: 25px 0; +} +#content .reply .body { +} +#content .reply .user { + position: absolute; + right: 0px; + bottom: 0px; + padding: 2px 7px; + background: #f5f5f5; +} #footer-wrapper { background-color: #2d2d2d; min-height: 60px; diff --git a/static/website/js/custom.js b/static/website/js/custom.js index 20801f6..ef0752e 100644 --- a/static/website/js/custom.js +++ b/static/website/js/custom.js @@ -41,4 +41,12 @@ $(document).ready(function() { } }); }); + + $(document).ajaxStart(function() { + $("#ajax-loader").show(); + }); + + $(document).ajaxStop(function() { + $("#ajax-loader").hide(); + }); }); diff --git a/static/website/templates/base.html b/static/website/templates/base.html index f89417f..8d95162 100644 --- a/static/website/templates/base.html +++ b/static/website/templates/base.html @@ -24,7 +24,8 @@ {% endfor %} {% endblock %} diff --git a/static/website/templates/new-question.html b/static/website/templates/new-question.html index 5005e13..81da5cf 100644 --- a/static/website/templates/new-question.html +++ b/static/website/templates/new-question.html @@ -1,4 +1,5 @@ {% extends 'website/templates/base.html' %} +{% load static %} {% load widget_tweaks %} {% block content %}

@@ -9,7 +10,10 @@
{% csrf_token %} {% with WIDGET_ERROR_CLASS='field_error' %} -

Please enter the tutorial details.

+

+ Please enter the tutorial details. + +

{% render_field form.category class+="form-control"%} -- cgit