added language navigation

Change-Id: Iade462aad14d9f68ebc2183a101b8f9a3465778f
This commit is contained in:
Evgeny Fadeev 2013-06-19 18:50:49 -04:00
parent 1e4ce62f6f
commit 60de0220c8
4 changed files with 179 additions and 52 deletions

View File

@ -54,6 +54,7 @@ h1.section-title,
position: absolute;
left: 200px;
bottom: 22px;
width: 750px;
a {
color: #255e6e;
@ -101,6 +102,9 @@ h1.section-title,
border-left: 1px solid #e4eef1;
/*background: url(../images/sprites.png) no-repeat -7px -242px;*/
position: relative;
&.lang-nav {
padding: 0;
}
}
span.dropdown-toggle:hover {
background: #e4eef1;
@ -113,6 +117,14 @@ h1.section-title,
padding: 4px 0 10px 0;
top: 36px;
}
&.lang-nav {
.dropdown-menu {
padding-top: 10px;
left: -14px;
min-width: auto !important;
top: 14px;
}
}
}
.dropdown-menu {
background: #e4eef1;
@ -139,6 +151,20 @@ h1.section-title,
text-decoration: none;
}
}
.lang-nav {
float: right;
color: #255e6e;
font-size: 16px;
line-height: 16px;
height: 16px;
@include text-shadow(#fff 0 1px 1px);
li {
background: transparent;
}
.dropdown-menu li:hover {
background: transparent !important;
}
}
}
#header.with-logo #userToolsNav {
bottom: 19px;

View File

