From b92e1b058421a6bf49f65f2d45060cfdf197fd1d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 30 Jun 2007 12:09:28 +0000 Subject: [PATCH] Fix some HTML validation issue. --- app/views/layouts/site.rhtml | 43 +++++++++++------------ app/views/site/index.rhtml | 3 +- app/views/trace/_trace.rhtml | 9 ++--- app/views/trace/list.rhtml | 2 +- app/views/user/login.rhtml | 6 ++-- public/stylesheets/site.css | 67 +++++++++++------------------------- 6 files changed, 53 insertions(+), 77 deletions(-) diff --git a/app/views/layouts/site.rhtml b/app/views/layouts/site.rhtml index e39c31b69..a2b912a97 100644 --- a/app/views/layouts/site.rhtml +++ b/app/views/layouts/site.rhtml @@ -1,12 +1,9 @@ - + - <%= javascript_include_tag 'main.js' %> - - <%= javascript_include_tag 'tile.js' %> <%= javascript_include_tag 'site.js' %> - - + + <%= stylesheet_link_tag 'site.css' %> OpenStreetMap<%= ' | '+@title if @title %> @@ -14,13 +11,13 @@ <% if params[:controller] == 'site' and params[:action] == 'index' %>
<% end %> +
<% if flash[:notice] %>
<%= flash[:notice] %>
<% end %> <%= yield %> -
@@ -37,12 +34,13 @@
    - <% viewclass = '' + <% + viewclass = '' editclass = '' traceclass = '' viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' - editcalss = 'active' if params['controller'] == 'campaign' + editclass = 'active' if params['controller'] == 'campaign' traceclass = 'active' if params['controller'] == 'trace' %>
  • <%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass } %>
  • @@ -57,9 +55,10 @@

    OpenStreetMap

    <%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %>
    -

    The Free Wiki World Map

    +

    The Free Wiki World Map

+ <% unless @user %>
OpenStreetMap is a free editable map of the whole world. It is made by people like you. @@ -70,18 +69,18 @@
<% end %> -
- Help & Wiki
+
+ Help & Wiki
<%= link_to "Users' diaries", {:controller => 'diary_entry', :action => 'list', :display_name => nil} %>
News blog
Shop
-
+
-
-
-Come to the first OpenStreetMap Conference, The State of the Map: 14th-15th July 2007, Manchester, UK. -
+
+
+ Come to the first OpenStreetMap Conference, The State of the Map: 14th-15th July 2007, Manchester, UK. +
@@ -90,13 +89,13 @@ Come to the first OpenStreetMap Conference, - - - - + + + + - +
diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 4b187c099..d0c9c2e29 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -87,6 +87,7 @@ var bottom = getStyle( el, 'bottom' ); var right = getStyle( el, 'right' ); var width = el.old_width; + var height; if( ! width ) { width = getStyle( el, 'width' ); } @@ -98,7 +99,7 @@ if( el.offsetParent.nodeName == 'BODY' || el.offsetParent.nodeName == 'HTML' ) { if( typeof( window.innerWidth ) == 'number' ) { pwidth = window.innerWidth; - height = window.innerHeight; + pheight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { pwidth = document.documentElement.clientWidth; diff --git a/app/views/trace/_trace.rhtml b/app/views/trace/_trace.rhtml index b79638d17..8bd198d4e 100644 --- a/app/views/trace/_trace.rhtml +++ b/app/views/trace/_trace.rhtml @@ -2,7 +2,7 @@ <% cl = cycle('table0', 'table1') %> <% if trace.inserted %> - + <% else %> PENDING <% end %> @@ -13,9 +13,10 @@ (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points) <% end %> ... <%= time_ago_in_words( trace.timestamp ) %> ago
- <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %> / - map
- <%= trace.description %> + <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %> / + <%= link_to 'map', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'create maps'} %> +
+ <%= escape_once(trace.description) %>
by <%= link_to trace.user.display_name, {:controller => 'user', :action => 'view', :display_name => trace.user.display_name} %> in diff --git a/app/views/trace/list.rhtml b/app/views/trace/list.rhtml index 1bf36cc60..237fd7ae4 100644 --- a/app/views/trace/list.rhtml +++ b/app/views/trace/list.rhtml @@ -4,7 +4,7 @@ Traces filtered by tag <%= @tag %>

<% end %> - | +RSS | <%= link_to 'See just your traces, or upload a trace', {:controller => 'trace', :action => 'mine'} %> <% if @tag %> | <%= link_to 'See all traces', {:controller => 'trace', :action => 'list'} %> diff --git a/app/views/user/login.rhtml b/app/views/user/login.rhtml index c8cc49388..59af16b4f 100644 --- a/app/views/user/login.rhtml +++ b/app/views/user/login.rhtml @@ -1,5 +1,5 @@ -

Login:


-Please login or <%= link_to 'create an account', :controller => 'user', :action => 'new' %>.
+

Login:


+Please login or <%= link_to 'create an account', :controller => 'user', :action => 'new' %>.
<% form_tag :action => 'login' do %> <%= hidden_field_tag('referer', params[:referer]) %> @@ -8,6 +8,6 @@ Please login or <%= link_to 'create an account', :controller => 'user', :action password:<%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %> -
+
<%= submit_tag 'Login' %> <% end %> (<%= link_to 'Lost your password?', :controller => 'user', :action => 'lost_password' %>) diff --git a/public/stylesheets/site.css b/public/stylesheets/site.css index e06a6bf81..008089ed2 100644 --- a/public/stylesheets/site.css +++ b/public/stylesheets/site.css @@ -80,7 +80,7 @@ body { font-size: 11px; } -#left_menu { +.left_menu { width: 150px; min-width: 150px; margin: 10px; @@ -93,62 +93,63 @@ body { font-size: 14px; font-weight: bold; } -#left_menu td { + +.left_menu td { font-size: 12px; padding-right: 4px; } -#left_menu h1 { + +.left_menu h1 { font-style: normal; font-size: 15px; padding: 0 0 0 1em; text-align: left; } -#left_menu ul { +.left_menu ul { /*list-style: none;*/ padding-left: 10px; margin: 0; } -#left_menu li { +.left_menu li { margin:0; padding:0; } -#left_menu img { +.left_menu img { margin: 2px 8px 0 0; } -#left_menu a { +.left_menu a { color: #000000; text-decoration: none; } -#messages { - border: 1px solid #ccc; -} - - -#left_menu a:visited { +.left_menu a:visited { color: #000000; text-decoration: none; } -#left_menu a:active { +.left_menu a:active { color: #000000; text-decoration: none; } -#left_menu a:link { +.left_menu a:link { color: #000000; text-decoration: none; } -#left_menu a:hover { +.left_menu a:hover { color: #000000; text-decoration: underline; } +#messages { + border: 1px solid #ccc; +} + #content { /* width: 700px; */ @@ -455,6 +456,10 @@ input { width : 30em; } +.nowrap { + white-space: nowrap; +} + /** * This now just used to detect the width/height required for the popup. */ @@ -489,33 +494,3 @@ input { text-align: Left; font-weight: normal; } -#left_menu a { - color: #000000; - text-decoration: none; -} - -#messages { - border: 1px solid #ccc; -} - -#left_menu a:visited { - color: #000000; - text-decoration: underline; -} - -#left_menu a:active { - color: #000000; - text-decoration: underline; -} - -#left_menu a:link { - color: #000000; - text-decoration: underline; -} - -#left_menu a:hover { - color: #000000; - text-decoration: underline; -} - - -- 2.43.2