mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-02-05 21:18:03 +00:00
Yet again more fixing! But no actual progress
This commit is contained in:
parent
a9780f59e7
commit
d767bf0582
|
@ -116,6 +116,13 @@ if (isset($_POST['title_submit'])) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
| New Group
|
||||
|-------------------------------------------------------------
|
||||
|
|
||||
|-------------------------------------------------------------
|
||||
*/
|
||||
if (isset($_POST['new_group_submit'])) {
|
||||
if ($user_info->is_loggedin()) {
|
||||
$group_name = $_SESSION['username']."\'s Group";
|
||||
|
@ -140,6 +147,13 @@ if (isset($_POST['new_group_submit'])) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|-------------------------------------------------------------
|
||||
| Delete Group
|
||||
|-------------------------------------------------------------
|
||||
|
|
||||
|-------------------------------------------------------------
|
||||
*/
|
||||
if (isset($_POST['group_delete'])) {
|
||||
$query = $group_info->get_group_info($conn, $_POST['group_id']);
|
||||
|
||||
|
@ -153,16 +167,15 @@ if (isset($_POST['group_delete'])) {
|
|||
if ($stmt->execute()) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Goodbye!', 'Successfully deleted image group! You shall be yeeted in a moment', 'var(--green)', 'assets/icons/check.svg');
|
||||
flyoutClose();
|
||||
|
||||
setTimeout(function(){window.location.href = "group.php";}, 2000);
|
||||
setTimeout(function(){window.location.href = "group.php";}, 500);
|
||||
</script>
|
||||
<?php
|
||||
$_SESSION['msg'] = "Group successfully yeeted out";
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Ouchie', 'Something went wrong while deleting the image group', 'var(--red)', 'assets/icons/cross.svg');
|
||||
sniffleAdd('Ouchie', 'Something went wrong while deleting the group', 'var(--red)', 'assets/icons/cross.svg');
|
||||
flyoutClose();
|
||||
</script>
|
||||
<?php
|
||||
|
|
40
css/main.css
40
css/main.css
|
@ -243,7 +243,7 @@ nav .btn {
|
|||
max-width: calc(20% - 0.5rem);
|
||||
min-width: calc(20% - 0.5rem);
|
||||
background-color: #151515;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
flex: 1 0 150px;
|
||||
|
@ -475,7 +475,7 @@ nav .btn {
|
|||
padding: 0.5rem;
|
||||
display: block;
|
||||
background-color: #8C977D;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
font-family: "Secular One", sans-serif;
|
||||
}
|
||||
.tag::before {
|
||||
|
@ -497,13 +497,29 @@ nav .btn {
|
|||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.group-description h2 span {
|
||||
margin-left: 0.25rem;
|
||||
font-size: 16px;
|
||||
}
|
||||
.group-description h2 a {
|
||||
margin-left: 0.25rem;
|
||||
font-size: 16px;
|
||||
color: #8C977D;
|
||||
text-decoration: none;
|
||||
}
|
||||
.group-description > * {
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
.group-description a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.group-description a:hover {
|
||||
color: #8C977D;
|
||||
}
|
||||
|
||||
.group-cover {
|
||||
height: 100%;
|
||||
max-width: 40%;
|
||||
max-width: 50%;
|
||||
width: auto;
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
|
@ -516,7 +532,7 @@ nav .btn {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background: linear-gradient(to right, #151515, rgba(21, 21, 21, 0.7333333333));
|
||||
background: linear-gradient(to right, #151515, rgba(21, 21, 21, 0.8), rgba(21, 21, 21, 0.2));
|
||||
z-index: 1;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
|
@ -707,7 +723,7 @@ nav .btn {
|
|||
margin: 0 auto;
|
||||
max-width: 100%;
|
||||
max-height: 15rem;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
@ -727,7 +743,7 @@ nav .btn {
|
|||
height: 7.813rem;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
background-color: #121212;
|
||||
}
|
||||
.pfp-upload form > * {
|
||||
|
@ -772,7 +788,7 @@ nav .btn {
|
|||
display: none;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
}
|
||||
|
||||
.log {
|
||||
|
@ -819,7 +835,7 @@ nav .btn {
|
|||
display: none;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
}
|
||||
|
||||
.ban {
|
||||
|
@ -873,7 +889,7 @@ nav .btn {
|
|||
display: none;
|
||||
flex-direction: column;
|
||||
background-color: #151515;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
}
|
||||
|
||||
.user {
|
||||
|
@ -1002,7 +1018,7 @@ body * {
|
|||
font-family: "Secular One", sans-serif;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
transition: outline 0.1s cubic-bezier(0.19, 1, 0.22, 1);
|
||||
}
|
||||
.btn:hover {
|
||||
|
@ -1018,7 +1034,7 @@ body * {
|
|||
text-decoration: none;
|
||||
background-color: #E8E3E3;
|
||||
border: none;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
}
|
||||
.btn:where(input[type=file])::file-selector-button {
|
||||
margin: -0.25rem 0.5rem -0.25rem -0.25rem;
|
||||
|
@ -1028,7 +1044,7 @@ body * {
|
|||
text-decoration: none;
|
||||
background-color: #E8E3E3;
|
||||
border: none;
|
||||
border-radius: -0.3rem;
|
||||
border-radius: -0.1rem;
|
||||
}
|
||||
|
||||
a.btn {
|
||||
|
|
|
@ -78,7 +78,7 @@ body {
|
|||
text-decoration: none;
|
||||
|
||||
border: none;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
|
||||
transition: outline 0.1s cubic-bezier(.19, 1, .22, 1);
|
||||
|
||||
|
@ -102,7 +102,7 @@ body {
|
|||
background-color: $white;
|
||||
|
||||
border: none;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
min-width: calc(20% - 0.5rem);
|
||||
|
||||
background-color: $bg;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
|
||||
position: relative;
|
||||
|
||||
|
@ -370,7 +370,7 @@
|
|||
|
||||
background-color: $page-accent;
|
||||
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
|
||||
font-family: $font-body;
|
||||
|
||||
|
@ -396,14 +396,39 @@
|
|||
|
||||
z-index: +1;
|
||||
|
||||
h2 {
|
||||
span {
|
||||
margin-left: 0.25rem;
|
||||
|
||||
font-size: 16px;
|
||||
}
|
||||
a {
|
||||
margin-left: 0.25rem;
|
||||
|
||||
font-size: 16px;
|
||||
|
||||
color: $page-accent;
|
||||
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
& > * {
|
||||
margin: 0 0 0.5rem 0;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
|
||||
&:hover {
|
||||
color: $page-accent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.group-cover {
|
||||
height: 100%;
|
||||
max-width: 40%;
|
||||
max-width: 50%;
|
||||
width: auto;
|
||||
|
||||
position: absolute;
|
||||
|
@ -423,7 +448,7 @@
|
|||
|
||||
position: absolute;
|
||||
|
||||
background: linear-gradient(to right, $bg, $bg-alt);
|
||||
background: linear-gradient(to right, $bg, rgba($bg, 0.8), rgba($bg, 0.2));
|
||||
|
||||
z-index: +1;
|
||||
|
||||
|
@ -655,7 +680,7 @@
|
|||
max-width: 100%;
|
||||
max-height: 15rem;
|
||||
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -678,7 +703,7 @@
|
|||
|
||||
object-fit: cover;
|
||||
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
|
||||
background-color: $black;
|
||||
}
|
||||
|
@ -730,7 +755,7 @@
|
|||
display: none; flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
}
|
||||
.log {
|
||||
min-width: 850px;
|
||||
|
@ -782,7 +807,7 @@
|
|||
display: none; flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
}
|
||||
.ban {
|
||||
min-width: 900px;
|
||||
|
@ -840,7 +865,7 @@
|
|||
display: none; flex-direction: column;
|
||||
|
||||
background-color: $bg;
|
||||
border-radius: calc($rad - 0.7rem);
|
||||
border-radius: calc($rad - 0.5rem);
|
||||
}
|
||||
.user {
|
||||
min-width: 950px;
|
||||
|
|
30
group.php
30
group.php
|
@ -27,37 +27,37 @@
|
|||
<?php require_once __DIR__."/assets/ui/header.php"; ?>
|
||||
</head>
|
||||
<body>
|
||||
<?php require_once __DIR__."/assets/ui/nav.php"; ?>
|
||||
<?php
|
||||
require_once __DIR__."/assets/ui/nav.php";
|
||||
|
||||
if (isset($_SESSION['msg'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd("Info", "<?php echo $_SESSION['msg']; ?>", "var(--green)", "assets/icons/check.svg");
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['msg']);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (isset($_GET['id'])) {
|
||||
if (isset($_SESSION['msg'])) {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd("Info", "<?php echo $_SESSION['msg']; ?>", "var(--green)", "assets/icons/check.svg");
|
||||
</script>
|
||||
<?php
|
||||
unset($_SESSION['msg']);
|
||||
}
|
||||
|
||||
$image_list = array_reverse(explode(" ", $group['image_list']));
|
||||
|
||||
echo "<div class='group-banner defaultDecoration defaultSpacing defaultFonts'>
|
||||
<div class='group-description'>";
|
||||
|
||||
echo "<h2>".$group['group_name']."</h2>";
|
||||
|
||||
$author_info = $user_info->get_user_info($conn, $group['author']);
|
||||
echo "<p>By: ".$author_info['username']."</p>";
|
||||
echo "<h2>".$group['group_name']."<span>by</span><a href='profile.php?user=".$author_info['id']."'>".$author_info['username']."</a></h2>";
|
||||
|
||||
$group_members = $group_info->get_group_members($conn, $_GET['id']);
|
||||
if (!empty($group_members)) {
|
||||
$members_array = array();
|
||||
foreach ($group_members as $member) {
|
||||
$member_info = $user_info->get_user_info($conn, $member);
|
||||
if (!empty($member_info['username'])) $members_array[] = "<a class='link' href='profile.php?user=".$member_info['id']."'>".$member_info['username']."</a>";
|
||||
if (!empty($member_info['username'])) $members_array[] = "<a href='profile.php?user=".$member_info['id']."'>".$member_info['username']."</a>";
|
||||
}
|
||||
echo "<p>Members: ".implode(", ", $members_array)."</p>";
|
||||
echo "<p>Featured: ".implode(", ", $members_array)."</p>";
|
||||
}
|
||||
|
||||
if (!empty($group['image_list'])) echo "<p>Images: ".count(explode(" ", $group['image_list']))."</p>";
|
||||
|
|
Loading…
Reference in a new issue