diff options
47 files changed, 1135 insertions, 853 deletions
diff --git a/askbot/models/meta.py b/askbot/models/meta.py index 9022a7ec..cbec7d33 100644 --- a/askbot/models/meta.py +++ b/askbot/models/meta.py @@ -49,6 +49,10 @@ class Vote(base.MetaContent, base.UserContent): def __unicode__(self): return '[%s] voted at %s: %s' %(self.user, self.voted_at, self.vote) + def __int__(self): + """1 if upvote -1 if downvote""" + return self.vote + def is_upvote(self): return self.vote == self.VOTE_UP diff --git a/askbot/skins/common/media/jquery-openid/openid.css b/askbot/skins/common/media/jquery-openid/openid.css index da541e45..e44e5478 100644 --- a/askbot/skins/common/media/jquery-openid/openid.css +++ b/askbot/skins/common/media/jquery-openid/openid.css @@ -1,4 +1,4 @@ -div#login-icons {margin:10px 0 0 0;padding:0} +div#login-icons {margin:10px 0 0 0;padding:10px;border:#eee 1px solid;} ul.login-icons {width: 450px; margin:0;padding:0;text-align:left; list-style-type:none; display:block;} ul.login-icons li {display:inline;} ul.large input {height: 40px; width: 90px;border:1px solid #ccc;margin:0 5px 5px 0;} diff --git a/askbot/skins/common/media/js/post.js b/askbot/skins/common/media/js/post.js index 5cf9cb4f..31d42803 100644 --- a/askbot/skins/common/media/js/post.js +++ b/askbot/skins/common/media/js/post.js @@ -321,27 +321,27 @@ var Vote = function(){ return $(favoriteNumber); }; var getQuestionVoteUpButton = function(){ - var questionVoteUpButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixQuestionVoteup +']'; + var questionVoteUpButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixQuestionVoteup +']'; return $(questionVoteUpButton); }; var getQuestionVoteDownButton = function(){ - var questionVoteDownButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixQuestionVotedown +']'; + var questionVoteDownButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixQuestionVotedown +']'; return $(questionVoteDownButton); }; var getAnswerVoteUpButtons = function(){ - var answerVoteUpButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAnswerVoteup +']'; + var answerVoteUpButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixAnswerVoteup +']'; return $(answerVoteUpButton); }; var getAnswerVoteDownButtons = function(){ - var answerVoteDownButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAnswerVotedown +']'; + var answerVoteDownButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixAnswerVotedown +']'; return $(answerVoteDownButton); }; var getAnswerVoteUpButton = function(id){ - var answerVoteUpButton = 'div.'+ voteContainerId +' img[id='+ imgIdPrefixAnswerVoteup + id + ']'; + var answerVoteUpButton = 'div.'+ voteContainerId +' div[id='+ imgIdPrefixAnswerVoteup + id + ']'; return $(answerVoteUpButton); }; var getAnswerVoteDownButton = function(id){ - var answerVoteDownButton = 'div.'+ voteContainerId +' img[id='+ imgIdPrefixAnswerVotedown + id + ']'; + var answerVoteDownButton = 'div.'+ voteContainerId +' div[id='+ imgIdPrefixAnswerVotedown + id + ']'; return $(answerVoteDownButton); }; @@ -373,22 +373,13 @@ var Vote = function(){ return $(removeAnswerLinks); }; - var setVoteImage = function(voteType, undo, object){ - var flag = undo ? "" : "-on"; - var arrow = (voteType == VoteType.questionUpVote || voteType == VoteType.answerUpVote) ? "up" : "down"; - object.attr("src", mediaUrl("media/images/vote-arrow-"+ arrow + flag +".png")); - - // if undo voting, then undo the pair of arrows. - if(undo){ - if(voteType == VoteType.questionUpVote || voteType == VoteType.questionDownVote){ - $(getQuestionVoteUpButton()).attr("src", mediaUrl("media/images/vote-arrow-up.png")); - $(getQuestionVoteDownButton()).attr("src", mediaUrl("media/images/vote-arrow-down.png")); - } - else{ - $(getAnswerVoteUpButton(postId)).attr("src", mediaUrl("media/images/vote-arrow-up.png")); - $(getAnswerVoteDownButton(postId)).attr("src", mediaUrl("media/images/vote-arrow-down.png")); - } + var setVoteImage = function(voteType, undo, elem){ + elem.siblings('.post-vote').removeClass('on'); + if (undo){ + elem.removeClass('on'); + return; } + elem.addClass('on'); }; var setVoteNumber = function(object, number){ @@ -564,6 +555,7 @@ var Vote = function(){ } else { if (data.status == '1'){ + //cancel vote setVoteImage(voteType, true, object); } else { diff --git a/askbot/skins/common/templates/authopenid/logout.html b/askbot/skins/common/templates/authopenid/logout.html index a07b78d1..1ac6705c 100644 --- a/askbot/skins/common/templates/authopenid/logout.html +++ b/askbot/skins/common/templates/authopenid/logout.html @@ -2,7 +2,7 @@ <!-- template logout.html --> {% block title %}{% spaceless %}{% trans %}Logout{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}You have successfully logged out{% endtrans %}</h1> +<h1 class="section-title">{% trans %}You have successfully logged out{% endtrans %}</h1> {% if have_federated_login_methods %} <p>{% trans %}However, you still may be logged in to your OpenID provider. Please logout of your provider if you wish to do so.{% endtrans %}</p> {% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %} diff --git a/askbot/skins/common/templates/authopenid/signin.html b/askbot/skins/common/templates/authopenid/signin.html index f10d0cd0..4c894aa3 100644 --- a/askbot/skins/common/templates/authopenid/signin.html +++ b/askbot/skins/common/templates/authopenid/signin.html @@ -7,7 +7,7 @@ {% endblock %}
{% block content %}
{% if have_buttons or view_subtype == 'email_sent' %}
- <h1>{{page_title}}</h1>
+ <h1 class="section-title">{{page_title}}</h1>
{% endif %}
{% if answer %}
<div class="message">
@@ -212,7 +212,7 @@ {% block sidebar %}
{% if have_buttons %}
- <div class="boxC">
+ <div class="box">
<h2>{% trans %}Why use OpenID?{% endtrans %}</h2>
<ul>
<li>
diff --git a/askbot/skins/common/templates/question/answer_controls.html b/askbot/skins/common/templates/question/answer_controls.html index 4309e10c..4d26ffb9 100644 --- a/askbot/skins/common/templates/question/answer_controls.html +++ b/askbot/skins/common/templates/question/answer_controls.html @@ -1,18 +1,18 @@ {% set pipe=joiner('<span class="sep">|</span>') %} <span class="linksopt">{{ pipe() }} - <a + <a class="permant-link" href="{{ answer.get_absolute_url() }}" title="{% trans %}answer permanent link{% endtrans %}"> {% trans %}permanent link{% endtrans %} </a> </span> {% if request.user|can_edit_post(answer) %}{{ pipe() }} -<span class="action-link"><a href="{% url edit_answer answer.id %}">{% trans %}edit{% endtrans %}</a></span> +<span class="action-link"><a class="question-edit" href="{% url edit_answer answer.id %}">{% trans %}edit{% endtrans %}</a></span> {% endif %} {% if request.user|can_flag_offensive(answer) %}{{ pipe() }} <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag" title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> + <a class="question-flag">{% trans %}flag offensive{% endtrans %}</a> {% if request.user|can_see_offensive_flags(answer) %} <span class="darkred">{% if answer.offensive_flag_count > 0 %}({{ answer.offensive_flag_count }}){% endif %}</span> {% endif %} @@ -21,7 +21,7 @@ {% if request.user|can_delete_post(answer) %}{{ pipe() }} {% spaceless %} <span class="action-link"> - <a id="answer-delete-link-{{answer.id}}"> + <a class="question-delete" id="answer-delete-link-{{answer.id}}"> {% if answer.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> </span> {% endspaceless %} diff --git a/askbot/skins/common/templates/question/answer_vote_buttons.html b/askbot/skins/common/templates/question/answer_vote_buttons.html index 1cdd5188..2744e37d 100644 --- a/askbot/skins/common/templates/question/answer_vote_buttons.html +++ b/askbot/skins/common/templates/question/answer_vote_buttons.html @@ -1,22 +1,8 @@ -<img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" - {% if user_answer_votes[answer.id] == 1 %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i like this answer (click again to cancel){% endtrans %}"/> -<div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans %}current number of votes{% endtrans %}"> - {{ answer.score }} -</div> -<img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" - {% if user_answer_votes[answer.id] == -1 %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" /> +{{ macros.post_vote_buttons( + post = answer, + visitor_vote = user_answer_votes[answer.id] + ) +}} {% if request.user == question.author or request.user.is_authenticated() and (request.user.is_moderator() or request.user.is_superuser()) %} <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" {% if answer.accepted %} diff --git a/askbot/skins/common/templates/question/closed_question_info.html b/askbot/skins/common/templates/question/closed_question_info.html index db4b10ee..73ff4e47 100644 --- a/askbot/skins/common/templates/question/closed_question_info.html +++ b/askbot/skins/common/templates/question/closed_question_info.html @@ -1,5 +1,5 @@ <div class="question-status"> -<h3>{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason "{{ close_reason }}" by{% endtrans %} -<a href="{{ question.closed_by.get_profile_url() }}">{{ question.closed_by.username }}</a> +<h3>{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason <b>"{{ close_reason }}"</b> <i>by{% endtrans %} +<a href="{{ question.closed_by.get_profile_url() }}">{{ question.closed_by.username }}</a> </i><br> {% trans closed_at=question.closed_at %}close date {{closed_at}}{% endtrans %}</h3> </div> diff --git a/askbot/skins/common/templates/question/question_controls.html b/askbot/skins/common/templates/question/question_controls.html index 257ce870..9de54526 100644 --- a/askbot/skins/common/templates/question/question_controls.html +++ b/askbot/skins/common/templates/question/question_controls.html @@ -1,31 +1,31 @@ {% set pipe=joiner('<span class="sep">|</span>') %} {% if request.user|can_edit_post(question) %}{{ pipe() }} - <a href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a> + <a class="question-edit" href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a> {% endif %} {% if request.user|can_retag_question(question) %}{{ pipe() }} - <a id="retag" href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a> + <a id="retag" class="question-retag"href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a> <script type="text/javascript"> var retagUrl = "{% url retag_question question.id %}"; </script> {% endif %} {% if question.closed %} {% if request.user|can_reopen_question(question) %}{{ pipe() }} - <a href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a> + <a class="question-close" href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a> {% endif %} {% else %} {% if request.user|can_close_question(question) %}{{ pipe() }} - <a href="{% url close question.id %}">{% trans %}close{% endtrans %}</a> + <a class="question-close" href="{% url close question.id %}">{% trans %}close{% endtrans %}</a> {% endif %} {% endif %} {% if request.user|can_flag_offensive(question) %}{{ pipe() }} <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag" title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> + <a class="question-flag">{% trans %}flag offensive{% endtrans %}</a> {% if request.user|can_see_offensive_flags(question) %} <span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span> {% endif %} </span> {% endif %} {% if request.user|can_delete_post(question) %}{{ pipe() }} - <a id="question-delete-link-{{question.id}}">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> + <a id="question-delete-link-{{question.id}}" class="question-delete">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> {% endif %} diff --git a/askbot/skins/common/templates/question/question_vote_buttons.html b/askbot/skins/common/templates/question/question_vote_buttons.html index b3db504f..ce6b18ff 100644 --- a/askbot/skins/common/templates/question/question_vote_buttons.html +++ b/askbot/skins/common/templates/question/question_vote_buttons.html @@ -1,35 +1,4 @@ -{% if question_vote %} - <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - {% if question_vote.is_upvote() %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> -<div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} -</div> -<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - {% if question_vote.is_downvote() %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> -{% else %} -<img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - src="{{'/images/vote-arrow-up.png'|media}}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> -<div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} -</div> -<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - src="{{'/images/vote-arrow-down.png'|media}}" - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> -{% endif %} +{{ macros.post_vote_buttons( + post = question, + visitor_vote = user_question_vote) +}} diff --git a/askbot/skins/default/media/images/background-user-info.png b/askbot/skins/default/media/images/background-user-info.png Binary files differnew file mode 100644 index 00000000..b681cb37 --- /dev/null +++ b/askbot/skins/default/media/images/background-user-info.png diff --git a/askbot/skins/default/media/images/close.png b/askbot/skins/default/media/images/close.png Binary files differnew file mode 100644 index 00000000..cfe209ff --- /dev/null +++ b/askbot/skins/default/media/images/close.png diff --git a/askbot/skins/default/media/images/comment-background.png b/askbot/skins/default/media/images/comment-background.png Binary files differnew file mode 100644 index 00000000..4299b847 --- /dev/null +++ b/askbot/skins/default/media/images/comment-background.png diff --git a/askbot/skins/default/media/images/comment.png b/askbot/skins/default/media/images/comment.png Binary files differnew file mode 100644 index 00000000..9dcc4c66 --- /dev/null +++ b/askbot/skins/default/media/images/comment.png diff --git a/askbot/skins/default/media/images/delete.png b/askbot/skins/default/media/images/delete.png Binary files differnew file mode 100644 index 00000000..9263eae3 --- /dev/null +++ b/askbot/skins/default/media/images/delete.png diff --git a/askbot/skins/default/media/images/edit2.png b/askbot/skins/default/media/images/edit2.png Binary files differnew file mode 100644 index 00000000..f142a68c --- /dev/null +++ b/askbot/skins/default/media/images/edit2.png diff --git a/askbot/skins/default/media/images/flag.png b/askbot/skins/default/media/images/flag.png Binary files differnew file mode 100644 index 00000000..fc302335 --- /dev/null +++ b/askbot/skins/default/media/images/flag.png diff --git a/askbot/skins/default/media/images/link.png b/askbot/skins/default/media/images/link.png Binary files differnew file mode 100644 index 00000000..6ad60f5e --- /dev/null +++ b/askbot/skins/default/media/images/link.png diff --git a/askbot/skins/default/media/images/notification.png b/askbot/skins/default/media/images/notification.png Binary files differnew file mode 100644 index 00000000..c33ba699 --- /dev/null +++ b/askbot/skins/default/media/images/notification.png diff --git a/askbot/skins/default/media/images/retag.png b/askbot/skins/default/media/images/retag.png Binary files differnew file mode 100644 index 00000000..836c043c --- /dev/null +++ b/askbot/skins/default/media/images/retag.png diff --git a/askbot/skins/default/media/images/small-button-cancel.png b/askbot/skins/default/media/images/small-button-cancel.png Binary files differnew file mode 100644 index 00000000..79a87497 --- /dev/null +++ b/askbot/skins/default/media/images/small-button-cancel.png diff --git a/askbot/skins/default/media/images/socialsprite.png b/askbot/skins/default/media/images/socialsprite.png Binary files differnew file mode 100644 index 00000000..8d01ed77 --- /dev/null +++ b/askbot/skins/default/media/images/socialsprite.png diff --git a/askbot/skins/default/media/images/summary-background.png b/askbot/skins/default/media/images/summary-background.png Binary files differindex 58c3855a..28a6a398 100644 --- a/askbot/skins/default/media/images/summary-background.png +++ b/askbot/skins/default/media/images/summary-background.png diff --git a/askbot/skins/default/media/images/vote-arrow-down-new.png b/askbot/skins/default/media/images/vote-arrow-down-new.png Binary files differnew file mode 100644 index 00000000..f2a28aea --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-down-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-down-on-new.png b/askbot/skins/default/media/images/vote-arrow-down-on-new.png Binary files differnew file mode 100644 index 00000000..2127bf7d --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-down-on-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-up-new.png b/askbot/skins/default/media/images/vote-arrow-up-new.png Binary files differnew file mode 100644 index 00000000..cb9ea8b6 --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-up-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-up-on-new.png b/askbot/skins/default/media/images/vote-arrow-up-on-new.png Binary files differnew file mode 100644 index 00000000..ef895206 --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-up-on-new.png diff --git a/askbot/skins/default/media/style/jquery.autocomplete.css b/askbot/skins/default/media/style/jquery.autocomplete.css index b3d7b759..09b08192 100644 --- a/askbot/skins/default/media/style/jquery.autocomplete.css +++ b/askbot/skins/default/media/style/jquery.autocomplete.css @@ -4,8 +4,11 @@ .acResults { padding: 0px; border: 1px solid WindowFrame; - background-color: Window; + background-color: #fff; overflow: hidden; + -webkit-box-shadow: 0px 1px 1px #A7A7A7; + -moz-box-shadow: 0px 1px 1px #BFBFBF; + box-shadow: 0px 1px 1px #BFBFBF; } .acResults ul { @@ -23,7 +26,7 @@ display: block; width: 100%; font: menu; - font-size: 12px; + font-size: 14px; overflow: hidden; } diff --git a/askbot/skins/default/media/style/lib_style.less b/askbot/skins/default/media/style/lib_style.less index 34710137..e6d554b1 100644 --- a/askbot/skins/default/media/style/lib_style.less +++ b/askbot/skins/default/media/style/lib_style.less @@ -7,15 +7,15 @@ @question-link:#464646; @button-label:#4a757f; @section-title:#7ea9b3; -@info-text:#8d8d8d; +@info-text:#707070; @info-text-dark:#6b6b6b; /* Variables for fonts*/ -@trebuchet:"Trebuchet MS", sans-serif; -@georgia:Georgia, serif; -@yanone:'Yanone Kaffeesatz', sans-serif; -@arial:Arial; +@body-font:Arial; /* "Trebuchet MS", sans-serif;*/ +@sort-font:Georgia, serif; +@main-font:'Yanone Kaffeesatz', sans-serif; +@secondary-font:Arial; /* Receive exactly positions for background Sprite */ @@ -44,3 +44,12 @@ -webkit-border-radius: @radio; -khtml-border-radius: @radio; } + +.rounded-corners-top(@radio:5px){ + border-top-right-radius:@radio; + border-top-left-radius:@radio; + -moz-border-radius-topright:@radio; + -moz-border-radius-topleft:@radio; + -webkit-border-top-left-radius:@radio; + -webkit-border-top-right-radius:@radio; +} diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css index 23972142..d2eeb364 100644 --- a/askbot/skins/default/media/style/style.css +++ b/askbot/skins/default/media/style/style.css @@ -10,7 +10,7 @@ body { margin: 0; padding: 0; color: #000; - font-family: @yanone; + font-family: @main-font; } div { @@ -143,7 +143,7 @@ a:hover { h1 { font-size: 160%; - padding: 10px 0 5px 5px; + padding: 10px 0 5px 0px; } /* ----- Custom positions ----- */ @@ -151,6 +151,10 @@ h1 { .left{float:left} .right{float:right} .clean{clear:both} +.center{ + margin: 0 auto; + padding: 0; +} /* ----- Notify message bar , check blocks/system_messages.html ----- */ @@ -360,7 +364,7 @@ h1 { border:0px; color:#484848; padding-left:10px; - font-family:@trebuchet; + font-family:@body-font; vertical-align: middle; } @@ -438,6 +442,7 @@ h1 { width: 730px; float: left; position: relative; + padding-bottom:10px; } #ContentRight { @@ -451,12 +456,12 @@ h1 { width: 950px; } -/* ----- Sidebar Widgets Box, check main_page/sidebar.html ----- */ +/* ----- Sidebar Widgets Box, check main_page/sidebar.html or question/sidebar.html ----- */ .box { background: #fff; padding: 4px 0px 10px 0px; - + width:200px; p { margin-bottom: 4px; @@ -490,7 +495,11 @@ h1 { } label { - color: #333; + color: @info-text; + font-size:15px; + display: block; + float: right; + width: 172px; } ul { @@ -499,9 +508,10 @@ h1 { li { list-style-type: disc; - font-size: 13px; + font-size: 16px; line-height: 20px; margin-bottom: 10px; + color:@info-text; } ul.tags { list-style: none; @@ -540,13 +550,81 @@ h1 { background:url(../images/small-button-blue.png) repeat-x bottom; } } + + img.gravatar { + margin:1px; + } -} +/* widgets for question template */ -img.gravatar { - margin:1px; + a.followed, a.follow{ + background: url(../images/medium-button.png) top repeat-x; + height:34px; + line-height:34px; + text-align:center; + border:0; + font-family:@main-font; + color:@button-label; + font-weight:normal; + font-size:21px; + margin-top:3px; + display:block; + width:120px; + text-decoration:none; + .rounded-corners(4px); + .box-shadow(1px, 1px, 2px, #636363); + .center; + } + + a.followed:hover, a.follow:hover{ + text-decoration:none; + background: url(../images/medium-button.png) bottom repeat-x; + .text-shadow(0px, 1px, 0px, #c6d9dd); + } + + a.followed div.unfollow{ + display:none; + } + + a.followed:hover div{ + display:none; + } + a.followed:hover div.unfollow{ + display:inline; + color:#a05736; + } + + .favorite-number { + padding: 5px 0 0 5px; + font-size: 100%; + font-family: Arial; + font-weight: bold; + color: #777; + text-align:center; + } } +.statsWidget p{ + color:@info-text; + font-size:16px; + border-bottom:#cccccc 1px solid; + + strong{ + float:right; + padding-right:10px; + } +} +.questions-related { + word-wrap: break-word; + + p { + line-height: 20px; + padding: 4px 0px 4px 0px; + font-size: 16px; + font-weight:normal; + border-bottom:#cccccc 1px solid; + } +} /* tips and markdown help are widgets for ask template */ #tips{ @@ -570,6 +648,7 @@ img.gravatar { } } + /* ----- Sorting top Tab, check main_page/tab_bar.html ------*/ .tabBar { @@ -579,7 +658,7 @@ img.gravatar { margin-bottom: 3px; margin-top: 3px; float:right; - font-family:@georgia; + font-family:@sort-font; font-size:16px; .rounded-corners(5px); } @@ -648,7 +727,7 @@ img.gravatar { padding-top:3px; background:#fff url(../images/feed-icon-small.png) no-repeat center right; float:right; - font-family:@georgia; + font-family:@sort-font; font-size:16px; } @@ -732,7 +811,7 @@ ul#searchTags { .userinfo { text-align:right; line-height:16px; - font-family:@trebuchet; + font-family:@body-font; padding-right:4px; } @@ -758,7 +837,7 @@ ul#searchTags { .counts .item-count { padding:0px 5px 0px 5px; font-size: 25px; - font-family:@yanone; + font-family:@main-font; } .counts .votes div, @@ -872,7 +951,7 @@ ul#searchTags { background-color: #fff; color: #777; padding: 2px 4px 3px 4px; - font-family:@yanone; + font-family:@main-font; } a{ color:@section-title; @@ -996,6 +1075,7 @@ ul.tags.marked-tags li, .tags-page ul.tags li, ul#ab-user-tags li { width: 160px; + margin:5px; } ul#related-tags li { @@ -1031,7 +1111,7 @@ ul#related-tags li { text-align: center; white-space: nowrap; vertical-align: middle; - font-family:@trebuchet; + font-family:@body-font; color:#717179; } .deletable-tag { @@ -1096,7 +1176,18 @@ span.delete-icon:hover { padding-right: 15px; } -/* ----- Ask Question Form template----- */ +/* ----- Ask and Edit Question Form template----- */ + +.section-title{ + color:@section-title; + font-family:@main-font; + font-weight:bold; + font-size:24px; +} + +.ask-body { + padding-right: 10px; +} #fmask{ margin-bottom:30px; @@ -1125,7 +1216,7 @@ span.delete-icon:hover { } } -.ask-page{ +.ask-page, .edit-question-page{ div#question-list { float: none; @@ -1168,6 +1259,7 @@ span.delete-icon:hover { height:25px; padding-left:5px; width:395px; + font-size:14px; } } @@ -1176,20 +1268,24 @@ span.delete-icon:hover { font-size: 15px; } +#fmanswer input.submit, .ask-page input.submit, .edit-question-page input.submit { float: left; background: url(../images/medium-button.png) top repeat-x; height:34px; border:0; - font-family:@yanone; + font-family:@main-font; color:@button-label; font-weight:normal; font-size:21px; margin-top:3px; .rounded-corners(4px); .box-shadow(1px, 1px, 2px, #636363); + margin-right:7px; } + +#fmanswer input.submit:hover, .ask-page input.submit:hover, .edit-question-page input.submit:hover{ text-decoration:none; @@ -1220,6 +1316,14 @@ span.delete-icon:hover { background-color: #F5F5F5; min-height: 20px; overflow: auto; + font-size:13px; + font-family:@body-font; + + p{ + margin-bottom:14px; + line-height:1.4; + font-size:14px; + } } .wmd-preview pre { @@ -1257,9 +1361,9 @@ span.delete-icon:hover { .question-options { margin-top: 1px; - float: left; color: #666; line-height: 13px; + margin-bottom:5px; } .question-options label { vertical-align: text-bottom; @@ -1271,10 +1375,41 @@ span.delete-icon:hover { margin: 5px 0 5px 0; } +.edit-question-page{ + #id_revision{ + font-size:14px; + margin-top:10px; + } + #id_title{ + font-size: 24px; + line-height: 24px; + height: 36px; + margin: 0px; + padding: 0px 0 0 5px; + border:#cce6ec 3px solid; + width:725px; + margin-bottom:10px; + } + #id_summary{ + border:#cce6ec 3px solid; + height:25px; + padding-left:5px; + width:395px; + font-size:14px; + } + .title-desc{ + margin-bottom:10px; + } +} + /* ----- Question template ----- */ .question-page{ + h1{ + padding-top:0px; + } + h1 a{ color:@question-link; font-size:30px; @@ -1285,524 +1420,921 @@ span.delete-icon:hover { p.rss { float:none; clear:both; - padding: 3px 0 0 1px; - font-size: 14px; + padding: 3px 0 0 25px; + font-size: 15px; + width:110px; + background-position:center left; + margin-left:4px; } p.rss a { - padding-left: 18px; + font-family:@main-font; vertical-align: top; } -} + + .question-content{ + float:right; + width:690px; + margin-bottom:10px; + } -.question-body, .answer-body { - min-height: 39px; - line-height: 20px; - overflow: auto; - width: 660px; - font-family:@trebuchet; - color:#4b4b4b; -} + #question-table{ + float:left; + border-top:#f0f0f0 1px solid; + } -.question-body p, .answer-body p{ - font-size:13px; -} -.question-body IMG, .answer-body IMG { - max-width: 600px; -} + #question-table, + .answer-table { + margin: 6px 0 0px 0; + border-spacing: 0px; + width: 680px; + padding-right:3px; + } + .answer-table { + margin-top:0px; + border-bottom: 1px solid #D4D4D4; + float:left; + } -#question-table, -.answer-table { - margin: 2px 0 10px 0; - border-spacing: 0px; - width: 100%; -} + .answer-table td, + #question-table td { + width:20px; + vertical-align:top; + } + .question-body, .answer-body { + overflow: auto; + margin-top:10px; + font-family:@body-font; + color:#4b4b4b; -.answer-table { - border-bottom: 1px solid #bbb; - clear: both; -} + p{ + margin-bottom:14px; + line-height:1.4; + font-size:14px; + padding:0px 5px 5px 0px; + } + + a { + color:@link; + } + + li { + margin-bottom:7px; + } + } -.answer-table td, -#question-table td { - width:30px; - vertical-align:top; -} + .question-body IMG, .answer-body IMG { + max-width: 600px; + } -#questionTools { - font-size: 22px; - margin-top: 11px; - text-align: left; -} + .post-update-info-container { + float: right; + width: 175px; + } -/* ----- Footer links , check blocks/footer.html----- */ + .post-update-info { + background: #fff url(../images/background-user-info.png) repeat-x bottom; + float: right; + font-size: 9px; + font-family:@secondary-font; + width: 158px; + padding:4px; + margin:0px 0px 5px 5px; + line-height: 14px; + .rounded-corners(4px); + .box-shadow (0px, 2px,1px,#bfbfbf); + + p { + line-height: 13px; + font-size: 11px; + margin: 0 0 2px 1px; + padding: 0; + } + a{ + color:#444; + } + .gravatar { + float: left; + margin-right: 4px; + } -#ground { - width: 100%; - clear: both; - border-top: 1px solid #000; - padding: 6px 0 0 0; - background: @header-color; - font-size:16px; + p.tip { + color: #444; + line-height: 13px; + font-size: 10px; + } + } - p { - margin-bottom:0; + .post-controls{ + font-size: 11px; + line-height: 12px; + min-width: 200px; + padding-left: 5px; + text-align:right; + clear: left; + float: right; + margin-top:10px; + + a { + color: #777; + padding: 0px 3px 3px 22px; + cursor: pointer; + border: none; + font-size:12px; + font-family:@body-font; + text-decoration: none; + height:18px; + display:block; + float:right; + line-height:18px; + margin-top:-2px; + margin-left:4px; + } + + a:hover { + background-color: #f5f0c9; + + } + .sep { + color: #ccc; + float:right; + height:18px; + font-size:18px; + } + } + .post-controls, .answer-controls{ + .question-delete{ + background: url(../images/delete.png) no-repeat center left; + padding-left:16px; + } + .question-flag{ + background: url(../images/flag.png) no-repeat center left; + } + .question-edit{ + background: url(../images/edit2.png) no-repeat center left; + } + .question-retag{ + background: url(../images/retag.png) no-repeat center left; + } + .question-close{ + background: url(../images/close.png) no-repeat center left; + } + .permant-link{ + background: url(../images/link.png) no-repeat center left; + } + } + .tabBar{ + width:100%; + } + + #questionCount{ + float:left; + font-family:@main-font; + line-height:15px; } -} -.footer-links { - color: #EEE; - text-align:left; - width:500px; - float:left; - a { - color: #e7e8a8; + .question-img-upvote, .question-img-downvote, + .answer-img-upvote, .answer-img-downvote { + width: 25px; + height: 20px; + cursor:pointer; } -} -.powered-link{ - width:500px; - float:left; - text-align:left; - a{ - color:#8ebcc7; + .question-img-upvote, .answer-img-upvote { + background: url(../images/vote-arrow-up-new.png) no-repeat; } -} -.copyright{ - color:#616161; - width:450px; - float:right; - text-align:right; + .question-img-downvote, .answer-img-downvote { + background: url(../images/vote-arrow-down-new.png) no-repeat; + } - a{ - color:#8ebcc7; + .question-img-upvote:hover, .question-img-upvote.on, + .answer-img-upvote:hover, .answer-img-upvote.on { + background: url(../images/vote-arrow-up-on-new.png) no-repeat; } - img.license-logo { - margin: 6px 0px 20px 10px; - float:right; + + .question-img-downvote:hover, .question-img-downvote.on, + .answer-img-downvote:hover, .answer-img-downvote.on { + background: url(../images/vote-arrow-down-on-new.png) no-repeat; } -} + .question-img-favorite:hover { + background: url(../images/vote-favorite-on.png) + } + div.comments { + padding: 0; + } + #comment-title{ + font-weight:bold; + font-size:23px; + color:@section-title; + width:200px; + float:left; + } + .comments { + font-size: 12px; + clear: both; + + div.controls { + clear: both; + float:left; + width: 100%; + margin: 3px 0 20px 5px; + } + + .controls a { + color: #988e4c; + padding: 0 3px 2px 22px; + font-family:@body-font; + font-size:13px; + background:url(../images/comment.png) no-repeat center left; + } -/* badges */ -a.medal { - font-size: 14px; - line-height: 250%; - font-weight: 800; - color: #333; - text-decoration: none; - background: url(../images/medala.gif) no-repeat; - border-left: 1px solid #EEE; - border-top: 1px solid #EEE; - border-bottom: 1px solid #CCC; - border-right: 1px solid #CCC; - padding: 4px 12px 4px 6px; -} + .controls a:hover { + background-color: #f5f0c9; + text-decoration: none; + } -a:hover.medal { - color: #333; - text-decoration: none; - background: url(../images/medala_on.gif) no-repeat; - border-left: 1px solid #E7E296; - border-top: 1px solid #E7E296; - border-bottom: 1px solid #D1CA3D; - border-right: 1px solid #D1CA3D; -} + .button { + color: #988e4c; + font-size: 11px; + padding: 3px; + cursor: pointer; + } + a { + background-color: inherit; + color: @link; + padding: 0; + } + + form.post-comments { + margin: 3px 30px 4px 5px; + } -.questions-related { - font-weight: 700; - word-wrap: break-word; -} + textarea { + height: 42px; + width:100%; + margin: 12px 0 5px 1px; + font-family: @body-font; + outline: none; + overflow:auto; + font-size: 12px; + line-height: 140%; + padding-left:2px; + padding-top:4px; + border:#cce6ec 3px solid; + } -.questions-related p { - line-height: 20px; - margin-bottom: 10px; - font-size: 100%; -} + input { + margin-left: 10px; + margin-top: 1px; + vertical-align: top; + width: 100px; + } + button{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-size:12px; + width:95px; + font-weight:bold; + height:24px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080); + float:left; + } + button:hover{ + background: url(../images/small-button-blue.png) bottom repeat-x; + .text-shadow(0px, 1px, 0px, #c6d9dd); + } + .counter { + display: inline-block; + width: 245px; + float:right; + color:#b6a475 !important; + vertical-align: top; + font-family:@body-font; + float:right; + text-align:right; + } + .comment { + border-bottom: 1px solid #edeeeb; + margin: 0; + margin-top:8px; + padding-bottom:4px; + overflow: auto; + font-family:@body-font; + font-size:11px; + min-height: 25px; + background:url(../images/comment-background.png) bottom repeat-x; + .rounded-corners(5px); + } + div.comment:hover { + background-color: #efefef; + } + a.author{ + background-color: inherit; + color: @link; + padding: 0; + } -.question-status { - margin-top: 10px; - margin-bottom:15px - padding: 20px; - background-color: #F5F5F5; - text-align: center; -} + a.author:hover { + text-decoration: underline; + } + span.delete-icon{ + background:url(../images/close-small.png) no-repeat; + } + span.delete-icon:hover{ + border:#BC564B 2px solid; + .rounded-corners(10px); + + } + .content { + margin-bottom: 7px; + } + + .comment-votes { + float: left; + width: 37px; + line-height: 130%; + padding: 6px 5px 6px 3px; + } -.question-status h3 { - font-size: 125%; -} + .comment-body { + line-height: 1.3; + margin: 3px 26px 0 46px; + padding: 5px 3px; + color: #666; + font-size:13px; + } -.vote-buttons { - float: left; - text-align: center; - padding-top: 2px; -} + .comment-body p{ + font-size:13px; + line-height:1.3; + margin-bottom: 3px; + padding: 0; + } -.vote-buttons IMG { - cursor: pointer; -} + .comment-delete { + float: right; + width: 14px; + line-height: 130%; + padding: 8px 6px; + } -.vote-buttons .button{ - -moz-border-radius: 10px; - margin-top: 20px; - border-radius: 10px; - height: 20px; - width: 80px; - border-style: solid; - border-width: 1px; - padding: 8px; - float:left; -} + .upvote { + margin: 0px; + padding-right: 17px; + padding-top: 2px; + text-align: right; + height: 20px; + font-size: 13px; + font-weight: bold; + color: #777; + } -.vote-buttons .followed{ - font-color: #000; - font-style:normal; - background: #cccccc; -} + .upvote.upvoted { + color: #d64000; + } -.vote-buttons .followed div{ - font-weight: normal; -} + .upvote.hover { + background: url(../images/go-up-grey.png) no-repeat; + background-position: right 1px; + } -.vote-buttons .followed div.unfollow{ - display:none; -} + .upvote:hover { + background: url(../images/go-up-orange.png) no-repeat; + background-position: right 1px; + } -.vote-buttons .followed:hover{ - color: #fff; - background: #8b0000; -} + .help-text{ + float: right; + text-align:right; + color: gray; + margin-bottom: 0px; + margin-top: 0px; + line-height: 50%; + } + } + #questionTools { + font-size: 22px; + margin-top: 11px; + text-align: left; + } -.vote-buttons .followed:hover div{ - display:none; -} + .question-status { + margin-top: 10px; + margin-bottom:15px; + padding: 20px; + background-color: #fef7cc; + text-align: center; + border:#e1c04a 1px solid; + } -.vote-buttons .followed:hover div.unfollow{ - display:inline; - font-weight: bold; -} + .question-status h3 { + font-size: 20px; + color:@info-text; + font-weight:normal; + } + + .vote-buttons { + float: left; + text-align: center; + padding-top: 2px; + margin:3px 10px 0px 3px; + } + + .vote-buttons IMG { + cursor: pointer; + } + + .vote-number { + font-family: @main-font; + padding: 0px 0 5px 0; + font-size: 25px; + font-weight: bold; + color: #777; + } + + .vote-buttons .notify-sidebar { + text-align: left; + } + .vote-buttons .notify-sidebar label { + vertical-align: top; + } + + .tabBar-answer{ + margin-bottom:15px; + padding-left:7px; + width:723px; + margin-top:10px; + } + .answer{ + .vote-buttons { + float:left; + } + } + .accepted-answer { + background-color: #f7fecc; + border-bottom-color: #9BD59B; + + .vote-buttons { + width:27px; + margin-right:10px; + } + } + + .answer .post-update-info a{ + color:#444444; + } + + .accepted-answer .comments { + background-color: #f1f6d4; + } + + .answered { + background: #CCC; + color: #999; + } + + .answered-accepted { + background: #DCDCDC; + color: #763333; + + strong { + color: #E1E818; + } + } + + .answered-by-owner { + background: #F1F1FF; + + .comments .button { + background-color: #E6ECFF; + } + .comments { + background-color: #E6ECFF; + } + .vote-buttons { + margin-right:10px; + } + } + + .answer-img-accept:hover { + background: url(../images/vote-accepted-on.png) + } + .answer-body a { + color:@link; + } + .answer-body li { + margin-bottom:0.7em; + } + + #fmanswer{ + color:@info-text; + font-size:16px; + line-height:1.2; + margin-top:10px; + } + .message { + padding: 5px; + margin: 10px 0 10px 0; + + } -.vote-buttons .follow{ - background: #cccccc; } -.vote-buttons .follow:hover{ - background: #234f32; - color: #fff; - font-weight: bold; +.facebook-share.icon, .twitter-share.icon, .linkedin-share.icon, .identica-share.icon { + background: url(../images/socialsprite.png) no-repeat; + display:block; + text-indent:-100em; + height:25px; + width:25px; + margin-bottom:3px; } -.vote-number { - font-family: Arial; - padding: 0px 0 3px 0; - font-size: 140%; - font-weight: bold; - color: #777; +.facebook-share.icon:hover, .twitter-share.icon:hover, .linkedin-share.icon:hover, .identica-share.icon:hover{ + opacity:0.8; + filter: alpha(opacity=80); } -.vote-buttons .notify-sidebar { - text-align: left; +.facebook-share.icon { + background-position: -26px 0px; } -.vote-buttons .notify-sidebar label { - vertical-align: top; +.identica-share.icon { + background-position: -78px 0px; } - -.question-img-upvote:hover { - background: url(../images/vote-arrow-up-on.png) +.twitter-share.icon { + margin-top:10px; + background-position: 0px 0px; } - -.question-img-downvote:hover { - background: url(../images/vote-arrow-down-on.png) +.linkedin-share.icon { + background-position: -52px 0px; } -.question-img-favorite:hover { - background: url(../images/vote-favorite-on.png) -} +/* -----Content pages, Login, About, FAQ, Users----- */ -.favorite-number { - padding: 5px 0 0 10px; - font-size: 100%; - font-family: Arial; - font-weight: bold; - color: #777; - text-align: left; +.openid-signin, +.meta, +.users-page, +{ + p{ + font-size:15px; + color:@info-text; + } + h2{ + color:@info-text-dark; + padding-left:0px; + } } -.notify-me { - float: left; +#email-input-fs,#local_login_buttons,#password-fs,#openid-fs{ + margin-top:10px; + #id_email,#id_username,#id_password,input{ + font-size: 12px; + line-height: 20px; + height: 20px; + margin: 0px; + padding: 0px 0 0 5px; + border:#cce6ec 3px solid; + width:200px; + } + .submit-b{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-weight:bold; + font-size:12px; + height:24px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080) + } + .submit-b:hover{ + background:url(../images/small-button-blue.png) repeat-x bottom; + } } - -.offensive-flag a { - color: #777; - padding: 3px; +.openid-input { + background: url(../images/openid.gif) no-repeat; + padding-left: 15px; cursor: pointer; } -.offensive-flag a:hover { - background-color: #777; - text-decoration: none; - color: #fff; +.openid-login-input { + background-position: center left; + background: url(../images/openid.gif) no-repeat 0% 50%; + padding: 5px 5px 5px 15px; + cursor: pointer; + font-family: Trebuchet MS; + font-weight: 300; + font-size: 150%; + width: 500px; } -.linksopt a { - color: #777; - padding: 3px; +.openid-login-submit { + height: 40px; + width: 80px; + line-height: 40px; cursor: pointer; + border: 1px solid #777; + font-weight: bold; + font-size: 120%; } -.linksopt a:hover { - background-color: #777; - text-decoration: none; - color: #fff; -} +/* People page */ -.post-controls a { - color: #777; - padding: 3px; - cursor: pointer; - border: none; - background: none; - text-decoration: none; +.tabBar-user{ + width:375px; } -.post-controls a:hover { - background-color: #777; - color: #fff; +.user { + padding: 5px; + line-height: 140%; + width: 166px; + border:#eee 1px solid; + margin-bottom:5px; + .rounded-corners(3px); + .user-micro-info{ + color:@info-text-dark; + } + } -.post-controls .sep { - color: #ccc; +.user ul { + margin: 0; + list-style-type: none; } -.comments { - font-size: 12px; - width: 650px; +.user .thumb { clear: both; + float: left; + margin-right: 4px; + display: inline; } -.comments .comment { - border-top: 1px dotted #cccccc; - margin: 0; - overflow: auto; -} +/* tags page */ -.comments .content { - margin-bottom: 7px; +.tabBar-tags{ + width:270px; + margin-bottom:15px; } -.comments div.comment { - min-height: 25px; +/* badges page */ + +a.medal { + font-size: 17px; + line-height: 250%; + margin-right:5px; + color: #333; + text-decoration: none; + background: url(../images/medala.gif) no-repeat; + border-left: 1px solid #EEE; + border-top: 1px solid #EEE; + border-bottom: 1px solid #CCC; + border-right: 1px solid #CCC; + padding: 4px 12px 4px 6px; } -.comments div.comment:hover { - background-color: #eee; +a:hover.medal { + color: #333; + text-decoration: none; + background: url(../images/medala_on.gif) no-repeat; + border-left: 1px solid #E7E296; + border-top: 1px solid #E7E296; + border-bottom: 1px solid #D1CA3D; + border-right: 1px solid #D1CA3D; } -div.comment .comment-votes { - float: left; - width: 37px; - line-height: 130%; - padding: 6px 5px 6px 3px; +#award-list{ + .user{ + float:left; + margin:5px; + } } -div.comment .comment-body { - line-height: 140%; - margin: 3px 26px 0 46px; - padding: 5px 3px; - color: #666; +/* profile page */ + +.tabBar-profile{ + width:100%; + margin-bottom:15px; + float:left; } -div.comment .comment-body p{ - font-size:inherit; - margin-bottom: 3px; - padding: 0; +.user-profile-page{ + font-size:15px; + color:@info-text-dark; + .avatar img{ + border:#eee 1px solid; + padding:5px; + } + h2{ + padding:10px 0px 10px 0px; + } } -div.comment .comment-delete { - float: right; - width: 14px; - line-height: 130%; - padding: 8px 6px; +.user-details { + font-size: 15px; } -div.comment .upvote { - margin: 0px; - padding-right: 17px; - padding-top: 2px; - text-align: right; - height: 20px; - font-size: 13px; - font-weight: bold; - color: #777; +.user-about { + background-color: #EEEEEE; + height: 200px; + line-height: 20px; + overflow: auto; + padding: 10px; + width: 90%; + p{font-size:18px;} } -div.comment .upvote.upvoted { - color: #d64000; +.user-info-table td{ + padding-bottom:5px; } -div.comment .upvote.hover { - background: url(../images/go-up-grey.png) no-repeat; - background-position: right 1px; +.follow-toggle { + border:0; + color:@button-label; + font-weight:bold; + font-size:12px; + height:26px; + line-height:26px; + margin-top:-2px; + font-size:15px; + cursor:pointer; + background:url(../images/small-button-blue.png) repeat-x top; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080) } -div.comment .upvote:hover { - background: url(../images/go-up-orange.png) no-repeat; - background-position: right 1px; +.follow-toggle:hover { + background:url(../images/small-button-blue.png) repeat-x bottom; } -.comments div.controls { - clear: both; - background: url(../images/gray-up-arrow-h18px.png) no-repeat; - width: 100%; - padding-left: 12px; - margin: 3px 0 20px 5px; +.follow-toggle .follow{ + font-color: #000; + font-style:normal; } -.comments form.post-comments { - width: 560px; - margin: 3px 30px 4px 45px; +.follow-toggle .unfollow div.unfollow-red{ + display:none; } -.comments textarea { - display: block; - height: 42px; - width: 572px; - margin: 6px 0 5px 1px; - font-family: sans-serif; - outline: none; - overflow:auto; - font-size: 12px; - line-height: 140%; - padding-left:2px; +.follow-toggle .unfollow:hover div.unfollow-red{ + display:inline; + color:#fff; + font-weight:bold; + color:#A05736; } -.comments input { - margin-left: 10px; - margin-top: 1px; - vertical-align: top; - width: 100px; +.follow-toggle .unfollow:hover div.unfollow-green{ + display:none; } -.comments .counter { - display: inline-block; - width: 245px; - vertical-align: top; +.vote-count { + font-family: Arial; + font-size: 160%; + font-weight: 700; + color: #777; } -.comments .controls a { - color: #888888; - padding: 0 3px 2px; +.answer-summary { + display: block; + clear: both; + padding: 3px; } -.comments .controls a:hover { - background-color: #777777; - color: white; +.answer-votes { + background-color: #EEEEEE; + color: #555555; + float: left; + font-family: Arial; + font-size: 15px; + font-weight: bold; + height: 17px; + padding: 2px 4px 5px; + text-align: center; text-decoration: none; + width: 20px; + margin-right: 10px; + .rounded-corners(4px); } -.comments .help-text{ - float: right; - text-align:right; - color: gray; - margin-bottom: 0px; - margin-top: 0px; - line-height: 50%; -} +.vote-notification { + z-index: 1; + cursor: pointer; + display: none; + position: absolute; + font-family:@secondary-font; + font-size:14px; + font-weight:normal; + color: white; + background-color: #8e0000; + text-align: center; + padding-bottom:10px; + .box-shadow(0px, 2px, 4px, #370000); + .rounded-corners(4px); -span.text-counter { - margin-right: 20px; -} + h3{ + background:url(../images/notification.png) repeat-x top; + padding:10px 10px 10px 10px; + font-size:13px; + margin-bottom:5px; + border-top:#8e0000 1px solid; + color:#fff; + font-weight:normal; + .rounded-corners-top(4px); + } + a { + color: #fb7321; + text-decoration: underline; + font-weight:bold; + } -span.form-error { - color: #990000; - font-weight: normal; - margin-left: 5px; } -p.form-item { - margin: 0px; -} +/* ----- Footer links , check blocks/footer.html----- */ -div.comments { - padding: 0; -} +#ground { + width: 100%; + clear: both; + border-top: 1px solid #000; + padding: 6px 0 0 0; + background: @header-color; + font-size:16px; -.comments .button { - color: black; - font-size: 11px; - background: #eeeeee; - padding: 3px; - cursor: pointer; + p { + margin-bottom:0; + } } -.comment a { - background-color: inherit; - color: blue; - padding: 0; +.footer-links { + color: #EEE; + text-align:left; + width:500px; + float:left; + a { + color: #e7e8a8; + } } -.comment a.author, a.author:hover { - background-color: inherit; - color: blue; - padding: 0; +.powered-link{ + width:500px; + float:left; + text-align:left; + a{ + color:#8ebcc7; + } } -.comment a.author:hover { - text-decoration: underline; -} +.copyright{ + color:#616161; + width:450px; + float:right; + text-align:right; -.accepted-answer { - background-color: #EBFFE6; - border-bottom-color: #9BD59B; + a{ + color:#8ebcc7; + } + img.license-logo { + margin: 6px 0px 20px 10px; + float:right; + } } -.accepted-answer .comments .button { - background-color: #CCFFBF; -} -.accepted-answer .comments { - background-color: #CCFFBF; +.notify-me { + float: left; } -.answered { - background: #CCC; - color: #999; -} -.answered-accepted { - background: #CCC; - color: #763333; +span.text-counter { + margin-right: 20px; } -.answered-by-owner { - background: #E9E9FF; +span.form-error { + color: #990000; + font-weight: normal; + margin-left: 5px; } -.answered-by-owner .comments .button { - background-color: #E6ECFF; +p.form-item { + margin: 0px; } -.answered-by-owner .comments { - background-color: #E6ECFF; -} -.answered-accepted strong { - color: #E1E818; -} -.answer-img-accept:hover { - background: url(../images/vote-accepted-on.png) -} .deleted { background: #F4E7E7 none repeat scroll 0 0; } - - /* openid styles */ .form-row { line-height: 25px; @@ -1868,32 +2400,6 @@ label.retag-error { padding: 10px; } -.openid-input { - background: url(../images/openid.gif) no-repeat; - padding-left: 15px; - cursor: pointer; -} - -.openid-login-input { - background-position: center left; - background: url(../images/openid.gif) no-repeat 0% 50%; - padding: 5px 5px 5px 15px; - cursor: pointer; - font-family: Trebuchet MS; - font-weight: 300; - font-size: 150%; - width: 500px; -} - -.openid-login-submit { - height: 40px; - width: 80px; - line-height: 40px; - cursor: pointer; - border: 1px solid #777; - font-weight: bold; - font-size: 120%; -} span.form-error { color: #990000; @@ -1991,18 +2497,6 @@ ins .post-tag { margin-top: 3px; } -.user-details { - font-size: 13px; -} - -.user-about { - background-color: #EEEEEE; - height: 200px; - line-height: 20px; - overflow: auto; - padding: 10px; - width: 90%; -} /* .favorites-count-off { @@ -2049,33 +2543,8 @@ ins .post-tag { float: left; } -.answer-summary { - display: block; - clear: both; - padding: 3px; -} -.answer-votes { - background-color: #EEEEEE; - color: #555555; - float: left; - font-family: Arial; - font-size: 110%; - font-weight: bold; - height: 15px; - padding: 4px 4px 5px; - text-align: center; - text-decoration: none; - width: 20px; - margin-right: 10px; -} -.vote-count { - font-family: Arial; - font-size: 160%; - font-weight: 700; - color: #777; -} /* todo: make these more semantic */ .user-action-1 { @@ -2204,31 +2673,6 @@ a.offensive { color: #999; } -.user { - padding: 5px; - line-height: 140%; - width: 170px; -} - -.user ul { - margin: 0; - list-style-type: none; -} - -.user .thumb { - clear: both; - float: left; - margin-right: 4px; - display: inline; -} - -.message { - padding: 5px; - margin: 10px 0 10px 0; - background-color: #eee; - border: 1px solid #aaaaaa; -} - .message h1 { padding-top: 0px; font-size: 15px; @@ -2283,11 +2727,6 @@ button::-moz-focus-inner { *display: inline; } -.ask-body { - padding-right: 10px; -} - - .noscript { position: fixed; top: 0px; @@ -2457,18 +2896,6 @@ ul.form-horizontal-rows li input { vertical-align: top; } -.post-controls, .post-tags { - font-size: 11px; - line-height: 12px; - min-width: 200px; - padding-left: 5px; - margin-bottom: 5px; -} - -.post-controls { - clear: left; - float: left; -} ul.post-tags { margin-left: 7px; @@ -2487,37 +2914,6 @@ ul.post-retag { margin: 0 0 3px 0; } -.post-update-info-container { - float: right; - min-width: 85px; -} - -.post-update-info { - display: inline-block; - float: right; - font-size: 11px; - width: 190px; - margin-bottom: 5px; - line-height: 14px -} - -.post-update-info p { - line-height: 13px; - font-size: 11px; - margin: 0 0 2px 1px; - padding: 0; -} - -.post-update-info .gravatar { - float: left; - margin-right: 4px; -} - - -.post-update-info p.tip { - color: #444; -} - #tagSelector { padding-bottom: 2px; margin-bottom: 0; @@ -2557,23 +2953,12 @@ p.signup_p { } /* a workaround to set link colors correctly */ -.answer-body a { - color:#0000ff; -} -.question-body a { - color:#0000ff; -} -.question-body li { - margin-bottom:0.7em; -} -.answer-body li { - margin-bottom:0.7em; -} + .wmd-preview a { - color:#0000ff; + color:@link; } .wmd-preview li { - margin-bottom:0.7em; + margin-bottom:7px; } .karma-summary { @@ -2637,22 +3022,6 @@ p.signup_p { margin:0; } -.vote-notification { - z-index: 1; - cursor: pointer; - display: none; - position: absolute; - padding: 15px; - color: white; - background-color: darkred; - text-align: center; -} - -.vote-notification a { - color: white; - text-decoration: underline; -} - #responses { clear:both; line-height:18px; @@ -2726,26 +3095,7 @@ img.flag { vertical-align: text-bottom; } -.facebook-share.icon, .twitter-share.icon, .linkedin-share.icon, .identica-share.icon { - background: url(../images/sprite.png) no-repeat; - display:block; - text-indent:-100em; - height:25px; - width:25px; -} -.facebook-share.icon { - background-position: -25px 0px; -} -.identica-share.icon { - background-position: -85px 0px; -} -.twitter-share.icon { - margin-top:10px; - background-position: 0px 0px; -} -.linkedin-share.icon { - background-position: -55px 0px; -} + /* Pretty printing styles. Used with prettify.js. */ a.edit { @@ -2778,52 +3128,3 @@ pre.prettyprint { padding: 3px; border: 0px solid #888; } .atn { color: #404; } .atv { color: #060; } } - -.follow-toggle { - border: 2px solid; - -moz-border-radius:5px; - -webkit-border-radius:5px; - border-radius: 5px; - height: auto; - width: 200px; - float:left; - padding: 0; - margin-right:100%; - margin-bottom: 10px; -} - -.follow-toggle .follow{ - font-color: #000; - font-style:normal; - background: #4cd46f; -} - -.follow-toggle .follow:hover{ - font-weight: bold; -} - -.follow-toggle .unfollow{ - background: #4cd46f; -} - -.follow-toggle .unfollow:hover{ - background: #d94849; -} - -.follow-toggle .unfollow div.unfollow-red{ - display:none; -} - -.follow-toggle .unfollow div.unfollow-green{ - background: #4cd46f; -} - -.follow-toggle .unfollow:hover div.unfollow-red{ - display:inline; - color:#fff; - font-weight:bold; -} - -.follow-toggle .unfollow:hover div.unfollow-green{ - display:none; -} diff --git a/askbot/skins/default/templates/badge.html b/askbot/skins/default/templates/badge.html index ee7f5360..d1f75617 100644 --- a/askbot/skins/default/templates/badge.html +++ b/askbot/skins/default/templates/badge.html @@ -1,9 +1,10 @@ {% extends "two_column_body.html" %} {% import "macros.html" as macros %} +{%from "macros.html" import gravatar %} <!-- template badge.html --> {% block title %}{% spaceless %}{% trans name=badge.name %}{{name}}{% endtrans %} - {% trans %}Badge{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans name=badge.name %}Badge "{{name}}"{% endtrans %}</h1> +<h1 class="section-title">{% trans name=badge.name %}Badge "{{name}}"{% endtrans %}</h1> <p> <a href="{{badge.get_absolute_url()}}" title="{{ badge.get_type_display() }} : {% trans description=badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ badge.css_class }}">●</span> {% trans name=badge.name%}{{name}}{% endtrans %}</a> {% trans description=badge.description %}{{description}}{% endtrans %} </p> @@ -13,11 +14,16 @@ <strong>{% trans num_awardees=badge_recipients|length %}user received this badge:{% pluralize %}users received this badge:{% endtrans %}</strong></p> {% endif %} </div> - <div id="award-list" style="clear:both;margin-left:20px;line-height:25px;"> + <div class="clean"></div> + <div id="award-list"> {% for recipient in badge_recipients %} - <p style="width:180px;float:left"><a href="{{ recipient.get_absolute_url() }}">{{ recipient.username }}</a> - {{ macros.user_score_and_badge_summary(recipient) }} - </p> + <div class="user"> + <ul> + <li class="thumb">{{ gravatar(recipient, 32) }}</li> + <li><a href="{{ recipient.get_absolute_url() }}">{{recipient.username}}</a></li> + <li>{{ macros.user_score_and_badge_summary(recipient) }}</li> + </ul> + </div> {% endfor %} </div> {% endblock %} diff --git a/askbot/skins/default/templates/badges.html b/askbot/skins/default/templates/badges.html index bbd09951..08827da3 100644 --- a/askbot/skins/default/templates/badges.html +++ b/askbot/skins/default/templates/badges.html @@ -2,7 +2,7 @@ <!-- template badges.html --> {% block title %}{% spaceless %}{% trans %}Badges summary{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}Badges{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Badges{% endtrans %}</h1> <p> {% trans %}Community gives you awards for your questions, answers and votes.{% endtrans %}<br/> {% trans %}Below is the list of available badges and number @@ -31,7 +31,7 @@ of times each type of badge has been awarded. Give us feedback at {{feedback_faq </div> {% endblock %} {% block sidebar %} -<div class="boxC"> +<div class="box"> <h2>{% trans %}Community badges{% endtrans %}</h2> <p> <a style="cursor:default;" title="{% trans %}gold badge: the highest honor and is very rare{% endtrans %}" class="medal"><span class="badge1">●</span> {% trans %}gold{% endtrans %}</a> diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index c13595f4..d0a27b5d 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -21,6 +21,32 @@ </div> {%- endmacro -%} +{%- macro post_vote_buttons(post = None, visitor_vote = None) -%} +<div + id="{{post.post_type}}-img-upvote-{{ post.id }}" + class="{{post.post_type}}-img-upvote post-vote{% if visitor_vote == 1 %} on{% endif %}" + {% if post.post_type == 'question' %} + title="{% trans %}i like this question (click again to cancel){% endtrans %}" + {% else %} + title="{% trans %}i like this answer (click again to cancel){% endtrans %}" + {% endif %} +/></div> +<div + id="{{post.post_type}}-vote-number-{{ post.id }}" + class="vote-number" + title="{% trans %}current number of votes{% endtrans %}" +>{{ post.score }}</div> +<div + id="{{post.post_type}}-img-downvote-{{ post.id }}" + class="{{post.post_type}}-img-downvote post-vote{% if visitor_vote == -1 %} on{% endif %}" + {% if post.post_type == 'question' %} + title="{% trans %}i dont like this question (click again to cancel){% endtrans %}" + {% else %} + title="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" + {% endif %} +/></div> +{%- endmacro -%} + {%- macro post_contributor_avatar_and_credentials(post, user) -%} {% if post.is_anonymous %} <img alt="{% trans %}anonymous user{% endtrans %}" src="{{ '/images/anon.png'|media }} " class="gravatar" width="32" height="32" /> @@ -49,7 +75,7 @@ poor design of the data or methods on data objects #} {% endif %} <strong>{{post.added_at|diff_date}}</strong> </p> - <img + <img width="35" height="35" src="{{'/images/wiki.png'|media}}" alt="{% trans %}this post is marked as community wiki{% endtrans %}" style="float:left" @@ -260,7 +286,7 @@ for the purposes of the AJAX comment editor #} >{{comment.user.username}}</a> <span class="age"> ({{comment.added_at|diff_date}})</span> {% if user|can_edit_comment(comment) %} - <a class="edit">{% trans %}edit{% endtrans %}</a> + <a class="edit">{% trans %}edit{% endtrans %}</a> {% endif %} </div> </div> @@ -300,6 +326,9 @@ for the purposes of the AJAX comment editor #} ) -%} {% spaceless %} + {% if post.comment_count > 0 %} + <h2 id="comment-title">Comments</h2> + {% endif %} {% set widget_id = 'comments-for-' + post.post_type + '-' + post.id|string %} <div class="comments" id="{{widget_id}}"> <div class="content"> @@ -428,7 +457,7 @@ answer {% if answer.accepted %}accepted-answer{% endif %} {% if answer.author_id {%- endmacro -%} {%- macro user_score_and_badge_summary(user) -%} - {%include "widgets/user_long_score_and_badge_summary.html"%} + {%include "widgets/user_score_and_badge_summary.html"%} {%- endmacro -%} {%- macro follow_toggle(follow, name, alias, id) -%} diff --git a/askbot/skins/default/templates/question/answer_card.html b/askbot/skins/default/templates/question/answer_card.html index 097dbbfd..1d7380c5 100644 --- a/askbot/skins/default/templates/question/answer_card.html +++ b/askbot/skins/default/templates/question/answer_card.html @@ -2,27 +2,24 @@ <div id="answer-container-{{ answer.id }}" class="{{ macros.answer_classes(answer, question) }}"> - <table class="answer-table"> - <tr> - <td> - <div class="vote-buttons"> - {% include "question/answer_vote_buttons.html" %} + <div class="vote-buttons"> + {% include "question/answer_vote_buttons.html" %} + </div> + <div class="answer-table"> + + <div class="item-right"> + <div class="answer-body"> + <div class="post-update-info-container"> + {% include "question/answer_author_info.html" %} </div> - </td> - <td> - <div class="item-right"> - <div class="answer-body"> - {{ answer.html }} - </div> - <div class="answer-controls post-controls"> - {% include "question/answer_controls.html" %} - </div> - <div class="post-update-info-container"> - {% include "question/answer_author_info.html" %} - </div> - {% include "question/answer_comments.html" %} - </div> - </td> - </tr> - </table> + {{ answer.html }} + </div> + <div class="answer-controls post-controls"> + {% include "question/answer_controls.html" %} + </div> + {% include "question/answer_comments.html" %} + </div> + </div> + <div class="clean"></div> </div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/answer_tab_bar.html b/askbot/skins/default/templates/question/answer_tab_bar.html index 227a9f81..24042b4a 100644 --- a/askbot/skins/default/templates/question/answer_tab_bar.html +++ b/askbot/skins/default/templates/question/answer_tab_bar.html @@ -1,12 +1,15 @@ -<div class="tabBar"> - <h2 id="sort-top"> - {% trans counter=answers|length %} - {{counter}} Answer: - {% pluralize %} - {{counter}} Answers: - {% endtrans %} - </h2> +<div class="tabBar tabBar-answer"> + <h1 id="questionCount"> + {% trans counter=answers|length %} + {{counter}} Answer + {% pluralize %} + {{counter}} Answers + {% endtrans %} + </h1> <div class="tabsA"> + <span class="label"> + Sort by » + </span> <a id="oldest" href="{{ question.get_absolute_url() }}?sort=oldest#sort-top" title="{% trans %}oldest answers will be shown first{% endtrans %}" ><span>{% trans %}oldest answers{% endtrans %}</span></a> @@ -18,3 +21,4 @@ ><span>{% trans %}popular answers{% endtrans %}</span></a> </div> </div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/question_card.html b/askbot/skins/default/templates/question/question_card.html index 9364d3fd..b1fa1743 100644 --- a/askbot/skins/default/templates/question/question_card.html +++ b/askbot/skins/default/templates/question/question_card.html @@ -1,24 +1,22 @@ -<h1><a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a></h1> -{% include "question/question_tags.html" %} -<table id="question-table" {% if question.deleted %}class="deleted"{%endif%}> - <tr> - <td> - <div class="vote-buttons"> - {% include "question/question_vote_buttons.html"%} - {% include "question/share_buttons.html"%} - </div> - </td> - <td> - <div class="question-body"> - {{question.html}} - </div> - <div id="question-controls" class="post-controls"> - {% include "question/question_controls.html" %} - </div> +<div class="vote-buttons"> + {% include "question/question_vote_buttons.html"%} + {% include "question/share_buttons.html"%} +</div> +<div class="question-content"> + + <h1><a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a></h1> + {% include "question/question_tags.html" %} + <div id="question-table" {% if question.deleted %}class="deleted"{%endif%}> + <div class="question-body"> <div class="post-update-info-container"> {% include "question/question_author_info.html" %} </div> - {% include "question/question_comments.html" %} - </td> - </tr> -</table> + {{question.html}} + </div> + <div id="question-controls" class="post-controls"> + {% include "question/question_controls.html" %} + </div> + {% include "question/question_comments.html" %} + </div> +</div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/sidebar.html b/askbot/skins/default/templates/question/sidebar.html index ab3a9ace..d011d562 100644 --- a/askbot/skins/default/templates/question/sidebar.html +++ b/askbot/skins/default/templates/question/sidebar.html @@ -1,7 +1,7 @@ {% import "macros.html" as macros %} {{ settings.SIDEBAR_QUESTION_HEADER }} <div class="box vote-buttons"> - <h2 id="questionTools">{% trans %}Question tools{% endtrans %}</h2> + <h2 >{% trans %}Question tools{% endtrans %}</h2> {% if favorited %} <a class="button followed" alt="{% trans %}click to unfollow this question{% endtrans %}"> @@ -9,7 +9,7 @@ <div class='unfollow'>{% trans %}Unfollow{% endtrans %}</div> </a> {% else %} - <a class="button follow" + <a class="button followed" alt="{% trans %}click to follow this question{% endtrans %}"> {%trans %}Follow{%endtrans%} </a> @@ -38,33 +38,12 @@ </div> </div> {% cache 0 "questions_tags" questions_tags question.id language_code %} -{% if settings.SIDEBAR_QUESTION_SHOW_TAGS %} - <div class="box"> - <div class="clearfix"></div> - <h2> - {% trans %}Question tags{% endtrans %}: - </h2> - <ul id="related-tags" class="tags"> - {% for tag in tags %} - <li> - {{ macros.tag_widget( - tag, - html_tag = 'div', - url_params = 'start_over=true', - extra_content = '<span class="tag-number">× ' ~ - tag.used_count|intcomma ~ '</span>' - ) - }} - </li> - {% endfor %} - </ul> - </div> -{% endif %} + {% if settings.SIDEBAR_QUESTION_SHOW_META %} -<div class="box"> +<div class="box statsWidget"> <div class="clearfix"></div> - <h2>{% trans %}Stats:{% endtrans %}</h2> + <h2>{% trans %}Stats{% endtrans %}</h2> <p> {% trans %}question asked{% endtrans %}: <strong title="{{ question.added_at }}">{{question.added_at|diff_date}}</strong> </p> diff --git a/askbot/skins/default/templates/question_edit.html b/askbot/skins/default/templates/question_edit.html index 3cdcd8bb..47873e0e 100644 --- a/askbot/skins/default/templates/question_edit.html +++ b/askbot/skins/default/templates/question_edit.html @@ -6,7 +6,7 @@ <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> {% endblock %} {% block content %} -<h1>{% trans %}Edit question{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</h1> +<div class="section-title">{% trans %}Edit question{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</div> <form id="fmedit" action="{% url edit_question question.id %}" method="post" >{% csrf_token %} {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} @@ -24,8 +24,6 @@ ) }} <div class="after-editor"> - <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> - <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> <div class="question-options"> {% if settings.WIKI_ON and question.wiki == False %} {{ macros.checkbox_in_div(form.wiki) }} @@ -34,6 +32,9 @@ {{ macros.checkbox_in_div(form.reveal_identity) }} {% endif %} </div> + <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> + <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> + </div> </form> {% endblock %} diff --git a/askbot/skins/default/templates/tags.html b/askbot/skins/default/templates/tags.html index 7d9026af..1cd4c4b9 100644 --- a/askbot/skins/default/templates/tags.html +++ b/askbot/skins/default/templates/tags.html @@ -4,14 +4,14 @@ {% block title %}{% spaceless %}{% trans %}Tag list{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} <!-- Tabs --> -<div class="tabBar"> - {% if stag %} - <h1>{% trans %}Tags, matching "{{ stag }}"{% endtrans %}</h1> - {% else %} - <h1>{% trans %}Tag list{% endtrans %}</h1> - {% endif %} - +{% if stag %} + <h1 class="section-title">{% trans %}Tags, matching "{{ stag }}"{% endtrans %}</h1> +{% else %} + <h1 class="section-title">{% trans %}Tag list{% endtrans %}</h1> +{% endif %} +<div class="tabBar tabBar-tags"> <div class="tabsA"> + <span class="label">{% trans %}Sort by »{% endtrans %}</span> <a id="sort_name" href="{% url tags %}?sort=name" @@ -46,6 +46,7 @@ </li> {% endfor %} </ul> + <div class="clean"></div> <div class="pager"> {{macros.paginator(paginator_context)}} </div> diff --git a/askbot/skins/default/templates/user_profile/user.html b/askbot/skins/default/templates/user_profile/user.html index ad3d564b..6ec4bc3a 100644 --- a/askbot/skins/default/templates/user_profile/user.html +++ b/askbot/skins/default/templates/user_profile/user.html @@ -7,15 +7,13 @@ </style> {% endblock %} {% block content %} - <h1> + <h1 class="section-title"> {% spaceless %} - <a href="{% url user_profile view_user.id, view_user.username|slugify %}"> {% trans username=view_user.username %}{{username}}'s profile{% endtrans %} - {% block profilesection %}{% endblock %} - </a> {% endspaceless %} </h1> - <div style="margin-left: 5px;"> - {% include "user_profile/user_tabs.html" %} + {% include "user_profile/user_tabs.html" %} + <div> {% block usercontent %} {% endblock %} </div> diff --git a/askbot/skins/default/templates/user_profile/user_favorites.html b/askbot/skins/default/templates/user_profile/user_favorites.html index bb019c90..08c3c688 100644 --- a/askbot/skins/default/templates/user_profile/user_favorites.html +++ b/askbot/skins/default/templates/user_profile/user_favorites.html @@ -1,7 +1,7 @@ {% extends "user_profile/user.html" %} <!-- user_favorites.html --> {% block profilesection %} - {% trans %}followed questions{% endtrans %} + <h1 class="section-title"> {% trans %}followed questions{% endtrans %}</h1> {% endblock %} {% block usercontent %} {% include "user_profile/users_questions.html" %} diff --git a/askbot/skins/default/templates/user_profile/user_tabs.html b/askbot/skins/default/templates/user_profile/user_tabs.html index ad24a303..0c7c4599 100644 --- a/askbot/skins/default/templates/user_profile/user_tabs.html +++ b/askbot/skins/default/templates/user_profile/user_tabs.html @@ -1,5 +1,5 @@ <!-- user_tabs.html --> -<div class="tabBar"> +<div class="tabBar tabBar-profile"> <div class="tabsC"> <a id="stats" {% if tab_name=="stats" %}class="on"{% endif %} title="{% trans %}User profile{% endtrans %}" @@ -49,4 +49,5 @@ {% endif %} </div> </div> +<div class="clean"></div> <!-- end user_tabs.html --> diff --git a/askbot/skins/default/templates/user_profile/user_votes.html b/askbot/skins/default/templates/user_profile/user_votes.html index d5e469ae..5111a580 100644 --- a/askbot/skins/default/templates/user_profile/user_votes.html +++ b/askbot/skins/default/templates/user_profile/user_votes.html @@ -10,9 +10,9 @@ <div style="width:150px;float:left">{{vote.voted_at|diff_date(True)}}</div> <div style="width:30px;float:left"> {% if vote.vote==1 %} - <img src="{{"/images/vote-arrow-up-on.png"|media}}" title="{% trans %}upvote{% endtrans %}"> + <img src="{{"/images/vote-arrow-up-on-new.png"|media}}" title="{% trans %}upvote{% endtrans %}"> {% else %} - <img src="{{"/images/vote-arrow-down-on.png"|media}}" title="{% trans %}downvote{% endtrans %}"> + <img src="{{"/images/vote-arrow-down-on-new.png"|media}}" title="{% trans %}downvote{% endtrans %}"> {% endif %} </div> <div style="float:left;overflow:hidden;width:750px"> diff --git a/askbot/skins/default/templates/users.html b/askbot/skins/default/templates/users.html index 1d7d02dd..0502a6e5 100644 --- a/askbot/skins/default/templates/users.html +++ b/askbot/skins/default/templates/users.html @@ -3,9 +3,10 @@ <!-- users.html --> {% block title %}{% spaceless %}{% trans %}Users{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<div class="tabBar"> - <h1>{% trans %}Users{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Users{% endtrans %}</h1> +<div class="tabBar tabBar-user"> <div class="tabsA"> + <span class="label">{% trans %}Sort by »{% endtrans %}</span> <a id="sort_reputation" href="{% url users %}?sort=reputation" @@ -32,6 +33,7 @@ ><span>{% trans %}by username{% endtrans %}</span></a> </div> </div> +<div class="clean"></div> <p> {% if suser %} {% trans %}users matching query {{suser}}:{% endtrans %} diff --git a/askbot/skins/default/templates/widgets/ask_form.html b/askbot/skins/default/templates/widgets/ask_form.html index 4e3346b8..18196d93 100644 --- a/askbot/skins/default/templates/widgets/ask_form.html +++ b/askbot/skins/default/templates/widgets/ask_form.html @@ -30,11 +30,6 @@ mandatory_tags = mandatory_tags ) }} - {% if not request.user.is_authenticated() %} - <input type="submit" name="post_anon" value="{% trans %}Login/signup to post your question{% endtrans %}" class="submit" /> - {% else %} - <input type="submit" name="post" value="{% trans %}Ask your question{% endtrans %}" class="submit" /> - {% endif %} <div class="question-options"> {% if settings.WIKI_ON %} {{ macros.checkbox_in_div(form.wiki) }} @@ -43,5 +38,10 @@ {{ macros.checkbox_in_div(form.ask_anonymously) }} {% endif %} </div> + {% if not request.user.is_authenticated() %} + <input type="submit" name="post_anon" value="{% trans %}Login/signup to post your question{% endtrans %}" class="submit" /> + {% else %} + <input type="submit" name="post" value="{% trans %}Ask your question{% endtrans %}" class="submit" /> + {% endif %} <div class="clean"></div> </form> diff --git a/askbot/skins/default/templates/widgets/question_edit_tips.html b/askbot/skins/default/templates/widgets/question_edit_tips.html index b62c6338..1270687f 100644 --- a/askbot/skins/default/templates/widgets/question_edit_tips.html +++ b/askbot/skins/default/templates/widgets/question_edit_tips.html @@ -12,7 +12,9 @@ </li> </ul> <p class='info-box-follow-up-links'> +<!-- will be change to a popup windows <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">{% trans %}FAQ{% endtrans %} »</a> +--> </p> </div> @@ -53,7 +55,9 @@ </li> </ul> <p class='info-box-follow-up-links'> +<!-- will be change to a popup windows <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">{% trans %}learn more about Markdown{% endtrans %} »</a> +--> </p> </div> <!-- end question_edit_tips.html --> diff --git a/askbot/views/readers.py b/askbot/views/readers.py index 8d06c2be..4a12fe2c 100644 --- a/askbot/views/readers.py +++ b/askbot/views/readers.py @@ -430,13 +430,11 @@ def question(request, id):#refactor - long subroutine. display question body, an answers = answers.select_related(depth=1) user_answer_votes = {} - for answer in answers: - vote = answer.get_user_vote(request.user) - if vote is not None and not user_answer_votes.has_key(answer.id): - vote_value = -1 - if vote.is_upvote(): - vote_value = 1 - user_answer_votes[answer.id] = vote_value + if request.user.is_authenticated(): + for answer in answers: + vote = answer.get_user_vote(request.user) + if vote is not None and not answer.id in user_answer_votes: + user_answer_votes[answer.id] = int(vote) view_dic = {"latest":"-added_at", "oldest":"added_at", "votes":"-score" } orderby = view_dic[answer_sort_method] @@ -517,19 +515,19 @@ def question(request, id):#refactor - long subroutine. display question body, an paginator_context = extra_tags.cnprog_paginator(paginator_data) favorited = question.has_favorite_by_user(request.user) + user_question_vote = 0 if request.user.is_authenticated(): - question_vote = question.votes.select_related().filter(user=request.user) - else: - question_vote = None #is this correct? - if question_vote is not None and question_vote.count() > 0: - question_vote = question_vote[0] - + votes = question.votes.select_related().filter(user=request.user) + if votes.count() > 0: + user_question_vote = int(votes[0]) + else: + user_question_vote = 0 data = { 'page_class': 'question-page', 'active_tab': 'questions', 'question' : question, - 'question_vote' : question_vote, + 'user_question_vote' : user_question_vote, 'question_comment_count':question.comments.count(), 'answer' : AnswerForm(question,request.user), 'answers' : page_objects.object_list, |