add post viewing basis, add insert post and comment queries

This commit is contained in:
Hendrik
2017-01-24 16:56:04 +01:00
parent f6051ee14f
commit b9fc016f7d
7 changed files with 208 additions and 1 deletions

View File

@@ -73,4 +73,12 @@ function mansonry() {
}
$("div.posts div.column").width(100/columnCount + "%");
$(".post").click(function () {
$(".modal").show();
});
$(".modal-close").click(function () {
$(".modal").hide();
});
}

View File

View File

@@ -2,9 +2,10 @@
<html>
<head>
<?php include("../views/head.php"); ?>
<script src="/js/masonry.js"></script>
<script src="js/masonry.js"></script>
<style>
@import url("styles/profile.css");
@import url("styles/post-popup.css");
</style>
</head>
<body>
@@ -12,6 +13,7 @@
include("../queries/user.php");
include("../queries/friendship.php");
include("../queries/nicetime.php");
include("../queries/post.php");
if(empty($_GET["username"])) {
$userID = $_SESSION["userID"];

View File

@@ -0,0 +1,38 @@
/* modal based on: http://www.w3schools.com/howto/howto_css_modals.asp */
.modal {
/*display: none; !* Hidden by default *!*/
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: calc(100% - 256px); /* Full width */
height: calc(100% - 80px); /* Full height */
overflow: visible; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
}
.modal-close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
margin: auto;
}
.modal-close:hover,
.modal-close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}