Last active
April 4, 2017 19:45
-
-
Save Evanto/879b1c974baccd252b4987a36f4da17d to your computer and use it in GitHub Desktop.
SleepCalc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="./css/bootstrap.min.css"> | |
<link rel='stylesheet' href='./css/main.css' /> | |
</head> | |
<body> | |
<!-- Header Section --> | |
<div class="header"> | |
<div class="menu"> | |
<div class="container"> | |
<ul class="nav"> | |
<li class="active"><a href="#">Home</a></li> | |
<li><a href="#">About</a></li> | |
<li><a href="#">Blog</a></li> | |
<li><a href="#">Contact</a></li> | |
</ul> | |
</div> | |
</div> | |
<div class="main"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-5"> | |
<h1>Hi, welcome to <span>SleepCalc.</span>.</h1> | |
<p>What is the best time to <span>go to bed</span>, if I want to<span> get up</span> at:</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- End header Section --> | |
<!-- Form Section--> | |
<section class="container"> | |
<div class="row text-center"> | |
<div class="col-md-12"> | |
<h2>What is the best time to get up if I want to wake up at:</h2> | |
</div> | |
</section> | |
<section class="container"> | |
<div class="row text-center"> | |
<div class="col-md-12"> | |
<form class="form-inline"> | |
<div class="form-group select-group"> | |
<%= form_for @pages do |f| %> | |
<%= f.label :hours %> | |
<%= f.select :hours, '1'..'24' %> | |
<%= f.label :minutes %> | |
<%= f.select :minutes, '0'..'59' %> | |
<%= f.submit "Submit" %> | |
<% end %> | |
</div> | |
</form> | |
</div> | |
</div> | |
</section> | |
<section class="container"> | |
<div class="row text-center"> | |
</section> | |
</div> | |
<div class="footer"> | |
<div class="container"> | |
<ul> | |
<li>About</li> | |
<li>Blog</li> | |
<li>Contact</li> | |
</ul> | |
<p>© 2017 SleepCalc</p> | |
</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hours < ApplicationRecord | |
has_many :minutes | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Minutes < ApplicationRecord | |
belongs_to :hours | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PagesController < ApplicationController | |
def home | |
end | |
# POST /hours and minutes | |
def create | |
@pages = Page.create(page_params) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment