]> git.openstreetmap.org Git - rails.git/commitdiff
various skeleton stuff
authorSteve Coast <steve@asklater.com>
Fri, 28 Jul 2006 22:35:05 +0000 (22:35 +0000)
committerSteve Coast <steve@asklater.com>
Fri, 28 Jul 2006 22:35:05 +0000 (22:35 +0000)
app/views/layouts/user.rhtml
app/views/user/login.rhtml [new file with mode: 0644]
app/views/user/new.rhtml
public/images/cc_button.png [new file with mode: 0644]
public/images/osm_logo.png [new file with mode: 0644]
public/index.html
public/javascripts/site.js
public/stylesheets/site.css

index 1bd916a0243ed1d4452937a524c2ae1f8738cc89..dc90025bb8bc0c06a1af081eb24da013aa02c3da 100644 (file)
@@ -4,19 +4,88 @@
     <!--[if IE]><%= javascript_include_tag 'pngfix.js' %><![endif]--> <!-- thanks, microsoft! -->
     <%= javascript_include_tag 'tile.js' %>
     <%= javascript_include_tag 'site.js' %>
-    
-    <script type="text/javascript">
-      lon = <% if cgi['lon'].length > 0 then print cgi['lon'].to_f else print '0' end %>;
-      lat = <% if cgi['lat'].length > 0 then print cgi['lat'].to_f else print '0' end %>;
-      zoom = <% if cgi['zoom'].length > 0 then print cgi['zoom'].to_f else print '0' end %>;
-      <% if cgi['scale'].length > 0 then %>
-      zoom = Math.log(360.0/(( <% print cgi['scale'].to_f() %> ) * 512.0)) / Math.log(2.0);
-      <% end %>
-      </script>
-      <link rel="stylesheet" type="text/css" href="/css/style.css" />
-      <title>OpenStreetMap</title>
-    </head>
-    <body>
-      <%= @content_for_layout %>
+
+    <link rel="stylesheet" type="text/css" href="/stylesheets/site.css" />
+    <title>OpenStreetMap</title>
+  </head>
+  <body>
+
+    <div id="content">
+    <%= @content_for_layout %>
+
+  </div>
+
+
+
+  <span id="greeting">
+    <%= link_to 'Login', :controller => 'user', :action => 'login' %> /
+    <%= link_to 'Sign up', :controller => 'user', :action => 'new' %>
+  </span>
+  
+  <div>
+    <ul id="tabnav">
+      <li><a  id="viewanchor" href="/index.html" title="view maps">View</a></li>
+      <li><a  style="font-style:italic" href="/login.html" title="edit maps">Edit</a></li>
+      <li><a  href="/traces" title="manage traces">GPS traces</a></li>
+    </ul>
+  </div>
+
+
+
+  <div id="left">
+
+    <div id="logo">
+      <center>
+        <h1>OpenStreetMap</h1>
+
+        <img src="/images/osm_logo.png" width="120" height="120"/><br/>
+        <nobr><h2>The Free Wiki World Map</h2></nobr>
+      </center>
+    </div>
+
+    <div id="intro">
+      OpenStreetMap is a free editable map of the whole world. It is made by people like you.
+      <p/>
+      OpenStreetMap allows you to view, edit and use geographical data in a collaborative way from anywhere on Earth.
+      <p/>
+      OpenStreetMap's hosting is kindly supported by the <a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a> and <a href="http://www.bytemark.co.uk">bytemark</a>.
+
+    </div>
+
+    <div id="left_menu">
+      <a href="http://wiki.openstreetmap.org">Help & Wiki</a><br />
+      <a href="http://www.opengeodata.org/">News blog</a><br />
+      <a href="http://wiki.openstreetmap.org/index.php/Merchandise">Shop</a><br />
+      <center>
+
+        <script type="text/javascript"><!--
+          var detect = navigator.userAgent.toLowerCase();
+          if (detect.indexOf('msie') >= 0) {
+            document.write('<script type=\"text/javascript\"> google_ad_client = \"pub-7727744269903103\";  google_ad_width = 125;  google_ad_height = 125;  google_ad_format = \"125x125_as_rimg\";  google_cpa_choice = \"CAAQveHnzwEaCEiH5iXPqf1SKJe193M\";  </script>  <script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">  </script>');
+            }
+//--></script>
+
+
+          </center>
+
+        </div>
+
+
+        <div id="cclogo">
+          <center>
+            <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
+              <input type="hidden" name="cmd" value="_s-xclick">
+              <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
+              <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHFgYJKoZIhvcNAQcEoIIHBzCCBwMCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBh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Y/hFOLjANBgkqhkiG9w0BAQEFAASBgK2XalT/ShlrD0owoDt3at4NTz8hrNnrEnLUmGJWlOdhqviP6mH1FiHqYjNNck8Br0fW2J05tIE1IdGShjxDqWLgJTXBhGDwG7bW9r8lMcCsi6Z4pI3jkFa9JXw8ZyNZ4qZO3x5vRRPWaD/jQTjsz9/I2jwahkUZ/hsJqxJyhrpI-----END PKCS7-----">
+            </form>
+
+            <a href="http://creativecommons.org/licenses/by-sa/2.0/"><img src="/images/cc_button.png" border="0"></a>
+
+          </center>
+        </div>
+
+      </div>
+
+
     </body>
   </html>
