Skip to content

Commit

Permalink
[2375] Normalised the simple list and navigation styles
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 21, 2012
1 parent 419e118 commit a741776
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 5 additions & 1 deletion ckan/public/base/less/mixins.less
Expand Up @@ -56,14 +56,18 @@
}

.simple-item {
font-size: 12px;
line-height: 14 / 12em;
padding: 7px @gutterX;
border-bottom: 1px dotted #ccc;
&:last-of-type {
border-bottom: 0;
}
}

.simple-list {
.clearfix;
.unstyled;
padding-bottom: 7px;

& > li {
.simple-item;
Expand Down
9 changes: 1 addition & 8 deletions ckan/public/base/less/nav.less
Expand Up @@ -3,16 +3,10 @@
padding-bottom: 0;
}

.nav-item:last-of-type {
border-bottom: 0;
}

.nav-item > a {
color: @navLinkColor;
margin: -7px -@gutterX;
padding: 7px @gutterX;
font-size: 12px;
line-height: 14px; // keeps the overall height an even number
}

.nav-item.active {
Expand All @@ -34,9 +28,8 @@
}

.nav-item [class^=icon] {
position: relative;
font-size: 1.2em;
left: -1px;
margin: -1px 0 -1px -1px;
}

.module-narrow .nav-item > a {
Expand Down
8 changes: 5 additions & 3 deletions ckan/templates/development/primer.html
Expand Up @@ -19,9 +19,11 @@
{% snippet 'development/snippets/module.html', heading='Narrow Module (sidebar)', classes=['module-narrow'] %}
{% snippet 'development/snippets/module.html', heading='Narrow Shallow Module (sidebar text)', classes=['module-narrow', 'module-shallow'] %}

{% snippet 'development/snippets/nav.html', heading='List' %}
{% snippet 'development/snippets/nav.html', heading='Active List', show_active=true %}
{% snippet 'development/snippets/nav.html', heading='Icon List', show_icons=true %}
{% snippet 'development/snippets/list.html', heading='Simple List' %}

{% snippet 'development/snippets/nav.html', heading='Navigation' %}
{% snippet 'development/snippets/nav.html', heading='Active Navigation', show_active=true %}
{% snippet 'development/snippets/nav.html', heading='Icon Navigation', show_icons=true %}

{% snippet 'development/snippets/facet.html', heading='Facet List', show_icons=true %}

Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/development/snippets/nav.html
Expand Up @@ -5,7 +5,7 @@ <h1 class="module-heading">{{ heading }}</h1>
<ul class="unstyled nav nav-simple">
{% for value, active in items %}
<li class="nav-item{{ ' active' if show_active and active }}">
<a href="#">{% if show_icons %}<a href="#"><i class="icon-large icon-cog"></i> {% endif %}{{ value }}</a>
<a href="#">{% if show_icons %}<i class="icon-large icon-cog"></i> {% endif %}{{ value }}</a>
</li>
{% endfor %}
</ul>
Expand Down

0 comments on commit a741776

Please sign in to comment.