Skip to content

Commit 0921fbe

Browse files
author
Just Wait
committed
Integrated PHP code further.
Added URL GET and POST requests that validate the entered day and redirect to the respective profile. Started with the CSS of the personality page.
1 parent 4b15812 commit 0921fbe

20 files changed

+12440
-126
lines changed

.vscode/settings.json

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
{
22
"files.exclude": {
3-
".github": false,
4-
".vscode": false,
5-
"Backup": false,
6-
"README.md": false,
7-
"LICENSE": false,
8-
"web/soon.personalitylib.com": false,
9-
"web/dev.personalitylib.com": false,
10-
"web/error.personalitylib.com": false,
11-
"web/personalitylib.com/assets/css/template.css": false,
12-
"web/personalitylib.com/assets/css/template.css.map": false,
13-
"web/personalitylib.com/assets/css/style.css.map": false,
14-
"web/personalitylib.com/assets/css/style.css": false,
15-
"web/personalitylib.com/assets/css/login.css": false,
16-
"web/personalitylib.com/assets/css/login.css.map": false,
17-
"web/personalitylib.com/assets/css/legalnotice.css": false,
18-
"web/personalitylib.com/assets/css/legalnotice.css.map": false,
19-
"web/personalitylib.com/assets/css/licence.css": false,
20-
"web/personalitylib.com/assets/css/licence.css.map": false,
21-
"web/personalitylib.com/assets/css/account.css": false,
22-
"web/personalitylib.com/assets/css/account.css.map": false,
23-
"web/personalitylib.com/assets/css/about.css": false,
24-
"web/personalitylib.com/assets/css/about.css.map": false,
25-
"web\\personalitylib.com\\node_modules": false,
26-
"web\\personalitylib.com\\vite.config.ts": false
3+
".github": true,
4+
".vscode": true,
5+
"Backup": true,
6+
"README.md": true,
7+
"LICENSE": true,
8+
"web/soon.personalitylib.com": true,
9+
"web/dev.personalitylib.com": true,
10+
"web/error.personalitylib.com": true,
11+
"web/personalitylib.com/assets/css/template.css": true,
12+
"web/personalitylib.com/assets/css/template.css.map": true,
13+
"web/personalitylib.com/assets/css/style.css.map": true,
14+
"web/personalitylib.com/assets/css/style.css": true,
15+
"web/personalitylib.com/assets/css/login.css": true,
16+
"web/personalitylib.com/assets/css/login.css.map": true,
17+
"web/personalitylib.com/assets/css/legalnotice.css": true,
18+
"web/personalitylib.com/assets/css/legalnotice.css.map": true,
19+
"web/personalitylib.com/assets/css/licence.css": true,
20+
"web/personalitylib.com/assets/css/licence.css.map": true,
21+
"web/personalitylib.com/assets/css/account.css": true,
22+
"web/personalitylib.com/assets/css/account.css.map": true,
23+
"web/personalitylib.com/assets/css/about.css": true,
24+
"web/personalitylib.com/assets/css/about.css.map": true,
25+
"web\\personalitylib.com\\node_modules": true,
26+
"web\\personalitylib.com\\vite.config.ts": true,
27+
"web\\personalitylib.com\\public\\css\\template.css": true,
28+
"web\\personalitylib.com\\public\\css\\template.css.map": true,
29+
"web\\personalitylib.com\\public\\css\\style.css": true,
30+
"web\\personalitylib.com\\public\\css\\style.css.map": true,
31+
"web\\personalitylib.com\\public\\css\\licence.css": true,
32+
"web\\personalitylib.com\\public\\css\\licence.css.map": true,
33+
"web\\personalitylib.com\\public\\css\\legalnotice.css": true,
34+
"web\\personalitylib.com\\public\\css\\legalnotice.css.map": true,
35+
"web\\personalitylib.com\\public\\css\\about.css": true,
36+
"web\\personalitylib.com\\public\\css\\about.css.map": true,
37+
"web\\personalitylib.com\\public\\css\\personality.css.map": true,
38+
"web\\personalitylib.com\\public\\css\\personality.css": true
2739
},
2840
"liveServer.settings.port": 5502,
2941
"docwriter.style": "Auto-detect",

web/personalitylib.com/index.php

Lines changed: 74 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
// The code checks if a tag is provided via GET or POST methods. It validates the tag length and content, then redirects
2+
to a URL with the tag if it meets the criteria. The tag prefix and style are adjusted based on validation results.
3+
<?php
4+
$prefix = "#";
5+
$style = "";
6+
if (isset($_GET['tag'])) {
7+
$tag = $_GET["tag"];
8+
}else{
9+
if (!isset($_POST["tag"]) || empty($_POST["tag"])) {
10+
$prefix = "#"; // Empty tag
11+
$style = "";
12+
} else if (!ctype_digit($_POST["tag"])) {
13+
$prefix = "has to be just numbers"; // Not only digits
14+
$style = "color:red;";
15+
} else {
16+
$length = strlen($_POST["tag"]);
17+
if ($length < 6) {
18+
$prefix = "too short"; // Less than 6 digits
19+
$style = "color:red;";
20+
} else if ($length > 6) {
21+
$prefix = "too long"; // More than 6 digits
22+
$style = "color:red;";
23+
} else{
24+
$style = "";
25+
$url = "personality?tag=" . urlencode($_POST["tag"]);
26+
header("Location: $url");
27+
exit;
28+
}
29+
}
30+
}
31+
?>
132
<!DOCTYPE html>
233
<html lang="en">
334

@@ -54,52 +85,55 @@
5485
<main>
5586
<div class="input-div">
5687
<nav class="navbar bg-body-tertiary">
57-
<form class="container-fluid">
88+
<form class="container-fluid" action="index.php" method="POST">
5889
<div class="input-group">
59-
<span class="input-group-text" id="basic-addon1">#</span>
60-
<input type="text" class="form-control" placeholder="PersoTag" aria-label="PeroTag"
61-
aria-describedby="basic-addon1" />
90+
91+
<?php
92+
echo '<label for="tag" class="input-group-text" id="basic-addon1" style="'.$style.'">'.$prefix.'</label>';
93+
?>
94+
<input type="text" id="tag" class="form-control" placeholder="PersoTag" aria-label="PersoTag"
95+
name="tag" aria-describedby="basic-addon1" />
96+
6297
</div>
63-
</form>
64-
</nav>
65-
</div>
66-
<div class="submit-div">
67-
<div class="button-submit-div">
68-
<div class="btn-group" role="group" aria-label="Basic outlined example">
69-
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal"
70-
data-bs-target="#betaModal">
71-
Search
72-
</button>
73-
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal"
74-
data-bs-target="#betaModal">
75-
Help
76-
</button>
77-
</div>
78-
<!-- Modal -->
79-
<div class="modal fade" id="betaModal" tabindex="-1" aria-labelledby="betaModalLabel"
80-
aria-hidden="true">
81-
<div class="modal-dialog">
82-
<div class="modal-content">
83-
<div class="modal-header">
84-
<h1 class="modal-title fs-5" id="betaModalLabel">
85-
Open Beta
86-
</h1>
87-
<button type="button" class="btn-close" data-bs-dismiss="modal"
88-
aria-label="Close"></button>
89-
</div>
90-
<div class="modal-body">
91-
This website is still under construction and is in an open
92-
beta
93-
</div>
94-
<div class="modal-footer">
95-
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">
96-
Close
98+
<div class="submit-div">
99+
<div class="button-submit-div">
100+
<div class="btn-group" role="group" aria-label="Basic outlined example">
101+
<input type="submit" value="Send" class="input-button btn btn-outline-primary"></input>
102+
<button type="button" class="input-button btn btn-outline-primary"
103+
data-bs-toggle="modal" data-bs-target="#betaModal">
104+
Help
105+
<!--TODO: Make Help Modal-->
97106
</button>
107+
108+
</div>
109+
<!-- Modal -->
110+
<div class="modal fade" id="betaModal" tabindex="-1" aria-labelledby="betaModalLabel"
111+
aria-hidden="true">
112+
<div class="modal-dialog">
113+
<div class="modal-content">
114+
<div class="modal-header">
115+
<h1 class="modal-title fs-5" id="betaModalLabel">
116+
Open Beta
117+
</h1>
118+
<button type="button" class="btn-close" data-bs-dismiss="modal"
119+
aria-label="Close"></button>
120+
</div>
121+
<div class="modal-body">
122+
This website is still under construction and is in an open
123+
beta
124+
</div>
125+
<div class="modal-footer">
126+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">
127+
Close
128+
</button>
129+
</div>
130+
</div>
131+
</div>
98132
</div>
99133
</div>
100134
</div>
101-
</div>
102-
</div>
135+
</form>
136+
</nav>
103137
</div>
104138
</main>
105139
<footer>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta name="description"
8+
content="PersoLib is an open-source project that allows individuals to share their personality data with others." />
9+
<meta name="keywords"
10+
content="personality, libary, exchange, explore, perso, dating, friends, personalitylib, personalitylib.com, justwait" />
11+
<meta name="robots" content="index, follow" />
12+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13+
<meta name="language" content="English" />
14+
<meta name="revisit-after" content="2 days" />
15+
<meta name="author" content="JustWait" />
16+
<!-- BOOTTSTRAP -->
17+
<script src="../public/bootstrap/bootstrap.bundle.js"></script>
18+
<!-- FAVICON -->
19+
<link rel="shortcut icon" href="../public/favicon.ico" type="image/x-icon">
20+
<title>USERNAME</title>
21+
<meta name="title" content="USERNAME" />
22+
<link rel="stylesheet" href="../public/css/personality.css" />
23+
<!--Google Ads-->
24+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4168649657374641"
25+
crossorigin="anonymous"></script>
26+
</head>
27+
28+
<body>
29+
<header class="z-1 hstack gap-2">
30+
<h1 class="titel p-2"><a href="https://personalitylib.com/">PersonalityLib</a></h1>
31+
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
32+
<ol class="breadcrumb p-2">
33+
<li class="breadcrumb-item"><a href="../../index.html">Home</a></li>
34+
<li class="breadcrumb-item active" aria-current="page">USERNAME</li>
35+
</ol>
36+
</nav>
37+
38+
<div class="link-tree p-2 ms-auto">
39+
<button type="button" class="btn btn-outline-primary home"
40+
onclick="window.location.href='https://personalitylib.com/'">
41+
Home
42+
</button>
43+
<div class="btn-group" role="group" aria-label="Basic outlined example">
44+
<button type="button" class="btn btn-outline-primary" data-bs-toggle="modal"
45+
data-bs-target="#betaModal">
46+
LogIn
47+
</button>
48+
<button type="button" class="btn btn-outline-primary create" data-bs-toggle="modal"
49+
data-bs-target="#betaModal">
50+
Create
51+
</button>
52+
<button type="button" class="btn btn-outline-primary" onclick="window.location.href='../about/'">
53+
About
54+
</button>
55+
<!-- Modal -->
56+
<div class="modal fade" id="betaModal" tabindex="-1" aria-labelledby="betaModalLabel"
57+
aria-hidden="true">
58+
<div class="modal-dialog">
59+
<div class="modal-content">
60+
<div class="modal-header">
61+
<h1 class="modal-title fs-5" id="betaModalLabel">Open Beta</h1>
62+
<button type="button" class="btn-close" data-bs-dismiss="modal"
63+
aria-label="Close"></button>
64+
</div>
65+
<div class="modal-body">
66+
This website is still under construction and is in an open beta
67+
</div>
68+
<div class="modal-footer">
69+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button>
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
</div>
75+
</div>
76+
</header>
77+
<main class="z-0">
78+
79+
</main>
80+
<footer class="z-1">
81+
<span class="">
82+
<p>Links:</p>
83+
<span class="hstack gap-4 media-uvis">
84+
<p class="p-2"><a href="../about/">About</a></p>
85+
<p class="p-2"><a href="../legalnotice/">Legal Notice</a></p>
86+
<p class="p-2"><a href="../licence/">Licence</a></p>
87+
<p class="p-2"><a href="https://github.com/persolib/personalitylib.com">Github</a></p>
88+
</span>
89+
<span class="media-vis">
90+
<span class="hstack gap-2">
91+
<p class=""><a href="../about/">About</a></p>
92+
<p class=""><a href="../legalnotice/">Legal Notice</a></p>
93+
</span>
94+
<span class="hstack gap-2">
95+
<p class=""><a href="../licence/">Licence</a></p>
96+
<p class=""><a href="https://github.com/persolib/personalitylib.com">Github</a></p>
97+
</span>
98+
</span>
99+
</span>
100+
<h1>by JustWait</h1>
101+
<span class="footer-span">
102+
<p>© 2024 PersonalityLib</p>
103+
</span>
104+
</footer>
105+
</body>
106+
107+
</html>

web/personalitylib.com/public/css/_mixin.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@
2424
margin-left: $b;
2525
}
2626

