Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gabriela Voll's completed app, deployed and working #2

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9650289
Create form.erb
gabrielavoll Oct 16, 2014
c961d8c
Create basics.rb
gabrielavoll Oct 16, 2014
d3a0b1e
Update Gemfile.lock
gabrielavoll Oct 16, 2014
feb3c2b
Update Gemfile
gabrielavoll Oct 16, 2014
b331b51
addign view folder
gabrielavoll Oct 16, 2014
85d9cb1
Update README.md
gabrielavoll Oct 16, 2014
cb940d6
Update README.md
gabrielavoll Oct 16, 2014
5b0a83d
Delete .travis.yml
gabrielavoll Oct 16, 2014
c6e993c
Merge pull request #1 from gato333/patch-1
gabrielavoll Oct 16, 2014
076fc8a
Merge pull request #2 from gato333/master
gabrielavoll Oct 16, 2014
5b7c4c5
Merge pull request #3 from gato333/patch-1
gabrielavoll Oct 16, 2014
c13f2ad
Create travis.yml
gabrielavoll Oct 16, 2014
b747f2c
Rename travis.yml to .travis.yml
gabrielavoll Oct 16, 2014
f59a015
Create Procfile
gabrielavoll Oct 16, 2014
646b850
Update README.md
gabrielavoll Oct 16, 2014
d9fc533
chaged time to loacal time
gabrielavoll Oct 20, 2014
1e3651c
added readme
gabrielavoll Oct 20, 2014
4ea300e
Delete form.erb
gabrielavoll Oct 20, 2014
d0c8435
chaged time to loacal time
gabrielavoll Oct 20, 2014
8436a2f
added sleep stage
gabrielavoll Oct 20, 2014
2652ebe
time fix
gabrielavoll Oct 20, 2014
252bf92
time fix
gabrielavoll Oct 20, 2014
f51456a
time fix
gabrielavoll Oct 20, 2014
6236943
time fix
gabrielavoll Oct 20, 2014
2c86dd2
time fix
gabrielavoll Oct 20, 2014
32e12b9
trying to fix javascript
gabrielavoll Oct 20, 2014
a66d291
minor text tweeks
gabrielavoll Oct 23, 2014
3f89f02
alignment fix
gabrielavoll Oct 23, 2014
9473ffd
resolved color changing problem
gabrielavoll Oct 23, 2014
1c9a58a
Update README.md
gabrielavoll Oct 23, 2014
013527a
fixed evererything; color changing is operational, and alignment issu…
gabrielavoll Oct 23, 2014
0f9f967
updated readme.md file
gabrielavoll Oct 23, 2014
7f17318
added giifs
gabrielavoll Oct 23, 2014
019738c
added a init page, that asks the user to wonder if its party time
gabrielavoll Oct 23, 2014
7896ffa
forgot some stuff
gabrielavoll Oct 23, 2014
974a0ec
forgot folder
gabrielavoll Oct 23, 2014
00e5b0d
changed party time to start at 5pm not 6pm
gabrielavoll Oct 23, 2014
96f2678
update, for daylight savings
gabrielavoll Nov 9, 2014
ef82cd8
update to the update for daylight savings, pushed it and hour foward …
gabrielavoll Nov 9, 2014
d6cc739
added a month clause that changes the utc based on what month it is (…
gabrielavoll Nov 9, 2014
1e537df
updating the readme, didnt have it locally at the moment
May 3, 2017
5ab6622
typop
May 3, 2017
8faa8f7
Update README.md
May 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: ruby
rvm:
- 2.0.0
script: bundle exec rubocop
-language: ruby
-rvm:
-- 2.1.2
-script: bundle exec rubocop
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'https://rubygems.org'

gem 'rubocop'
source "https://rubygems.org"
ruby "2.1.2"
gem 'sinatra', '1.1.0'
23 changes: 6 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
parser (2.2.0.pre.4)
ast (>= 1.1, < 3.0)
slop (~> 3.4, >= 3.4.5)
powerpack (0.0.9)
rainbow (2.0.0)
rubocop (0.26.1)
astrolabe (~> 1.3)
parser (>= 2.2.0.pre.4, < 3.0)
powerpack (~> 0.0.6)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.4)
ruby-progressbar (1.6.0)
slop (3.6.0)
rack (1.5.2)
sinatra (1.1.0)
rack (~> 1.1)
tilt (~> 1.1)
tilt (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
rubocop
sinatra (= 1.1.0)
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec ruby basics.rb -p $PORT
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Single-Purpose Site
# Gabriela Voll's Single-Purpose Site

Create a single-purpose website using [Sinatra](http://www.sinatrarb.com/) that tells the user one thing, a la [isitchristmas.com](https://isitchristmas.com/). Surprise and delight us – creativity is encouraged. Example inputs:
This single-purpose app, tell you whether or not it is party time. It is indeed party time after 5pm and before 9am. from 9am-5pm it is not party time.

* The current date
* The time
* The weather
* Whether Kanye West's most recent tweets mention Kanye West
* *etc*

**Deploy the application to Heroku**, and **submit a pull request** to this repository. Include:
To run locally:

* All the necessary files
* In the README:
* Setup instructions
* A link to the live app on Heroku
Download the files

in Terminal: install bundler ( to utilize the versions of sinatra and ruby specified)

in Terminal: heroku create

in Terminal: git push heroku master

in Terminal: heroku open

and the website should be up at whatever randomly generated website they give you


link to the live app on Heroku: http://isitpartytime.herokuapp.com/
15 changes: 15 additions & 0 deletions basics.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require 'sinatra'
require 'rubygems'

get '/' do
erb :formQ
end

get '/answer' do
erb :formA
end

not_found do
status 404
'not found'
end
80 changes: 80 additions & 0 deletions views/formA.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@

<%
t= Time.now
if (t.month >10 || t.month < 3)
t=t.getlocal("-05:00")
else
t=t.getlocal("-04:00")
end

if (t.hour >16 || t.hour<4)
word= "YAAAAASS!"
colorid="colorful"
fontsize="100px"
gifadd="http://i2.wp.com/i.imgur.com/OLBwlDo.gif?zoom=2&w=650"
elsif (t.hour<9 && t.hour>=4)
word="No, go the fuck to sleep."
colorid="sleep"
fontsize="70px"
gifadd="http://b.vimeocdn.com/ts/165/538/165538918_640.jpg"
else
word= "No. It is time to twerk."
colorid="not"
fontsize="80px"
gifadd="http://i.imgur.com/Tib2gJo.gif"
end
t.strftime("it is %T")

%>

<!DOCTYPE html>
<html>
<head>
<title>Is It Party Time</title>

<script src="http://code.jquery.com/jquery-2.1.1.js"> </script>
<script src="http://code.jquery.com/ui/1.11.2/jquery-ui.js"> </script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.js"> </script>

<script type="text/javascript">
$(document).ready(function () {
setInterval(function() {
$("#colorful").animate( {backgroundColor: '#000000'}, 100)
.animate( {backgroundColor: '#FFFFFF'}, 100);
}, 200);
});

</script>


</head>
<body id= "<%=colorid%>" >
<div style="height:70%; width:90%;padding-top:1%;margin:auto; text-align:center">
<p style="font-size: 30px;line-height:80%"> Is it party time? </p>
<p style="font-size:<%=fontsize%>; line-height:80%; margin:30px 0px 30px 0px"> <%= word %> </p>
<p style="font-size: 30px;margin:10px 0px 20px 0px;line-height:80%"> Current Time is: <%= t %> </p>
<img height="350px" src="<%= gifadd%>">
</div>

</body>

<style>

#colorful {
background-color: #FFFF00;
}
#not {
background-color: #FFFFFF;
}
#sleep {
background-color: #444499;
}
html,body {
height: 100%;
width: 100%;
}
</style>


</html>

33 changes: 33 additions & 0 deletions views/formQ.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Is It Party Time</title>
</head>
<body>
<form action="/answer" id="wrapper">
<input id="button" type="submit" value="IS IT PARTY TIME?">
</form>
</body>



<style>
#wrapper{
text-align: center;
}
#button {
width:50%;
position: absolute;
top:47%;
left:25%;
font-size: 30px;
margin:auto;
}
body {
background-color: #000000;
width: 100%;
height: 100%;
}

</style>
</html>