Skip to content

Commit

Permalink
Plug home page contents
Browse files Browse the repository at this point in the history
  • Loading branch information
jodosha committed Feb 16, 2015
1 parent c230a83 commit 7bb0000
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 116 deletions.
193 changes: 105 additions & 88 deletions source/javascripts/main.js
@@ -1,20 +1,19 @@

//fixed and scroll transitions //fixed and scroll transitions
$(window).load(function(){ $(window).load(function(){
$(document).ready(function () { $(document).ready(function () {
var menu = $('.navbar'); var menu = $('.navbar');
var origOffsetY = menu.offset().top; var origOffsetY = menu.offset().top;


function scroll() { function scroll() {
if ($(window).scrollTop() >= origOffsetY) { if ($(window).scrollTop() >= origOffsetY) {
$('body.index nav').addClass('navbar-fixed-top'); $('body.index nav').addClass('navbar-fixed-top');
$('.features').addClass('menu-padding'); $('.features').addClass('menu-padding');
} else { } else {
$('body.index nav').removeClass('navbar-fixed-top'); $('body.index nav').removeClass('navbar-fixed-top');
$('.features').removeClass('menu-padding'); $('.features').removeClass('menu-padding');
}
} }
document.onscroll = scroll; }
document.onscroll = scroll;
}); });
}); });


Expand All @@ -36,92 +35,110 @@ $(window).scroll(function() {
} }
}); });


// Prepare version
$(window).load(function(){
var version = $('meta[name=lotusrb-version]').attr('content');


//Typing terminal animation $('.version').each(function(i, element) {
$(function () { element = $(element);
var data = [ var content = element.text().replace('{{version}}', version);
{
action: 'type', element.text(content);
strings: ['gem install lotusrb^400'], });
output: '<span class="gray">Fetching: lotusrb-0.2.1.gem (100%)<br>Succesfully installed lotusrb-0.2.1</span><br>&nbsp;', });
postDelay: 1000
}, // Prepare timestamps for terminal animation
{ $(window).load(function(){
action: 'type', var date = new Date();
strings: ['lotus new bookshelf^400'], var month = (date.getMonth()+1);
output: '<span class="gray">27 files created successfully</span><br>&nbsp;', month = month > 10 ? month : '0'+month;
postDelay: 1000
}, var timestamp = "["+date.getFullYear()+"-"+month+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+"]";
{
action: 'type', $('span.timestamp').each(function(i, element) {
strings: ['cd bookshelf && bundle^400'], element = $(element);
output: '<span class="gray">24 gems installed successfully</span><br>&nbsp;', var content = element.text().replace('{{timestamp}}', timestamp);
postDelay: 1000
}, element.text(content);
{ });
action: 'type', });
strings: ['cd bundle exec lotus server^400'],
output: $('.run-output').html() // Typing terminal animation
}, $(window).load(function(){
{ var version = $('meta[name=lotusrb-version]').attr('content');
action: 'type', var data = [
strings: [ {
'Start building!', action: 'type',
'' strings: ['gem install lotusrb^400'],
], output: '<span class="gray">Fetching: lotusrb-'+ version +'.gem (100%)<br>Succesfully installed lotusrb-'+ version +'</span><br>&nbsp;',
postDelay: 2000 postDelay: 1000
} },
{
action: 'type',
strings: ['lotus new bookshelf^400'],
output: '<span class="gray">27 files created successfully</span><br>&nbsp;',
postDelay: 1000
},
{
action: 'type',
strings: ['cd bookshelf && bundle^400'],
output: '<span class="gray">24 gems installed successfully</span><br>&nbsp;',
postDelay: 1000
},
{
action: 'type',
strings: ['bundle exec lotus server^400'],
output: $('.run-output').html()
},
{
action: 'type',
strings: [
'Start building!',
''
],
postDelay: 2000
}
]; ];
runScripts(data, 0); runScripts(data, 0);
}); });
function runScripts(data, pos) { function runScripts(data, pos) {
var prompt = $('.prompt'), script = data[pos]; var prompt = $('.prompt'), script = data[pos];
if (script.clear === true) { if (script.clear === true) {
$('.history').html(''); $('.history').html('');
} }
switch (script.action) { switch (script.action) {
case 'type': case 'type':
prompt.removeData(); prompt.removeData();
$('.typed-cursor').text(''); $('.typed-cursor').text('');
prompt.typed({ prompt.typed({
strings: script.strings, strings: script.strings,
typeSpeed: 30, typeSpeed: 30,
callback: function () { callback: function () {
var history = $('.history').html(); var history = $('.history').html();
history = history ? [history] : []; history = history ? [history] : [];
history.push('$ ' + prompt.text()); history.push('$ ' + prompt.text());
if (script.output) { if (script.output) {
history.push(script.output); history.push(script.output);
prompt.html(''); prompt.html('');
$('.history').html(history.join('<br>')); $('.history').html(history.join('<br>'));
} }
$('section.terminal').scrollTop($('section.terminal').height()); $('section.terminal').scrollTop($('section.terminal').height());
pos++; pos++;
if (pos < data.length) { if (pos < data.length) {
setTimeout(function () { setTimeout(function () {
runScripts(data, pos); runScripts(data, pos);
}, script.postDelay || 1000); }, script.postDelay || 1000);
} }
} }
}); });
break; break;
case 'view': case 'view':
break; break;
} }
} }



