users#sign_in is the current landing page. 'sign up for an invite' is hooked up to mailchimp.

This commit is contained in:
danielvincent 2010-11-17 15:39:10 -08:00
parent 37a694ed1f
commit f59f6be4b0
11 changed files with 375 additions and 39 deletions

View file

@ -5,6 +5,8 @@ gem 'rails', '3.0.1'
gem 'bundler', '>= 1.0.0' gem 'bundler', '>= 1.0.0'
gem "chef", :require => false gem "chef", :require => false
gem "nokogiri", "1.4.3.1"
#Security #Security
gem 'devise', '1.1.3' gem 'devise', '1.1.3'
gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper' gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper'

View file

@ -219,7 +219,7 @@ GEM
multi_json (0.0.5) multi_json (0.0.5)
multipart-post (1.0.1) multipart-post (1.0.1)
net-ldap (0.1.1) net-ldap (0.1.1)
nokogiri (1.4.4) nokogiri (1.4.3.1)
oa-basic (0.1.6) oa-basic (0.1.6)
multi_json (~> 0.0.2) multi_json (~> 0.0.2)
nokogiri (~> 1.4.2) nokogiri (~> 1.4.2)
@ -298,7 +298,7 @@ GEM
rspec-core (2.1.0) rspec-core (2.1.0)
rspec-expectations (2.1.0) rspec-expectations (2.1.0)
diff-lcs (~> 1.1.2) diff-lcs (~> 1.1.2)
rspec-instafail (0.1.3) rspec-instafail (0.1.4)
rspec-mocks (2.1.0) rspec-mocks (2.1.0)
rspec-rails (2.1.0) rspec-rails (2.1.0)
rspec (~> 2.1.0) rspec (~> 2.1.0)
@ -375,6 +375,7 @@ DEPENDENCIES
mocha mocha
mongo_mapper! mongo_mapper!
mongrel mongrel
nokogiri (= 1.4.3.1)
omniauth omniauth
pubsubhubbub pubsubhubbub
rails (= 3.0.1) rails (= 3.0.1)

View file

@ -1,34 +1,26 @@
.span-10.append-1.last /%h1 This is a technology preview, do not provide any private information.
.floating /%h3 your account may be deleted until we move into a more stable development period.
%h3 /%h3 USE AT YOUR OWN RISK!!
= t('.login')
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
#user
%p.username
= f.label :username , t('username')
= f.text_field :username
%p.user_network
="@#{APP_CONFIG[:terse_pod_url]}"
%p .span-22.prepend-1.last
= f.label :password , t('password')
= f.password_field :password
/%p
/- if devise_mapping.rememberable?
/ = f.check_box :remember_me
/ = f.label :remember_me , t('.remember_me')
= f.submit t('.sign_in')
%p
= render :partial => "devise/shared/links"
%p
= link_to t('.have_a_problem'), 'http://diaspora.shapado.com/'
.span-13.last #landing_content
%h1
This is a technology preview, do not provide any private information.
%h3
your account may be deleted until we move into a more stable development period.
%h3
USE AT YOUR OWN RISK!!
#diaspora_description.section
%p
Share what you want, with who you want.
#signup_field.section
= render 'shared/mail_signup_form'
#login_field.section
already have an account?
= link_to "log in here", "#"
.span-24.last{:style=>"text-align:center;"}
%ul#press_logos
%li= image_tag "press_logos/nyt.png"
%li= image_tag "press_logos/nymag.gif"
%li= image_tag "press_logos/mashable.jpeg"
%li= image_tag "press_logos/techcrunch.gif"

View file

