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

Wave 2/3 Pull Request #33

Open
wants to merge 24 commits into
base: rrs/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6c90ba2
Testing new tabs
rileslovesyall Oct 28, 2015
62effd2
Adding beginnings of css files
rileslovesyall Oct 28, 2015
21fd515
Adding basic css files
rileslovesyall Oct 28, 2015
afba2f8
Testing for indentation
rileslovesyall Oct 28, 2015
b89c00b
Still testing for indentation
rileslovesyall Oct 28, 2015
2f9eb7b
Indentation fixed?
rileslovesyall Oct 28, 2015
f66fb05
Fixed indentattiongit add .
rileslovesyall Oct 28, 2015
7d219e5
CSS elements working
rileslovesyall Oct 29, 2015
1add726
Added a layout page, began setting it up
rileslovesyall Oct 29, 2015
6bf1da6
Commiting so I can fetch
rileslovesyall Oct 29, 2015
4d7b1d2
TacoCreator workinggit add .
rileslovesyall Oct 30, 2015
1239de9
Removed extraneous lib file
rileslovesyall Oct 30, 2015
f904e3d
You can name your own TacoCorn
rileslovesyall Oct 30, 2015
1484e10
working website, except css on home page being dumb
rileslovesyall Oct 30, 2015
18a1ad7
random generator working, plus name your own tacocorn
rileslovesyall Oct 30, 2015
9ce0b8a
Tried to add DOTYPE after the fact, it messed up a bunch of my css, a…
rileslovesyall Oct 30, 2015
ae7d8fc
Beginning to add TacoCorn database
rileslovesyall Nov 5, 2015
1a293b7
Database initialized
rileslovesyall Nov 5, 2015
d1564c9
Procfile added
rileslovesyall Nov 6, 2015
df0f09f
Removed sqlite3:
rileslovesyall Nov 6, 2015
c4e7dae
Updating Gemfile.lock
rileslovesyall Nov 6, 2015
fc0054c
removed database related code
rileslovesyall Nov 6, 2015
aa97bc5
Fixed named tacocorn page:
rileslovesyall Nov 6, 2015
bce45e8
Fixed named_tacocorn photo problem
rileslovesyall Nov 6, 2015
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
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec rackup -p $PORT
29 changes: 29 additions & 0 deletions lib/database.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# require "sqlite3"

# module TacoCorn
# class Database

# def initialize(db_name)
# @db = SQLite3::Database.new(db_name)
# end

# def create_schema
# @db.execute('
# CREATE TABLE tacocorns (
# id INTEGER PRIMARY KEY,
# name TEXT NOT NULL,
# hunger INTEGER NOT NULL,
# horn_size INTEGER NOT NULL
# description TEXT NULL,
# );')
# end

# def create_tacocorn(name, horn_size, hunger, description)
# @db.execute('
# INSERT INTO tacocorns (name, horn_size, hunger, description)
# VALUES(?, ?, ?, ?)
# ', name, horn_size, hunger, description)
# end
# end

# end
2 changes: 2 additions & 0 deletions lib/taco.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Taco
end
7 changes: 7 additions & 0 deletions lib/tacocorn_manipulator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Tacocorn

class Manipulate

end

end
33 changes: 33 additions & 0 deletions lib/unicorn.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
require './lib/taco.rb'

class Unicorn
attr_reader :horn_size
attr_accessor :name, :hunger

def initialize
@name = ""
@horn_size = rand(2..10)
@hunger = @horn_size
end

def introduce
@intro = "Meet #{name}, the TacoCorn. \n#{name} loves to eat tacos."
end

def self.introduce_new
@@unicorn = Unicorn.new
return @@unicorn.introduce
end

def give_name
names = ['Charlie', 'Pericles', 'Desmond', 'Scarlett', 'Janet', 'Gertrude', 'Apple', 'Onion', 'WaterfallRiverSparkle', 'Unitarded', 'Gregory', 'James', 'Bearasaurus', 'Desdemona', 'T-Rex']
length = names.length - 1
name = names[rand(0..length)]
end
end