diff --git a/app/views/user/login.rhtml b/app/views/user/login.rhtml
new file mode 100644 (file)
index 0000000..ff71fb8
--- /dev/null
@@ -0,0 +1,14 @@
+<h1>Login:</h1><br>
+Please login or <%= link_to 'create an account', :controller => 'user', :action => 'new' %>.<br>
+
+
+<%= start_form_tag :action => 'login' %>
+<table>
+  <tr><td>Login name</td><td><%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %></td></tr>
+  <tr><td>password:</td><td><%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %></td></tr>
+</table>
+
+<br>
+<input type="submit" value="Login">
+
+<%= end_form_tag %> (<%= link_to 'Forgotten your password?', :controller => 'user', :action => 'lost_password' %>)
index 4e1ca5f72e03a29c87ccfa05feb0025bdd7e2fca..b67ad1f586ac05b4fd0cfa9860822d14a7d90316 100644 (file)
@@ -1,4 +1,18 @@
+<h1>Create a user account</h1><br>
+Fill in the form and we'll send you a quick email to activate your account.<br><br>
 
-create a user
+By creating an account, you agree that all work uploaded to openstreetmap.org and all data created by use of any tools on openstreetmap.org is to be licensed under <a href="http://creativecommons.org/licenses/by-sa/2.0/">this</a> Creative Commons license.<br><br>
 
+<%= start_form_tag :action => 'signup' %>
+<table>
+  <tr><td>email address:</td><td><%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %></td></tr>
+  <tr><td>Login name</td><td><%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %></td></tr>
+  <tr><td>password:</td><td><%= password_field('user', 'password',{:size => 50, :maxlength => 255}) %></td></tr>
+  <tr><td>retype password:</td><td><%= password_field('user', 'password_confirm',{:size => 50, :maxlength => 255}) %></td></tr>
+</table>
+
+<br>
+<input type="submit" value="Signup">
+
+<%= end_form_tag %>
 
diff --git a/public/images/cc_button.png b/public/images/cc_button.png
new file mode 100644 (file)
index 0000000..c6d2641
Binary files /dev/null and b/public/images/cc_button.png differ
diff --git a/public/images/osm_logo.png b/public/images/osm_logo.png
new file mode 100644 (file)
index 0000000..d2ddc69
Binary files /dev/null and b/public/images/osm_logo.png differ
index b48454685aa09988740753df14ad90c0ee2380f4..319ca90af76d548ca9c1df43427d9dc452b38029 100644 (file)
@@ -1,5 +1,5 @@
 
 nuffin here
 
-
+<a href="/user/new">new user</a>
 
index 75c3eb539807d4dabd69879f7282accedf57634a..e7ef320bcadaea835f499ee92405d8e372602a1e 100644 (file)
@@ -1,28 +1,28 @@
 function updatelinks(lon,lat,zoom) {
-    var links = new Array();
-    links['viewanchor'] = '/index.html';
-    //links['editanchor'] = 'edit.html';
-    links['uploadanchor'] = '/traces';
-    links['loginanchor'] = '/login.html';
-    links['logoutanchor'] = '/logout.html';
-    links['registeranchor'] = '/create-account.html';
-    var node;
-    var anchor;
-    for (anchor in links) {
-       node = document.getElementById(anchor);
-       if (! node) { continue; }
-       node.href = links[anchor] + "?lat=" + lat + "&lon=" + lon + "&zoom=" + zoom;
-    }
+  var links = new Array();
+  links['viewanchor'] = '/index.html';
+  //links['editanchor'] = 'edit.html';
+  links['uploadanchor'] = '/traces';
+  links['loginanchor'] = '/login.html';
+  links['logoutanchor'] = '/logout.html';
+  links['registeranchor'] = '/create-account.html';
+
+  var node;
+  var anchor;
+  for (anchor in links) {
+    node = document.getElementById(anchor);
+    if (! node) { continue; }
+    node.href = links[anchor] + "?lat=" + lat + "&lon=" + lon + "&zoom=" + zoom;
+  }
 
-    node = document.getElementById("editanchor");
-    if (node) {
+  node = document.getElementById("editanchor");
+  if (node) {
     if ( zoom >= 14) {
-        node.href = '/edit.html?lat=' + lat + '&lon=' + lon + "&zoom=" + zoom;
-       node.style.fontStyle = 'normal';
+      node.href = '/edit.html?lat=' + lat + '&lon=' + lon + "&zoom=" + zoom;
+      node.style.fontStyle = 'normal';
     } else {
-        node.href = 'javascript:alert("zoom in to edit map");';
-       node.style.fontStyle = 'italic';
-    }
+      node.href = 'javascript:alert("zoom in to edit map");';
+      node.style.fontStyle = 'italic';
     }
+  }
 }
index 2cd8ca412d01e8cd09e38a86f6e70ba7a14acc5f..0dc7eaf18881a6c1122b8e0b238a7ba0379b7d31 100644 (file)
@@ -146,7 +146,7 @@ body {
 }\r
 \r
 \r
-#main_area {\r
+#content {\r
   width: 700px;\r
   padding: 0;\r
   /*padding-left: 1em;*/\r