// Copyright year

$(window).load(function(){

var year = (new Date()).getFullYear();

$('#copyright-year').text(year);

});










73 changes: 45 additions & 28 deletions source/layouts/layout.erb
Expand Up @@ -6,6 +6,7 @@
<title><%= current_page.data.title || "Lotus &dash; A complete web framework for Ruby" %></title> <title><%= current_page.data.title || "Lotus &dash; A complete web framework for Ruby" %></title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="lotusrb-version" content="0.2.1">


<%= stylesheet_link_tag 'application' %> <%= stylesheet_link_tag 'application' %>
<%# <link rel="stylesheet" href="stylesheets/styles.css"> %> <%# <link rel="stylesheet" href="stylesheets/styles.css"> %>
Expand All @@ -24,12 +25,12 @@
<![endif]--> <![endif]-->


<header class="primary container-fluid animated fadeIn"> <header class="primary container-fluid animated fadeIn">
<a class="logo" href="index.html" >lotus</a> <a class="logo" href="index.html">lotus</a>
<h1>A complete web framework for Ruby</h1> <h1>A complete web framework for Ruby</h1>
<p class="sub">Lotus brings back Object Oriented Programming to web development,<br /> <p class="sub">Lotus brings back Object Oriented Programming to web development,<br />
leveraging a stable API, minimal DSL and plain objects.</p> leveraging a stable API, minimal DSL and plain objects.</p>


<a href="#" class="btn btn-primary">Download v0.2.0</a> <a href="https://rubygems.org/gems/lotusrb" target="_blank" class="btn btn-primary version">Download v{{version}}</a>


<!-- terminal-window --> <!-- terminal-window -->
<div class="terminal-window animated bounceInUp"> <div class="terminal-window animated bounceInUp">
Expand All @@ -48,9 +49,9 @@
<!-- data --> <!-- data -->
<div class="terminal-data run-output"> <div class="terminal-data run-output">
<br> <br>
<span class="gray">[2015-02-08 11:18:54] INFO WEBrick 1.3.1</span><br> <span class="gray timestamp">{{timestamp}} INFO WEBrick 1.3.1</span><br>
<span class="gray">[2015-02-08 11:18:54] INFO ruby 2.1.2 (2014-05-08) [x86_64-darwin13.0]</span><br> <span class="gray timestamp">{{timestamp}} INFO ruby 2.2.0 (2014-12-25) [x86_64-darwin13]</span><br>
<span class="gray">[2015-02-08 11:18:54] INFO WEBrick::HTTPServer#start: pid=52511 port=2300</span><br> <span class="gray timestamp">{{timestamp}} INFO WEBrick::HTTPServer#start: pid=75581 port=2300</span><br>
<br> <br>
</div> </div>
<!-- .data --> <!-- .data -->
Expand All @@ -68,10 +69,11 @@
</div> </div>
<div class="collapse navbar-collapse"> <div class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="ui-kit-docs.html">Docs</a></li> <li><a href="/guides">Guides</a></li>
<li><a href="#">Community</a></li> <li><a href="/community">Community</a></li>
<li><a href="ui-kit-blog.html">Blog</a></li> <li><a href="/blog">Blog</a></li>
<li><button type="button" class="btn btn-primary">Download v.0.2.0</button></li> <li><a href="https://github.com/lotus" target="_blank">Source Code</a></li>
<%# <li><button href="https://rubygems.org/gems/lotusrb" type="button" class="btn btn-primary version">Download v{{version}}</button></li> %>
</ul> </ul>
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>
Expand All @@ -82,14 +84,12 @@
<article class="col-md-5 col-xs-12"> <article class="col-md-5 col-xs-12">
<h3>Features</h3> <h3>Features</h3>
<h2>Lotus is lightweight, fast and testable</h2> <h2>Lotus is lightweight, fast and testable</h2>

<p>Lotus is Open Source Software, which strives for simplicity, less DSLs, minimal conventions, more objects, zero monkey-patching and the separation of concerns between MVC layers. It suggests best practices, but it leaves all the freedom to you, the developer, to build your own architecture, with your own objects.</p> <p>Lotus is Open Source Software, which strives for simplicity, less DSLs, minimal conventions, more objects, zero monkey-patching and the separation of concerns between MVC layers. It suggests best practices, but it leaves all the freedom to you, the developer, to build your own architecture, with your own objects.</p>

<p>Lotus is made of standalone frameworks (controllers, views, etc.) and each one is shipped as an independent gem to emphasize the separation of concerns.</p> <p>Lotus is made of standalone frameworks (controllers, views, etc.) and each one is shipped as an independent gem to emphasize the separation of concerns.</p>
</article> </article>


<figure class="col-md-7 hidden-sm hidden-xs"> <figure class="col-md-7 hidden-sm hidden-xs">
<img src="images/features.png" /> <%= image_tag 'features.png' %>
</figure> </figure>
</div> </div>
</section> </section>
Expand All @@ -107,25 +107,25 @@
<div class="framework"> <div class="framework">
<h4>Lotus</h4> <h4>Lotus</h4>
<p>Full stack web applications<br /> <p>Full stack web applications<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotusrb" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotusrb" target="_blank">API</a><a href="https://github.com/lotus/lotus" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
<article class="col-sm-4"> <article class="col-sm-4">
<span class="number">_02</span> <span class="number">_02</span>
<div class="framework"> <div class="framework">
<h4>Lotus <strong>::</strong> Model</h4> <h4>Lotus <strong>::</strong> Model</h4>
<p>Model layer for Lotus<br /> <p>A persistence framework with entities, repositories, data mapper and query objects<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotus-model" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-model" target="_blank">API</a><a href="https://github.com/lotus/model" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
<article class="col-sm-4"> <article class="col-sm-4">
<span class="number">_03</span> <span class="number">_03</span>
<div class="framework"> <div class="framework">
<h4>Lotus <strong>::</strong> Router</h4> <h4>Lotus <strong>::</strong> Router</h4>
<p>Rack compatible, lightweight and fast HTTP Router<br /> <p>Rack compatible, lightweight and fast HTTP Router for Ruby<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotus-router" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-router" target="_blank">API</a><a href="https://github.com/lotus/router" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
Expand All @@ -137,7 +137,7 @@
<div class="framework"> <div class="framework">
<h4>Lotus <strong>::</strong> Utils</h4> <h4>Lotus <strong>::</strong> Utils</h4>
<p>Ruby core extensions and class utilities for Lotus<br /> <p>Ruby core extensions and class utilities for Lotus<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotus-utils" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-utils" target="_blank">API</a><a href="https://github.com/lotus/utils" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
Expand All @@ -146,16 +146,28 @@
<div class="framework"> <div class="framework">
<h4>Lotus <strong>::</strong> View</h4> <h4>Lotus <strong>::</strong> View</h4>
<p>View layer for Lotus<br /> <p>View layer for Lotus<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotus-view" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-view" target="_blank">API</a><a href="https://github.com/lotus/view" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
<article class="col-sm-4"> <article class="col-sm-4">
<span class="number">_06</span> <span class="number">_06</span>
<div class="framework"> <div class="framework">
<h4>Lotus <strong>::</strong> Controller</h4> <h4>Lotus <strong>::</strong> Controller</h4>
<p>Controller layer for Lotus<br /> <p>Complete, fast and testable actions for Rack and Lotus<br />
<a href="#">Gem</a><a href="#">API</a><a href="#">Source Code</a> <a href="http://rubygems.org/gems/lotus-controller" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-controller" target="_blank">API</a><a href="https://github.com/lotus/controller" target="_blank">Source Code</a>
</p>
</div>
</article>
</div>

