Skip to content

Commit

Permalink
Merge branch '68-ui-tweaks'
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed May 16, 2013
2 parents 3afcccf + 44a4e0d commit 0af26cd
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 80 deletions.
83 changes: 48 additions & 35 deletions ckanext/geodatagov/fanstatic_library/styles/geodatagov.css
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ a {
}
.masthead .container .account-wrapper {
float: right;
padding: 10px;
padding: 6px 10px;
}
.masthead .container .account-wrapper .not-authed a {
color: #284a7a;
Expand All @@ -178,9 +178,6 @@ a {
.masthead .container .account-wrapper .not-authed a span {
text-decoration: underline;
}
.masthead .container .account-wrapper .authed {
padding: 7px;
}
.masthead .container .account-wrapper .authed .gravatar {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
Expand All @@ -190,8 +187,6 @@ a {
}
.masthead .container .account-wrapper ul {
*zoom: 1;
margin-top: 5px;
margin-right: 5px;
}
.masthead .container .account-wrapper ul:before,
.masthead .container .account-wrapper ul:after {
Expand All @@ -204,22 +199,48 @@ a {
}
.masthead .container .account-wrapper ul li {
float: left;
margin-left: 5px;
border-left: 1px solid #c0cfe1;
}
.masthead .container .account-wrapper ul li a {
display: block;
padding: 2px 5px;
color: white;
background-color: #5881b0;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
padding: 0 5px;
color: #5881b0;
}
.masthead .container .account-wrapper ul li a:hover {
background-color: #446891;
color: #446891;
background-color: #e2e9f2;
text-decoration: none;
}
.masthead .container .site-wide-search {
position: absolute;
right: 0;
bottom: 0;
margin: 7px 10px;
}
.masthead .container .site-wide-search input {
margin: 0;
border-width: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
width: 166px;
padding-left: 29px;
background: url("http://www.data.gov/sites/all/themes/datagov/images/search-box.jpg");
}
.masthead .container .site-wide-search button {
background: url("http://www.data.gov/sites/all/themes/datagov/images/search-button.jpg");
width: 104px;
height: 28px;
border-width: 0;
line-height: 9000px;
}
.masthead .container .top-nav {
clear: both;
background-color: transparent;
Expand Down Expand Up @@ -322,26 +343,15 @@ a {
margin-top: -35px;
width: 290px;
}
.masthead .container .top-nav .site-search {
float: right;
margin: 9px 18px;
}
.masthead .container .top-nav .site-search input {
border-width: 0;
font-family: 'Open Sans';
font-weight: 600;
padding: 6px 10px;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
}
.masthead .container .top-nav .secondary {
background-color: #4ba9d0;
background-color: #3a74a5;
background-image: -moz-linear-gradient(top, #5ea0d2, #033162);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5ea0d2), to(#033162));
background-image: -webkit-linear-gradient(top, #5ea0d2, #033162);
background-image: -o-linear-gradient(top, #5ea0d2, #033162);
background-image: linear-gradient(to bottom, #5ea0d2, #033162);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5ea0d2', endColorstr='#ff033162', GradientType=0);
font-family: 'Open Sans';
font-weight: 600;
height: 50px;
Expand All @@ -367,7 +377,10 @@ a {
}
.masthead .container .top-nav .secondary ul li a:hover,
.masthead .container .top-nav .secondary ul li.active a {
background-color: #3090b8;
background-color: #5ea0d2;
}
.masthead .container .top-nav .secondary ul li.home {
margin-right: 40px;
}
.masthead .container .top-nav .secondary ul li.home a {
padding-left: 20px;
Expand Down
81 changes: 45 additions & 36 deletions ckanext/geodatagov/fanstatic_library/styles/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
width: 920px;
}
a img {
vertical-align: -2px;
margin-right: 3px;
vertical-align: -2px;
margin-right: 3px;
}
}

Expand All @@ -26,7 +26,7 @@
}
.logo {
.clearfix;
float: left;
float: left;
padding: 4px;
width: 540px;
a {
Expand Down Expand Up @@ -54,7 +54,7 @@
}
.account-wrapper {
float: right;
padding: 10px;
padding: 6px 10px;
.not-authed a {
color: @geoHeaderDarkColor;
font-weight: bold;
Expand All @@ -65,34 +65,52 @@
text-decoration: underline;
}
}
.authed {
padding: 7px;
.gravatar {
.border-radius(2px);
vertical-align: -3px;
}
.authed .gravatar {
.border-radius(2px);
vertical-align: -3px;
}
ul {
.clearfix;
margin-top: 5px;
margin-right: 5px;
li {
float: left;
margin-left: 5px;
border-left: 1px solid lighten(@geoHeaderLiteColor, 30%);
a {
display: block;
padding: 2px 5px;
color: white;
background-color: @geoHeaderLiteColor;
.border-radius(2px);
padding: 0 5px;
color: @geoHeaderLiteColor;
&:hover {
background-color: darken(@geoHeaderLiteColor, 10%);
color: darken(@geoHeaderLiteColor, 10%);
background-color: lighten(@geoHeaderLiteColor, 40%);
text-decoration: none;
}
}
}
}
}
.site-wide-search {
position: absolute;
right: 0;
bottom: 0;
margin: 7px 10px;
input {
margin: 0;
border-width: 0;
.box-shadow(none);
.border-radius(0);
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
width: 166px;
padding-left: 29px;
background: url("@{geoRemoteThemeURL}images/search-box.jpg");
}
button {
background: url("@{geoRemoteThemeURL}images/search-button.jpg");
width: 104px;
height: 28px;
border-width: 0;
line-height: 9000px;
}
}
.top-nav {
clear: both;
background-color: transparent;
Expand Down Expand Up @@ -175,20 +193,8 @@
}
}
}
.site-search {
float: right;
margin: 9px 18px;
input {
border-width: 0;
font-family: 'Open Sans';
font-weight: 600;
padding: 6px 10px;
.border-radius(0);
.box-shadow(none);
}
}
.secondary {
background-color: @geoHeaderSubColor;
#gradient > .vertical(#5ea0d2, #033162);
font-family: 'Open Sans';
font-weight: 600;
height: 50px;
Expand All @@ -202,12 +208,15 @@
}
a:hover,
&.active a {
background-color: darken(@geoHeaderSubColor, 10%);
background-color: #5ea0d2;
}
&.home a {
padding-left: 20px;
padding-right: 20px;
font-size: 21px;
&.home {
margin-right: 40px;
a {
padding-left: 20px;
padding-right: 20px;
font-size: 21px;
}
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions ckanext/geodatagov/fanstatic_library/styles/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,27 @@
-o-transform-origin: @arguments;
transform-origin: @arguments;
}

// Gradients
#gradient {
.horizontal(@startColor: #555, @endColor: #333) {
background-color: @endColor;
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(to right, @startColor, @endColor); // Standard, IE10
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@startColor),argb(@endColor))); // IE9 and down
}
.vertical(@startColor: #555, @endColor: #333) {
background-color: mix(@startColor, @endColor, 60%);
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
background-image: linear-gradient(to bottom, @startColor, @endColor); // Standard, IE10
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@startColor),argb(@endColor))); // IE9 and down
}
}
14 changes: 5 additions & 9 deletions ckanext/geodatagov/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,17 @@
{% endif %}
</div>
{% endblock %}
<form class="site-wide-search" action="{% url_for controller='package', action='search' %}" method="get">
<label for="field-sitewide-search" class="hide">{{ _('Search Datasets') }}</label>
<input id="field-sitewide-search" type="text" name="q" placeholder="{{ _('Search datasets...') }}" />
<button class="btn-search" type="submit">{{ _('Search') }}</button>
</form>
</hgroup>

<hgroup class="top-nav">
{% include 'snippets/root_nav.html' %}
{% block header_site_navigation %}
<nav class="secondary">
{% block header_site_search %}
<form class="section site-search simple-input" action="{% url_for controller='package', action='search' %}" method="get">
<div class="field">
<label for="field-sitewide-search">{{ _('Search Datasets') }}</label>
<input id="field-sitewide-search" type="text" name="q" placeholder="{{ _('Search datasets...') }}" />
<button class="btn-search" type="submit">{{ _('Search') }}</button>
</div>
</form>
{% endblock %}
<ul class="nav" data-module="geodatagov-top-nav">
{% set nav_items = [
{ 'url': h.url_for('search'),
Expand Down

0 comments on commit 0af26cd

Please sign in to comment.