add gmail button
authorJoey Hess <joey@kitenet.net>
Sat, 8 May 2010 06:38:54 +0000 (02:38 -0400)
committerJoey Hess <joey@kitenet.net>
Sat, 8 May 2010 06:38:54 +0000 (02:38 -0400)
It uses the google profile openid url, which results in a nicer openid
than the o8/id url.

doc/style.css
underlays/openid-selector/ikiwiki/openid/openid-jquery.js

index 6832194b2bf3045eb72a59facca81d658ae239a9..171a684746503fed8e74c1d52dcfb1c02fc79d6a 100644 (file)
@@ -440,7 +440,7 @@ li.L8 { list-style: upper-alpha; }
        float: left;
 }
 .openid_large_btn {
-       padding: 1em 1.5em;
+       padding: 1em 1.75em;
        border: 1px solid #DDD;
        margin: 3px;
        float: left;
index 59a59c0843f03479bfcf5e54488afa2e4d355b82..544ba89360f1986365b9e1da971056445987bfd9 100644 (file)
@@ -30,18 +30,24 @@ var providers_small = {
         label: 'Enter your Livejournal username:',
         url: 'http://{username}.livejournal.com/'
     },
-    flickr: {
-       name: 'Flickr',        
-       icon: 'http://flickr.com/favicon.ico',
-       label: 'Enter your Flickr username:',
-       url: 'http://flickr.com/photos/{username}/'
-    },
     wordpress: {
         name: 'Wordpress',
        icon: 'https://ddgw.s3.amazonaws.com/wordpress.org.ico',
         label: 'Enter your Wordpress.com username:',
         url: 'http://{username}.wordpress.com/'
     },
+    gmail: {
+       name: 'Gmail',
+       icon: 'http://mail.google.com/favicon.ico',
+       label: 'Enter your Gmail address:',
+       url: 'http://google.com/profiles/{email_username}/'
+    },
+    flickr: {
+       name: 'Flickr',
+       icon: 'http://www.flickr.com/favicon.ico',
+       label: 'Enter your Flickr username:',
+       url: 'http://flickr.com/photos/{username}/'
+    },
     myopenid: {
         name: 'MyOpenID',
        icon: 'http://myopenid.com/favicon.ico',
@@ -172,6 +178,7 @@ var openid = {
        var url = openid.provider_url; 
        if (url) {
                url = url.replace('{username}', $('#openid_username').val());
+               url = url.replace('{email_username}', $('#openid_username').val().split('@')[0]);
                openid.setOpenIdUrl(url);
        }
        if(openid.ajaxHandler) {