Skip to content

Commit

Permalink
[#2375] Tidy up some html validation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Aug 2, 2012
1 parent b1d0380 commit 1db2037
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
8 changes: 5 additions & 3 deletions ckan/public/base/less/masthead.less
Expand Up @@ -24,7 +24,7 @@
}

.masthead hgroup h1,
.masthead hgroup p {
.masthead hgroup h2 {
font-size: 34px;
line-height: 1.5;
float: left;
Expand All @@ -35,13 +35,15 @@
letter-spacing: -2px; // Sorry world of typography.
}

.masthead hgroup p {
.masthead hgroup h2 {
position: absolute;
bottom: -3px;
right: 0;
font-size: 15px;
margin: 0;
font-size: 15px;
font-weight: normal;
line-height: 1.2;
white-space: nowrap;
}

.masthead hgroup a {
Expand Down
4 changes: 2 additions & 2 deletions ckan/public/base/test/primer/index.html
Expand Up @@ -587,7 +587,7 @@ <h1 id="masthead" class="primer-heading">Masthead (Site Header)</h1>
<header class="masthead">
<hgroup>
<h1><a href="">My Site Title</a></h1>
<p>My Site Tagline</p>
<h2>My Site Tagline</h2>
</hgroup>
<nav>
<ul class="unstyled">
Expand All @@ -603,7 +603,7 @@ <h1><a href="">My Site Title</a></h1>
<header class="masthead">
<hgroup>
<h1><a href="">My Site Title</a></h1>
<p>My Site Tagline</p>
<h2>My Site Tagline</h2>
</hgroup>
<div class="account">
<a href="#home" class="image">
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/snippets/group_item.html
Expand Up @@ -17,7 +17,7 @@
#}
{% set url = h.url_for(group.type ~ '_read', action='read', id=group.name) %}
<li class="media-item media media-vertical{% if first %} first{% endif %}{% if last %} last{% endif %}">
<a class="media-image" href="{{ url }}"><img src="{{ group.image_url or '/base/images/placeholder-group.png' }}" /></a>
<a class="media-image" href="{{ url }}"><img src="{{ group.image_url or '/base/images/placeholder-group.png' }}" alt="{{ group.name }}" /></a>

This comment has been minimized.

Copy link
@icmurray

icmurray Aug 8, 2012

Contributor

Oi, Use {% url_for_static %}!

<div class="media-content">
<h3 class="media-heading">
<a href="{{ url }}" title="{{ _('View {name}').format(name=group.display_name) }}">
Expand Down
12 changes: 7 additions & 5 deletions ckan/templates/header.html
Expand Up @@ -5,11 +5,13 @@
<div class="container">
{# The .header-image class hides the main text and uses image replacement for the title #}
<hgroup class="{{ g.header_class }}">
{% if g.site_logo %}
<a class="logo" href="{{ h.url('home') }}"><img src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a>
{% endif %}
<h1><a href="{{ h.url('home') }}">{{ g.site_title }}</a></h1>
{% if g.site_description %}<p>{{ g.site_description }}</p>{% endif %}
<h1>
{% if g.site_logo %}
<a class="logo" href="{{ h.url('home') }}"><img src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a>
{% endif %}
<a href="{{ h.url('home') }}">{{ g.site_title }}</a>
</h1>
{% if g.site_description %}<h2>{{ g.site_description }}</h2>{% endif %}
</hgroup>
<div class="content">
{% if c.userobj %}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/home/index.html
Expand Up @@ -45,7 +45,7 @@ <h1 class="page-heading">{% block home_primary_heading %}{{ _("Welcome to CKAN")
<h2 class="media-heading">{% block home_image_caption %}{{ _("This is a featured section") }}{% endblock %}</h2>
{% block home_image_content %}
<a class="image" href="#">
<img src="http://placehold.it/420x220" width="420" height="220" />
<img src="http://placehold.it/420x220" alt="Placeholder" width="420" height="220" />
</a>
{% endblock %}
</section>
Expand All @@ -60,7 +60,7 @@ <h2 class="media-heading">{% block home_image_caption %}{{ _("This is a featured
<form class="dataset-search module-content clearfix" method="get" action="{% url_for controller='package', action='search' %}">
<h3 class="heading">{{ _("Search Your Data") }}</h3>
<span class="control-group search-giant">
<input type="text" class="search" name="q" value="{{ c.q }}" autocomplete="off" results="0" placeholder="{{ _('eg. Gold Prices') }}" />
<input type="text" class="search" name="q" value="{{ c.q }}" autocomplete="off" placeholder="{{ _('eg. Gold Prices') }}" />
<button type="submit" value="{{ _('Search') }}">Submit</button>
</span>
</form>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/related/snippets/related_item.html
Expand Up @@ -3,7 +3,7 @@
} %}
<li class="related-item media-item media media-vertical{% if first %} first{% endif %}{% if last %} last{% endif %}">
<a class="media-image" href="{{ related.url }}">
<img src="{{ related.image_url or placeholder_map[related.type] or '/base/images/placeholder-image.png' }}" />
<img src="{{ related.image_url or placeholder_map[related.type] or '/base/images/placeholder-image.png' }}" alt="{{ related.title }}" />
<span class="banner">
{%- if related.type == 'application' -%}
app
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/snippets/group.html
Expand Up @@ -14,7 +14,7 @@
<section class="module module-narrow module-shallow group">
<div class="module-content media media-vertical">
<a class="media-image" href="{{ url }}">
<img src="{{ group.image_url or h.url_for('/base/images/placeholder-group.png') }}" width="200" height="125" />
<img src="{{ group.image_url or h.url_for('/base/images/placeholder-group.png') }}" width="200" height="125" alt="{{ group.name }}" />
</a>
<div class="media-content">
<h3 class="media-heading"><a href={{ url }}>{{ group.title or group.name }}</a></h3>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/snippets/group_item.html
Expand Up @@ -3,7 +3,7 @@
{% set url=h.url_for(controller='group', action='read', id=group.name) %}
{% set truncate=truncate or 0 %}
<a class="media-image" href="{{ url }}">
<img src="{{ group.image_url or h.url_for('/base/images/placeholder-group.png') }}" width="100" height="60" />
<img src="{{ group.image_url or h.url_for('/base/images/placeholder-group.png') }}" width="100" height="60" alt="{{ group.name }}" />
</a>
<div class="media-content">
<h3 class="media-heading"><a href={{ url }}>{{ group.title or group.name }}</a></h3>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/snippets/related.html
Expand Up @@ -4,7 +4,7 @@ <h2 class="module-heading"><i class="icon-medium icon-picture"></i> Related <a c
{% if item %}
{% with url = h.url_for(controller='related', action='list', id=pkg_name) %}
<a class="image logo" href="{{ url }}">
<img src="{{ item.image_url or "http://placehold.it/200x125" }}" width="200" height="125" />
<img src="{{ item.image_url or "http://placehold.it/200x125" }}" width="200" height="125" alt="{{ item.title }}" />
</a>
<div class="media-content">
<h3 class="media-heading"><a href="{{ url }}">{{ item.title }}</a></h3>
Expand Down

0 comments on commit 1db2037

Please sign in to comment.