<div class="row">
<article class="col-sm-4">
<span class="number">_07</span>
<div class="framework">
<h4>Lotus <strong>::</strong> Validations</h4>
<p>Validations mixin for Ruby objects<br />
<a href="http://rubygems.org/gems/lotus-validations" target="_blank">Gem</a><a href="http://rdoc.info/gems/lotus-validations" target="_blank">API</a><a href="https://github.com/lotus/validations" target="_blank">Source Code</a>
</p> </p>
</div> </div>
</article> </article>
Expand All @@ -166,14 +178,16 @@
<section class="cta"> <section class="cta">
<div class="wrapper"> <div class="wrapper">
<h3>Download</h3> <h3>Download</h3>
<h2>Get Started with the Lotus Framework</h2> <h2>Get Started with Lotus</h2>
<a href="#" class="btn btn-primary">Download v0.2.0</a> <a href="http://rubygems.org/gems/lotusrb" target="_blank" class="btn btn-primary version">Download v{{version}}</a>


<!--
<article class="case-studies"> <article class="case-studies">
<p>Check out who uses Lotus:</p> <p>Check out who uses Lotus:</p>
<img class="dnsimple" src="images/dnssimple.png" /> <%= image_tag 'dnssimple.png' %>
<img class="envato" src="images/envato.png" /> <%= image_tag 'envato.png' %>
</article> </article>
-->
</div> </div>
</section> </section>


Expand Down Expand Up @@ -209,10 +223,13 @@
</div> </div>


<div class="sub-footer wrapper"> <div class="sub-footer wrapper">
<p class="copyright pull-left">© 2015 <a href="http://lucaguidi.com/">Luca Guidi</a> – Lotus is released under the MIT License. Site Design by <a href="http://www.alantippins.com/">Alan Tippins</a>.</p> <p class="copyright pull-left">&copy; 2014-<span id="copyright-year">{{year}}</span> <a href="http://lucaguidi.com/">Luca Guidi</a> – Lotus is released under the MIT License.
<br>
<br> This website and its contents are released under <a href="http://creativecommons.org/licenses/by-nc/4.0/" href="_blank">CC Attribution-NonCommercial 4.0</a>.
<br> Maintained with <3 by the <a href="" target="_blank">core team</a> with help from <a href="https://github.com/lotus/lotus/graphs/contributors" target="_blank">contributors</a>. Site Design by <a href="http://www.alantippins.com/">Alan Tippins</a>.</p>
<ul class="social"> <ul class="social">
<li><a href="#" class="icon-twitter"></a></li> <li><a href="https://twitter.com/lotus_rb" target="_blank" class="icon-twitter"></a></li>
<li><a href="#" class="icon-github"></a></li> <li><a href="https://github.com/lotus" target="_blank" class="icon-github"></a></li>
</ul> </ul>
</div> </div>
</footer> </footer>
Expand Down

0 comments on commit 7bb0000

Please sign in to comment.