diff --git a/website/public/API/loadPost.php b/website/public/API/loadPost.php
new file mode 100644
index 0000000..a9e9851
--- /dev/null
+++ b/website/public/API/loadPost.php
@@ -0,0 +1,61 @@
+fetch(PDO::FETCH_ASSOC);
+ $fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . ")";
+
+echo "
+
+
+
+
" . $post['content'] . "
+
+
+";
+
+} else {
+ echo "Failed to load";
+}
\ No newline at end of file
diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js
index 2bddf59..bbc97c0 100644
--- a/website/public/js/masonry.js
+++ b/website/public/js/masonry.js
@@ -1,5 +1,21 @@
margin = 20;
+function loadPost(postForm) {
+ $.get(
+ "API/loadPost.php",
+ $(postForm).serialize()
+ ).done(function (data) {
+ console.log(data);
+ $('#modal-response').html(data);
+ });
+}
+
+function requestPost(post) {
+ $(".modal").show();
+ console.log($(post).children("form"));
+ loadPost($(post).children("form"));
+}
+
$(window).on("load", function() {
console.log("LOADED");
container = $("div.posts");
@@ -74,9 +90,11 @@ function mansonry() {
$("div.posts div.column").width(100/columnCount + "%");
- $(".post").click(function () {
- $(".modal").show();
- });
+ // $(".post").click(function () {
+ // $(".modal").show();
+ // console.log("testerino");
+ // loadPost($(this).children("form.first"));
+ // });
$(".modal-close").click(function () {
$(".modal").hide();
diff --git a/website/public/js/profile.js b/website/public/js/profile.js
index e69de29..2a47dce 100644
--- a/website/public/js/profile.js
+++ b/website/public/js/profile.js
@@ -0,0 +1,8 @@
+function loadPost(postID) {
+ $.get(
+ "API/loadPost.php",
+ $(postID).serialize()
+ ).done(function (data) {
+ $('#modal-response').innerHTML= JSON.parse(data);
+ });
+}
\ No newline at end of file
diff --git a/website/public/profile.php b/website/public/profile.php
index f7cae2b..cb58436 100644
--- a/website/public/profile.php
+++ b/website/public/profile.php
@@ -3,6 +3,7 @@
+