CHANGE: new file structure, staged all the files now, hopefully

This commit is contained in:
TheShinyMelon 2023-11-19 19:28:43 +01:00
parent 5e57ef36f1
commit 864fc1babb
20 changed files with 195 additions and 0 deletions

36
add_script/dbstuff.sql Normal file
View File

@ -0,0 +1,36 @@
USE layer;
CREATE TABLE images(
`img_id` INT NOT NULL AUTO_INCREMENT,
`img_path` VARCHAR(100),
`img_title` VARCHAR(50),
`img_desc` TEXT,
PRIMARY KEY (`img_id`)
);
INSERT INTO images (img_path, img_title, img_desc)
VALUES ('./resources/img/bisasam.png', 'Bisasam', 'Dieses POKéMON trägt von Geburt an einen Samen auf dem Rücken, der mit ihm keimt und wächst.');
INSERT INTO images (img_path, img_title, img_desc)
VALUES ('./resources/img/bisaknosp.png', 'Bisaknosp', 'Sobald die Knospe auf seinem Rücken aufgeht, kann BISAKNOSP nicht mehr auf zwei Beinen stehen.');
INSERT INTO images (img_path, img_title, img_desc)
VALUES ('./resources/img/bisaflor.png', 'Bisaflor', 'Dieses POKéMON folgt der Sonne. Die Pflanze auf seinem Rücken absorbiert Solarenergie.');
CREATE TABLE audio(
`aud_id` INT NOT NULL AUTO_INCREMENT,
`aud_path` VARCHAR(100),
`aud_title` VARCHAR(50),
`aud_desc` TEXT,
PRIMARY KEY (`aud_id`)
);
INSERT INTO audio (aud_path,aud_title, aud_desc)
VALUES ('/home/dani/music/bbtb.mp3', 'Bitten by the Bullet: It is really good!', 'This song is very good. It pulls inspiration from J-Rock and Punk covering many topics that I was dealing with at the time of writing.');
INSERT INTO audio (aud_path, aud_title, aud_desc)
VALUES ('/home/dani/music/chronostasis.mp3', 'the enigmatic benefits of chronostasis', "The blink of an eye. The stroke of a colibri's wing. The entire span of primordial nucleosynthesis. Moments can only last so long, But you have the power of making it last forever.");

3
add_script/start_nginx.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
/usr/sbin/nginx -c nginx.conf -p $(pwd)&

7
app/config.php Normal file
View File

@ -0,0 +1,7 @@
<?php
// DB
$host = 'localhost';
$dbname = 'layer';
$user = 'dani';
$passwd = 'mindcrime';
$dsn = 'mysql:host='.$host.';dbname='.$dbname.';charset=UTF8';

26
app/db_connector.php Normal file
View File

@ -0,0 +1,26 @@
<?php
$pdo;
try {
$pdo = new PDO($dsn, $user, $passwd);
// if ($pdo) echo "Connected to the $dbname database successfully!";
} catch (PDOException $e) {
echo $e->getMessage();
}
function get_images($pdo) {
$stmt = $pdo->prepare("SELECT * FROM images;");
$stmt->execute();
$data = $stmt->fetchAll();
$img_list = '<ul class="img_list">';
foreach ($data as $block) {
$img_list .= '<li>';
$img_list .= '<img src=\''.$block['img_path'].'\'><br>';
$img_list .= '<h4>'.$block['img_title']."<br></h4>";
$img_list .= '<p>'.$block['img_desc']."</p>";
$img_list .= '</li>';
}
$img_list .= '</ul>';
echo $img_list;
}

1
public/404.php Normal file
View File

@ -0,0 +1 @@
<h1>Sie haben hier nichts zu suchen.</h1>

7
public/image.php Normal file
View File

@ -0,0 +1,7 @@
<h1 class='cat_heading'>> chosen file type: image<br>&nbsp;&nbsp;listing files:</h1>
<?php
include_once('../app/db_connector.php');
get_images($pdo);
?>

BIN
public/resources/fav.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

View File

@ -0,0 +1,115 @@
@font-face {
font-family: 'sans';
src: url('../resources/fonts/LiberationSans.woff') format('woff'),
url('../resources/fonts/LiberationSans.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'mono';
src: url('../resources/fonts/LiberationMono.woff') format('woff'),
url('../resources/fonts/LiberationMono.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'hyper';
src: url('../resources/fonts/RealityHyperRegular.woff') format('woff'),
url('../resources/fonts/RealityHyperRegular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
*, body {
box-sizing: border-box;
font-family: 'sans';
color: white;
background-color: black;
}
.logo_font {
color: #BFBFBF;
font-family: 'hyper';
font-size: 6rem;
text-shadow: 0 1px 0 #17202A, 0 2px 0 #17202A,
0 7px 0 #17202A, 0 8px 0 #17202A,
0 11px 0 #17202A, 0 12px 0 #17202A;
z-index: 999;
padding-left: 4rem;
}
.logo_gif {
height: 8.5rem;
margin: -4rem;
z-index: 998;
}
.logo_group {
display: flex;
justify-content: center;
align-items: center;
pointer-events: none;
margin-bottom: -4rem;
}
.logo_link {
text-decoration: none;
}
.menu_bar {
display: flex;
justify-content: center;
align-items: center;
font-family: 'mono';
font-size: 2rem;
text-shadow: 0 1px 0 #17202A, 0 2px 0 #17202A,
0 7px 0 #17202A, 0 8px 0 #17202A,
0 11px 0 #17202A, 0 12px 0 #17202A;
}
.menu_bar li {
list-style-type: none;
margin: 1rem;
}
.menu_bar li a {
text-decoration: none;
color: #BFBFBF;
}
.menu_bar li a:hover {
text-decoration: underline;
text-decoration-thickness: 5px;
text-decoration-color: #f3a041;
color: white;
}
.menu_bar li a:active {
text-decoration: underline;
text-decoration-thickness: 6px;
text-decoration-color: #41a3f3;
color: #BFBFBF;
}
.img_list {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
padding: 2rem;
}
.img_list li {
list-style-type: none;
margin: 1rem;
}
.cat_heading {
font-family: 'mono';
font-size: 2rem;
padding-left: 2rem;
color: #BFBFBF;
}