Commit 4af5871a authored by Giuseppe Terrasi's avatar Giuseppe Terrasi

import from ubuntu-it-ask/dev:
- custom pages error;
- fix bug #1024828
- change search form colors
thanks to Riccardo Padovani.
- twitter, facebook, google plus button in question.html under comment box
- Modificato il layout della sidebar, in stile planet
thanks to Riccardo Padovani.
- minor tweaks
parents 8c71137e 7f4ee8a6
...@@ -193,15 +193,20 @@ blockquote blockquote { ...@@ -193,15 +193,20 @@ blockquote blockquote {
margin: auto; margin: auto;
min-width: 985px; min-width: 985px;
margin: 0 20px; margin: 0 20px;
background-color: #FFF;
} }
#announcement { #announcement {
padding: 0 5px; padding: 0 5px;
} text-align: center;
margin: 5px 20px;
#fixed-header { height: 35px;
height: 120px; font-size: 17px;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.6);
border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px;
line-height: 2;
color: white;
} }
.container { .container {
...@@ -264,6 +269,10 @@ blockquote blockquote { ...@@ -264,6 +269,10 @@ blockquote blockquote {
text-decoration: none; text-decoration: none;
} }
#fixed-header {
height: 105px;
}
#page-header { display: none; } #page-header { display: none; }
#page-body { #page-body {
overflow: hidden; overflow: hidden;
...@@ -403,24 +412,38 @@ padding-top: 4px; ...@@ -403,24 +412,38 @@ padding-top: 4px;
padding: 5px; padding: 5px;
} }
#room {
border: 1px solid #DD4814;
background-color: #E7E7E7;
padding: 5px;
}
#CALeft { #CALeft {
float: left; float: left;
width: 84%; width: 84%;
background-color: #e4e4e4;
padding: 5px;
border: solid 1px #D4D4D4;
border-radius: 3px;
} }
#CARight { #CARight {
float: right; float: right;
width: 15%; width: 15%;
color: #EEE;
}
#CARight h3 {
background-color: transparent;
font-size: 20px;
text-align: center;
color: #E0E0E0;
text-shadow: 1px 1px 1px #222;
}
#CARight p {
font-size: 14px;
} }
#CAFull { #CAFull {
float: left; float: left;
background-color: #e4e4e4;
border: solid 1px #D4D4D4;
border-radius: 3px;
width: 100%; width: 100%;
} }
...@@ -525,7 +548,7 @@ padding-top: 4px; ...@@ -525,7 +548,7 @@ padding-top: 4px;
} }
.questions-count { .questions-count {
color: #A40000; color: #DD4818;
font-family: sans-serif; font-family: sans-serif;
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
...@@ -562,12 +585,16 @@ padding-top: 4px; ...@@ -562,12 +585,16 @@ padding-top: 4px;
} }
.boxC { .boxC {
background-color: #D7D7D7; padding-left: 10px;
border-left: 1px solid #DD4814; padding-right: 10px;
border-bottom: 1px solid #DD4814; padding-bottom: 5px;
padding: 10px; padding-top: 5px;
margin-right: -5px; margin-left: 5px;
margin-top: -5px; margin-bottom: 10px;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.6);
border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px;
} }
.boxC p { .boxC p {
...@@ -655,10 +682,11 @@ padding-top: 4px; ...@@ -655,10 +682,11 @@ padding-top: 4px;
} }
.tags { .tags {
display: block; /*display: block;*/
font-family: sans-serif; font-family: sans-serif;
line-height: 200%; line-height: 200%;
margin-top: 5px; margin-top: 5px;
width: 100%;
} }
.tags-summary { .tags-summary {
...@@ -668,8 +696,6 @@ padding-top: 4px; ...@@ -668,8 +696,6 @@ padding-top: 4px;
.tags a, span.tag, .tags-summary a { .tags a, span.tag, .tags-summary a {
background-color: #EEEEEE; background-color: #EEEEEE;
border-bottom: 1px solid #CCCCCC;
border-right: 1px solid #CCCCCC;
color: #777777; color: #777777;
font-size: 11px; font-size: 11px;
font-weight: normal; font-weight: normal;
...@@ -696,8 +722,7 @@ padding-top: 4px; ...@@ -696,8 +722,7 @@ padding-top: 4px;
.medal { .medal {
background: none repeat scroll 0 0 #DD4818; background: none repeat scroll 0 0 #DD4818;
border: #DD4818 solid 1px; color: white;
color: #333333;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
line-height: 250%; line-height: 250%;
...@@ -712,7 +737,6 @@ a.medal { ...@@ -712,7 +737,6 @@ a.medal {
a.medal:hover { a.medal:hover {
/*background: url("../images/medala_on.gif") no-repeat scroll 0 0 transparent;*/ /*background: url("../images/medala_on.gif") no-repeat scroll 0 0 transparent;*/
background-color: white; background-color: white;
border: #DD4818 solid 1px;
color: #DD4818; color: #DD4818;
text-decoration: none; text-decoration: none;
} }
...@@ -720,7 +744,7 @@ a.medal:hover { ...@@ -720,7 +744,7 @@ a.medal:hover {
.tabBar { .tabBar {
clear: both; clear: both;
height: 30px; height: 30px;
margin-bottom: 3px; margin: 3px;
width: 100%; width: 100%;
} }
...@@ -837,7 +861,7 @@ a.medal:hover { ...@@ -837,7 +861,7 @@ a.medal:hover {
.questions-related { .questions-related {
font-weight: 700; font-weight: 700;
word-wrap: break-word; /*word-wrap: break-word;*/
} }
.questions-related p { .questions-related p {
...@@ -952,7 +976,7 @@ div.question-body p, div.answer-body p { ...@@ -952,7 +976,7 @@ div.question-body p, div.answer-body p {
margin: 0; margin: 0;
} }
.badge-list a { /*.badge-list a {
color: #DD4818; color: #DD4818;
} }
...@@ -962,7 +986,7 @@ div.question-body p, div.answer-body p { ...@@ -962,7 +986,7 @@ div.question-body p, div.answer-body p {
.badge-list a.medal:hover { .badge-list a.medal:hover {
color: #DD4818; color: #DD4818;
} }*/
#medalList .badgeListDescription { #medalList .badgeListDescription {
float: left; float: left;
...@@ -1174,6 +1198,7 @@ ins { ...@@ -1174,6 +1198,7 @@ ins {
width: 90%; width: 90%;
border: 3px solid #DD4814; border: 3px solid #DD4814;
background-color: #D7D7D7; background-color: #D7D7D7;
border-radius: 5px;
} }
.user-edit-link { .user-edit-link {
...@@ -1325,6 +1350,10 @@ ins { ...@@ -1325,6 +1350,10 @@ ins {
margin-left: 15px; margin-left: 15px;
} }
#searchtags {
margin: 5px;
}
#searchBar { #searchBar {
float: left; float: left;
margin-left: 15px; margin-left: 15px;
...@@ -1335,13 +1364,18 @@ ins { ...@@ -1335,13 +1364,18 @@ ins {
} }
#searchBar .searchInput { #searchBar .searchInput {
border: 0px; border: 3px solid #D7D7D7;
padding: 3px; padding: 3px;
font-size: 13px; font-size: 13px;
height: 18px; height: 18px;
width: 380px; width: 380px;
} }
#searchBar .searchInput:focus {
border: 3px solid #DD4818;
outline: none;
}
#searchBar .searchBtn { #searchBar .searchBtn {
font-size: 14px; font-size: 14px;
height: 26px; height: 26px;
...@@ -1400,8 +1434,8 @@ padding: 6px; ...@@ -1400,8 +1434,8 @@ padding: 6px;
margin-bottom: 0; margin-bottom: 0;
} }
.darkred { /*Quando è un figlio di notify lo facciamo bianco, (è usato da altre parti?)*/ .darkred { /*Quando è un figlio di notify lo facciamo bianco, altrimenti lo convertiamo in arancio per i titoletti*/
color: darkred; color: #DD4818;
} }
.notify > .darkred { .notify > .darkred {
color: white; color: white;
...@@ -2165,3 +2199,24 @@ div.wmd-button { ...@@ -2165,3 +2199,24 @@ div.wmd-button {
div.wmd-button-bar { div.wmd-button-bar {
float:left; float:left;
} }
#error > h1 {
color: white;
background-color: #DD4818;
}
#error {
text-align: center;
margin: 5px;
}
.error-box {
float: left;
margin-left: auto;
margin-right: auto;
width: 32%;
text-align: center;
height: 66px;
padding-top: 44px;
font-size: large;
}
...@@ -24,23 +24,17 @@ ...@@ -24,23 +24,17 @@
</script> </script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main-bar" class="headNormal"> <div id="error">
{% trans "Not logged in" %} <h1>401</h1>
<h2>{% trans "Not logged in" %}</h2><br/>
<h3>{% trans "You are not logged in..." %} <br/> {% trans "...and the resource you're trying to access is protected." %} </h3> <br/>
<p>
{% trans "Redirecting to the login page." %}<span id="redirect_loader"></span>
</p>
<p>
{% trans "If you're not automatically redirected in 5 seconds, please click" %}
<a href="{% url auth_signin %}">{% trans "here" %}</a>.
</p>
</div> </div>
<div id="main-body" class="">
<div style="padding:5px 0px 10px 0;line-height:25px;">
<h3>{% trans "You are not logged in..." %}</h3>
<div style="margin-top:5px">
{% trans "...and the resource you're trying to access is protected." %}
<p>
{% trans "Redirecting to the login page." %}<span id="redirect_loader"></span>
</p>
<p>
{% trans "If you're not automatically redirected in 5 seconds, please click" %}
<a href="{% url auth_signin %}">{% trans "here" %}</a>.
</p>
</div>
</div>
</div> {% endblock %}
{% endblock %}
\ No newline at end of file
...@@ -7,7 +7,23 @@ ...@@ -7,7 +7,23 @@
</style> </style>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main-bar" class="headNormal"> <div id="error">
<h1>403</h1>
<h2>{% trans "Forbidden" %}</h2><br/>
<h3>{% trans "Sorry, you don't have permissions to access this page." %}</h3> <br/>
</div>
<div id="error-box1">
<a href="{% url questions %}">{% trans "see all questions" %} &raquo;</a>
</div>
<div id="error-box2">
<a href="{% url tags %}">{% trans "see all tags" %} &raquo;</a>
</div>
<div id="error-box3">
<a href="#" id="linkPrevious">{% trans "back to previous page" %} &raquo;</a>
</div>
<!--<div id="main-bar" class="headNormal">
{% trans "Forbidden" %} {% trans "Forbidden" %}
</div> </div>
<div id="main-body" class=""> <div id="main-body" class="">
...@@ -32,5 +48,5 @@ ...@@ -32,5 +48,5 @@
</ul> </ul>
</div> </div>
</div> </div>-->
{% endblock %} {% endblock %}
...@@ -2,11 +2,6 @@ ...@@ -2,11 +2,6 @@
<!-- template 404.html --> <!-- template 404.html -->
{% load i18n %} {% load i18n %}
{% block title %}{% trans "404 Error" %}{% endblock %} {% block title %}{% trans "404 Error" %}{% endblock %}
{% block forestyle%}
<style type="text/css">
form input { margin-right: 5px; }
</style>
{% endblock %}
{% block forejs %} {% block forejs %}
<script type="text/javascript"> <script type="text/javascript">
$().ready(function(){ $().ready(function(){
...@@ -16,33 +11,19 @@ ...@@ -16,33 +11,19 @@
</script> </script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main-bar" class="headNormal"> <div id="error">
{% trans "404 Not Found" %} <h1>404</h1>
<h2>Questa pagina non esiste</h2><br/>
<h3>Beh, ovviamente <em>questa pagina esiste</em>. Ma la pagina che hai richiesto non esiste. Infatti, questa pagina è qui solo per dirti che la pagina che stai cercando non esiste</h3> <br/>
</div> </div>
<div id="main-body" class=""> <div id="error-box1">
<div style="padding:5px 0px 10px 0;line-height:25px;"> <a href="{% url questions %}">{% trans "see all questions" %} &raquo;</a>
<h3>{% trans "Sorry, could not find the page you requested." %}</h3> </div>
<div style="margin-top:5px"> <div id="error-box2">
{% trans "This might have happened for the following reasons:" %}<br/> <a href="{% url tags %}">{% trans "see all tags" %} &raquo;</a>
<ul> </div>
<li>{% trans "this question or answer has been deleted;" %}</li> <div id="error-box3">
<li>{% trans "url has error - please check it;" %}</li> <a href="#" id="linkPrevious">{% trans "back to previous page" %} &raquo;</a>
<li>{% trans "if you believe this error 404 should not have occurred, please" %}
<a href="{% if settings.CONTACT_URL %}{{ settings.CONTACT_URL }}{% else %}{% url feedback %}{% endif %}">{% trans "report this problem" %}</a></li>
</ul>
</div>
<script type="text/javascript">
var GOOG_FIXURL_LANG = '{{settings.LANGUAGE_CODE}}';
var GOOG_FIXURL_SITE = '{{site_url}}';
</script>
<script type="text/javascript" src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
<ul>
<li><a href="#" id="linkPrevious">{% trans "back to previous page" %} &raquo;</a></li>
<li><a href="{% url questions %}">{% trans "see all questions" %} &raquo;</a></li>
<li><a href="{% url tags %}">{% trans "see all tags" %} &raquo;</a></li>
</ul>
</div>
</div> </div>
{% endblock %} {% endblock %}
<!-- end template 404.html --> <!-- end template 404.html -->
...@@ -11,25 +11,28 @@ ...@@ -11,25 +11,28 @@
</script> </script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="error">
<h1>500</h1>
<h2>Server Error</h2><br/>
<h3>{% trans "sorry, system error" %}<br/>
{% trans "system error log is recorded, error will be fixed as soon as possible" %}<br/>
{% trans "please report the error to the site administrators if you wish" %}</h3> <br/>
</div>
<div id="error-box1">
<a href="{% url questions %}">{% trans "see all questions" %} &raquo;</a>
</div>
<div id="error-box2">
<a href="{% url tags %}">{% trans "see all tags" %} &raquo;</a>
</div>
<div id="error-box3">
<a href="#" id="linkPrevious">{% trans "back to previous page" %} &raquo;</a>
</div>
<div id="main-bar" class=""> <div id="main-bar" class="">
<h3> <h3>
500 Server Error 500 Server Error
</h3> </h3>
</div>
<div id="main-body" class="headNormal">
<div style="padding:5px 0px 10px 0;line-height:25px">
<h3>{% trans "sorry, system error" %}</h3>
<br/>
{% trans "system error log is recorded, error will be fixed as soon as possible" %}<br/>
{% trans "please report the error to the site administrators if you wish" %}
<ul>
<li><a href="#" id="linkPrevious">{% trans "back to previous page" %}</a></li>
<li><a href="{% url questions %}">{% trans "see latest questions" %}</a></li>
<li><a href="{% url tags %}">{% trans "see tags" %}</a></li>
</ul>
</div>
</div> </div>
{% endblock %} {% endblock %}
<!-- end template 500.html --> <!-- end template 500.html -->
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
{% block page_center %} {% block page_center %}
{% block full_width_banner %}{% endblock %} {% block full_width_banner %}{% endblock %}
<div id="wrapper"> <div id="wrapper">
{% block site_width_banner %}{% endblock %} {% block site_width_banner %}{% endblock %}
......
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
<div class="clear"></div> <div class="clear"></div>
{% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %} </div>
</div>
{% if settings.USE_ANNOUNCEMENT_BAR|or_preview:request %}
<div id="announcement"> <div id="announcement">
{{ settings.ANNOUNCEMENT_BAR|or_preview:request|static_content:settings.ANNOUNCEMENT_BAR_RENDER_MODE }} {{ settings.ANNOUNCEMENT_BAR|or_preview:request|static_content:settings.ANNOUNCEMENT_BAR_RENDER_MODE }}
</div> </div>
{% endif %} {% endif %}
</div>
</div>
<!-- end template header.html --> <!-- end template header.html -->
...@@ -92,6 +92,14 @@ ...@@ -92,6 +92,14 @@
} }
</style> </style>
</noscript> </noscript>
<div id="fb-root"></div>
<script>
(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
...@@ -127,7 +135,21 @@ ...@@ -127,7 +135,21 @@
{% contributors_info question %} {% contributors_info question %}
</div> </div>
{% comments question request.user %} {% comments question request.user %}
</div> <!-- start share content -->
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="it" data-count="none" data-dnt="true">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<div class="g-plus" data-action="share" data-annotation="none"></div>
<script type="text/javascript">
window.___gcfg = {lang: 'it'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<div class="fb-like" data-send="true" data-layout="button_count" data-width="450" data-show-faces="false"></div>
<!-- end share content -->
</div>
</td> </td>
</tr> </tr>
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
<div class="boxC"> <div class="boxC">
<div class="questions-count"> <div class="questions-count">
{{ questions.paginator.count }}<span style="color:black;font-size:14px;margin-left:5px">{{ list_description }}</span> {{ questions.paginator.count }}<span style="color:#EEE;font-size:14px;margin-left:5px;text-shadow: 1px 1px 1px #222;">{{ list_description }}</span>
</div> </div>
{% if answer_count %} {% if answer_count %}
<div class="questions-count"> <div class="questions-count">
{{ answer_count }}<span style="color:black;font-size:14px;margin-left:5px">{% trans "answers" %}</span> {{ answer_count }}<span style="color:#EEE;font-size:14px;margin-left:5px;text-shadow: 1px 1px 1px #222;">{% trans "answers" %}</span>
</div> </div>
{% endif %} {% endif %}
...@@ -23,4 +23,4 @@ ...@@ -23,4 +23,4 @@
</p> </p>
</div> </div>
</div> </div>
{% endspaceless %} {% endspaceless %}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment