From 1541ab6a4ff28a6a0a4e37873367314e3b898dac Mon Sep 17 00:00:00 2001
From: Jayaram Pai
Date: Sun, 22 Dec 2013 22:50:27 +0530
Subject: making forum in table format
---
static/website/css/main.css | 20 +++-
static/website/templates/ajax-keyword-search.html | 112 ++++++++++--------
static/website/templates/ajax-time-search.html | 112 ++++++++++--------
static/website/templates/filter.html | 137 ++++++++++++++++------
static/website/templates/get-question.html | 32 +++--
static/website/templates/index.html | 105 ++++++++++-------
website/views.py | 7 +-
7 files changed, 341 insertions(+), 184 deletions(-)
diff --git a/static/website/css/main.css b/static/website/css/main.css
index 4280d57..2d629ac 100644
--- a/static/website/css/main.css
+++ b/static/website/css/main.css
@@ -1,3 +1,4 @@
+@import url(http://fonts.googleapis.com/css?family=Varela+Round);
/* override bootstrap */
.container>.navbar-header {
height: 45px;
@@ -12,6 +13,7 @@
body {
background: #fafafa;
box-shadow: 4px 0 10px #cccccc, -4px 0 10px #cccccc;
+ font-family: 'Varela Round', sans-serif;
}
#page-wrapper {
max-width: 970px;
@@ -56,7 +58,7 @@ body {
}
#content .question .title a{
padding: 0 0 7px 0;
- font-size: 1.3em;
+ font-size: 1.1em;
color: #424242;
}
#content .question .body {
@@ -68,7 +70,7 @@ body {
#content .question .minute_range a,
#content .question .second_range a {
padding: 3px 5px;
- margin: 0 10px 0 0;
+ margin: 0 5px 0 0;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-o-border-radius: 3px;
@@ -81,6 +83,8 @@ body {
#content .question .tutorial a {
background: #424242;
color: #ffffff;
+ width: 100px;
+ overflow: hidden;
}
#content .question .minute_range a {
background: #f5f5f5;
@@ -99,6 +103,18 @@ body {
background: #f5f5f5;
padding: 2px 7px;
}
+table .category {
+ color:#7395d9;
+ font-weight:bold;
+}
+table .tutorial {
+ color:#a26dc8;
+ font-weight:bold;
+}
+table .title a {
+ font-size: 1.1em;
+ color: #424242;
+}
#similar-link {
display: none;
}
diff --git a/static/website/templates/ajax-keyword-search.html b/static/website/templates/ajax-keyword-search.html
index 7d38a42..234332a 100644
--- a/static/website/templates/ajax-keyword-search.html
+++ b/static/website/templates/ajax-keyword-search.html
@@ -1,55 +1,75 @@
{% if questions %}
+
+
+ FOSS |
+ TUTORIAL |
+ MIN |
+ SEC |
+ QUESTION |
+ DATE |
+ USER |
{% for question in questions %}
-
{% else %}
-No results found . . .
+ No results found . . .
{% endif %}
+
+{% block javascript %}
+
+{% endblock %}
diff --git a/static/website/templates/ajax-time-search.html b/static/website/templates/ajax-time-search.html
index 7d38a42..234332a 100644
--- a/static/website/templates/ajax-time-search.html
+++ b/static/website/templates/ajax-time-search.html
@@ -1,55 +1,75 @@
{% if questions %}
+
+
+ FOSS |
+ TUTORIAL |
+ MIN |
+ SEC |
+ QUESTION |
+ DATE |
+ USER |
{% for question in questions %}
-
{% else %}
-No results found . . .
+ No results found . . .
{% endif %}
+
+{% block javascript %}
+
+{% endblock %}
diff --git a/static/website/templates/filter.html b/static/website/templates/filter.html
index 5d6fbb3..86a826c 100644
--- a/static/website/templates/filter.html
+++ b/static/website/templates/filter.html
@@ -1,12 +1,10 @@
{% extends 'website/templates/base.html' %}
{% block content %}
-
{% if question %}
-
+
-
@@ -38,49 +36,118 @@
+
+
+
+
+ {{ question.date_created|date:"y-d-m" }}, {{ question.date_created|time }}
+
+
+
+
+ {{ question.user }}
+
+
+
{% endif %}
-
You might also want to take a look at:
{% if questions %}
- {% for question in questions %}
-
-
+
+ These are the similar questions in:
+ {% if category %}
+ {{ category }}
+ {% endif %}
+ {% if tutorial %}
+ >
+ {{ tutorial }}
+ {% endif %}
+ {% if minute_range %}
+ >
+ {{ minute_range }} min
+ {% endif %}
+ {% if second_range %}
+ >
+ {{ second_range }} sec
+ {% endif %}
+
-
-
-
- {{ question.category }}
-
-
-
+
+{% else %}
+
There are no similar questions.
{% endif %}
{% endblock %}
+
+{% block javascript %}
+
+{% endblock %}
diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html
index cc4aca1..15c0197 100644
--- a/static/website/templates/get-question.html
+++ b/static/website/templates/get-question.html
@@ -55,7 +55,7 @@
- {{ question.date_created }}
+ {{ question.date_created|date:"y-d-m" }}, {{ question.date_created|time }}
@@ -91,20 +91,26 @@
{% endfor %}
-