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

Postgres issues #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1 @@
# Persistence assignment

Create a site in Sinatra that saves information from a form to a database, then displays that information on the page. Examples:

* A single-user Twitter clone
* A blog that can be edited online
* A note-taking app
* A recipe site
* *etc.*

Using a SQL database is recommended, specifically PostgreSQL (a.k.a. "Postgres") via the [pg](https://bitbucket.org/ged/ruby-pg/wiki/Home) gem. The app doesn't need a lot of bells & whistles, e.g. user authentication, unless you get that first part done early.

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

* All the necessary files
* In the README:
* Setup instructions
* A link to the live app on Heroku
The objective was to create a gaming forum. But unfortunately I have issues with postgres.
2 changes: 2 additions & 0 deletions README.md~
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The objective was to create a gaming forum. But unfortunately I have issues with postgres.

12 changes: 12 additions & 0 deletions basic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'rubygems'
require 'sinatra'
require 'pg'

get '/main.html' do
'This is delievered via the route.'
end


post '/form.html' do

end
20 changes: 20 additions & 0 deletions public/form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Signing Up!</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
</head>


<body id="bg2">
<h3>Please fill out the form below:</h3>

<form action="/form" method="post">
FirstName: <input type="text" name="fname"> <br>
LastName: <input type="text" name="lname"> <br>
email address: <input type="text" name="em"> <br>
Favorite Portable gaming system: <input type="text" name="fgs"> <br>
Favorite game of All-time: <input type="text" name="game"> <br>
</form>
</body>
</html>
20 changes: 20 additions & 0 deletions public/form.html~
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Signing Up!</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
</head>


<body>
<h3>Please fill out the form below:</h3>

<form action="/form" method="post">
FirstName: <input type="text" name="fname"> <br>
LastName: <input type="text" name="lname"> <br>
email address: <input type="text" name="em"> <br>
Favorite Portable gaming system: <input type="text" name="fgs"> <br>
Favorite game of All-time: <input type="text" name="game"> <br>
</form>
</body>
</html>
Binary file added public/kz.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions public/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>Main page</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
</head>


<body id="bg">
<h1><em id="head">Abdul's Gaming Forum</em></h1>
<!--
<ul id="nav">
<li>Home</li>
<li>Community</li>
<li>Forums</li>
</ul> -->

<div id="block1">
<p>Hello Everyone! This fourm is dedicated to those who love portable gaming!</p>
<p>If you enjoy games like</p>
<ul>
<li>Super Smash Bros!</li>
<li>Killzone Mercenary!</li>
<li>Persona 4 Golden!</li>
<li>Fire Emblem Awakening!</li>
</ul>
</div>

<div id="block2">
<p>just to name a few, you've come to the right place.</p>

<p>The primary objective of this forum is to allow portable gamers to interact with one another and to talk about the latest games.</p>
<p>But before you can join, we are going to need you sign up!</p>

<a href="form.html">Please click on the link to sign up!</a>
</div>
</body>
</html>
38 changes: 38 additions & 0 deletions public/main.html~
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>Main page</title>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
</head>


<body id="bg">
<h1><em id="head">Abdul's Gaming Forum</em></h1>

<ul id="nav">
<li>Home</li>
<li>Community</li>
<li>Forums</li>
</ul>

<div id="block1">
<p>Hello Everyone! This fourm is dedicated to those who love portable gaming!</p>
<p>If you enjoy games like</p>
<ul>
<li>Super Smash Bros!</li>
<li>Killzone Mercenary!</li>
<li>Persona 4 Golden!</li>
<li>Fire Emblem Awakening!</li>
</ul>
</div>

<div id="block2">
<p>just to name a few, you've come to the right place.</p>

<p>The primary objective of this forum is to allow portable gamers to interact with one another and to talk about the latest games.</p>
<p>But before you can join, we are going to need you sign up!</p>

<a href="form.html">Please click on the link to sign up!</a>
</div>
</body>
</html>
35 changes: 35 additions & 0 deletions public/stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#head
{
color: red;
border: 2px solid;
}


#block1
{
color: white;
font-weight: bold;
font-size: 20px;
}

#block2
{
color: white;
font-weight: bold;
}

#bg
{
background-image: url("kz.jpg");
}

#bg2
{
background-color: #DCDCDC;
}

#nav
{
display: inline;
color: white;
}
34 changes: 34 additions & 0 deletions public/stylesheet.css~
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#head
{
color: red;
border: 2px solid;
}


#block1
{
color: white;
font-weight: bold;
font-size: 20px;
}

#block2
{
color: white;
font-weight: bold;
}

#bg
{
background-image: url("kz.jpg");
}

#bg2
{
background-color: #DCDCDC;
}

#nav
{
display: inline;
}