From 74ea395747225ba2631c53ad7b29ddf2e91b5873 Mon Sep 17 00:00:00 2001 From: holyantony Date: Tue, 21 Jul 2015 21:46:19 +0530 Subject: Subject:Google Custom Search Description: 1. Added key for custom search 2. Added script from google to index.html --- forums/settings.py | 12 +++++++ forums/urls.py | 1 + static/website/css/bootstrap.min.css | 3 +- static/website/css/main.css | 4 +-- static/website/slick/slick.css | 2 +- static/website/templates/base.html | 14 ++++----- static/website/templates/filter.html | 2 +- static/website/templates/index.html | 47 ++++++++++++++++++++++++++++ static/website/templates/new-question.html | 2 +- static/website/templates/search.html | 29 +++++++++++++++++ static/website/templates/user-answers.html | 2 +- static/website/templates/user-questions.html | 2 +- 12 files changed, 105 insertions(+), 15 deletions(-) diff --git a/forums/settings.py b/forums/settings.py index 6fc18f0..72a6891 100644 --- a/forums/settings.py +++ b/forums/settings.py @@ -1,6 +1,7 @@ #Custom settings from os.path import * from config import * +import os from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS PROJECT_DIR = abspath(dirname(__file__) + '/../') @@ -144,6 +145,7 @@ INSTALLED_APPS = ( 'captcha', 'south' + #'migrate_spoken', ) @@ -182,6 +184,16 @@ TEMPLATE_CONTEXT_PROCESSORS += ( ) + +WHOOSH_INDEX = os.path.join(PROJECT_DIR,'whoosh/') + +HAYSTACK_CONNECTIONS = { + 'default':{ + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH' : WHOOSH_INDEX, + }, +} + COMPRESS_ROOT = PROJECT_DIR + "/static/" COMPRESS_ENABLED = True # disable in production Env HTML_MINIFY = True # disable in production Env diff --git a/forums/urls.py b/forums/urls.py index 13ea5be..0924a64 100644 --- a/forums/urls.py +++ b/forums/urls.py @@ -24,5 +24,6 @@ urlpatterns = patterns('', url(r"^accounts/profile/(?P[\w. @-]+)/$", 'forums.views.account_profile', name='profile'), url(r"^accounts/view-profile/(?P[\w. @-]+)/$", 'forums.views.account_view_profile', name='view_profile'), + ) diff --git a/static/website/css/bootstrap.min.css b/static/website/css/bootstrap.min.css index 6eabea4..f96d9b5 100644 --- a/static/website/css/bootstrap.min.css +++ b/static/website/css/bootstrap.min.css @@ -708,7 +708,8 @@ pre code{ .container{ padding-right:15px; - padding-left:15px; + padding-left:15px; + padding-top: 15px margin-right:auto; margin-left:auto } diff --git a/static/website/css/main.css b/static/website/css/main.css index 43d3ec9..4debbbd 100644 --- a/static/website/css/main.css +++ b/static/website/css/main.css @@ -62,7 +62,7 @@ body { position: relative; max-width: 970px; margin:0 auto; - padding: 25px 0 15px 0; + padding: 1px 0 15px 0; background: #ffffff; } #content-inner { @@ -97,7 +97,7 @@ body { /* } */ #content .question { position: relative; - padding: 15px 0 15px 0; + padding: 30px 0 15px 0; border-bottom: 1px solid #f5f5f5; } #content .editable { diff --git a/static/website/slick/slick.css b/static/website/slick/slick.css index dc385ba..04569a7 100644 --- a/static/website/slick/slick.css +++ b/static/website/slick/slick.css @@ -37,7 +37,7 @@ .slick-next:before { content: "\2192"; } /* Dots */ -.slick-slider { margin-bottom: 30px; } +.slick-slider { margin-bottom: 20px; } .slick-dots { position: absolute; bottom: -45px; list-style: none; display: block; text-align: center; padding: 0px; width: 100%; } .slick-dots li { position: relative; display: inline-block; height: 20px; width: 20px; margin: 0px 5px; padding: 0px; cursor: pointer; } diff --git a/static/website/templates/base.html b/static/website/templates/base.html index b5d087b..d122679 100644 --- a/static/website/templates/base.html +++ b/static/website/templates/base.html @@ -47,17 +47,14 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= FOSSEE Forums + + + + + -
+
{% block content %} diff --git a/static/website/templates/filter.html b/static/website/templates/filter.html index c64f68c..a3ff7f7 100644 --- a/static/website/templates/filter.html +++ b/static/website/templates/filter.html @@ -3,7 +3,7 @@ {% block content %} {% if questions %} -
+
These are the similar questions in: diff --git a/static/website/templates/index.html b/static/website/templates/index.html index f7c3f37..53e8f95 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -5,8 +5,53 @@ {% load helpers %} {% block content %} + +
+ + +
+ + + + +