27+
@mixin input-button-groupe {
28+
background-color: none;
29+
border-color: $border-background;
30+
color: $text-background;
31+
width: 90px;
32+
transition: 0.4s;
33+
34+
&:hover {
35+
width: 110px;
36+
border-color: $border;
37+
color: $text;
38+
background-color: $black;
39+
border-style: dashed;
40+
}
41+
}
42+
2743
@mixin button-groupe {
2844
background-color: none;
2945
border-color: $border;
@@ -35,7 +51,7 @@
3551
width: 110px;
3652
border-color: $black;
3753
color: $text-background;
38-
background-color: white;
54+
background-color: $white;
3955
border-style: dashed;
4056
}
4157
}

web/personalitylib.com/public/css/_var.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ $details: #4f5f76;
66
$border: whitesmoke;
77
$text: white;
88
$background: whitesmoke;
9+
910
$text-background: black;
11+
$border-background: black;
1012

1113
// scss-docs-start color-variables
1214
$blue: #0d6efd !default;

web/personalitylib.com/public/css/about.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12033,7 +12033,7 @@ header .link-tree button:hover {
1203312033
width: 110px;
1203412034
border-color: #000;
1203512035
color: black;
12036-
background-color: white;
12036+
background-color: #fff;
1203712037
border-style: dashed;
1203812038
}
1203912039
header .link-tree .active {

web/personalitylib.com/public/css/about.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/personalitylib.com/public/css/legalnotice.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12033,7 +12033,7 @@ header .link-tree button:hover {
1203312033
width: 110px;
1203412034
border-color: #000;
1203512035
color: black;
12036-
background-color: white;
12036+
background-color: #fff;
1203712037
border-style: dashed;
1203812038
}
1203912039
header .link-tree .active {

web/personalitylib.com/public/css/legalnotice.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/personalitylib.com/public/css/licence.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12033,7 +12033,7 @@ header .link-tree button:hover {
1203312033
width: 110px;
1203412034
border-color: #000;
1203512035
color: black;
12036-
background-color: white;
12036+
background-color: #fff;
1203712037
border-style: dashed;
1203812038
}
1203912039
header .link-tree .active {

web/personalitylib.com/public/css/licence.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)