Skip to content

Commit 0400cab

Browse files
Add files via upload
1 parent 63ee116 commit 0400cab

File tree

10 files changed

+531
-0
lines changed

10 files changed

+531
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
$server = "localhost";
3+
$username = "root";
4+
$passward = "";
5+
$port = 3306;
6+
$dbname = "api";
7+
$con = mysqli_connect($server, $username, $passward, $dbname);
8+
header("Content-Type:application/json");
9+
10+
header('Access-Control-Allow-Origin: *');
11+
12+
if (isset($_GET["q"])) {
13+
$query = $_GET["q"];
14+
} else {
15+
$query = "notadmin";
16+
}
17+
18+
if (!$con) {
19+
echo json_encode(["status_code" => 404, "data" => "api is down"]);
20+
} else {
21+
if ($query == "admin") {
22+
$sql = "select * from api1";
23+
$res = mysqli_query($con, $sql);
24+
while ($row = mysqli_fetch_assoc($res)) {
25+
$arr[] = $row;
26+
}
27+
echo json_encode(["status_code" => 200, "data" => $arr]);
28+
} else {
29+
echo json_encode(["status_code" => 400, "data" => "wrong credential"]);
30+
}
31+
}
110 KB
Loading
101 KB
Loading
6.09 MB
Loading
1.18 MB
Loading
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
6+
body {
7+
background-color: #252830;
8+
color: white;
9+
font-family: "Lato";
10+
}
11+
.container {
12+
display: flex;
13+
justify-content: space-around;
14+
flex-wrap: wrap;
15+
margin-bottom: 100px;
16+
}
17+
.box {
18+
height: 400px;
19+
width: 600px;
20+
overflow: hidden;
21+
position: relative;
22+
margin-top: 50px;
23+
}
24+
.media {
25+
background-position: center;
26+
background-size: cover;
27+
height: 100%;
28+
position: absolute;
29+
transition: all 0.6s ease;
30+
width: 100%;
31+
}
32+
.media:hover {
33+
transform: scale(1.1);
34+
}
35+
.box p {
36+
color: #252830;
37+
height: 100%;
38+
margin-left: 15px;
39+
left: 0;
40+
position: absolute;
41+
top: 0;
42+
width: 250px;
43+
/* background-color: rgba(255, 255, 255, 0.863); */
44+
text-align: center;
45+
padding-top: 20px;
46+
}
47+
.box p .title {
48+
font: bolder 38px "Alfa Slab One";
49+
text-align: center;
50+
margin: 0;
51+
color: black;
52+
mix-blend-mode: lighten;
53+
background-color: rgba(253, 253, 253, 0.838);
54+
width: 250px;
55+
letter-spacing: 2px;
56+
display: block;
57+
width: 100%;
58+
}
59+
.box p .des {
60+
padding-top: 50px;
61+
padding-right: 5px;
62+
padding-left: 5px;
63+
font-size: 15px;
64+
background-color: rgba(253, 253, 253, 0.838);
65+
display: block;
66+
/* width: 100%; */
67+
line-height: 30px;
68+
letter-spacing: 1px;
69+
}
70+
.box p .lang {
71+
font-size: 15px;
72+
font-weight: 700;
73+
letter-spacing: 1px;
74+
display: block;
75+
background-color: rgba(196, 165, 28, 0.685);
76+
text-align: left;
77+
padding-left: 5px;
78+
padding-top: 5px;
79+
padding-bottom: 5px;
80+
}
81+
.box p .links {
82+
bottom: 0px;
83+
background-color: yellowgreen;
84+
width: 100%;
85+
display: flex;
86+
height: 50px;
87+
justify-content: center;
88+
text-align: center;
89+
}
90+
.box p .links a {
91+
text-decoration: none;
92+
font-size: 20px;
93+
font-weight: 700;
94+
letter-spacing: 2px;
95+
width: 50%;
96+
height: 100%;
97+
text-align: center;
98+
color: #252830;
99+
}
100+
.box p .links a:nth-child(1) {
101+
background-color: aqua;
102+
}
103+
.box p .links a:nth-child(2) {
104+
padding-top: 10px;
105+
}
106+
.navbar {
107+
width: 100%;
108+
bottom: 50px;
109+
position: fixed;
110+
}
111+
.nev {
112+
width: 400px;
113+
height: 50px;
114+
border-radius: 25px;
115+
margin: auto;
116+
background-color: blueviolet;
117+
display: flex;
118+
justify-content: space-around;
119+
text-align: center;
120+
vertical-align: middle;
121+
line-height: 50px;
122+
box-shadow: 0 4px 8px 0 rgba(211, 14, 178, 0.2),
123+
0 6px 20px 0 rgba(208, 12, 226, 0.19);
124+
}
125+
.nev a {
126+
text-decoration: none;
127+
color: white;
128+
font-size: 20px;
129+
display: inline;
130+
}
131+
@media only screen and (max-width: 650px) {
132+
.container {
133+
flex-direction: column;
134+
}
135+
.box {
136+
display: flex;
137+
flex-direction: column;
138+
width: 295px;
139+
margin: auto;
140+
height: auto;
141+
margin-top: 50px;
142+
}
143+
.media {
144+
position: relative;
145+
height: 200px;
146+
}
147+
.box p {
148+
width: 100%;
149+
position: relative;
150+
padding-top: 0px;
151+
margin-left: 0px;
152+
}
153+
.box p .des {
154+
padding-top: 0px;
155+
}
156+
.nev {
157+
width: 90%;
158+
}
159+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Project</title>
8+
<link rel="preconnect" href="https://fonts.gstatic.com" />
9+
<link
10+
href="https://fonts.googleapis.com/css2?family=Alfa+Slab+One&display=swap"
11+
rel="stylesheet"
12+
/>
13+
<link
14+
rel="stylesheet"
15+
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
16+
/>
17+
<link rel="stylesheet" href="main.css" />
18+
</head>
19+
<body>
20+
<div class="container" id="contents"></div>
21+
<div class="navbar">
22+
<div class="nev">
23+
<a href="#"><i class="fa fa-home"></i></a>
24+
<a href="#"><i class="fa fa-search"></i></a>
25+
<a href="#"><i class="fa fa-bars"></i></a>
26+
</div>
27+
</div>
28+
<script>
29+
async function getText(url) {
30+
const response = await fetch(url);
31+
32+
// Storing data in form of JSON
33+
var data = await response.json();
34+
if (data.status_code == 200) {
35+
show(data);
36+
}
37+
}
38+
function show(data) {
39+
tab = "";
40+
41+
// Loop to access all rows
42+
for (let r of data.data) {
43+
data = `
44+
<div class="box">
45+
<div
46+
class="media"
47+
style="
48+
background-image: url(https://quartziferous-wool.000webhostapp.com/api/${r.image});
49+
"
50+
></div>
51+
<p>
52+
<span class="title">${r.name}</span>
53+
<span class="des"
54+
>${r.des}</span
55+
>
56+
<span class="lang"><b>Built with</b>: ${r.lang}</span>
57+
<span class="links">
58+
<a href="${r.source}">Source <br />code</a>
59+
<a href="${r.deploy}">View</a>
60+
</span>
61+
</p>
62+
</div>
63+
`;
64+
tab += data;
65+
}
66+
// Setting innerHTML as tab variable
67+
document.getElementById("contents").innerHTML = tab;
68+
}
69+
getText(
70+
"https://quartziferous-wool.000webhostapp.com/api/api.php?q=admin"
71+
);
72+
</script>
73+
</body>
74+
</html>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
body {
2+
padding: 0px;
3+
height: 100%;
4+
background-color: #2b2c2c;
5+
width: 100%;
6+
}
7+
.text {
8+
color: green;
9+
text-align: center;
10+
font: bolder 50px "Alfa Slab One";
11+
background-image: url(image/floral.jpg);
12+
-webkit-text-fill-color: transparent;
13+
-webkit-background-clip: text;
14+
}
15+
.input {
16+
padding-bottom: 10px;
17+
width: 80%;
18+
border: 2px solid white;
19+
border-radius: 5px;
20+
margin: 20px;
21+
pointer-events: all;
22+
background-color: rgb(29, 28, 28);
23+
border: none;
24+
25+
border-bottom: 2px solid white;
26+
color: white;
27+
transition: all 0.3s ease;
28+
}
29+
input:focus-visible,
30+
textarea:focus,
31+
select:focus {
32+
/* border-width: 0px; */
33+
outline: -webkit-focus-ring-color auto 0px;
34+
background-color: rgb(29, 28, 28);
35+
}
36+
.form {
37+
color: cornsilk;
38+
width: 700px;
39+
height: auto;
40+
41+
border-radius: 10px;
42+
margin: 20px auto;
43+
padding: 20px;
44+
}
45+
46+
button {
47+
background-color: rgba(38, 201, 201, 0.726);
48+
border-radius: 15px;
49+
font-size: 20px;
50+
letter-spacing: 1px;
51+
padding-top: 10px;
52+
transition: all 1s ease;
53+
width: 80%;
54+
margin-left: 10%;
55+
}
56+
button:hover {
57+
background-color: cyan;
58+
}
59+
.box {
60+
background-color: rgb(29, 28, 28);
61+
padding: 20px;
62+
margin: 10px;
63+
border-radius: 10px;
64+
}
65+
@media only screen and (max-width: 800px) {
66+
.form {
67+
width: 90%;
68+
}
69+
}

0 commit comments

Comments
 (0)