@ -13,7 +13,7 @@ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
*/
/* line 9, ../sass/extra.scss */
/* line 24, ../sass/extra.scss */
body,
p,
.short-summary .counts,
@ -22,7 +22,7 @@ p,
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* line 24, ../sass/extra.scss */
/* line 39, ../sass/extra.scss */
#secondaryHeader,
#questionCount,
#header,
@ -39,7 +39,7 @@ h1.section-title,
font-family: "PT Sans", serif;
}
/* line 27, ../sass/extra.scss */
/* line 42, ../sass/extra.scss */
#header {
background: #e4eef1;
border-top: 3px solid #255e6e;
@ -48,7 +48,7 @@ h1.section-title,
box-shadow: 1px 1px 1px 1px #cccccc;
}
/* line 33, ../sass/extra.scss */
/* line 48, ../sass/extra.scss */
.openid-signin #metaNav a.signin {
background: none;
-webkit-box-shadow: 0 0 0 0;
@ -56,13 +56,14 @@ h1.section-title,
box-shadow: 0 0 0 0;
}
/* line 38, ../sass/extra.scss */
/* line 53, ../sass/extra.scss */
#metaNav {
position: absolute;
left: 200px;
bottom: 22px;
width: 750px;
}
/* line 43, ../sass/extra.scss */
/* line 59, ../sass/extra.scss */
#metaNav a {
color: #255e6e;
font-size: 16px;
@ -70,7 +71,7 @@ h1.section-title,
height: 16px;
text-shadow: white 0 1px 1px;
}
/* line 51, ../sass/extra.scss */
/* line 67, ../sass/extra.scss */
#metaNav a.signin {
background: #e8d895;
padding: 5px 8px;
@ -83,7 +84,7 @@ h1.section-title,
-moz-box-shadow: 0 0 2px 2px white;
box-shadow: 0 0 2px 2px white;
}
/* line 58, ../sass/extra.scss */
/* line 74, ../sass/extra.scss */
#metaNav a.on {
font-weight: normal;
color: #e4eef1;
@ -98,7 +99,7 @@ h1.section-title,
-moz-box-shadow: 0 0 2px 2px white;
box-shadow: 0 0 2px 2px white;
}
/* line 71, ../sass/extra.scss */
/* line 87, ../sass/extra.scss */
#metaNav #navTags,
#metaNav #navBadges,
#metaNav #navUsers,
@ -108,7 +109,7 @@ h1.section-title,
padding: 3px 10px 6px 10px;
margin: 0 0 0 30px;
}
/* line 78, ../sass/extra.scss */
/* line 94, ../sass/extra.scss */
#metaNav .dropdown,
#metaNav a {
display: inline;
@ -116,19 +117,23 @@ h1.section-title,
padding: 0;
margin: 5px 0 0 0;
}
/* line 84, ../sass/extra.scss */
/* line 100, ../sass/extra.scss */
#metaNav span.dropdown-toggle {
padding: 10px;
border-left: 1px solid #e4eef1;
/*background: url(../images/sprites.png) no-repeat -7px -242px;*/
position: relative;
}
/* line 90, ../sass/extra.scss */
/* line 105, ../sass/extra.scss */
#metaNav span.dropdown-toggle.lang-nav {
padding: 0;
}
/* line 109, ../sass/extra.scss */
#metaNav span.dropdown-toggle:hover {
background: #e4eef1;
/*background: url(../images/sprites.png) no-repeat -7px -274px;*/
}
/* line 93, ../sass/extra.scss */
/* line 112, ../sass/extra.scss */
#metaNav span.dropdown-toggle:hover .dropdown-menu {
background: #e4eef1;
border-left: 1px solid #e4eef1;
@ -137,58 +142,82 @@ h1.section-title,
padding: 4px 0 10px 0;
top: 36px;
}
/* line 102, ../sass/extra.scss */
/* line 121, ../sass/extra.scss */
#metaNav span.dropdown-toggle:hover.lang-nav .dropdown-menu {
padding-top: 10px;
left: -14px;
min-width: auto !important;
top: 14px;
}
/* line 129, ../sass/extra.scss */
#metaNav .dropdown-menu {
background: #e4eef1;
left: 26px;
top: 22px;
}
/* line 106, ../sass/extra.scss */
/* line 133, ../sass/extra.scss */
#metaNav .dropdown-menu li {
line-height: 1.7;
padding: 0 0 0 13px;
margin: 0;
}
/* line 110, ../sass/extra.scss */
/* line 137, ../sass/extra.scss */
#metaNav .dropdown-menu li img {
margin-bottom: 3px;
}
/* line 114, ../sass/extra.scss */
/* line 141, ../sass/extra.scss */
#metaNav .dropdown-menu li:hover {
display: block !important;
background: white !important;
}
/* line 118, ../sass/extra.scss */
/* line 145, ../sass/extra.scss */
#metaNav .dropdown-menu a {
margin: 0;
padding: 0;
}
/* line 122, ../sass/extra.scss */
/* line 149, ../sass/extra.scss */
#metaNav .dropdown-menu a:hover {
background: inherit;
text-decoration: none;
}
/* line 154, ../sass/extra.scss */
#metaNav .lang-nav {
float: right;
color: #255e6e;
font-size: 16px;
line-height: 16px;
height: 16px;
text-shadow: white 0 1px 1px;
}
/* line 161, ../sass/extra.scss */
#metaNav .lang-nav li {
background: transparent;
}
/* line 164, ../sass/extra.scss */
#metaNav .lang-nav .dropdown-menu li:hover {
background: transparent !important;
}
/* line 128, ../sass/extra.scss */
/* line 169, ../sass/extra.scss */
#header.with-logo #userToolsNav {
bottom: 19px;
right: -100px;
}
/* line 132, ../sass/extra.scss */
/* line 173, ../sass/extra.scss */
#secondaryHeader {
background: #fff;
border: none;
margin-bottom: 7px;
}
/* line 137, ../sass/extra.scss */
/* line 178, ../sass/extra.scss */
.scope-selector {
font-size: 16px;
height: 37px;
border-bottom: 3px solid white;
}
/* line 142, ../sass/extra.scss */
/* line 183, ../sass/extra.scss */
.scope-selector.on, .scope-selector:hover {
background: none;
border-bottom: 3px solid;
@ -199,33 +228,33 @@ h1.section-title,
-o-transition: 0.07s, ease;
transition: 0.07s, ease;
}
/* line 149, ../sass/extra.scss */
/* line 190, ../sass/extra.scss */
.scope-selector:hover {
color: #264D69;
}
/* line 152, ../sass/extra.scss */
/* line 193, ../sass/extra.scss */
.scope-selector:first-child {
margin-left: 0;
}
/* line 157, ../sass/extra.scss */
/* line 198, ../sass/extra.scss */
#askButton,
#homeButton {
display: none;
}
/* line 160, ../sass/extra.scss */
/* line 201, ../sass/extra.scss */
.tabBar {
background: none;
}
/* line 163, ../sass/extra.scss */
/* line 204, ../sass/extra.scss */
#logo img {
height: 56px;
margin-left: -10px;
}
/* line 167, ../sass/extra.scss */
/* line 208, ../sass/extra.scss */
#searchBar {
-webkit-box-shadow: inset #eeeeee 1px 1px 2px 1px;
-moz-box-shadow: inset #eeeeee 1px 1px 2px 1px;
@ -234,12 +263,12 @@ h1.section-title,
margin-top: -33px;
}
/* line 172, ../sass/extra.scss */
/* line 213, ../sass/extra.scss */
.search-drop-menu {
margin-left: 255px;
}
/* line 175, ../sass/extra.scss */
/* line 216, ../sass/extra.scss */
.search-drop-menu .footer button {
padding: 2px 6px 3px;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(5%, #f3f3f3), color-stop(100%, #f5850c));
@ -253,30 +282,30 @@ h1.section-title,
text-shadow: 0 0 0;
}
/* line 184, ../sass/extra.scss */
/* line 225, ../sass/extra.scss */
body.anon #searchBar,
body.anon .search-drop-menu {
margin-left: 158px;
}
/* line 188, ../sass/extra.scss */
/* line 229, ../sass/extra.scss */
#ContentRight {
margin-top: -56px;
margin-bottom: 56px;
}
/* line 192, ../sass/extra.scss */
/* line 233, ../sass/extra.scss */
#ContentLeft {
padding-bottom: 0;
}
/* line 198, ../sass/extra.scss */
/* line 239, ../sass/extra.scss */
.box h2,
.box .contributorback {
background: none;
text-align: left;
}
/* line 206, ../sass/extra.scss */
/* line 247, ../sass/extra.scss */
.box .inputs #interestingTagInput,
.box .inputs #ignoredTagInput,
.box .inputs #subscribedTagInput,
@ -286,7 +315,7 @@ body.anon .search-drop-menu {
line-height: 23px;
}
/* line 215, ../sass/extra.scss */
/* line 256, ../sass/extra.scss */
input[type="submit"].searchBtn,
input.cancelSearchBtn {
border: 0;
@ -297,7 +326,7 @@ input.cancelSearchBtn {
right: -500px;
}
/* line 227, ../sass/extra.scss */
/* line 268, ../sass/extra.scss */
button,
input[type="submit"],
input[type="button"],
@ -330,46 +359,46 @@ input[type="reset"],
border-left-color: #bababa !important;
}
/* line 247, ../sass/extra.scss */
/* line 288, ../sass/extra.scss */
.comments input[type="submit"],
.comments .controls a.button {
color: #4b4b4b !important;
border: none !important;
}
/* line 250, ../sass/extra.scss */
/* line 291, ../sass/extra.scss */
.comments input[type="submit"]:hover,
.comments .controls a.button:hover {
text-decoration: underline;
}
/* line 254, ../sass/extra.scss */
/* line 295, ../sass/extra.scss */
.comments input[type="submit"] {
color: #1b71bd;
}
/* line 258, ../sass/extra.scss */
/* line 299, ../sass/extra.scss */
input[type="submit"].link {
border: none !important;
color: 4b4b4b !important;
}
/* line 263, ../sass/extra.scss */
/* line 304, ../sass/extra.scss */
#footer {
margin-top: 10px;
}
/* line 266, ../sass/extra.scss */
/* line 307, ../sass/extra.scss */
#footer .span-4,
#footer .span-8 {
margin: 0;
}
/* line 269, ../sass/extra.scss */
/* line 310, ../sass/extra.scss */
#footer .span-4 {
width: 17%;
}
/* line 272, ../sass/extra.scss */
/* line 313, ../sass/extra.scss */
#footer .span-8 {
width: 32%;
}
/* line 279, ../sass/extra.scss */
/* line 320, ../sass/extra.scss */
#footer a,
#footer a:active,
#footer a:hover,
@ -379,30 +408,30 @@ input[type="submit"].link {
font-size: 12px;
line-height: 18px;
}
/* line 284, ../sass/extra.scss */
/* line 325, ../sass/extra.scss */
#footer p {
margin-top: 14px;
}
/* line 287, ../sass/extra.scss */
/* line 328, ../sass/extra.scss */
#footer h3 {
color: #de0000;
font-size: 16px;
margin: 0 0 8px 0;
padding: 0;
}
/* line 293, ../sass/extra.scss */
/* line 334, ../sass/extra.scss */
#footer ul {
list-style: none;
margin: 0;
}
/* line 297, ../sass/extra.scss */
/* line 338, ../sass/extra.scss */
#footer textarea {
display: block;
margin: 12px 0 10px;
width: 80%;
}
/* line 304, ../sass/extra.scss */
/* line 345, ../sass/extra.scss */
.pager,
.paginator {
margin-bottom: 0;

71
os/templates/base.html Normal file
View File

@ -0,0 +1,71 @@
{% load compress %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
{% block meta_description %}
<meta name="description" content="{{settings.APP_DESCRIPTION|escape}}" />
{% endblock %}
<meta name="keywords" content="{%block keywords%}{%endblock%},{{settings.APP_KEYWORDS|escape}}" />
{% if settings.GOOGLE_SITEMAP_CODE %}
<meta name="google-site-verification" content="{{settings.GOOGLE_SITEMAP_CODE}}" />
{% endif %}
<meta name="referrer" content="always" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
{% if settings.SITE_FAVICON %}
<link rel="shortcut icon" href="{{ settings.SITE_FAVICON|media }}" />
{% endif %}
<link
rel="alternate"
type="application/rss+xml"
title="{% trans site_title=settings.APP_SHORT_NAME %}RSS feed from {{ site_title }}{% endtrans %}"
href="{{ base_url }}{% url "latest_questions_feed" %}"
/>
{% block before_css %}{% endblock %}
{% include "meta/html_head_stylesheets.html" %}
{% include "meta/fonts.html" %} {# may contain external files #}
{% block forestyle %}{% endblock %}
{% include "meta/html_head_javascript.html" %}
{% block forejs %}{% endblock %}
{% if settings.USE_CUSTOM_HTML_HEAD %}
{{ settings.CUSTOM_HTML_HEAD }}
{% endif %}
</head>
<body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}{% if request.user.is_anonymous() %} anon{% endif %} lang-{{ language_code }}">
{% include "widgets/system_messages.html" %}
{% include "debug_header.html" %}
{% include "custom_header.html" ignore missing %}
{% if settings.CUSTOM_HEADER|trim != '' %}
<div id="custom-header">
{{settings.CUSTOM_HEADER}}
</div>
{% endif %}
{% include "widgets/header.html" %} {# Logo, user tool navigation and meta navitation #}
{% include "widgets/secondary_header.html" %} {# Scope selector, search input and ask button #}
{% if settings.ENABLE_LEADING_SIDEBAR %}
<div id="leading-sidebar">
{{ settings.LEADING_SIDEBAR }}
</div>
{% endif %}
<div class="content-wrapper">
{% block body %}
{% endblock %}
</div>
{% if settings.FOOTER_MODE == 'default' %}
{% include "widgets/footer.html" %}
{% elif settings.FOOTER_MODE == 'customize' %}
{{ settings.CUSTOM_FOOTER }}
{% endif %}
{% include "custom_footer.html" ignore missing %}
{% include "meta/bottom_scripts.html" %}
{% block endjs %}
{% endblock %}
<script type="text/javascript">
for (url_name in askbot['urls']){
askbot['urls'][url_name] = cleanUrl(askbot['urls'][url_name]);
}
</script>
</body>
</html>

View File

@ -137,3 +137,4 @@ under the License.
>{% trans %}badges{% endtrans %}</a>
{% endif %}
<a class="help" href="{% url "help" %}" title="{% trans %}help{% endtrans %}">{% trans %}help{% endtrans %}</a>
{% include 'widgets/language_nav.html' %}