@ -53,17 +53,23 @@
- flash.each do |name, msg| - flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}" = content_tag :div, msg, :id => "flash_#{name}"
%header %header.landing_page
.container{:style => "position:relative;"} .container{:style => "position:relative;"}
#notification #notification
#diaspora_text #diaspora_text
= link_to "DIASPORA", (current_user ? root_path : new_user_session_path) = link_to "DIASPORA*", (current_user ? root_path : new_user_session_path)
%span.sub_text %span.sub_text
PREVIEW ALPHA
- if current_user - unless current_user
.right{:style => "top:70px;"}
%ul#landing_nav
%li= link_to "blog", "http://blog.joindiaspora.com"
%li= link_to "developers", "https://github.com/diaspora/diaspora"
%li= link_to "login", "#"
- else
#global_search #global_search
= form_tag(people_path, :method => 'get') do = form_tag(people_path, :method => 'get') do
= text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5 = text_field_tag 'q', nil, :placeholder => t('search'), :type => 'search', :results => 5
@ -83,8 +89,17 @@
.span-24.last .span-24.last
= yield = yield
.span-24.last /.span-24.last
= render "posts/debug" /= render "posts/debug"
.clearfix
%footer
.container
.brandon POWERED BY DIASPORA*
%ul#footer_nav
%li= link_to "blog", "http://blog.joindiaspora.com"
%li= link_to "developers", "https://github.com/diaspora/diaspora"
:javascript :javascript
var is_ssl = ("https:" == document.location.protocol); var is_ssl = ("https:" == document.location.protocol);
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/"; var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
@ -98,3 +113,4 @@
feedback_widget_options.color = "#222"; feedback_widget_options.color = "#222";
feedback_widget_options.style = "idea"; feedback_widget_options.style = "idea";
var feedback_widget = new GSFN.feedback_widget(feedback_widget_options); var feedback_widget = new GSFN.feedback_widget(feedback_widget_options);

View file

@ -0,0 +1,133 @@
<!-- Begin MailChimp Signup Form -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.validate.js"></script>
<script type="text/javascript" src="http://downloads.mailchimp.com/js/jquery.form.js"></script>
<script type="text/javascript">
// delete this script tag and use a "div.mce_inline_error{ XXX !important}" selector
// or fill this in and it will be inlined when errors are generated
var mc_custom_error_style = '';
</script>
<div id="mc_embed_signup">
<form action="http://joindiaspora.us1.list-manage.com/subscribe/post?u=d759919b94f9cdcf39d204f3f&amp;id=7b5ceb2f8b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank">
<div class="mc-field-group">
<input type="text" value="" name="EMAIL" class="required email" placeholder="Email" id="mce-EMAIL">
</div>
<div><input type="submit" value="Sign up for an invite!" name="subscribe" id="mc-embedded-subscribe" class="btn"></div>
<div id="mce-responses">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
</form>
</div>
<script type="text/javascript">
var fnames = new Array();var ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[3]='MMERGE3';ftypes[3]='text';fnames[4]='MMERGE4';ftypes[4]='text';var err_style = '';
try{
err_style = mc_custom_error_style;
} catch(e){
err_style = 'margin: 1em 0 0 0; padding: 1em 0.5em 0.5em 0.5em; background: ERROR_BGCOLOR none repeat scroll 0% 0%; font-weight: bold; float: left; z-index: 1; width: 80%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: ERROR_COLOR;';
}
var mce_jQuery = jQuery.noConflict();
mce_jQuery(document).ready( function($) {
var options = { errorClass: 'mce_inline_error', errorElement: 'div', errorStyle: err_style, onkeyup: function(){}, onfocusout:function(){}, onblur:function(){} };
var mce_validator = mce_jQuery("#mc-embedded-subscribe-form").validate(options);
options = { url: 'http://joindiaspora.us1.list-manage2.com/subscribe/post-json?u=d759919b94f9cdcf39d204f3f&id=7b5ceb2f8b&c=?', type: 'GET', dataType: 'json', contentType: "application/json; charset=utf-8",
beforeSubmit: function(){
mce_jQuery('#mce_tmp_error_msg').remove();
mce_jQuery('.datefield','#mc_embed_signup').each(
function(){
var txt = 'filled';
var fields = new Array();
var i = 0;
mce_jQuery(':text', this).each(
function(){
fields[i] = this;
i++;
});
mce_jQuery(':hidden', this).each(
function(){
if ( fields[0].value=='MM' && fields[1].value=='DD' && fields[2].value=='YYYY' ){
this.value = '';
} else if ( fields[0].value=='' && fields[1].value=='' && fields[2].value=='' ){
this.value = '';
} else {
this.value = fields[0].value+'/'+fields[1].value+'/'+fields[2].value;
}
});
});
return mce_validator.form();
},
success: mce_success_cb
};
mce_jQuery('#mc-embedded-subscribe-form').ajaxForm(options);
});
function mce_success_cb(resp){
mce_jQuery('#mce-success-response').hide();
mce_jQuery('#mce-error-response').hide();
if (resp.result=="success"){
mce_jQuery('#mce-'+resp.result+'-response').show();
mce_jQuery('#mce-'+resp.result+'-response').html(resp.msg);
mce_jQuery('#mc-embedded-subscribe-form').each(function(){
this.reset();
});
} else {
var index = -1;
var msg;
try {
var parts = resp.msg.split(' - ',2);
if (parts[1]==undefined){
msg = resp.msg;
} else {
i = parseInt(parts[0]);
if (i.toString() == parts[0]){
index = parts[0];
msg = parts[1];
} else {
index = -1;
msg = resp.msg;
}
}
} catch(e){
index = -1;
msg = resp.msg;
}
try{
if (index== -1){
mce_jQuery('#mce-'+resp.result+'-response').show();
mce_jQuery('#mce-'+resp.result+'-response').html(msg);
} else {
err_id = 'mce_tmp_error_msg';
html = '<div id="'+err_id+'" style="'+err_style+'"> '+msg+'</div>';
var input_id = '#mc_embed_signup';
var f = mce_jQuery(input_id);
if (ftypes[index]=='address'){
input_id = '#mce-'+fnames[index]+'-addr1';
f = mce_jQuery(input_id).parent().parent().get(0);
} else if (ftypes[index]=='date'){
input_id = '#mce-'+fnames[index]+'-month';
f = mce_jQuery(input_id).parent().parent().get(0);
} else {
input_id = '#mce-'+fnames[index];
f = mce_jQuery().parent(input_id).get(0);
}
if (f){
mce_jQuery(f).append(html);
mce_jQuery(input_id).focus();
} else {
mce_jQuery('#mce-'+resp.result+'-response').show();
mce_jQuery('#mce-'+resp.result+'-response').html(msg);
}
}
} catch(e){
mce_jQuery('#mce-'+resp.result+'-response').show();
mce_jQuery('#mce-'+resp.result+'-response').html(msg);
}
}
}
</script>
<!--End mc_embed_signup-->

