Skip to content

Commit

Permalink
Merge pull request #21 from GSG-K3/html
Browse files Browse the repository at this point in the history
Server and Database files
  • Loading branch information
rubasider authored Feb 26, 2020
2 parents 659d01c + 7aebaa6 commit e17b2bd
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 83 deletions.
8 changes: 4 additions & 4 deletions database/config/build.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DROP TABLE IF EXISTS students, teachers, grades, courses;


CREATE TABLE IF NOT EXISTS courses(
course_id SERIAL PRIMARY KEY,
course_id SERIAL PRIMARY KEY,
course_title TEXT NOT NULL

);
Expand All @@ -20,11 +20,11 @@ INSERT INTO courses (course_id, course_title) VALUES(7,'English');
CREATE TABLE IF NOT EXISTS students(
student_id SERIAL PRIMARY KEY,
student_name TEXT NOT NULL ,
student_birth INTEGER ,
student_birth INTEGER NOT NULL,
student_sex TEXT NOT NULL,
student_address TEXT ,
student_address TEXT NOT NULL ,
student_EMAIL VARCHAR(320),
student_img VARCHAR(250) NoT NULL
student_img VARCHAR(250) NOT NULL

);

Expand Down
5 changes: 5 additions & 0 deletions database/queries/getData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RTCPeerConnection.query(sql, (err, rows, fields) => {
if (err) console.log(err);
else console.log(rows);
response.send(rows);
});
4 changes: 2 additions & 2 deletions public/grades.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>Student Managment System</h1>
</section>

<form class="searchForm" action="page.php">
<input type="text" placeholder="Search.." name="search" />
<input type="text" placeholder="Your ID Number.." name="search" />
<button type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
Expand All @@ -38,7 +38,7 @@ <h1>Student Managment System</h1>
</tr>
<tr>
<td>
90
Math
</td>
<td>80</td>
</tr>
Expand Down
66 changes: 31 additions & 35 deletions public/student.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Student Managment System</title>
<link rel="stylesheet" href="./style.css" />
</head>

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./style.css">
</head>

<body>
<body>
<section class="topsection">
<img src="./imges/school.png" alt="school picture" />
<h1>Student Managment System</h1>
<img src="./imges/school.png" alt="school picture" />
<h1>Student Managment System</h1>
</section>

<section class="student">
<form class="student_form">
<div>
<input value="Type your ID" type="search" class="head_search">
</div>
<div>
<input value="submit" type="button" class="head_button">
</div>
</form>
<div class="student_profolio">
<img src="team-01.png" class="student_img">
<div class="student_profolio_name">
<h2>Ali</h2>
<h3>ID:134223</h3>
</div>
<form class="student_form">
<div>
<input value="Type your ID" type="search" class="head_search" />
</div>
<div class="student_info">
<h3>location:</h3>
<h3>birthday:</h3>
<h3>sex:</h3>
<h3>phone:</h3>


<div>
<input value="submit" type="button" class="head_button" />
</div>
</form>
<div class="student_profolio">
<img src="./imges/student.png" class="student_img" />
<div class="student_profolio_name">
<h2>Ali</h2>
<h3>ID:134223</h3>
</div>
</div>
<div class="student_info">
<h3>location:</h3>
<h3>birthday:</h3>
<h3>sex:</h3>
<h3>phone:</h3>
</div>
</section>
</body>

</html>
</body>
</html>
84 changes: 42 additions & 42 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
.student_profolio {
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-left: 100px;
box-shadow: 5px 5px 5px #aaaaaa;
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-left: 100px;
box-shadow: 5px 5px 5px #aaaaaa;
}

.student_img {
border-radius: 50%;
width: 130px;
height: 130px;
padding: 10px;
border-radius: 50%;
width: 130px;
height: 130px;
padding: 10px;
}

.student_profolio_name {
padding: 10px 0 10px 0;
padding: 10px 0 10px 0;
}

.student_form {
display: flex;
flex-direction: row;
padding: 10px 35px 10px 20px;
justify-content: space-around;
display: flex;
flex-direction: row;
padding: 10px 35px 10px 20px;
justify-content: space-around;
}

.student_info {
padding: 40px;
box-shadow: 5px 5px 5px 5px #aaaaaa;
height: 320px;
/* background-color: oldlace */
padding: 40px;
box-shadow: 5px 5px 5px 5px #aaaaaa;
height: 320px;
/* background-color: oldlace */
}

* {
padding: 0;
margin: 0;
padding: 0;
margin: 0;
}

.topsection {
background-color: #4e9cc9;
width: 100%;
height: 109px;
display: flex;
flex-direction: row;
align-items: center;
background-color: #4e9cc9;
width: 100%;
height: 109px;
display: flex;
flex-direction: row;
align-items: center;
}

.topsection img {
width: 50px;
height: 50px;
padding: 10px;
width: 50px;
height: 50px;
padding: 10px;
}

.topsection h1 {
margin-top: 22px;
font-family: "Anton";
font-size: 6vw;
color: white;
margin-top: 22px;
font-family: "Anton";
font-size: 6vw;
color: white;
}

.icons {
width: 100%;
height: auto;
padding: 5px;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
height: auto;
padding: 5px;
display: flex;
flex-direction: column;
align-items: center;
}

.icons img {
Expand All @@ -84,17 +84,18 @@
}

.searchForm input {
height: 25px;
border: 1px solid grey;
height: 28px;
width: 46vw;
background: #f1f1f1;
border: none;
}
.searchForm button {
width: 76px;
height: 26px;
background-color: #4e9cc9;
color: beige;
font-size: 3vw;
border: none;
}

.gradesTable {
Expand All @@ -117,4 +118,3 @@
color: white;
font-size: 25px;
}

15 changes: 15 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const express = require("express");
const path = require("path");
const app = express();
const request = require("request");

app.use(express.static(path.join(__dirname, "..", "public")));
app.set("port", process.env.PORT || 5000);
app.get("/home", (request, response) => {
getdata();
});
app.listen(app.get("port"), () => {
console.log("The server is working ....");
});

module.exports = app;
2 changes: 2 additions & 0 deletions src/controllers/user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const getData = require("../../database/queries/getData");
const postData = require("../../database/queries/postData");

0 comments on commit e17b2bd

Please sign in to comment.