diff options
author | Jochen Topf <jochen@topf.org> | 2012-01-24 17:11:25 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2012-01-24 17:11:25 +0100 |
commit | 51acfef57cda411c7917a2045fca7e0f3a1df18b (patch) | |
tree | cbcdf799308f4ef365bd9754e1a203244a04aa2f | |
parent | 2ee61e2fe3229a7ae05d6399d6702f4cc79b9c79 (diff) | |
download | taginfo-51acfef57cda411c7917a2045fca7e0f3a1df18b.tar taginfo-51acfef57cda411c7917a2045fca7e0f3a1df18b.tar.gz |
Save some spaces in HTML
-rw-r--r-- | web/lib/javascript.rb | 4 | ||||
-rw-r--r-- | web/views/index.erb | 20 | ||||
-rw-r--r-- | web/views/layout.erb | 87 |
3 files changed, 46 insertions, 65 deletions
diff --git a/web/lib/javascript.rb b/web/lib/javascript.rb index cadaa4f..86446fa 100644 --- a/web/lib/javascript.rb +++ b/web/lib/javascript.rb @@ -23,9 +23,9 @@ class Javascript def to_html if @file.nil? - %Q{ <script type="text/javascript">//<![CDATA[\n#{ @content }//]]></script>\n} + %Q{ <script type="text/javascript">//<![CDATA[\n#{ @content }//]]></script>\n} else - %Q{ <script type="text/javascript" src="/js/#{ @file }.js"></script>\n} + %Q{ <script type="text/javascript" src="/js/#{ @file }.js"></script>\n} end end diff --git a/web/views/index.erb b/web/views/index.erb index 7d2285c..54eb038 100644 --- a/web/views/index.erb +++ b/web/views/index.erb @@ -1,23 +1,15 @@ <table class="boxes resize" width="100%"> <tr> - <td> - <h2><a href="/keys"><%= t.osm.keys %></a> - / <a href="/tags"><%= t.osm.tags %></a></h2> - </td> + <td><h2><a href="/keys"><%= t.osm.keys %></a> / <a href="/tags"><%= t.osm.tags %></a></h2></td> <td rowspan="4" width="20"></td> - <td width="232"> - <h2><a href="/reports"><%= t.taginfo.reports %></a></h2> - </td> + <td width="232"><h2><a href="/reports"><%= t.taginfo.reports %></a></h2></td> <td rowspan="4" width="20"></td> - <td width="232"> - <h2><a href="/about"><%= t.taginfo.about %></a></h2> - </td> + <td width="232"><h2><a href="/about"><%= t.taginfo.about %></a></h2></td> </tr> <tr> <td rowspan="3" class="box"> <p><%= t.pages.index.keys.intro %></p> - <div id="tagcloud" style="margin: 15px 0; line-height: 200%; text-align: justify; overflow: hidden;"> - </div> + <div id="tagcloud" style="margin: 15px 0; line-height: 200%; text-align: justify; overflow: hidden;"></div> <p class="emphasis" style="margin-top: 20px;"><a href="/keys"><%= t.pages.index.keys.listkeys %></a></p> <p class="emphasis"><a href="/tags"><%= t.pages.index.keys.listtags %></a></p> </td> @@ -36,9 +28,7 @@ </td> </tr> <tr> - <td> - <h2><%= t.taginfo.international %></h2> - </td> + <td><h2><%= t.taginfo.international %></h2></td> </tr> <tr> <td class="box"> diff --git a/web/views/layout.erb b/web/views/layout.erb index de81b0c..be7645f 100644 --- a/web/views/layout.erb +++ b/web/views/layout.erb @@ -1,60 +1,51 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> - <head profile="http://a9.com/-/spec/opensearch/1.1/"> - <title><%= h(title) %></title> - <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <meta name="content-language" content="<%= r18n.locale.code %>" /> - <link rel="stylesheet" type="text/css" href="/css/taginfo.css" /> - <link rel="stylesheet" type="text/css" href="/css/smoothness/jquery-ui-1.8.10.custom.css" /> - <link rel="stylesheet" type="text/css" href="/css/flexigrid/flexigrid.css" /> - <link rel="search" type="application/opensearchdescription+xml" href="/search/opensearch.xml" title="<%= TaginfoConfig.get('opensearch.shortname') %>" /> +<head profile="http://a9.com/-/spec/opensearch/1.1/"> + <title><%= h(title) %></title> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <meta name="content-language" content="<%= r18n.locale.code %>" /> + <link rel="stylesheet" type="text/css" href="/css/taginfo.css" /> + <link rel="stylesheet" type="text/css" href="/css/smoothness/jquery-ui-1.8.10.custom.css" /> + <link rel="stylesheet" type="text/css" href="/css/flexigrid/flexigrid.css" /> + <link rel="search" type="application/opensearchdescription+xml" href="/search/opensearch.xml" title="<%= TaginfoConfig.get('opensearch.shortname') %>" /> <%= javascript_tags %> - </head> - <body> - <div id="header"> - <div id="header_date" title="<%= t.taginfo.data_from_description %>" tipsy="ne"> - <%= t.taginfo.data_from %>: <%= @data_until %> UTC - </div> - <div id="header_forms" class="no-print"> - <form id="set_language" action="/switch_locale"> - <input type="hidden" id="url" name="url" value="<%= TaginfoConfig.get('instance.url') + request.path %>"/> - <select id="locale" name="locale"> +</head> +<body> + <div id="header"> + <div id="header_date" title="<%= t.taginfo.data_from_description %>" tipsy="ne"><%= t.taginfo.data_from %>: <%= @data_until %> UTC</div> + <div id="header_forms" class="no-print"> + <form id="set_language" action="/switch_locale"> + <input type="hidden" id="url" name="url" value="<%= TaginfoConfig.get('instance.url') + request.path %>"/> + <select id="locale" name="locale"> <% r18n.available_locales.sort{ |a,b| a.title <=> b.title }.each do |locale| %> - <option value="<%= locale.code %>"<%= locale.code == r18n.locale.code ? ' selected="selected"' : ''%>><%= locale.title %> </option> + <option value="<%= locale.code %>"<%= locale.code == r18n.locale.code ? ' selected="selected"' : ''%>><%= locale.title %></option> <% end %> - </select> - </form> - <form action="/search"> - <input type="text" id="search" name="q" value=""/> - </form> - </div> - <div id="header_logo"> - <a href="/"><img width="49" height="49" src="<%= TaginfoConfig.get('instance.icon', '/img/logo/world.png') %>" alt="taginfo"/></a> + </select> + </form> + <form action="/search"><input type="text" id="search" name="q" value=""/></form> + </div> + <div id="header_logo"> + <a href="/"><img width="49" height="49" src="<%= TaginfoConfig.get('instance.icon', '/img/logo/world.png') %>" alt="taginfo"/></a> <% if @section %> - <a href="/"><img width="136" height="49" src="/img/logo/taginfo_with_bar.png" alt="taginfo"/></a> - <a class="section" href="/<%= @section %>"><%= @section_title %></a> + <a href="/"><img width="136" height="49" src="/img/logo/taginfo_with_bar.png" alt="taginfo"/></a> + <a class="section" href="/<%= @section %>"><%= @section_title %></a> <% else %> - <a href="/"><img width="129" height="49" src="/img/logo/taginfo.png" alt="taginfo"/></a> + <a href="/"><img width="129" height="49" src="/img/logo/taginfo.png" alt="taginfo"/></a> <% end %> - </div> </div> - <div id="main"> + </div> + <div id="main"> <%= yield %> + </div> + <div id="footer" class="no-print"> + <div id="footer_left"><a class="extlink" href="http://www.openstreetmap.org/"><b>OpenStreetMap</b> - The Free Wiki World Map</a></div> + <div id="footer_right"> + <a href="/keys"><%= t.osm.keys %></a> · <a href="/tags"><%= t.osm.tags %></a> · + <a href="/reports"><%= t.taginfo.reports %></a> · <a href="/sources"><%= t.taginfo.sources %></a> · + <a href="/download"><%= t.taginfo.download %></a> · <a href="/about"><%= t.taginfo.about %></a> · + <a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo"><%= t.taginfo.wiki %></a> </div> - <div id="footer" class="no-print"> - <div id="footer_left"> - <a class="extlink" href="http://www.openstreetmap.org/"><b>OpenStreetMap</b> - The Free Wiki World Map</a> - </div> - <div id="footer_right"> - <a href="/keys"><%= t.osm.keys %></a> · - <a href="/tags"><%= t.osm.tags %></a> · - <a href="/reports"><%= t.taginfo.reports %></a> · - <a href="/sources"><%= t.taginfo.sources %></a> · - <a href="/download"><%= t.taginfo.download %></a> · - <a href="/about"><%= t.taginfo.about %></a> · - <a class="extlink" href="http://wiki.openstreetmap.org/wiki/Taginfo"><%= t.taginfo.wiki %></a> - </div> - </div> - <div id="javascriptmsg" style="position: absolute; top: 0px; left: 240px; background-color: #f08080; padding: 10px; margin: 20px 40px;">This website only works with Javascript! Please enable Javascript in your browser.</div> - </body> + </div> + <div id="javascriptmsg" style="position: absolute; top: 0px; left: 240px; background-color: #f08080; padding: 10px; margin: 20px 40px;">This website only works with Javascript! Please enable Javascript in your browser.</div> +</body> </html> |