BIN
public/images/ball.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -12,6 +12,7 @@
:style normal :style normal
body body
:padding 2em :padding 2em
:margin 0 :margin 0
:background-color rgb(252,252,252) :background-color rgb(252,252,252)
@ -131,6 +132,15 @@ header
:border none :border none
:color #fff :color #fff
&.landing_page
:height 100px
#diaspora_text
:font
:size 40px
:text-shadow 0 2px 3px #000
:position absolute
:top 40px
ul#user_menu ul#user_menu
:overflow hidden :overflow hidden
:white-space nowrap :white-space nowrap
@ -1613,3 +1623,185 @@ ul#request_result
&.remove &.remove
:color red :color red
footer
:margin
:top 40px
:text
:align center
:width 100%
:left 0
:bottom 0
:color #999
.container
:padding 0
:top 2em
:border
:top 1px solid #ddd
ul#footer_nav
:margin 0
:padding 0
:list
:style none
> li
:display inline
:margin
:right 1em
a
:color #777
:font
:weight bold
&:hover
:color #ccc
.brandon
:font
:family 'BrandonGrotesqueLightRegular'
:text
:transform uppercase
ul#landing_nav
:margin 0
:padding 0
:list
:style none
:font
:size 14px
> li
:display inline
:margin
:right 0.5em
a
:color #107FC9
:text-shadow 0 1px 0 #000
#signup_field
:margin
:top -200px
:height 46px
:padding 0
:width 400px
:display inline
div
:display inline
#mce-responses
:margin
:top 12px
:font
:size 12px
:display block
:color #888
:text-shadow 0 1px 0 #fff
#mce-error-response
:color red
#mce-success-response
:color green
input[type='text']
:top -1px
:margin 0
:right -3px
:border-radius 5px 0 0 5px
:width 300px
:position relative
:display inline
:padding 12px
:font
:size 18px
#big_action_button, input[type='submit']
:height 47px
:margin 0
:background
:color #107FC9
:border-radius 0 5px 5px 0
:background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(0,123,194)), color-stop(1, rgb(65,182,250)))
:padding 12px
:font
:size 18px
:weight bold
:color #eee
:text-shadow 0 1px 0 #333
:text
:align center
&:hover
:background -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(0,136,209)), color-stop(1, rgb(113,204,255)))
&:active
#diaspora_description
:background
:image url('../images/ball.png')
:repeat no-repeat
:position top center
:padding
:top 250px
:margin
:top -200px
:font
:size 3.3em
:weight bold
:text-shadow 0 1px 3px #999
p
:padding 12px
:background
:color #fff
:-webkit-box-shadow 0 1px 3px #ccc
#login_field
:text
:align left
:font
:style italic
:margin
:top 14px
:left 500px
:color #888
ul#press_logos
:margin 0
:top 100px
:padding 0
:list
:style none
> li
:display inline
:margin
:right 30px
img
:height 40px
&:last-child
:margin
:right 0
#landing_content
:margin
:top 100px
:text
:align center