Skip to content
Permalink
Browse files

Plug home page contents

  • Loading branch information...
jodosha committed Feb 16, 2015
1 parent c230a83 commit 7bb0000b65a961888f43a32bb378916e05467800
Showing with 152 additions and 116 deletions.
  1. +105 −88 source/javascripts/main.js
  2. +45 −28 source/layouts/layout.erb
  3. +1 −0 source/sass/layouts/_footer.scss
  4. +1 −0 source/stylesheets/styles.css
@@ -1,20 +1,19 @@

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

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

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

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

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

//Typing terminal animation
$(function () {
var data = [
{
action: 'type',
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
},
{
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: ['cd bundle exec lotus server^400'],
output: $('.run-output').html()
},
{
action: 'type',
strings: [
'Start building!',
''
],
postDelay: 2000
}
$('.version').each(function(i, element) {
element = $(element);
var content = element.text().replace('{{version}}', version);

element.text(content);
});
});

// Prepare timestamps for terminal animation
$(window).load(function(){
var date = new Date();
var month = (date.getMonth()+1);
month = month > 10 ? month : '0'+month;

var timestamp = "["+date.getFullYear()+"-"+month+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+"]";

$('span.timestamp').each(function(i, element) {
element = $(element);
var content = element.text().replace('{{timestamp}}', timestamp);

element.text(content);
});
});

// Typing terminal animation
$(window).load(function(){
var version = $('meta[name=lotusrb-version]').attr('content');
var data = [
{
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: 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);
});
function runScripts(data, pos) {
var prompt = $('.prompt'), script = data[pos];
if (script.clear === true) {
$('.history').html('');
$('.history').html('');
}
switch (script.action) {
case 'type':
case 'type':
prompt.removeData();
$('.typed-cursor').text('');
prompt.typed({
strings: script.strings,
typeSpeed: 30,
callback: function () {
var history = $('.history').html();
history = history ? [history] : [];
history.push('$ ' + prompt.text());
if (script.output) {
history.push(script.output);
prompt.html('');
$('.history').html(history.join('<br>'));
}
$('section.terminal').scrollTop($('section.terminal').height());
pos++;
if (pos < data.length) {
setTimeout(function () {
runScripts(data, pos);
}, script.postDelay || 1000);
}
}
});
break;
case 'view':
$('.typed-cursor').text('');
prompt.typed({
strings: script.strings,
typeSpeed: 30,
callback: function () {
var history = $('.history').html();
history = history ? [history] : [];
history.push('$ ' + prompt.text());
if (script.output) {
history.push(script.output);
prompt.html('');
$('.history').html(history.join('<br>'));
}
$('section.terminal').scrollTop($('section.terminal').height());
pos++;
if (pos < data.length) {
setTimeout(function () {
runScripts(data, pos);
}, script.postDelay || 1000);
}
}
});
break;
case 'view':
break;
}
}
















// Copyright year
$(window).load(function(){
var year = (new Date()).getFullYear();
$('#copyright-year').text(year);
});
@@ -6,6 +6,7 @@
<title><%= current_page.data.title || "Lotus &dash; A complete web framework for Ruby" %></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="lotusrb-version" content="0.2.1">

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

<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>
<p class="sub">Lotus brings back Object Oriented Programming to web development,<br />
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 -->
<div class="terminal-window animated bounceInUp">
@@ -48,9 +49,9 @@
<!-- data -->
<div class="terminal-data run-output">
<br>
<span class="gray">[2015-02-08 11:18:54] 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">[2015-02-08 11:18:54] INFO WEBrick::HTTPServer#start: pid=52511 port=2300</span><br>
<span class="gray timestamp">{{timestamp}} INFO WEBrick 1.3.1</span><br>
<span class="gray timestamp">{{timestamp}} INFO ruby 2.2.0 (2014-12-25) [x86_64-darwin13]</span><br>
<span class="gray timestamp">{{timestamp}} INFO WEBrick::HTTPServer#start: pid=75581 port=2300</span><br>
<br>
</div>
<!-- .data -->
@@ -68,10 +69,11 @@
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="ui-kit-docs.html">Docs</a></li>
<li><a href="#">Community</a></li>
<li><a href="ui-kit-blog.html">Blog</a></li>
<li><button type="button" class="btn btn-primary">Download v.0.2.0</button></li>
<li><a href="/guides">Guides</a></li>
<li><a href="/community">Community</a></li>
<li><a href="/blog">Blog</a></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>
</div><!--/.nav-collapse -->
</div>
@@ -82,14 +84,12 @@
<article class="col-md-5 col-xs-12">
<h3>Features</h3>
<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 made of standalone frameworks (controllers, views, etc.) and each one is shipped as an independent gem to emphasize the separation of concerns.</p>
</article>

<figure class="col-md-7 hidden-sm hidden-xs">
<img src="images/features.png" />
<%= image_tag 'features.png' %>
</figure>
</div>
</section>
@@ -107,25 +107,25 @@
<div class="framework">
<h4>Lotus</h4>
<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>
</div>
</article>
<article class="col-sm-4">
<span class="number">_02</span>
<div class="framework">
<h4>Lotus <strong>::</strong> Model</h4>
<p>Model layer for Lotus<br />
<a href="#">Gem</a> • <a href="#">API</a> • <a href="#">Source Code</a>
<p>A persistence framework with entities, repositories, data mapper and query objects<br />
<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>
</div>
</article>
<article class="col-sm-4">
<span class="number">_03</span>
<div class="framework">
<h4>Lotus <strong>::</strong> Router</h4>
<p>Rack compatible, lightweight and fast HTTP Router<br />
<a href="#">Gem</a> • <a href="#">API</a> • <a href="#">Source Code</a>
<p>Rack compatible, lightweight and fast HTTP Router for Ruby<br />
<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>
</div>
</article>
@@ -137,7 +137,7 @@
<div class="framework">
<h4>Lotus <strong>::</strong> Utils</h4>
<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>
</div>
</article>
@@ -146,16 +146,28 @@
<div class="framework">
<h4>Lotus <strong>::</strong> View</h4>
<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>
</div>
</article>
<article class="col-sm-4">
<span class="number">_06</span>
<div class="framework">
<h4>Lotus <strong>::</strong> Controller</h4>
<p>Controller layer for Lotus<br />
<a href="#">Gem</a> • <a href="#">API</a> • <a href="#">Source Code</a>
<p>Complete, fast and testable actions for Rack and Lotus<br />
<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>
</div>
</article>
@@ -166,14 +178,16 @@
<section class="cta">
<div class="wrapper">
<h3>Download</h3>
<h2>Get Started with the Lotus Framework</h2>
<a href="#" class="btn btn-primary">Download v0.2.0</a>
<h2>Get Started with Lotus</h2>
<a href="http://rubygems.org/gems/lotusrb" target="_blank" class="btn btn-primary version">Download v{{version}}</a>

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

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

<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">
<li><a href="#" class="icon-twitter"></a></li>
<li><a href="#" class="icon-github"></a></li>
<li><a href="https://twitter.com/lotus_rb" target="_blank" class="icon-twitter"></a></li>
<li><a href="https://github.com/lotus" target="_blank" class="icon-github"></a></li>
</ul>
</div>
</footer>

0 comments on commit 7bb0000

Please sign in to comment.
You can’t perform that action at this time.