Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
HirotakaDango committed Jul 8, 2024
1 parent 68240df commit b101cd3
Show file tree
Hide file tree
Showing 36 changed files with 405 additions and 337 deletions.
22 changes: 2 additions & 20 deletions backheader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<nav class="navbar fixed-top navbar-expand-md navbar-light bg-body-tertiary">
<div class="container-fluid">
<button class="navbar-toggler1 d-md-none" type="button" onclick="goBack()">
<button class="navbar-toggler1 d-md-none link-body-emphasis" type="button" onclick="goBack()">
<img src="icon/back.svg" width="22" height="22">
</button>
<a class="navbar-brand text-secondary fw-bold" href="index.php">
Expand Down Expand Up @@ -135,20 +135,6 @@
</div>
</div>
<style>
.hover-effect:hover {
color: white;
background-color: #28242c;
border-radius: 5px;
}

.text-s {
color: #28242c;
}

.bg-darker {
background-color: #28242c;
}

@media (min-width: 768px) {
.navbar-nav {
position: absolute;
Expand Down Expand Up @@ -219,16 +205,12 @@
}

.navbar-toggler1 {
background-color: #ededed;
background-color: <?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?>;
border: none;
font-size: 8px;
margin-top: -2px;
border-radius: 5px;
padding: 6px;
transition: background-color 0.3s ease;
}

.navbar-toggler1:hover {
background-color: rgba(0,0,0,0.2);
}
</style>
2 changes: 1 addition & 1 deletion comment_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="d-flex align-items-center mb-2 position-relative">
<div class="position-absolute top-0 start-0 m-1">
<img class="rounded-circle object-fit-cover" src="<?php echo !empty($comment['pic']) ? $comment['pic'] : "icon/profile.svg"; ?>" alt="Profile Picture" width="32" height="32">
<a class="text-dark text-decoration-none fw-medium link-body-emphasis" href="artist.php?id=<?php echo $comment['iduser'];?>" target="_blank"><small>@<?php echo (mb_strlen($comment['artist']) > 15) ? mb_substr($comment['artist'], 0, 15) . '...' : $comment['artist']; ?></small></a>・<small class="small fw-medium"><small><?php echo $comment['created_at']; ?></small></small>
<a class="text-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> text-decoration-none fw-medium link-body-emphasis" href="artist.php?id=<?php echo $comment['iduser'];?>" target="_blank"><small>@<?php echo (mb_strlen($comment['artist']) > 15) ? mb_substr($comment['artist'], 0, 15) . '...' : $comment['artist']; ?></small></a>・<small class="small fw-medium"><small><?php echo $comment['created_at']; ?></small></small>
</div>
<?php if ($comment['email'] == $_SESSION['email']) : ?>
<div class="dropdown ms-auto position-relative">
Expand Down
2 changes: 1 addition & 1 deletion comment_preview_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="d-flex align-items-center mb-2 position-relative">
<div class="position-absolute top-0 start-0 m-1">
<img class="rounded-circle object-fit-cover" src="<?php echo !empty($comment['pic']) ? $comment['pic'] : "icon/profile.svg"; ?>" alt="Profile Picture" width="32" height="32">
<a class="text-dark text-decoration-none fw-medium link-body-emphasis" href="artist.php?id=<?php echo $comment['iduser'];?>" target="_blank"><small>@<?php echo (mb_strlen($comment['artist']) > 15) ? mb_substr($comment['artist'], 0, 15) . '...' : $comment['artist']; ?></small></a>・<small class="small fw-medium"><small><?php echo $comment['created_at']; ?></small></small>
<a class="text-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> text-decoration-none fw-medium link-body-emphasis" href="artist.php?id=<?php echo $comment['iduser'];?>" target="_blank"><small>@<?php echo (mb_strlen($comment['artist']) > 15) ? mb_substr($comment['artist'], 0, 15) . '...' : $comment['artist']; ?></small></a>・<small class="small fw-medium"><small><?php echo $comment['created_at']; ?></small></small>
</div>
<?php if ($comment['email'] == $_SESSION['email']) : ?>
<div class="dropdown ms-auto position-relative">
Expand Down
51 changes: 22 additions & 29 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
?>

<!DOCTYPE html>
<html>
<html lang="en" data-bs-theme="<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>">
<head>
<title>Comment Section</title>
<meta charset="UTF-8">
Expand All @@ -112,17 +112,21 @@
<?php include('bootstrapcss.php'); ?>
</head>
<body>
<?php include('backheader.php'); ?>
<br><br>
<div class="dropdown container">
<button class="btn btn-sm fw-bold rounded-pill mb-2 btn-outline-dark dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-images"></i> sort by
<?php include('header.php'); ?>
<div class="container d-flex">
<div class="dropdown me-auto">
<button class="btn btn-sm fw-bold rounded-pill mb-2 btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-images"></i> sort by
</button>
<ul class="dropdown-menu">
<li><a href="?by=newest&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(!isset($_GET['by']) || $_GET['by'] == 'newest') echo 'active'; ?>">newest</a></li>
<li><a href="?by=oldest&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'oldest') echo 'active'; ?>">oldest</a></li>
<li><a href="?by=top&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'top') echo 'active'; ?>">top comments</a></li>
</ul>
</div>
<button class="btn btn-sm fw-bold rounded-pill mb-2 btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?>" onclick="goBack()">
<i class="bi bi-chevron-left" style="-webkit-text-stroke: 2px;"></i> back
</button>
<ul class="dropdown-menu">
<li><a href="?by=newest&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(!isset($_GET['by']) || $_GET['by'] == 'newest') echo 'active'; ?>">newest</a></li>
<li><a href="?by=oldest&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'oldest') echo 'active'; ?>">oldest</a></li>
<li><a href="?by=top&imageid=<?php echo $filename; ?>&page=<?php echo isset($_GET['page']) ? $_GET['page'] : '1'; ?>" class="dropdown-item fw-bold <?php if(isset($_GET['by']) && $_GET['by'] == 'top') echo 'active'; ?>">top comments</a></li>
</ul>
</div>
<?php
if(isset($_GET['by'])){
Expand All @@ -147,33 +151,22 @@
?>
<nav class="navbar fixed-bottom navbar-expand justify-content-center">
<div class="container">
<button type="button" class="w-100 btn btn-primary fw-bold rounded-3" data-bs-toggle="modal" data-bs-target="#comments">send your comment</button>
<button type="button" class="w-100 btn btn-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> fw-bold rounded-3" data-bs-toggle="modal" data-bs-target="#comments">post your comment</button>
</div>
</nav>
<div class="modal fade" id="comments" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header border-0">
<h1 class="modal-title fs-5" id="exampleModalLabel">Type something else...</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div>
<form class="form-control border-0" action="" method="POST">
<textarea type="text" class="form-control fw-semibold rounded-3 mb-2" style="height: 200px; max-height: 800px;" name="comment" placeholder="Type something..." aria-label="Type a message..." aria-describedby="basic-addon2"
onkeydown="if(event.keyCode == 13) { this.style.height = (parseInt(this.style.height) + 10) + 'px'; return true; }"
onkeyup="this.style.height = '40px'; var newHeight = (this.scrollHeight + 10 * (this.value.split(/\r?\n/).length - 1)) + 'px'; if (parseInt(newHeight) > 800) { this.style.height = '800px'; } else { this.style.height = newHeight; }" required></textarea>
<button class="w-100 btn btn-primary rounded-3" type="submit"><i class="bi bi-send-fill"></i></button>
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content rounded-4 border-0 bg-transparent">
<div class="modal-body px-1">
<form class="form-control border-0 bg-transparent shadow p-0" action="" method="POST">
<textarea type="text" class="form-control fw-medium bg-body-tertiary border-0 rounded-4 rounded-bottom-0 focus-ring focus-ring-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>" style="height: 400px; max-height: 800px;" name="comment" placeholder="Post your comment..." aria-label="Type a message..." aria-describedby="basic-addon2" required></textarea>
<button class="w-100 btn btn-primary rounded-4 rounded-top-0" type="submit"><i class="bi bi-send-fill"></i></button>
</form>
</div>
</div>
</div>
</div>
<br><br><br>
<div class="d-none-sm position-fixed top-50 start-0 translate-middle-y">
<button class="btn btn-primary rounded-pill rounded-start-0 fw-bold btn-md ps-1" onclick="goBack()">
<i class="bi bi-arrow-left-circle-fill"></i>
</button>
</div>
<style>
.text-stroke {
-webkit-text-stroke: 1px;
Expand Down
30 changes: 25 additions & 5 deletions comments_preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,37 @@
?>

<!DOCTYPE html>
<html>
<html lang="en" data-bs-theme="<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>">
<head>
<title>Comment Section</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="icon/favicon.png">
<?php include('bootstrapcss.php'); ?>
<style>
/* For Webkit-based browsers */
::-webkit-scrollbar {
width: 0;
height: 0;
border-radius: 10px;
}

::-webkit-scrollbar-track {
border-radius: 0;
}

::-webkit-scrollbar-thumb {
border-radius: 0;
}

.text-stroke {
-webkit-text-stroke: 3px;
}
</style>
</head>
<body>
<div class="dropdown">
<button class="btn btn-sm fw-bold rounded-pill ms-2 my-2 btn-outline-dark dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<button class="btn btn-sm fw-bold rounded-pill ms-2 my-2 btn-outline-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/opposite.php'); ?> dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-images"></i> sort by
</button>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -145,11 +165,11 @@
?>
<div class="fixed-bottom w-100">
<form action="" method="POST">
<div class="input-group w-100 rounded-bottom-2">
<textarea id="message-input" name="comment" class="form-control fw-semibold" style="height: 40px; max-height: 150px;" placeholder="Type your comment..." aria-label="Type a message..." aria-describedby="basic-addon2"
<div class="input-group w-100 rounded-0 shadow-lg rounded-4 rounded-bottom-0">
<textarea id="message-input" name="comment" class="form-control fw-medium bg-body-tertiary border-0 rounded-start-4 focus-ring focus-ring-<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>" style="height: 40px; max-height: 150px;" placeholder="Post your comment..." aria-label="Type a message..." aria-describedby="basic-addon2"
onkeydown="if(event.keyCode == 13) { this.style.height = (parseInt(this.style.height) + 10) + 'px'; return true; }"
onkeyup="this.style.height = '40px'; var newHeight = (this.scrollHeight + 10 * (this.value.split(/\r?\n/).length - 1)) + 'px'; if (parseInt(newHeight) > 150) { this.style.height = '150px'; } else { this.style.height = newHeight; }"></textarea>
<button type="submit" class="btn btn-primary fw-bold">send</button>
<button type="submit" class="btn bg-body-tertiary border-0 rounded-end-4"><i class="bi bi-send-fill"></i></button>
</div>
</form>
</div>
Expand Down
48 changes: 29 additions & 19 deletions edit_comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,47 @@
?>

<!DOCTYPE html>
<html>
<html lang="en" data-bs-theme="<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>">
<head>
<title>Edit Comment</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="icon/favicon.png">
<?php include('bootstrapcss.php'); ?>
<style>
/* For Webkit-based browsers */
::-webkit-scrollbar {
width: 0;
height: 0;
border-radius: 10px;
}

::-webkit-scrollbar-track {
border-radius: 0;
}

::-webkit-scrollbar-thumb {
border-radius: 0;
}

.text-stroke {
-webkit-text-stroke: 3px;
}
</style>
</head>
<body>
<?php include('backheader.php'); ?>
<br><br>
<div class="modal-dialog" role="document">
<div class="modal-content border-3 border-bottom">
<div class="modal-body p-4">
<h5 class="mb-0 fw-bold text-center">Edit Comment</h5>
</div>
</div>
</div>
<div class="container-fluid mt-2">
<?php include('header.php'); ?>
<div class="container mb-5">
<form method="post">
<div class="mb-3">
<textarea class="form-control" id="comment" name="comment" rows="10" oninput="stripHtmlTags(this)" required><?php echo strip_tags($comment['comment']); ?></textarea>
<div class="mb-2">
<textarea class="form-control border-0 bg-body-tertiary rounded-4 shadow" id="comment" name="comment" rows="13" oninput="stripHtmlTags(this)" required><?php echo strip_tags($comment['comment']); ?></textarea>
</div>
<div class="btn-group w-100 gap-2">
<button class="btn btn-secondary w-50 fw-bold rounded-4" onclick="goBack()">Cancel</button>
<button type="submit" class="btn btn-primary w-50 fw-bold rounded-4">Save</button>
</div>
<button type="submit" class="btn btn-primary w-100 fw-bold">Save</button>
</form>
</div>
<div class="d-none-sm position-fixed top-50 start-0 translate-middle-y">
<button class="btn btn-primary rounded-pill rounded-start-0 fw-bold btn-md ps-1" onclick="goBack()">
<i class="bi bi-arrow-left-circle-fill"></i>
</button>
</div>
<script>
function goBack() {
window.location.href = "comments.php?by=<?php echo urlencode($sortUrl); ?>&imageid=<?php echo urlencode($comment['filename']); ?>&page=<?php echo urlencode($pageUrl); ?>";
Expand Down
45 changes: 28 additions & 17 deletions edit_comment_preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,46 @@
?>

<!DOCTYPE html>
<html>
<html lang="en" data-bs-theme="<?php include($_SERVER['DOCUMENT_ROOT'] . '/appearance/mode.php'); ?>">
<head>
<title>Edit Comment</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="icon/favicon.png">
<?php include('bootstrapcss.php'); ?>
<style>
/* For Webkit-based browsers */
::-webkit-scrollbar {
width: 0;
height: 0;
border-radius: 10px;
}

::-webkit-scrollbar-track {
border-radius: 0;
}

::-webkit-scrollbar-thumb {
border-radius: 0;
}

.text-stroke {
-webkit-text-stroke: 3px;
}
</style>
</head>
<body>
<div class="modal-dialog" role="document">
<div class="modal-content border-3 border-bottom">
<div class="modal-body p-4">
<h5 class="mb-0 fw-bold text-center">Edit Comment</h5>
</div>
</div>
</div>
<div class="container-fluid mt-2">
<div class="container-fluid mt-2 pt-1 mb-3">
<form method="post">
<div class="mb-3">
<textarea class="form-control" id="comment" name="comment" rows="10" oninput="stripHtmlTags(this)" required><?php echo strip_tags($comment['comment']); ?></textarea>
<div class="mb-2">
<textarea class="form-control border-0 bg-body-tertiary rounded-4 shadow" id="comment" name="comment" rows="13" oninput="stripHtmlTags(this)" required><?php echo strip_tags($comment['comment']); ?></textarea>
</div>
<div class="btn-group w-100 gap-2">
<button class="btn btn-secondary w-50 fw-bold rounded-4" onclick="goBack()">Cancel</button>
<button type="submit" class="btn btn-primary w-50 fw-bold rounded-4">Save</button>
</div>
<button type="submit" class="btn btn-primary w-100 fw-bold">Save</button>
</form>
</div>
<div class="d-none-sm position-fixed top-50 start-0 translate-middle-y">
<button class="btn btn-primary rounded-pill rounded-start-0 fw-bold btn-md ps-1" onclick="goBack()">
<i class="bi bi-arrow-left-circle-fill"></i>
</button>
</div>
<script>
function goBack() {
window.location.href = "comments_preview.php?by=<?php echo urlencode($sortUrl); ?>&imageid=<?php echo urlencode($comment['filename']); ?>&page=<?php echo urlencode($pageUrl); ?>";
Expand Down
Loading

0 comments on commit b101cd3

Please sign in to comment.