From bb8ef5494e8636f7b25539d09b2c3157fae09362 Mon Sep 17 00:00:00 2001 From: Robert Brook Date: Fri, 25 Apr 2008 08:05:47 +0100 Subject: [PATCH] more layout and style tweaks --- app/controllers/questions_controller.rb | 3 ++- app/views/layouts/application.haml | 1 + app/views/questions/index.haml | 13 ++++++++++++- config/initializers/mime_types.rb | 2 +- public/stylesheets/screen.css | 13 +++++++++++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/app/controllers/questions_controller.rb b/app/controllers/questions_controller.rb index 6e04263f..ed21cd9b 100644 --- a/app/controllers/questions_controller.rb +++ b/app/controllers/questions_controller.rb @@ -4,7 +4,8 @@ def index @title = "Questions" @questions = Question.find(:all) respond_to do |format| -format.html # index.rhtml +format.html +format.js { render :js => @questions.to_json } format.xml { render :xml => @questions.to_xml } format.yaml { render :yaml => @questions.to_yaml } end diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml index 58ee61af..b4dd560f 100644 --- a/app/views/layouts/application.haml +++ b/app/views/layouts/application.haml @@ -13,3 +13,4 @@ %div.yui-g = yield #ft + Lords Q+A Prototype diff --git a/app/views/questions/index.haml b/app/views/questions/index.haml index 48a3b2ae..9af769ee 100644 --- a/app/views/questions/index.haml +++ b/app/views/questions/index.haml @@ -1,2 +1,13 @@ + + +#questions - for question in @questions - = question.text \ No newline at end of file + .question + %span.member + = question.member + %span.text + = question.text + %span.uin + = question.uin + %span.uin + = question.answer.to_yaml \ No newline at end of file diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index 72aca7e4..da902f4a 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -2,4 +2,4 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone +# Mime::Type.register_alias "text/html", :iphone \ No newline at end of file diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css index 938a1ebe..76c51b9d 100644 --- a/public/stylesheets/screen.css +++ b/public/stylesheets/screen.css @@ -1,2 +1,11 @@ -#custom-doc { width: 66%; min-width: 740px; font-size: 1.3em; margin-left: 5em} -.asking_member, .answering { font-weight: bold } \ No newline at end of file +#custom-doc { width: 66%; min-width: 740px; font-size:153.9%;} +.asking_member, .answering { font-weight: bold } + +#hd, #ft {margin: 1em 0;padding: 1em 0;} +#hd {border-bottom: 1pt solid gray;} +h1 {font-weight:bold;color:gray;} +.question {margin: 1em 0;} + +.member {font-weight:bold;} +.text {} +.uin {font-size:85%;color:gray;} \ No newline at end of file