From 6adcce4e5d75fa21dea85742fa36ee3b97247b01 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 9 Jul 2013 15:26:04 -0700 Subject: [PATCH] Frontpage redesign --- app/assets/javascripts/sidebar.js | 22 +- app/assets/stylesheets/common.css.scss | 539 ++++++++----------------- app/assets/stylesheets/print.css | 5 +- app/assets/stylesheets/small.css.scss | 40 +- app/views/export/start.html.erb | 48 --- app/views/layouts/_content.html.erb | 15 + app/views/layouts/_header.html.erb | 36 ++ app/views/layouts/map.html.erb | 47 +++ app/views/layouts/site.html.erb | 117 +----- app/views/site/_search.html.erb | 16 - app/views/site/_sidebar.html.erb | 9 - app/views/site/edit.html.erb | 34 +- app/views/site/export.html.erb | 56 +++ app/views/site/index.html.erb | 46 +-- config/locales/en.yml | 12 +- config/routes.rb | 2 +- 16 files changed, 384 insertions(+), 660 deletions(-) delete mode 100644 app/views/export/start.html.erb create mode 100644 app/views/layouts/_content.html.erb create mode 100644 app/views/layouts/_header.html.erb create mode 100644 app/views/layouts/map.html.erb delete mode 100644 app/views/site/_search.html.erb delete mode 100644 app/views/site/_sidebar.html.erb create mode 100644 app/views/site/export.html.erb diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js index 912197b9f..e126285ab 100644 --- a/app/assets/javascripts/sidebar.js +++ b/app/assets/javascripts/sidebar.js @@ -1,16 +1,20 @@ -function openSidebar(options) { - options = options || {}; +function openSidebar() { + $("#sidebar-main") + .hide(); - $("#sidebar").trigger("closed"); - - if (options.title) { $("#sidebar_title").html(options.title); } - - $("#sidebar").width(options.width || "30%"); - $("#sidebar").css("display", "block").trigger("opened"); + $("#sidebar") + .trigger("closed") + .show() + .trigger("opened"); } function closeSidebar() { - $("#sidebar").css("display", "none").trigger("closed"); + $("#sidebar") + .hide() + .trigger("closed"); + + $("#sidebar-main") + .show(); } $(document).ready(function () { diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index b09becd04..f9065266b 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -5,9 +5,14 @@ $typeheight: 14px; $offwhite: #f4f4ff; $blue: #7092FF; $lightblue: #B8C5F0; -$grey: #AAA; -$lightgrey: #CCC; +$green: #7ebc6f; +$grey: #CCC; +$lightgrey: #EEE; +$darkgrey: #AAA; $hovercolor: 20%; +$headerHeight: 75px; +$sidebarWidth: 350px; +$keyline: 1px solid $grey; /* Styles common to large and small screens */ @@ -88,6 +93,7 @@ abbr, acronym { .margin12 { margin-left:100.0000%; } .fillL { background-color: white; } + /* Default rules for the body of every page */ * { @@ -112,35 +118,19 @@ body.slim { } h1, h2, h3 { - margin-top: $lineheight/2; - margin-bottom: $lineheight; font-weight: bold; line-height: 1.2; } -h1, h2 { - font-size: 32px; +h1 { + font-size: 18px; } -#content h2 { - font-size: 21px; +h2, h3 { + font-size: 16px; } -h3 { - font-size: 21px; - margin-top: $lineheight/2; - margin-bottom: $lineheight; -} - -h4,h5,h6 { - font-size: $typeheight; - margin-top: $lineheight/2; - margin-bottom: $lineheight/2; - font-weight: bold; - line-height: 1.5; -} - -p, ul { +p { margin-bottom: $lineheight; } @@ -242,196 +232,42 @@ table { } } -/* Rules for the whole left sidebar, including the logo */ - -#left { - position: absolute; - height: 100%; - width: 185px; - font-size: 11px; - line-height: 1.1; - z-index: 100; - border-right: 1px solid #ccc; -} - -/* Rules for the OpenStreetMap logo in the top left corner */ - -#logo { - display: block; - width: 170px; - min-width: 170px; - padding: $lineheight $lineheight/4; - text-align: center; - margin: auto; -} - -#logo h1 { - font-size: 18px; - line-height: 1; - text-align: center; - margin: 0; -} - -#logo h2 { - font-size: $lineheight/2; - line-height: 15px; - margin: 0; -} - -/* Rules for the site name */ - -#small-title { - display: none; - - img { - vertical-align: text-bottom; - } -} - -/* Rules for the introductory text displayed in the left sidebar to new users */ - -.sidebar-copy { - padding: $lineheight/4 $lineheight/2; - p { - margin: $lineheight/4 0; - } -} -.sidebar-copy.intro { - border-top: 1px solid #ccc; -} - -/* - * Rules for alert boxes shown in the left sidebar when important - * information needs to be conveyed such as when the site is - * undergoing maintenance. - */ - -.sidebar-alert { - padding: $lineheight/4; - border-top: 1px solid #ccc; - margin-top: 4px; - margin-bottom: -5px; - background: #e00; - font-size: 12px; - font-weight: bold; - p { - margin: $lineheight/4; - } -} - -/* - * Rules for notice boxes shown in the left sidebar when important, but - * non-critical information needs to be conveyed such as notices about - * donation drives. - */ - -.sidebar-notice { - padding: $lineheight/4; - border-top: 1px solid #ccc; - margin-top: 4px; - margin-bottom: -5px; - background: #ea0; - font-size: 12px; - p { - margin: $lineheight/4; - } -} - -/* Rules for the menu displayed in the left sidebar */ - -.left_menu { - left: 0px; - margin: 0; - padding: $lineheight/4 $lineheight/2 $lineheight/2 $lineheight/2; - font-size: 12px; - line-height: 1.25; - list-style-type: none; - border-bottom: 1px solid #ccc; - border-top: 1px solid #ccc; - img { - margin: $lineheight/2 0px; - } - - ul { - padding: 0; - margin: 0; - } - - li { - list-style-type: none; - padding: 0; - margin: 0; - } - - h4 { - padding: $lineheight/4 0 $lineheight/4 0; - font-size: 12px; - margin: 0; - } -} - -/* - * Rules for "optional boxes" which appear in the left sidebar on - * certain pages. Current users are the seach box on the main page - * and the tag cloud on the traces pages. - */ - -.optionalbox { - left: 0px; - padding: $lineheight/4 $lineheight/2; - margin: $lineheight/4 0; - text-align: left; -} - /* Rules for the search box */ -#search_field { +#search_form { position: relative; + padding: $lineheight; + background-color: $lightgrey; + border-bottom: $keyline; - form { - width: 165px; + #query_wrapper { + overflow: hidden; } - input[type="text"] { - width: 165px; - padding: 3px; - font-size: $typeheight; - line-height: 1.1; - height: 25px; - padding: 2px 0px 2px $lineheight/4; - box-shadow: inset #DDD 0px 1px 3px; + input { + width: 100%; + height: 30px; + border-right: none; + border-radius: 2px 0 0 2px; transition: 300ms linear; -webkit-transition: 300ms linear; -moz-transition: 300ms linear; } - input[type="text"]:focus { - box-shadow: 0px 0px 7px #9ED485; + input:focus { outline: none; + box-shadow: 0px 0px 7px #9ED485; } - input[type="submit"] { - border: 0; - margin: 0; - padding: 0; - width: 15px; - height: 15px; + input[type=submit] { + float: right; + width: auto; min-width: 0; - text-indent: -1000px; - overflow: hidden; - background: image-url("sprite.png") -2px -2px no-repeat; - position: absolute; - top: $lineheight/4; - right: $lineheight/4; - cursor: pointer; + border-radius: 0 2px 2px 0; } } -.search_help { - margin: $lineheight/4 0 0 0; -} - /* Utility for de-emphasizing content */ .deemphasize { @@ -454,7 +290,7 @@ a.donate { text-align: center; border-radius: 2px; color: #222; - margin: $lineheight/2 $lineheight/2 0px $lineheight/2; + margin: $lineheight/2 auto; &:hover { background: #9ed485; @@ -462,69 +298,64 @@ a.donate { } } -/* Rules for Creative Commons logo button */ +/* Rules for the header */ -#cclogo { - margin: $lineheight/2 0; - float: right; -} +header { + height: $headerHeight; + position: relative; + border-bottom: $keyline; -/* Rules for tabbed navigation bar */ + h1, nav, nav > ul, nav > ul > li, .dropdown { + display: inline-block; + } -#top-bar { - position: relative; - margin-left: 185px; - height: 30px; - border-bottom: 1px solid #ccc; - background: white; - z-index: 1001; + > * { + height: 100%; + padding: $lineheight; + } - .caret { - margin-top: 10px; + h1, nav.primary { + float: left; } -} -.site-edit #top-bar, -.site-index #top-bar, -.site-export #top-bar { - position: fixed; - top: 0; - left: 0; - right: 0; -} + img.logo { + width: 30px; + height: 30px; + vertical-align: middle; + } -#top-bar nav > ul { - height: 29px; - margin-bottom: 0; + h1 { + margin: 0; + border-right: $keyline; + } } nav.primary { - float: left; - > ul { - > li { - float: left; - - > * { - padding: 3px $lineheight/2; - } - } + border: 1px solid darken($green, 20%); + border-radius: 4px; } a.tab { display: inline-block; font-weight: bold; text-decoration: none; - color: #333; + color: $green; + padding: 5px 15px; + border-right: 1px solid darken($green, 20%); + } - -webkit-transition: color 200ms ease-in; - -moz-transition: color 200ms ease-in; - -o-transition: color 200ms ease-in; - transition: color 200ms ease-in; + #edit_tab a.tab { + border-right: 1px solid lighten($green, 20%); + } - &:hover { - text-decoration: underline; - } + .dropdown-toggle { + padding: 5px 10px 5px 5px; + } + + .caret { + margin-top: 15px; + border-top-color: $green; } .disabled a { @@ -539,34 +370,37 @@ nav.primary { border-top-color: #ccc; } } - - .dropdown { - height: 29px; - } } .site-index #view_tab, -.site-edit #edit_tab, -.changeset-list #history_tab { - background: #9ed485; - color: #000; +.changeset-list #history_tab, +.site-export #export_tab, +.site-edit #edit_tab { + background-color: $green; + + .tab { + color: #fff; + } + + .caret { + border-top-color: #fff; + } } nav.secondary { - float: right; - height: 100%; + position: absolute; + right: 0; - > ul { - display: inline-block; - padding: 3px $lineheight/2; + > ul a { + font-weight: bold; + text-decoration: none; + color: $darkgrey; + padding-right: 10px; } .dropdown { - display: inline-block; - background-color: #EEE; - &:hover { - background-color: #CCC; - } + border: 1px solid $grey; + border-radius: 4px; } img { @@ -774,7 +608,6 @@ nav.secondary { width: 250px; height: 100%; background: white; - border-left: 1px solid #CCC; overflow: auto; .section { @@ -882,7 +715,7 @@ nav.secondary { } .leaflet-top.leaflet-right { - top: $lineheight/2 !important; + top: 10px !important; .leaflet-control { margin-right: 0px !important; margin-top: 0px !important; @@ -902,15 +735,6 @@ nav.secondary { /* Rules for edit menu */ -.menuicon { - padding: 0 $lineheight/4; - font-weight: normal; - display: inline-block; - &:hover { - text-decoration: none !important; - } -} - .menu { display: none; z-index: 10000; @@ -943,25 +767,39 @@ nav.secondary { text-align: center; } -/* Rules for the popout map sidebar */ +/* Rules for the sidebar */ #sidebar { - display: none; - position: relative; - float: left; - border-right: 1px solid $lightgrey; - width: 33.3333%; - height: 100%; - ul { - margin-bottom: 0; - &:last-child { - border-bottom: 1px solid #ccc; - } - li { - margin-bottom: $lineheight/4; - &:last-child { - margin-bottom: 0; - } + .alert { + background: #e00; + } + + h2, h3, h4 { + padding: $lineheight; + border-bottom: $keyline; + } + + .icon.close { + position: absolute; + right: $lineheight; + } + + p { + padding: $lineheight; + margin: 0; + } + + .footer { + position: absolute; + bottom: 0; + } + + p.credits { + font-size: 11px; + color: #999; + + a { + color: #666; } } } @@ -986,17 +824,11 @@ nav.secondary { } #sidebar_content { - position: relative; - margin-bottom: 20px; - overflow: auto; - height: 100%; + position: absolute; + top: 72px; + bottom: 0; width: 100%; - h4 { - padding: 0 $lineheight $lineheight/2 $lineheight; - margin-top: $lineheight/2; - margin-bottom: 0; - border-bottom: 1px solid #ddd; - } + overflow-y: auto; } /* Rules for the map key which appears in the popout sidebar */ @@ -1091,35 +923,43 @@ ul.results-list li { border-bottom: 1px solid #ccc; } margin: $lineheight/4; } -/* Rules for the main content area */ +/* Rules for the sidebar and main content area */ + +.site-index, +.site-export, +.site-edit { + #content { + position: absolute; + top: $headerHeight; + bottom: 0; + width: 100%; + } -#content { + #sidebar, #map { + position: relative; + height: 100%; + overflow-x: hidden; + overflow-y: auto; + } + + #sidebar { + float: left; + width: $sidebarWidth; + } +} + +.content-heading { position: relative; padding: $lineheight; + background: $lightgrey; + border-bottom: $keyline; } -.site-edit #content, -.site-index #content, -.site-export #content { - position: fixed; - padding: 0; - top: 30px; bottom: 0; - left: 184px; right: 0; - border-left: 1px solid #ccc; +.content-body { + padding: $lineheight; } /* Overrides for pages that use new layout conventions */ -.user-new, -.user-create, -.user-terms, -.user-confirm, -.site-copyright, -.site-welcome, -.site-help { - #content { - max-width: 740px; - } -} .user-new, .user-create, @@ -1133,7 +973,7 @@ ul.results-list li { border-bottom: 1px solid #ccc; } .user-new, .user-create, .user-terms { - #content { + .content-body { padding: 0; } } @@ -1170,14 +1010,13 @@ ul.results-list li { border-bottom: 1px solid #ccc; } @media only screen and (max-width:900px) { .header-illustration.new-user-arm { display: none;} -} - .wrapper { - margin-left: 184px; - border-left: 1px solid #ccc; + margin-left: $sidebarWidth; text-align: left; } +} + #content.maximised { top: 0; left: 0; @@ -1223,24 +1062,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; } } } -.content-heading { - position: relative; - padding: $lineheight; - background: $offwhite; - z-index: 2; - h1, h2 { - margin-bottom: $lineheight/2; - line-height: 100%; - &:last-child { - margin-bottom: 0; - } - } - p { - margin-top: $lineheight/2; - margin-bottom: 0px; - } -} - /* Rules for small maps in content areas */ .content_map { @@ -2316,29 +2137,6 @@ a.button { * Rules for the iD editor */ -.site-edit-id { - #left, - #large-title { - display: none; - } - - #small-title { - display: inline-block; - width: 185px; - height: 30px; - font-size: 14px; - margin: 0; - background-color: #eee; - border-bottom: 1px solid #ccc; - text-align: center; - padding-top: 7px; - } - - #content { - left: 0; - } -} - .id-embed { width: 100%; height: 100%; @@ -2348,15 +2146,22 @@ a.button { .ad-container { display: block; height: 120px; + margin: auto; overflow: hidden; position: relative; border-bottom: 1px solid #ccc; -} -.ad { - height: 100px; - border: 0; - background: #fff; + a { + display: block; + width: 165px; + margin: auto; + } + + .ad { + height: 100px; + border: 0; + background: #fff; + } } /* Rules for dropdown menus */ diff --git a/app/assets/stylesheets/print.css b/app/assets/stylesheets/print.css index 84efa0e2e..fa04314b1 100644 --- a/app/assets/stylesheets/print.css +++ b/app/assets/stylesheets/print.css @@ -1,7 +1,4 @@ -#small-title, -#left, -#greeting, -#tabnav, +header, #sidebar, #permalink, .leaflet-control { diff --git a/app/assets/stylesheets/small.css.scss b/app/assets/stylesheets/small.css.scss index 419abeac4..a1ba2216d 100644 --- a/app/assets/stylesheets/small.css.scss +++ b/app/assets/stylesheets/small.css.scss @@ -40,48 +40,10 @@ h2, h3, h4 { /* Rules for the whole left sidebar, including the logo */ -#left { +#sidebar { display: none; } -/* Rules for tabbed navigation bar */ - -#top-bar { - left: 0; - margin: 0px; - height: 24px; - position: static; -} - -#tabnav { - height: 19px; - margin: 0px; - padding-top: 5px; - margin-top: 26px; - font-size: 10px; - line-height: 10px; -} - -#tabnav a, #tabnav a:link, #tabnav a:visited { - font-size: 10px; - line-height: 10px; - padding: 5px; - margin-right: 1px; -} - -.menuicon { line-height: 10px;} - -/* Rules for the site name - shown when left sidebar is hidden */ - -#small-title { - font-size: 10px; - display: block; - position: absolute; - left: 5px; - top: 5px; - margin: 0; -} - /* Rules for greeting bar in the top right corner */ #browse_map ul.secondary-actions { diff --git a/app/views/export/start.html.erb b/app/views/export/start.html.erb deleted file mode 100644 index 0bc1ac5bb..000000000 --- a/app/views/export/start.html.erb +++ /dev/null @@ -1,48 +0,0 @@ -<%= form_tag :controller => "export", :action => "finish" do %> - <%= hidden_field_tag 'format', 'osm' %> - -
-
- <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %> -
- <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %> - <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %> -
- <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> -
- <%= t'export.start.manually_select' %> -
- -
-

<%= t'export.start.licence' %>

- -
-

<%= raw t'export.start.export_details' %>

-
- -
-

<%= t'export.start.too_large.heading' %>

- -
-

<%= t'export.start.too_large.body' %>

-
-
<%= t'export.start.too_large.planet.title' %>
-
<%= t'export.start.too_large.planet.description' %>
- -
<%= t'export.start.too_large.geofabrik.title' %>
-
<%= t'export.start.too_large.geofabrik.description' %>
- -
<%= t'export.start.too_large.metro.title' %>
-
<%= t'export.start.too_large.metro.description' %>
- -
<%= t'export.start.too_large.other.title' %>
-
<%= t'export.start.too_large.other.description' %>
-
-
-
-
- -
- <%= submit_tag t('export.start.export_button'), :id => "export_commit" %> -
-<% end %> diff --git a/app/views/layouts/_content.html.erb b/app/views/layouts/_content.html.erb new file mode 100644 index 000000000..e6e737c21 --- /dev/null +++ b/app/views/layouts/_content.html.erb @@ -0,0 +1,15 @@ +
+ <% if content_for? :content %> + <%= yield :content %> + <% else %> + <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> + <% if content_for? :heading %> +
+ <%= yield :heading %> +
+ <% end %> +
+ <%= yield %> +
+ <% end %> +
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb new file mode 100644 index 000000000..f6d5bb9b9 --- /dev/null +++ b/app/views/layouts/_header.html.erb @@ -0,0 +1,36 @@ +
+

+ <%= image_tag "osm_logo.png", :alt => t('layouts.logo.alt_text'), :class => 'logo' %> + <%= t 'layouts.project_name.h1' %> +

+ + +
diff --git a/app/views/layouts/map.html.erb b/app/views/layouts/map.html.erb new file mode 100644 index 000000000..cedfdb9c2 --- /dev/null +++ b/app/views/layouts/map.html.erb @@ -0,0 +1,47 @@ +<% content_for :content do %> + + + + +
+
+ +
+
+ +
+ + + + + + + + +
<%= t 'site.index.license.license_url' %><%= t 'site.index.license.project_url' %>
<%= t 'site.index.license.copyright' %>
+
+<% end %> diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index 8239c8c2d..69ac7aa02 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -1,120 +1,9 @@ - + <%= render :partial => "layouts/head" %> -

- <%= image_tag "osm_logo.png", :size => "16x16", :alt => t('layouts.logo.alt_text') %> - <%= t 'layouts.project_name.h1' %> -

-
- - <%= yield :optionals %> - <% unless @user %> - - <% end %> - <% if STATUS == :database_offline or STATUS == :api_offline %> - - <% elsif STATUS == :database_readonly or STATUS == :api_readonly %> - - <% end %> - - - -
-
- - -
-
- <%= render :partial => "layouts/flash", :locals => { :flash => flash } %> - <% if content_for? :heading %> -
- <%= yield :heading %> -
- <% end %> -
- <%= yield %> -
-
+ <%= render :partial => "layouts/header" %> + <%= render :partial => "layouts/content" %> <% if defined?(PIWIK) -%> <% end -%> diff --git a/app/views/site/_search.html.erb b/app/views/site/_search.html.erb deleted file mode 100644 index e2f00082c..000000000 --- a/app/views/site/_search.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<% content_for :optionals do %> -
-
-
- <%= form_tag url_for(:controller => :geocoder, :action => :search), :id => "search_form" do %> - <%= submit_tag t('site.search.submit_text') %> - <%= text_field_tag :query, h(params[:query]), :tabindex => "1", :placeholder => t('site.search.search'), :autofocus => "autofocus" %> - <% end %> -
-
-

- <%= raw(t 'site.search.search_help') %> - <%= link_to t('site.search.where_am_i'), { :controller => :geocoder, :action => :search }, { :id => "describe_location", :title => t('site.search.where_am_i_title') } %> -

-
-<% end %> diff --git a/app/views/site/_sidebar.html.erb b/app/views/site/_sidebar.html.erb deleted file mode 100644 index cc3cf4815..000000000 --- a/app/views/site/_sidebar.html.erb +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb index 761975466..030775fe6 100644 --- a/app/views/site/edit.html.erb +++ b/app/views/site/edit.html.erb @@ -1,21 +1,17 @@ -<% if STATUS == :database_offline or STATUS == :api_offline %> -

<%= t 'layouts.osm_offline' %> -

-<% elsif STATUS == :database_readonly or STATUS == :api_readonly %> -

<%= t 'layouts.osm_read_only' %> -

-<% elsif !@user.data_public? %> -

<%= t 'site.edit.not_public' %>

-

<%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>

-

<%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %>

-<% else %> -<% content_for :head do %> - <%= javascript_include_tag "edit" %> -<% end %> - -<%= render :partial => 'home_link' %> -<%= render :partial => 'sidebar' %> -<%= render :partial => 'search' %> +<% content_for :content do %> + <% if STATUS == :database_offline or STATUS == :api_offline %> +

<%= t 'layouts.osm_offline' %>

+ <% elsif STATUS == :database_readonly or STATUS == :api_readonly %> +

<%= t 'layouts.osm_read_only' %>

+ <% elsif !@user.data_public? %> +

<%= t 'site.edit.not_public' %>

+

<%= raw t 'site.edit.not_public_description', :user_page => (link_to t('site.edit.user_page_link'), {:controller => 'user', :action => 'account', :display_name => @user.display_name, :anchor => 'public'}) %>

+

<%= raw t 'site.edit.anon_edits', :link => link_to(t('site.edit.anon_edits_link_text'), t('site.edit.anon_edits_link')) %>

+ <% else %> + <% content_for :head do %> + <%= javascript_include_tag "edit" %> + <% end %> -<%= render :partial => preferred_editor %> + <%= render :partial => preferred_editor %> + <% end %> <% end %> diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb new file mode 100644 index 000000000..0b0e99182 --- /dev/null +++ b/app/views/site/export.html.erb @@ -0,0 +1,56 @@ +<% content_for :head do %> + <%= javascript_include_tag "index" %> +<% end %> + +<% content_for :sidebar do %> + <%= form_tag :controller => "export", :action => "finish" do %> + <%= hidden_field_tag 'format', 'osm' %> + +
+
+ <%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %> +
+ <%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %> + <%= text_field_tag('maxlon', nil, :size => 10, :class => "export_bound") %> +
+ <%= text_field_tag('minlat', nil, :size => 10, :class => "export_bound") %> +
+ <%= t'export.start.manually_select' %> +
+ +
+

<%= t'export.start.licence' %>

+ +
+

<%= raw t'export.start.export_details' %>

+
+ +
+

<%= t'export.start.too_large.heading' %>

+ +
+

<%= t'export.start.too_large.body' %>

+
+
<%= t'export.start.too_large.planet.title' %>
+
<%= t'export.start.too_large.planet.description' %>
+ +
<%= t'export.start.too_large.geofabrik.title' %>
+
<%= t'export.start.too_large.geofabrik.description' %>
+ +
<%= t'export.start.too_large.metro.title' %>
+
<%= t'export.start.too_large.metro.description' %>
+ +
<%= t'export.start.too_large.other.title' %>
+
<%= t'export.start.too_large.other.description' %>
+
+
+
+
+ +
+ <%= submit_tag t('export.start.export_button'), :id => "export_commit" %> +
+ <% end %> +<% end %> + +<%= render :template => 'layouts/map' %> diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 73e1382d3..1f975e38d 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -2,32 +2,28 @@ <%= javascript_include_tag "index" %> <% end %> -<%= render :partial => 'home_link' %> -<%= render :partial => 'sidebar' %> -<%= render :partial => 'search' %> +<% content_for :sidebar do %> +

+ <%= t 'layouts.intro_header' %> + +

- +

<%= t 'layouts.intro_text' %>

-
-
+ +<% end %> -
- - - - - - - - -
<%= t'site.index.license.license_url' %><%= t'site.index.license.project_url' %>
<%= t'site.index.license.copyright' %>
-
- +<%= render :template => 'layouts/map' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 99767f699..3afa70365 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1015,13 +1015,9 @@ en: user_diaries_tooltip: View user diaries edit_with: Edit with %{editor} tag_line: The Free Wiki World Map - intro_1: "OpenStreetMap is a free worldwide map, created by people like you." - intro_2_html: "The data is free to %{download} and %{use} under its %{license}. %{create_account} to improve the map." + intro_header: Welcome to OpenStreetMap! + intro_text: OpenStreetMap is a free and editable map of the world maintained by an active community of contributors. intro_2_create_account: "Create a user account" - intro_2_license: "open license" - intro_2_use: "use" - intro_2_download: "download" - intro_2_use_url: "http://wiki.openstreetmap.org/wiki/Using_OpenStreetMap" partners_html: "Hosting is supported by %{ucl}, %{ic} and %{bytemark}, and other %{partners}." partners_ucl: "the UCL VR Centre" partners_ic: "Imperial College London" @@ -1032,6 +1028,7 @@ en: osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out." donate: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund." help: Help + about: About copyright: "Copyright & License" community: Community community_blogs: "Community Blogs" @@ -1390,10 +1387,7 @@ en: close: Close search: search: Search - where_am_i: "Where am I?" - where_am_i_title: Describe the current location using the search engine submit_text: "Go" - search_help: "examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ', or 'post offices near Lünen' more examples..." key: table: entry: diff --git a/config/routes.rb b/config/routes.rb index 31658e4a9..4351b65ce 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -129,7 +129,7 @@ OpenStreetMap::Application.routes.draw do match '/help' => 'site#help', :via => :get, :as => :help match '/history' => 'changeset#list', :via => :get match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom } - match '/export' => 'site#index', :export => true, :via => :get + match '/export' => 'site#export', :via => :get match '/login' => 'user#login', :via => [:get, :post] match '/logout' => 'user#logout', :via => [:get, :post] match '/offline' => 'site#offline', :via => :get -- 2.39.5