Skip to content

Commit

Permalink
Merge branch 'feature-2375-demo-theme' of github.com:okfn/ckan into f…
Browse files Browse the repository at this point in the history
…eature-2375-demo-theme
  • Loading branch information
tobes committed Jun 12, 2012
2 parents 7a89967 + ac9390f commit d4531e0
Show file tree
Hide file tree
Showing 20 changed files with 83 additions and 42 deletions.
54 changes: 28 additions & 26 deletions ckan/public/base/css/ckan.css
Expand Up @@ -5225,6 +5225,7 @@ textarea {
*zoom: 1;
margin-top: -10px;
margin-bottom: 10px;
padding: 5px 0;
}
.toolbar:before,
.toolbar:after {
Expand All @@ -5243,37 +5244,26 @@ textarea {
margin: 0 0 0 15px;
padding: 0;
border: none;
}
.toolbar .breadcrumb li:first-of-type:before {
content: " ";
*margin-right: .3em;
display: inline-block;
vertical-align: text-bottom;
position: relative;
top: 2px;
width: 16px;
height: 16px;
background-image: url("../images/sprite-ckan-icons.png");
background-repeat: no-repeat;
background-position: 16px 16px;
width: 20px;
height: 20px;
background-position: -60px -33px;
margin-right: 5px;
}
.toolbar .breadcrumb li:first-of-type:before:last-child {
*margin-left: 0;
font-size: 20px;
}
.toolbar .breadcrumb li:after {
content: " / ";
}
.toolbar .breadcrumb li:last-of-type:after {
content: "";
}
.toolbar .breadcrumb .home {
position: relative;
top: 3px;
margin-left: -3px;
}
.toolbar .breadcrumb a {
color: rgba(40, 40, 40, 0.8);
line-height: 28px;
}
.toolbar .breadcrumb .active a {
font-weight: bold;
}
.toolbar .actions {
margin: 0;
list-style: none;
Expand Down Expand Up @@ -5486,6 +5476,11 @@ textarea {
background-position: -320px -33px;
width: 16px;
}
.ckan-icon-bookmark {
width: 25px;
height: 25px;
background-position: 0px -53px;
}
.format-label {
*margin-right: .3em;
display: inline-block;
Expand Down Expand Up @@ -5764,12 +5759,6 @@ textarea {
margin-left: 0.3em;
font-style: italic;
}
.masthead .ir {
text-indent: -900em;
min-height: 50px;
background-position: top left;
background-repeat: no-repeat;
}
.masthead .logo {
margin-right: 10px;
float: left;
Expand Down Expand Up @@ -5914,6 +5903,19 @@ textarea {
font-size: 12px;
padding: 4px;
}
.masthead .header-image {
font: inherit;
text-indent: -900em;
min-height: 50px;
}
.masthead .header-image .logo {
display: block;
width: 240px;
height: 50px;
background-image: url("../images/ckan-logo.png");
background-position: top left;
background-repeat: no-repeat;
}
.masthead .debug {
position: absolute;
top: 10px;
Expand Down
Binary file modified ckan/public/base/images/sprite-ckan-icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions ckan/public/base/less/icons.less
Expand Up @@ -10,6 +10,10 @@
@large-y: 20px;
@large-offset-x: -@large-x;
@large-offset-y: -@small-y - @medium-y;
@huge-x: 25px;
@huge-y: 25px;
@huge-offset-x: -@huge-x;
@huge-offset-y: -@small-y - @medium-y - @large-y;
@format-medium-x: 32px;
@format-medium-y: 35px;
@format-medium-offset-x: -@format-medium-x;
Expand Down Expand Up @@ -81,6 +85,8 @@
.ckan-icon-head { .ckan-icon-background-position(15, "large") }
.ckan-icon-arrow-e { .ckan-icon-background-position(16, "large"); width: 16px; }

.ckan-icon-bookmark { .ckan-icon-background-position(0, "huge"); }

// RESOURCE FORMAT ICONS

.format-label {
Expand Down
24 changes: 17 additions & 7 deletions ckan/public/base/less/masthead.less
Expand Up @@ -36,13 +36,6 @@
font-style: italic;
}

.masthead .ir {
text-indent: -900em;
min-height: 50px;
background-position: top left;
background-repeat: no-repeat;
}

.masthead .logo {
margin-right: 10px;
float: left;
Expand Down Expand Up @@ -185,6 +178,23 @@

}

// Logo Image Replacement

.masthead .header-image {
font: inherit; // Override Bootstrap .hide-text
text-indent: -900em;
min-height: 50px;
}

.masthead .header-image .logo {
display: block;
width: 240px;
height: 50px;
background-image: url("@{image-path}/ckan-logo.png");
background-position: top left;
background-repeat: no-repeat;
}

.masthead .debug {
position: absolute;
top: 10px;
Expand Down
21 changes: 14 additions & 7 deletions ckan/public/base/less/toolbar.less
Expand Up @@ -2,22 +2,19 @@
.clearfix;
margin-top: -10px;
margin-bottom: 10px;
padding: 5px 0;
}

.toolbar .breadcrumb {
.box-shadow(none);
position: relative;
top: -3px;
float: left;
background: none;
margin: 0 0 0 @gutter-small-x;
padding: 0;
border: none;
}

.toolbar .breadcrumb li:first-of-type:before {
content: " ";
.ckan-icon;
.ckan-icon-home;
margin-right: 5px;
font-size: 20px;
}

.toolbar .breadcrumb li:after {
Expand All @@ -28,11 +25,21 @@
content: "";
}

.toolbar .breadcrumb .home {
position: relative;
top: 4px;
margin-left: -3px;
}

.toolbar .breadcrumb a {
color: rgba(40, 40, 40, 0.8);
line-height: 28px;
}

.toolbar .breadcrumb .active a {
font-weight: bold;
}

.toolbar .actions {
.unstyled;
float: right;
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/group/index.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{{ h.nav_link(_('Groups'), controller='group', action='index') }}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/group/pages/form_page.html
Expand Up @@ -2,6 +2,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Groups'), controller='group', action='index') }}</li>
<li class="current">{% block breadcrumb_link %}{{ h.nav_link(_('Add a Group'), controller='group', action='new') }}{% endblock %}</li>
</ol>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/group/read.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Groups'), controller='group', action='index') }}</li>
<li class="current">{{ h.nav_link(c.group_dict.display_name, controller='group', action='read', id=c.group_dict.name) }}</li>
</ol>
Expand Down
3 changes: 2 additions & 1 deletion ckan/templates/header.html
Expand Up @@ -3,7 +3,8 @@
<div class="debug">Controller : {{ c.controller }}<br/>Action : {{ c.action }}</div>
{% endif %}
<div class="container">
<hgroup class="ir" style="background-image: url({{ '/base/images/ckan-logo.png' }})">
{# The .header-image class hides the main text and uses image replacement for the title #}
<hgroup class="header-image">
<a class="logo" href="{{ h.url('home') }}"><img width="64" src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a>
<h1><a href="{{ h.url('home') }}">{{ g.site_title }}</a></h1>
<p>{{ g.site_description }}</p>
Expand Down
4 changes: 3 additions & 1 deletion ckan/templates/package/read.html
Expand Up @@ -5,13 +5,15 @@
{% block breadcrumb %}
{% set dataset = c.pkg_dict.title or c.pkg_dict.name %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}</li>
<li class="active"><a href="" title="{{ dataset }}">{{ h.truncate(dataset, 60) }}</a></li>
<li class="active"><a href="" title="{{ dataset }}">{{ h.truncate(dataset, 35) }}</a></li>
</ol>
{% endblock %}

{% block actions %}
<ul class="actions">
<li>{{ h.nav_link(_('Related'), controller='package', action='related', id=c.pkg.id, class_='btn', icon='photo') }}</li>
<li>{{ h.nav_link(_('History'), controller='package', action='history', id=c.pkg.id, class_='btn', icon='rewind') }}</li>
<li>{{ h.nav_link(_('Edit'), controller='package', action='edit', id=c.pkg.id, class_='btn', icon='tools', condition=h.check_access('package_update',{'id':c.pkg.id })) }}</li>
<li><a class="btn" href=""><i class="ckan-icon ckan-icon-flag"></i> Report Issue</a></li>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/package/related_list.html
Expand Up @@ -2,6 +2,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}</li>
<li>{{ h.nav_link(h.dataset_display_name(c.pkg), controller='package', action='read', id=c.pkg.name) }}</li>
<li class="active"><a href="">{{ _('Related') }}</a></li>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/package/resource_read.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Datasets'), controller='package', action='search', highlight_actions = 'new index') }}</li>
<li>{{ h.nav_link(h.dataset_display_name(c.package), controller='package', action='read', id=c.package.get('name')) }}</li>
<li class="active"><a href="">{{ h.resource_display_name(c.resource) }}</a></li>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/package/search.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="active">{{ h.nav_link(_('Search Datasets'), controller='package', action='search', highlight_actions = 'new index') }}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/related/pages/form_page.html
Expand Up @@ -4,6 +4,7 @@
<ol class="breadcrumb">
<li>{{ h.nav_link(_('Datasets'), controller='package', action='search') }}</li>
<li class="active"><a href="{{ h.url_for(controller='package', action='read', id=c.pkg_dict.name) }}" title="{{ c.pkg_dict.title or c.pkg_dict.name }}">{{ h.truncate(c.pkg_dict.title or c.pkg_dict.name, 60) }}</a></li>
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{% block breadcrumb_item %}{% endblock %}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/followers.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('Home'), controller='user', action='me') }}</li>
<li class="current">{{ h.nav_link(_('Followers'), controller='user', action='followers', id="") }}</li>
</ol>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/login.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{{ h.nav_link(_('Login'), controller='user', action='login') }}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/new.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{{ h.nav_link(_('Registration'), controller='user', action='register') }}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/perform_reset.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{{ _('Password Reset') }}</li>
</ol>
{% endblock %}
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/read.html
Expand Up @@ -6,6 +6,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li>{{ h.nav_link(_('User'), controller='user', action='index') }}</li>
{% with title = _('Your Profile') if c.is_myself else user.display_name %}
<li class="current">{{ h.nav_link(title, controller='user', action='read', id=user.name) }}</li>
Expand Down
1 change: 1 addition & 0 deletions ckan/templates/user/request_reset.html
Expand Up @@ -4,6 +4,7 @@

{% block breadcrumb %}
<ol class="breadcrumb">
<li class="home hide-text"><a class="ckan-icon ckan-icon-bookmark" href="{{ h.url('home') }}">Home</a></li>
<li class="current">{{ h.nav_link(_('Password Reset'), controller='user', action='register') }}</li>
</ol>
{% endblock %}
Expand Down

0 comments on commit d4531e0

Please sign in to comment.