def random_tacocorn
@taco_corns = ["hipster_tacocorn.png", "taco_unicorn.jpeg", "hipster_tacocorn2.jpeg", "tacocorn1.jpeg", "brony.jpeg", "tacocorn2.jpeg", "tacocorn3.jpeg"]
length = @taco_corns.length - 1
return @taco_corns[rand(0..length)]
end
50 changes: 37 additions & 13 deletions my-site.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
require "sinatra"
require './lib/unicorn.rb'

class MySite < Sinatra::Base

get "/" do
erb :index
end
get "/" do
@title = "One Taco to Rule Them All"
erb :index
end

get "/taco_corn" do
erb :taco_corn
end
get "/index" do
@title = "One Taco to Rule Them All"
erb :index
end

get "/blog" do
erb :blog
end
get "/taco_corn" do
@title = "TacoCorns Unite!"
erb :taco_corn
end

get "/blog" do
@title = "My Ideas are Important."
erb :blog
end

get "/tacocorn_creator" do
@title = "TacoCorn Creator"
@uni = Unicorn.new
@uni.name = @uni.give_name
@intro = @uni.introduce
@tacocorn = random_tacocorn
erb :tacocorn_creator
end

post '/named_tacocorn' do
@title = "Your TacoCorn"
@name = params[:name]
@uni = Unicorn.new
@uni.name = @name
@tacocorn = random_tacocorn
erb :named_tacocorn
end

get "/index" do
erb :index
end

end

Empty file added public/css/index.css
Empty file.
128 changes: 128 additions & 0 deletions public/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
body{
width: 900px
background-color: #FFEFAD;
margin: 0 auto;
}

header {
background-color: #EAAAFF;
}

div#wrap{s
background-color: #FFEFAD;
width:90%;
margin: 0 auto;
}

nav {
text-align: center;
}

nav a{
margin: 0px 25px;
}

a {
font-family: 'Amatic SC', courier;
font-size: 40px;
text-decoration: none;
}

a:link {
color: #009090;
}

a:visited {
color:#006666;
}

a:hover {
color: #4F1A4F;
}

a:active {
color: #220B22;
}

.content_block {
display: inline-block;
width: 25%;
height: 35%;
background-color: #00CC99;
margin: 10px auto;
padding: 30px;
font-family: 'Coming Soon', sans-serif;
text-align: center;
}

.creator_block {
background-color: #00CC99;
/*display: inline-block;*/
width: 500px;
margin: 10 auto;
padding: 20px;
font-family: 'Coming Soon', sans-serif;
text-align: center;
}

.header_block{
display: inline-block;
margin: 10px auto;
padding: 10px;
background-color: #00CC99;
font-family: 'Coming Soon', sans-serif;
text-align: center;
}

.blog_header{
width: 25%;
padding: 10px;
margin: 10 auto;
background-color: #00CC99;
font-family: 'Amatic SC', sans-serif;
text-align: center;
}

article {
width: 75%;
border: 2px black dashed;
margin: 10 auto;
padding: 10px;
font-family: 'Roboto Condensed', sans-serif;
}

aside {
background-color: #F4007A;
font-family: "Coming Soon", serif;
text-align: center;
margin: 10 auto;
padding: 15px;
}

table {
border: 1px solid black;
}

thead {
border: none;
border-bottom: 1px solid black;
}

img#tacocorn {
display: inline-block;
width: 300px;
display: block;
margin: 0 auto;
}

footer {
text-align: center;
background-color: #EAAAFF;
font-size: 40px;
font-family: 'Amatic SC', sans-serif;
}

footer div {
display: inline-block;
margin: 0px 15px;
}
Empty file added public/css/taco_corn.css
Empty file.
Binary file added public/images/brony.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/images/hipster_tacocorn2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added public/images/tacocorn1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tacocorn2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/tacocorn3.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 0 additions & 21 deletions public/main.css

This file was deleted.

Loading