It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn't find one. Please enter the address of your feed to validate.

Source: http://Jaycuba.com/read-blog/13_bermuda-infantil-sarja-bege-masculina-mercadolivre.html

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <script>
  5.        var isLoggedIn = false;
  6.    </script>
  7.    <meta charset="UTF-8">
  8.    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  9.    <title>jaycuba owner kin.top
  10. Professional Tantra Masseur / Energy healer having done over 1000 sessions with women.
  11. spiritually awakening through mooji.
  12. full-time vanlifer now 26 months (mostly portugal, spain, france)
  13.  
  14. english (very good)
  15. czech (spoken pretty good)
  16. german (very good)
  17. french (medium)
  18. spanish (very good)
  19. italian (understand a lot can speak a little)
  20. portuguese (getting better basically medium beginner understand a lot)</title>
  21. <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">-->
  22.  
  23. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  24.  
  25. <script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
  26.  
  27. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  28.  
  29.  
  30.  
  31. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
  32. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-48x48.png">
  33. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
  34. <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"  id="favicon">
  35. <link rel="manifest" href="/site.webmanifest?v=1">
  36. <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
  37. <meta name="msapplication-TileColor" content="#da532c">
  38. <meta name="theme-color" content="#ffffff">
  39. <link rel="apple-touch-icon" href="/android-chrome-192x192.png">
  40.  
  41.    <!-- Twitter Card data -->
  42.    <meta name="twitter:card" content="summary">
  43.    <meta name="twitter:site" content="@kinglobal">
  44.    <meta name="twitter:title" content="jaycuba owner kin.top
  45. Professional Tantra Masseur / Energy healer having done over 1000 sessions with women.
  46. spiritually awakening through mooji.
  47. full-time vanlifer now 26 months (mostly portugal, spain, france)
  48.  
  49. english (very good)
  50. czech (spoken pretty good)
  51. german (very good)
  52. french (medium)
  53. spanish (very good)
  54. italian (understand a lot can speak a little)
  55. portuguese (getting better basically medium beginner understand a lot)">
  56.    <meta name="twitter:description" content="Join Kin.top to earn rewards by inviting friends and participating in our communities.">
  57. <meta name="twitter:image" content="https://kin.top/hugecat.png"><meta property="og:image" content="https://kin.top/thecat.png" />    
  58.    <!-- Open Graph data -->
  59.    <meta property="og:title" content="jaycuba owner kin.top
  60. Professional Tantra Masseur / Energy healer having done over 1000 sessions with women.
  61. spiritually awakening through mooji.
  62. full-time vanlifer now 26 months (mostly portugal, spain, france)
  63.  
  64. english (very good)
  65. czech (spoken pretty good)
  66. german (very good)
  67. french (medium)
  68. spanish (very good)
  69. italian (understand a lot can speak a little)
  70. portuguese (getting better basically medium beginner understand a lot)" />
  71.    <meta property="og:type" content="website" />
  72.    <meta property="og:url" content="https://kin.top/user/jaycuba" />
  73.    
  74.    <meta property="og:description" content="Join Kin.top to earn rewards by inviting friends and participating in our communities." />
  75.   <meta property="og:site_name" content="Kin.top" />
  76.  
  77.   <style>
  78.  
  79.  
  80. body {
  81.   overflow-y: scroll; /* Ensures the vertical scrollbar is always active */
  82.    background-color: #DAE0E6;
  83.    padding-top: 60px; /* Adjust this value based on your navbar height */
  84.  
  85. }
  86.  
  87. html{
  88. padding:0px;
  89. margin:0px;
  90. }
  91.  
  92.  
  93. /* Ensure .reddit-post is centered on mobile screens */
  94. @media (max-width: 768px) {
  95.    .reddit-post {
  96.  
  97.  
  98.        margin: 0 auto;
  99.    }
  100.    
  101. .comment-text{
  102. display:none;
  103. }
  104. .navbar-collapse {
  105.    max-height: 600px; /* Adjust this value as needed */
  106.    overflow-y: auto;
  107. }
  108. }
  109.  
  110.  
  111.  
  112.  
  113. .superboostcounter {
  114.    color: #1C1C1C;
  115.  font-size:12px;
  116. }
  117. .slurp {
  118.    color: #1C1C1C;
  119.    font-weight: bold;
  120. }
  121.  
  122. .slurp a {
  123.    color: #1C1C1C;
  124.    text-decoration: none;
  125. }
  126.  
  127. .reddit-post {
  128.    display: flex;
  129.    align-items: flex-start; /* Changed from center to flex-start */
  130.    border: 1px solid #e1e4e8;
  131.    border-radius: 6px;
  132.    padding: 12px;
  133.    background-color: #ffffff;
  134.    margin-bottom: 6px;
  135.    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  136. }
  137.  
  138. .comment {
  139.  
  140.    border: 1px solid #e1e4e8;
  141.    border-radius: 6px;
  142.    padding: 12px;
  143.    background-color: #ffffff;
  144.    margin-bottom: 12px;
  145.    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  146. }
  147.  
  148.  
  149.  
  150.  
  151. .post-content {
  152.    flex-grow: 1;
  153. }
  154.  
  155. .post-title {
  156.    font-size: 18px;
  157.    font-weight: 500;
  158.    margin-bottom: 5px;
  159. }
  160.  
  161. .post-title a {
  162.    color: #0079d3;
  163.    text-decoration: none;
  164. }
  165.  
  166. .post-title a:hover {
  167.    text-decoration: underline;
  168. }
  169.  
  170. .post-meta {
  171.    font-size: 12px;
  172.    color: #787c7e;
  173.   margin-bottom:0px;
  174. }
  175.  
  176. .post-actions {
  177.    display: flex;
  178.    align-items: center;
  179.  
  180.    color: #747474;
  181. }
  182.  
  183. .post-actions  a{
  184.  
  185.    color: #747474;
  186. }
  187.  
  188.  
  189. .post-actions .btn-link {
  190.    color: #747474;
  191.    text-decoration: none;
  192.    font-family: Arial, Helvetica, sans-serif;
  193.    font-size: 14px;
  194.    padding: 0;
  195.    margin: 0;
  196. }
  197.  
  198.  
  199. .post-actions .btn-link:hover {
  200.    text-decoration: underline;
  201. }
  202.  
  203. .post-actions .several-comments{
  204. color: #454545;
  205.  
  206. }
  207.  
  208.  
  209. .post-actions .no-comments{
  210. color: #c5c5c5;
  211.  
  212.  
  213. }
  214.  
  215. .img-preview{
  216. border-radius:3px;
  217. -webkit-box-shadow: 0px 2px 3px -1px rgba(0,0,0,0.35);
  218. box-shadow: 0px 2px 3px -1px rgba(0,0,0,0.35);
  219. }
  220. .post-actions .superboost-btn {
  221.    font-family: Arial, Helvetica, sans-serif;
  222.    font-size: 14px;
  223. }
  224.  
  225. .comment {
  226.    border-left: 2px solid #007bff;
  227.    padding-left: 15px;
  228.    margin-bottom: 15px;
  229. }
  230.  
  231. .comment-header {
  232.    display: flex;
  233.    justify-content: space-between;
  234.    align-items: center;
  235.    margin-bottom: 5px;
  236. }
  237.  
  238. .comment-actions {
  239.    display: flex;
  240.    gap: 10px;
  241. }
  242.  
  243. .comment-content {
  244.    margin-bottom: 10px;
  245. }
  246.  
  247. .edit-form {
  248.    display: none;
  249.    margin-top: 10px;
  250. }
  251.  
  252. .spinner-border-custom {
  253.  display: inline-block;
  254.  width: 1rem;
  255.  height: 1rem;
  256.  vertical-align: text-bottom;
  257.  border: 0.25em solid currentColor;
  258.  border-right-color: transparent;
  259.  border-radius: 50%;
  260.  animation: spinner-border 0.75s linear infinite;
  261. }
  262.  
  263. @keyframes spinner-border {
  264.  100% {
  265.    transform: rotate(360deg);
  266.  }
  267. }
  268.  
  269. .page-load-status {
  270.  display: none; /* hidden by default */
  271.  padding-top: 20px;
  272.  border-top: 1px solid #DDD;
  273.  text-align: center;
  274.  color: #777;
  275. }
  276.  
  277. /* loader ellips */
  278. .loader-ellips {
  279.  font-size: 20px;
  280.  position: relative;
  281.  width: 4em;
  282.  height: 1em;
  283.  margin: 10px auto;
  284. }
  285.  
  286. .loader-ellips__dot {
  287.  display: block;
  288.  width: 1em;
  289.  height: 1em;
  290.  border-radius: 0.5em;
  291.  background: #555;
  292.  position: absolute;
  293.  animation-duration: 0.5s;
  294.  animation-timing-function: ease;
  295.  animation-iteration-count: infinite;
  296. }
  297.  
  298. .loader-ellips__dot:nth-child(1),
  299. .loader-ellips__dot:nth-child(2) {
  300.  left: 0;
  301. }
  302. .loader-ellips__dot:nth-child(3) { left: 1.5em; }
  303. .loader-ellips__dot:nth-child(4) { left: 3em; }
  304.  
  305. @keyframes reveal {
  306.  from { transform: scale(0.001); }
  307.  to { transform: scale(1); }
  308. }
  309.  
  310. @keyframes slide {
  311.  to { transform: translateX(1.5em) }
  312. }
  313.  
  314. .loader-ellips__dot:nth-child(1) {
  315.  animation-name: reveal;
  316. }
  317.  
  318. .loader-ellips__dot:nth-child(2),
  319. .loader-ellips__dot:nth-child(3) {
  320.  animation-name: slide;
  321. }
  322.  
  323. .loader-ellips__dot:nth-child(4) {
  324.  animation-name: reveal;
  325.  animation-direction: reverse;
  326. }
  327.  
  328. .whitepost {
  329.    border: 1px solid #e1e4e8;
  330.    border-radius: 6px;
  331.    padding: 12px;
  332.    background-color: #ffffff;
  333.  
  334.    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  335. }
  336.  
  337. .url-wrap {
  338.    word-break: break-word; /* Ensures words will break properly at the word boundary */
  339.  overflow-wrap: break-word; /* Allows the browser to break long words if needed */
  340. white-space: normal; /* Ensures text will wrap within the container */
  341. }
  342.  
  343.  
  344. ..vote-and-boost {
  345.    display: flex;
  346.    align-items: center;
  347.    justify-content: center;
  348.  
  349.    border-radius: 12px; /* Rounded corners */
  350.    padding: 8px 20px; /* Adjust padding as needed */
  351.    font-size: 14px;
  352.    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); /* Subtle shadow */
  353. }
  354.  
  355. .vote-and-boost button {
  356.    border: none;
  357.    background: none;
  358.    cursor: pointer;
  359.    font-size: 20px; /* Adjust the size to match the image */
  360.    line-height: 1;
  361.    color: #b4afa5; /* Default color */
  362. }
  363.  
  364.  
  365. .vote-and-boost  .downvote {
  366.  
  367. }
  368.  
  369.  
  370. .vote-and-boost .vote-count {
  371.    margin: 0 10px;
  372.    font-weight: bold;
  373.    color: #333;
  374.    font-size: 16px; /* Adjust size to match the image */
  375. }
  376.  
  377.  
  378.  
  379. .vote-and-boost .upvote.active {
  380.    color: #ff4500; /* Reddit's upvote orange when active */
  381. }
  382.  
  383. .vote-and-boost .downvote.active {
  384.    color: #7193ff; /* Reddit's downvote blue when active */
  385. }
  386.  
  387. .main-vote-container{
  388.   display:inline-block;
  389. width:300px;
  390. border-radius: 30px;
  391. padding:0px 10px 5px 10px;
  392. text-align:left;
  393.  
  394.  
  395. }
  396.  
  397.  
  398. .main-vote-container{
  399.   display:block;
  400.   width:40px;
  401. border-radius: 30px;
  402. padding:0px 10px 5px 10px;
  403. text-align:center;
  404.  
  405.  
  406. }
  407.  
  408. .main-orientation-left {
  409.    display: inline-flex;
  410.    flex-direction: column;
  411. width:40px;
  412.    border-radius: 15px;
  413.    padding: 0px 0px;
  414.    text-align: center;
  415.    margin: 0px 3px 6px 0px;
  416.    border: 0px;
  417. }
  418.  
  419. ..vote-and-boost {
  420.    display: flex;
  421.    align-items: center;
  422.    justify-content: center;
  423.    border-radius: 12px; /* Rounded corners */
  424.    padding: 0px 20px; /* Adjust padding as needed */
  425.    font-size: 14px;
  426.   box-shadow:none;
  427. }
  428.  
  429. .several-comments-text strong{
  430. color:#7b9848;
  431. }
  432.  
  433.  
  434. .vote-orientation-left {
  435.    display: flex;
  436.    flex-direction: column;
  437.    align-items: center;
  438.    justify-content: center;
  439.    border-radius: 12px;
  440.    padding: 0px;
  441.    font-size: 14px;
  442.    box-shadow: none;
  443. margin-top:0px;
  444. }
  445.  
  446.  
  447.  
  448. #nsfwToggle:not(:checked) {
  449. background-color:  #edece9;
  450. border:1px solid #8a8a8a;
  451.  
  452. }
  453. </style>
  454. </head>
  455.  
  456. <body>
  457. <script>
  458.  
  459.   if ('serviceWorker' in navigator) {
  460.        window.addEventListener('load', () => {
  461.            navigator.serviceWorker.register('/sw.js?v=6688a0dd5b93d')
  462.                .then((reg) => console.log('Service worker registered.', reg))
  463.                .catch((err) => console.log('Service worker registration failed:', err));
  464.        });
  465.    }
  466. let deferredPrompt;
  467.  
  468. window.addEventListener('beforeinstallprompt', (e) => {
  469.    // Prevent the mini-infobar from appearing on mobile
  470.    e.preventDefault();
  471.    // Stash the event so it can be triggered later.
  472.    deferredPrompt = e;
  473.    // Update UI to notify the user they can add to home screen
  474.    showInstallPromotion(); // Implement this function to show a custom install button
  475. });
  476.  
  477. const showInstallPromotion = () => {
  478.    const installButton = document.getElementById('installButton'); // Assumes you have a button with this ID
  479.    installButton.style.display = 'block';
  480.    installButton.addEventListener('click', (e) => {
  481.        // Hide the button
  482.        installButton.style.display = 'none';
  483.        // Show the install prompt
  484.        deferredPrompt.prompt();
  485.        // Wait for the user to respond to the prompt
  486.        deferredPrompt.userChoice.then((choiceResult) => {
  487.            if (choiceResult.outcome === 'accepted') {
  488.                console.log('User accepted the A2HS prompt');
  489.            } else {
  490.                console.log('User dismissed the A2HS prompt');
  491.            }
  492.            deferredPrompt = null;
  493.        });
  494.    });
  495. };
  496.  
  497. window.addEventListener('appinstalled', (event) => {
  498.    console.log('a2hs', 'installed');
  499. });
  500.  
  501.  
  502. Notification.requestPermission().then((permission) => {
  503.  if (permission === 'granted') {
  504.    console.log('Notification permission granted.');
  505.    
  506.    // Assuming you have a function to check for updates
  507.    checkForUpdates();
  508.  } else {
  509.    console.log('Notification permission denied.');
  510.  }
  511. });
  512.  
  513. function checkForUpdates() {
  514. /*
  515. console.log('set badge');
  516.  // Simulate checking for updates
  517.  const hasUpdates = true; // Replace with actual update check logic
  518.  
  519.  if (hasUpdates) {
  520.    // Show notification
  521. console.log('setting badge');
  522.    new Notification('New updates available');
  523.  
  524.    // Set app badge
  525.    if ('setAppBadge' in navigator) {
  526. console.log('set badge enabled');
  527. if ('setAppBadge' in navigator) {
  528.  navigator.setAppBadge(3).catch((error) => {
  529. console.error('Error setting app badge:', error);
  530.  });
  531. } else {
  532.  console.warn('Badging API not supported');
  533. }
  534.    }
  535.  }
  536.  */
  537. }
  538.  
  539.  
  540.  
  541.  
  542. </script>
  543.  
  544. <style>
  545.  
  546.  
  547.  
  548.  
  549. .newitem{
  550. color: #61574e
  551. }
  552. textarea {
  553.    overflow: hidden;
  554.    resize: none;
  555.    min-height: 50px;
  556.    box-sizing: border-box;
  557.    padding: 5px;
  558.    transition: height 0.1s ease-out;
  559. }
  560. /* styles.css */
  561. .rotating-image {
  562.    display: block;
  563.    margin: 0 auto; /* Center the image horizontally */
  564.    width: 30px; /* Adjust the size as needed */
  565.    height: 30px; /* Adjust the size as needed */
  566.    animation: rotate 10s linear infinite; /* 10s is the duration, you can change it to make it slower or faster */
  567. }
  568.  
  569. @keyframes rotate {
  570.    from {
  571.        transform: rotate(0deg);
  572.    }
  573.    to {
  574.        transform: rotate(360deg);
  575.    }
  576. }
  577.  
  578. @keyframes shake {
  579.    0% { transform: translate(1px, 1px) rotate(0deg); }
  580.    10% { transform: translate(-1px, -2px) rotate(-1deg); }
  581.    20% { transform: translate(-3px, 0px) rotate(1deg); }
  582.    30% { transform: translate(3px, 2px) rotate(0deg); }
  583.    40% { transform: translate(1px, -1px) rotate(1deg); }
  584.    50% { transform: translate(-1px, 2px) rotate(-1deg); }
  585.    60% { transform: translate(-3px, 1px) rotate(0deg); }
  586.    70% { transform: translate(3px, 1px) rotate(-1deg); }
  587.    80% { transform: translate(-1px, -1px) rotate(1deg); }
  588.    90% { transform: translate(1px, 2px) rotate(0deg); }
  589.    100% { transform: translate(1px, -2px) rotate(-1deg); }
  590. }
  591.  
  592. #notification-bell {
  593.    position: relative;
  594.  color: #8aa00e;
  595.  
  596. }
  597.  
  598. #notification-bell i{
  599.  font-size:16px;
  600. }
  601.  
  602. #messages-icon i{
  603.  font-size:16px;
  604.  color: #555555;
  605. }
  606.  
  607. #notification-bell.has-notifications i {
  608.    color: #198754;
  609.    font-weight: 900;
  610. }
  611.  
  612. #notification-count {
  613.    position: absolute;
  614.    top: -8px;
  615.    right: -8px;
  616.    background-color: #ff0000;
  617.    color: #ffffff;
  618.    border-radius: 50%;
  619.    padding: 2px 5px;
  620.    font-size: 0.7em;
  621. }
  622.  
  623.   .navbar-light .navbar-nav .nav-link {
  624.        color: #333333; /* Darker color for navbar links */
  625.    }
  626.  
  627.    .navbar-light .navbar-nav .nav-link:hover,
  628.    .navbar-light .navbar-nav .nav-link:focus {
  629.        color: #000000; /* Even darker color for hover and focus states */
  630.    }
  631.  
  632.  .badge.rounded-pill {
  633.  
  634.       font-size:11px;
  635.  
  636. font-weight:normal;
  637.    
  638.    }
  639. .nsfw-post{
  640. display:none !important;
  641. }
  642.  
  643. .custombar{
  644.  
  645. background-color: rgba(255, 255, 255) !important;
  646. border-top:2px solid #80c13e;
  647. background: rgb(237,240,228);
  648. background: linear-gradient(180deg, rgba(237,240,228,1) 0%, rgba(250,250,250,1) 24%, rgba(255,255,255,1) 82%);
  649. }
  650.  
  651.  
  652.  
  653. .customnoticon{
  654. background-color: #ebe9e7;
  655. width:36px;
  656. margin-right:4px;
  657. background: rgb(255,255,255);
  658. background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(235,235,235,0.7394795564710259) 100%);
  659. border-bottom: 1px solid #981073;
  660. }
  661.  
  662. .customnoticonnew{
  663. border-bottom: 1px solid #981073;
  664. background-color: #ebe9e7;
  665. width:46px;
  666. height:32px;
  667. margin-right:4px;
  668. font-size:13px;
  669. text-align:center;
  670. background: rgb(255,255,255);
  671. background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(235,235,235,0.7394795564710259) 100%);
  672. }
  673.  
  674. .custom-toggler {
  675. text-decoration:none;
  676.    border: none; /* Remove border */
  677.    outline: none; /* Remove outline */
  678.    padding: 0; /* Remove padding */
  679.    background: transparent; /* Remove background */
  680. font-size:13px;
  681. }
  682.  
  683. .custom-toggler-icon {
  684.    display: block;
  685.    width: 30px;
  686.    height: 22px;
  687.    position: relative;
  688.    background-color: transparent;
  689.    cursor: pointer;
  690. }
  691.  
  692. .custom-toggler-icon::before,
  693. .custom-toggler-icon::after,
  694. .custom-toggler-icon div {
  695.    content: '';
  696.    display: block;
  697.    width: 100%;
  698.    height: 4px;
  699.    background-color: #333; /* Change this color to your preferred color */
  700.    position: absolute;
  701.    left: 0;
  702.    transition: all 0.3s;
  703. }
  704.  
  705. .custom-toggler-icon::before {
  706.    top: 0;
  707. }
  708.  
  709. .custom-toggler-icon div {
  710.    top: 50%;
  711.    transform: translateY(-50%);
  712. }
  713.  
  714. .custom-toggler-icon::after {
  715.    bottom: 0;
  716. }
  717.  
  718.  
  719.  
  720. .btn-primary{
  721. background-color: #6d993f;
  722. border:0px;
  723. font-size:14px;
  724. padding:5px 11px 5px 11px;
  725. }
  726.  
  727. .bg-danger{
  728. background-color:  rgb(217 53 220) !important;
  729.  
  730. }
  731. </style>
  732.  
  733. <style id="base-theme">
  734.    /* styles.css */
  735.  
  736. :root {
  737.  --background-color: #ffffff;
  738.  --text-color: #000000;
  739.  --link-color: #0079d3;
  740.  --border-color: #e1e4e8;
  741.  --post-background: #ffffff;
  742. }
  743.  
  744. body {
  745.  background-color: var(--background-color);
  746.  color: var(--text-color);
  747. }
  748.  
  749. a {
  750.  color: var(--link-color);
  751. }
  752.  
  753. .reddit-post {
  754.  background-color: var(--post-background);
  755.  border-color: var(--border-color);
  756. }
  757.  
  758. /* Add more styles using CSS variables */</style>
  759.  
  760.  
  761.  
  762. <nav class="navbar navbar-expand-lg navbar-light  fixed-top custombar">
  763.    <div class="container">
  764.        <div class="d-flex align-items-center">
  765.            <a class="navbar-brand" href="/">
  766.                <img src="/kincat.gif" height="30" style="margin-top:-4px;" class="rotating-image">            </a>
  767.                                <a class="btn btn-light nav-link position-relative customnoticonnew d-flex align-items-center" href="/?sort=new"><div class="mx-auto">New</div></a>
  768.      
  769. <a class="btn btn-light nav-link position-relative customnoticonnew d-flex align-items-center" href="/feed"><div class="mx-auto">Feed</div></a>
  770.      
  771.        </div>
  772. <a class="navbar-toggler custom-toggler" type="" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
  773.            menu
  774.    </a>
  775.        <div class="collapse navbar-collapse" id="navbarNav">
  776.            <ul class="navbar-nav ms-auto">
  777.                <li class="nav-item">
  778.                    <a class="nav-link" href="/communities.php">Communities</a>
  779.                </li>
  780.   <li class="nav-item">
  781.                    <a class="nav-link" href="/all_members.php">Users</a>
  782.                </li>
  783. <li class="nav-item">
  784.    <a class="nav-link" href="/photos">Photos</a>
  785. </li>
  786.  
  787.    <li class="nav-item dropdown">
  788.        <a class="nav-link dropdown-toggle" href="#" id="datingDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  789.            Dating
  790.        </a>
  791.        <ul class="dropdown-menu" aria-labelledby="datingDropdown">
  792.    <li><a class="dropdown-item" href="/dating">Dating</a></li>
  793.        </ul>
  794.    </li>
  795. <li class="nav-item dropdown">
  796.    <a class="nav-link dropdown-toggle" href="#" id="exploreDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  797.        Explore
  798.    </a>
  799.    <ul class="dropdown-menu" aria-labelledby="exploreDropdown">
  800.        <li><a class="dropdown-item" href="/tags.php">Tags</a></li>
  801.        
  802.    </ul>
  803. </li>
  804.                                <li class="nav-item">
  805.                    <a class="nav-link" href="/login.php">Login</a>
  806.                </li>
  807.                <li class="nav-item">
  808.                    <a class="nav-link" href="/register.php">Register</a>
  809.                </li>
  810.                 <li class="nav-item">
  811.                    <a class="nav-link" href="/faq">Help</a>
  812.                </li>
  813.             </ul>
  814.        </div>
  815.    </div>
  816.  
  817. </nav>
  818.  
  819.  
  820.  
  821. <nav class="navbar navbar-expand-lg navbar-light ">
  822.  <div class="container">
  823.        <!-- Your existing navbar content -->
  824.        
  825.        <form class="d-flex w-100" id="search-form">
  826.            <div class="input-group">
  827.                <input class="form-control search-bar" type="search" placeholder="Search" aria-label="Search" id="search-input" autocomplete="off">
  828.                <button class="btn btn-success" type="submit">Search</button>
  829.            </div>
  830.        </form>
  831.    </div>
  832. </nav>
  833. <div id="search-results" class="container mt-0" style="display: none;"></div>
  834. <script>
  835.    $(document).ready(function() {
  836. const $searchForm = $('#search-form');
  837.    const $searchInput = $('#search-input');
  838.    const $searchResults = $('#search-results');
  839.    const $navbarCollapse = $('#navbarNav');
  840.    const $navbarToggler = $('.navbar-toggler');
  841.  
  842.        // Function to hide search results
  843.        function hideSearchResults() {
  844.            $searchResults.hide();
  845.            $searchResults.empty();
  846.        }
  847.  
  848.        // Show search results when form is submitted
  849.        $searchForm.on('submit', function(event) {
  850.            event.preventDefault();
  851.            // Your search logic here
  852.            // Show search results for demonstration
  853.            $searchResults.show();
  854.            $searchResults.html('<p>Search results go here...</p>');
  855.        });
  856.  
  857.        // Hide search results when clicking outside of them
  858.    $(document).on('click', function(event) {
  859.        if (!$searchForm.is(event.target) && $searchForm.has(event.target).length === 0 &&
  860.            !$searchResults.is(event.target) && $searchResults.has(event.target).length === 0) {
  861.            hideSearchResults();
  862.        }
  863.  
  864.        // Close navbar collapse when clicking outside
  865.        if (!$navbarCollapse.is(event.target) &&
  866.            $navbarCollapse.has(event.target).length === 0 &&
  867.            !$navbarToggler.is(event.target)) {
  868.            $navbarCollapse.collapse('hide');
  869.        }
  870.    });
  871.  
  872.  
  873.  
  874.        // Prevent hiding search results when clicking inside the search form or results
  875.        $searchForm.on('click', function(event) {
  876.            event.stopPropagation();
  877.        });
  878.  
  879.        $searchResults.on('click', function(event) {
  880.            event.stopPropagation();
  881.        });
  882.    function closeNavbarCollapse() {
  883.        if ($navbarCollapse.hasClass('show')) {
  884.            $navbarToggler.click();
  885.        }
  886. $navbarCollapse.on('click', function(event) {
  887.    event.stopPropagation();
  888. });
  889.    }
  890.    });
  891. </script>
  892. <style>
  893. .search-bar, .search-bar:active{
  894. border-color:  #198754;
  895.    background-color: blanchedalmond;
  896.    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
  897.            border-radius: 4px; border-color:  #198754;
  898.   border:1px solid #8f8f8f;
  899. }
  900. #search-results {
  901.        position: absolute;
  902.    
  903.        left: 0;
  904.        right: 0;
  905.        z-index: 1000; /* Ensure it's above other content */
  906.        background-color: white;
  907.  
  908.  
  909.        max-height: 80vh; /* Limit the height to 80% of the viewport height */
  910.        overflow-y: auto; /* Add scrollbar if content exceeds max-height */
  911.    }
  912.  
  913.  
  914.    /* Your existing styles */
  915.  
  916.    @media (min-width: 992px) {
  917.        #search-form {
  918.            max-width: 50%;
  919.            margin-right: auto;
  920.        }
  921.    }
  922.  
  923.    #search-form .input-group {
  924.        width: 100%;
  925.    }
  926. .search-results-container {
  927.    background-color: #ffffff;
  928.    border: 1px solid #e1e4e8;
  929.    border-radius: 6px;
  930.    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  931.    padding: 0px 16px;
  932.    margin-top: 10px;
  933. }
  934.  
  935. .search-results-container h6 {
  936.    color: #24292e;
  937.    font-size: 14px;
  938.    font-weight: 600;
  939.    margin-bottom: 10px;
  940. }
  941.  
  942. .search-results-container .list-group {
  943.    margin-bottom: 15px;
  944. }
  945.  
  946. .search-results-container .list-group-item {
  947.    border: none;
  948.    border-radius: 4px;
  949.    padding: 2px 12px;
  950.    margin-bottom: 0px;
  951.    transition: background-color 0.2s ease;
  952. }
  953.  
  954. .search-results-container .list-group-item:hover {
  955.    background-color: #f6f8fa;
  956. }
  957.  
  958. .search-results-container .list-group-item:last-child {
  959.    margin-bottom: 0;
  960. }
  961.  
  962. .search-results-container .fas {
  963.    margin-right: 8px;
  964.    color: #586069;
  965. }
  966.  
  967. .search-results-container .alert-info {
  968.    background-color: #f1f8ff;
  969.    border-color: #c8e1ff;
  970.    color: #0366d6;
  971. }
  972. </style>
  973. <script>
  974.        let searchTimeout;
  975.        const searchInput = $('#search-input');
  976.        const searchForm = $('#search-form');
  977.  
  978.        searchInput.on('input focus', function() {
  979.            clearTimeout(searchTimeout);
  980.            const query = $(this).val();
  981.  
  982.            if (query.length >= 0) {
  983.                searchTimeout = setTimeout(function() {
  984.                    $.ajax({
  985.                        url: '/search.php?v=6688a0dd5ba64',
  986.                        method: 'GET',
  987.                        data: { query: query },
  988.                        dataType: 'html',
  989.                        success: function(data) {
  990.                            $('#search-results').html(data).show();
  991.                        },
  992.                        error: function(jqXHR, textStatus, errorThrown) {
  993.                            console.error('Search error:', textStatus, errorThrown);
  994.                        }
  995.                    });
  996.                }, 300);
  997.            } else {
  998.                $('#search-results').hide();
  999.            }
  1000.        });
  1001.  
  1002.        searchForm.on('submit', function(e) {
  1003.            e.preventDefault();
  1004.            const query = searchInput.val();
  1005.            if (query.length >= 0) {
  1006.                window.location.href = '/search_results.php?v=6688a0dd5ba65&query=' + encodeURIComponent(query);
  1007.            }
  1008.        });
  1009.  
  1010.    </script>
  1011. <script>
  1012. document.addEventListener('DOMContentLoaded', function() {
  1013.   if (isLoggedIn) {
  1014.        const notificationBell = document.getElementById('notification-bell');
  1015.        const messagesIcon = document.getElementById('messages-icon');
  1016.        const notificationCount = 0;
  1017.        const messageCount = 0;
  1018.  
  1019.        if (notificationCount > 0) {
  1020.            notificationBell.classList.add('has-notifications');
  1021.            playSound();
  1022.        }
  1023.  
  1024.        if (messageCount > 0) {
  1025.            messagesIcon.classList.add('has-messages');
  1026.            playSound();
  1027.        }
  1028.  
  1029.        function playSound() {
  1030.            const audio = new Audio('/cat.mp3');
  1031.            audio.play();
  1032.        }
  1033.    }
  1034. });
  1035. </script>
  1036. <div class="container"><div class="alert alert-danger" role="alert">
  1037. Set your profile image <a href="/edit_profile.php" target="_blank" class="alert-link">edit your profile</a>
  1038. </div></div>
  1039.    <main class="container mt-1">
  1040. <button id="installButton" class="btn btn-sm btn-primary mb-2" style="display: none;">Install KinTop</button>
  1041. <div class="container mt-4">
  1042.    <div class="row">
  1043.        <div class="col-md-8 mx-auto">
  1044.            <div class="card mb-4">  <button class="btn btn-sm btn-link text-muted position-absolute top-0 end-0 mt-2 me-2" data-bs-toggle="modal" data-bs-target="#reportUserModal">
  1045.                                <i class="fas fa-flag"></i> Report User
  1046.                            </button>
  1047.                <div class="card-body text-center">
  1048.                                            <img src="https://kintop.b-cdn.net/images/profiles/profile_2_4.jpg" alt="jaycuba" class="rounded-circle img-fluid mb-3" style="max-width: 150px;">
  1049.                                        <h3>jaycuba</h3>
  1050.                    <p class="text-muted">Karma: 26</p>
  1051.                    <p class="text-muted">Member since: June 22, 2024</p>
  1052.                                            <p>owner kin.top<br />
  1053. Professional Tantra Masseur / Energy healer having done over 1000 sessions with women.<br />
  1054. spiritually awakening through mooji.<br />
  1055. full-time vanlifer now 26 months (mostly portugal, spain, france)<br />
  1056. <br />
  1057. english (very good)<br />
  1058. czech (spoken pretty good)<br />
  1059. german (very good)<br />
  1060. french (medium)<br />
  1061. spanish (very good)<br />
  1062. italian (understand a lot can speak a little)<br />
  1063. portuguese (getting better basically medium beginner understand a lot)</p>
  1064.                                                                <p class="text-muted">
  1065.                            Zaragoza, Spain                        </p>
  1066.                                        <div class="mt-3">
  1067.                                            </div>
  1068.                </div>
  1069.            </div>
  1070.            <div class="card mb-4">
  1071.    <div class="card-body">
  1072.        <h4>Photos</h4>
  1073.        <div class="row" id="userPhotos">
  1074.            <!-- Photos will be loaded here -->
  1075.        </div>
  1076.        <button id="loadMorePhotos" class="btn btn-primary mt-3">Load More Photos</button>
  1077.    </div>
  1078. </div>
  1079.            <div class="card mb-4">
  1080.                <div class="card-body">
  1081.                    <h4>Friends</h4>
  1082.                                            <ul class="list-group list-group-flush">
  1083.                                                            <li class="list-group-item">
  1084.                                    <a href="/user/DrPoofAloof">DrPoofAloof</a>
  1085.                                </li>
  1086.                                                            <li class="list-group-item">
  1087.                                    <a href="/user/%C3%A9tienne">étienne</a>
  1088.                                </li>
  1089.                                                            <li class="list-group-item">
  1090.                                    <a href="/user/Caro">Caro</a>
  1091.                                </li>
  1092.                                                            <li class="list-group-item">
  1093.                                    <a href="/user/tomaspecinka">tomaspecinka</a>
  1094.                                </li>
  1095.                                                            <li class="list-group-item">
  1096.                                    <a href="/user/Nkybaby">Nkybaby</a>
  1097.                                </li>
  1098.                                                    </ul>
  1099.                        <a href="/friends.php?user_id=2" class="btn btn-link mt-2">View All Friends</a>
  1100.                                    </div>
  1101.            </div>
  1102.            
  1103.            <div class="card mb-4">
  1104.                <div class="card-body">
  1105.                    <h4>Posts</h4>
  1106.                                                                        <div class="reddit-post mb-2
  1107. ">
  1108.            <div class="main-vote-container main-orientation-left">
  1109.            <div class="vote-and-boost vote-orientation-left" data-post-id="448">
  1110.                <button class="upvote " data-vote-type="upvote">
  1111.                   â–²
  1112.                </button>
  1113.                <span class="vote-count">2</span>
  1114.                <button class="downvote " data-vote-type="downvote">
  1115.                    â–¼
  1116.                </button>
  1117.            </div>
  1118.        </div>
  1119.        <div class="post-content url-wrap ">
  1120.        <h2 class="post-title">
  1121.            <a href="/post/448/leaving-the-kin-community-is-good-for-mental-health">
  1122.                                leaving the kin community is good for mental health            </a>
  1123.        </h2>
  1124.        <p class="post-meta">
  1125.                     <span class="slurp"><a href="/c/mentalhealth">c/mentalhealth</a></span>
  1126.                        posted by
  1127.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1128.                        16 hours ago                    </p>
  1129.  
  1130.    <div class="mb-1"></div>
  1131.  
  1132.        <div class="post-actions vote-and-boost" data-post-id="448">
  1133.                            <a href="/post/448/leaving-the-kin-community-is-good-for-mental-health" class=" btn-sm btn-link several-comments-text">
  1134.                    <strong><i class="fa-solid fa-comments"></i> 1 comments</strong>
  1135.                </a>
  1136.             &nbsp;&middot;&nbsp;
  1137.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="448">boost</a>
  1138. &nbsp;&middot;&nbsp;
  1139. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1140.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown448" data-bs-toggle="dropdown" aria-expanded="false">
  1141.                    share
  1142.                </a>
  1143.                <ul class="dropdown-menu" aria-labelledby="shareDropdown448">
  1144.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F448%2Fleaving-the-kin-community-is-good-for-mental-health&text=leaving+the+kin+community+is+good+for+mental+health+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1145.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F448%2Fleaving-the-kin-community-is-good-for-mental-health" target="_blank">Telegram</a></li>
  1146.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F448%2Fleaving-the-kin-community-is-good-for-mental-health" target="_blank">WhatsApp</a></li>
  1147.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/448/leaving-the-kin-community-is-good-for-mental-health">Copy Link</a></li>
  1148.                </ul>
  1149.            </a>
  1150. </div>
  1151.    </div>
  1152. </div>
  1153.                                                    <div class="reddit-post mb-2
  1154. ">
  1155.            <div class="main-vote-container main-orientation-left">
  1156.            <div class="vote-and-boost vote-orientation-left" data-post-id="447">
  1157.                <button class="upvote " data-vote-type="upvote">
  1158.                   â–²
  1159.                </button>
  1160.                <span class="vote-count">2</span>
  1161.                <button class="downvote " data-vote-type="downvote">
  1162.                    â–¼
  1163.                </button>
  1164.            </div>
  1165.        </div>
  1166.        <div class="post-content url-wrap ">
  1167.        <h2 class="post-title">
  1168.            <a href="/post/447/refusing-to-date-women">
  1169.                                refusing to date women            </a>
  1170.        </h2>
  1171.        <p class="post-meta">
  1172.                     <span class="slurp"><a href="/c/mgtow">c/mgtow</a></span>
  1173.                        posted by
  1174.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1175.                        16 hours ago                    </p>
  1176.  
  1177.    <div class="mb-1"></div>
  1178.  
  1179.        <div class="post-actions vote-and-boost" data-post-id="447">
  1180.                            <a href="/post/447/refusing-to-date-women" class=" btn-sm btn-link no-comments-text">
  1181.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1182. comment
  1183.                </a>
  1184.             &nbsp;&middot;&nbsp;
  1185.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="447">boost</a>
  1186. &nbsp;&middot;&nbsp;
  1187. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1188.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown447" data-bs-toggle="dropdown" aria-expanded="false">
  1189.                    share
  1190.                </a>
  1191.                <ul class="dropdown-menu" aria-labelledby="shareDropdown447">
  1192.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F447%2Frefusing-to-date-women&text=refusing+to+date+women+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1193.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F447%2Frefusing-to-date-women" target="_blank">Telegram</a></li>
  1194.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F447%2Frefusing-to-date-women" target="_blank">WhatsApp</a></li>
  1195.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/447/refusing-to-date-women">Copy Link</a></li>
  1196.                </ul>
  1197.            </a>
  1198. </div>
  1199.    </div>
  1200. </div>
  1201.                                                    <div class="reddit-post mb-2
  1202. ">
  1203.            <div class="main-vote-container main-orientation-left">
  1204.            <div class="vote-and-boost vote-orientation-left" data-post-id="446">
  1205.                <button class="upvote " data-vote-type="upvote">
  1206.                   â–²
  1207.                </button>
  1208.                <span class="vote-count">2</span>
  1209.                <button class="downvote " data-vote-type="downvote">
  1210.                    â–¼
  1211.                </button>
  1212.            </div>
  1213.        </div>
  1214.        <div class="post-content url-wrap ">
  1215.        <h2 class="post-title">
  1216.            <a href="/post/446/refusing-to-date-women">
  1217.                                refusing to date women            </a>
  1218.        </h2>
  1219.        <p class="post-meta">
  1220.                     <span class="slurp"><a href="/c/dating">c/dating</a></span>
  1221.                        posted by
  1222.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1223.                        16 hours ago                    </p>
  1224.  
  1225.    <div class="mb-1"></div>
  1226.  
  1227.        <div class="post-actions vote-and-boost" data-post-id="446">
  1228.                            <a href="/post/446/refusing-to-date-women" class=" btn-sm btn-link no-comments-text">
  1229.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1230. comment
  1231.                </a>
  1232.             &nbsp;&middot;&nbsp;
  1233.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="446">boost</a>
  1234. &nbsp;&middot;&nbsp;
  1235. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1236.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown446" data-bs-toggle="dropdown" aria-expanded="false">
  1237.                    share
  1238.                </a>
  1239.                <ul class="dropdown-menu" aria-labelledby="shareDropdown446">
  1240.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F446%2Frefusing-to-date-women&text=refusing+to+date+women+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1241.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F446%2Frefusing-to-date-women" target="_blank">Telegram</a></li>
  1242.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F446%2Frefusing-to-date-women" target="_blank">WhatsApp</a></li>
  1243.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/446/refusing-to-date-women">Copy Link</a></li>
  1244.                </ul>
  1245.            </a>
  1246. </div>
  1247.    </div>
  1248. </div>
  1249.                                                    <div class="reddit-post mb-2
  1250. ">
  1251.            <div class="main-vote-container main-orientation-left">
  1252.            <div class="vote-and-boost vote-orientation-left" data-post-id="445">
  1253.                <button class="upvote " data-vote-type="upvote">
  1254.                   â–²
  1255.                </button>
  1256.                <span class="vote-count">1</span>
  1257.                <button class="downvote " data-vote-type="downvote">
  1258.                    â–¼
  1259.                </button>
  1260.            </div>
  1261.        </div>
  1262.        <div class="post-content url-wrap ">
  1263.        <h2 class="post-title">
  1264.            <a href="/post/445/people-are-so-insanely-stupid">
  1265.                                people are so INSANELY stupid            </a>
  1266.        </h2>
  1267.        <p class="post-meta">
  1268.                     <span class="slurp"><a href="/c/kin">c/kin</a></span>
  1269.                        posted by
  1270.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1271.                        16 hours ago                    </p>
  1272.  
  1273.    <div class="post-image">
  1274.        <a href="/post/445/people-are-so-insanely-stupid">
  1275.            <img src="https://i.imgur.com/Fgx8HE8.png" alt="Image preview" class="mb-2 mt-2 img-preview" height="100" style="max-width:100%;">
  1276.        </a>
  1277.    </div>
  1278.  
  1279.        <div class="post-actions vote-and-boost" data-post-id="445">
  1280.                            <a href="/post/445/people-are-so-insanely-stupid" class=" btn-sm btn-link no-comments-text">
  1281.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1282. comment
  1283.                </a>
  1284.             &nbsp;&middot;&nbsp;
  1285.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="445">boost</a>
  1286. &nbsp;&middot;&nbsp;
  1287. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1288.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown445" data-bs-toggle="dropdown" aria-expanded="false">
  1289.                    share
  1290.                </a>
  1291.                <ul class="dropdown-menu" aria-labelledby="shareDropdown445">
  1292.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F445%2Fpeople-are-so-insanely-stupid&text=people+are+so+insanely+stupid+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1293.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F445%2Fpeople-are-so-insanely-stupid" target="_blank">Telegram</a></li>
  1294.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F445%2Fpeople-are-so-insanely-stupid" target="_blank">WhatsApp</a></li>
  1295.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/445/people-are-so-insanely-stupid">Copy Link</a></li>
  1296.                </ul>
  1297.            </a>
  1298. </div>
  1299.    </div>
  1300. </div>
  1301.                                                    <div class="reddit-post mb-2
  1302. ">
  1303.            <div class="main-vote-container main-orientation-left">
  1304.            <div class="vote-and-boost vote-orientation-left" data-post-id="444">
  1305.                <button class="upvote " data-vote-type="upvote">
  1306.                   â–²
  1307.                </button>
  1308.                <span class="vote-count">1</span>
  1309.                <button class="downvote " data-vote-type="downvote">
  1310.                    â–¼
  1311.                </button>
  1312.            </div>
  1313.        </div>
  1314.        <div class="post-content url-wrap ">
  1315.        <h2 class="post-title">
  1316.            <a href="/post/444/people-are-so-insanely-stupid">
  1317.                                people are so INSANELY stupid            </a>
  1318.        </h2>
  1319.        <p class="post-meta">
  1320.                     <span class="slurp"><a href="/c/code-wallet">c/code-wallet</a></span>
  1321.                        posted by
  1322.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1323.                        16 hours ago                    </p>
  1324.  
  1325.    <div class="post-image">
  1326.        <a href="/post/444/people-are-so-insanely-stupid">
  1327.            <img src="https://i.imgur.com/Fgx8HE8.png" alt="Image preview" class="mb-2 mt-2 img-preview" height="100" style="max-width:100%;">
  1328.        </a>
  1329.    </div>
  1330.  
  1331.        <div class="post-actions vote-and-boost" data-post-id="444">
  1332.                            <a href="/post/444/people-are-so-insanely-stupid" class=" btn-sm btn-link no-comments-text">
  1333.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1334. comment
  1335.                </a>
  1336.             &nbsp;&middot;&nbsp;
  1337.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="444">boost</a>
  1338. &nbsp;&middot;&nbsp;
  1339. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1340.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown444" data-bs-toggle="dropdown" aria-expanded="false">
  1341.                    share
  1342.                </a>
  1343.                <ul class="dropdown-menu" aria-labelledby="shareDropdown444">
  1344.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F444%2Fpeople-are-so-insanely-stupid&text=people+are+so+insanely+stupid+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1345.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F444%2Fpeople-are-so-insanely-stupid" target="_blank">Telegram</a></li>
  1346.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F444%2Fpeople-are-so-insanely-stupid" target="_blank">WhatsApp</a></li>
  1347.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/444/people-are-so-insanely-stupid">Copy Link</a></li>
  1348.                </ul>
  1349.            </a>
  1350. </div>
  1351.    </div>
  1352. </div>
  1353.                                                    <div class="reddit-post mb-2
  1354. ">
  1355.            <div class="main-vote-container main-orientation-left">
  1356.            <div class="vote-and-boost vote-orientation-left" data-post-id="443">
  1357.                <button class="upvote " data-vote-type="upvote">
  1358.                   â–²
  1359.                </button>
  1360.                <span class="vote-count">1</span>
  1361.                <button class="downvote " data-vote-type="downvote">
  1362.                    â–¼
  1363.                </button>
  1364.            </div>
  1365.        </div>
  1366.        <div class="post-content url-wrap ">
  1367.        <h2 class="post-title">
  1368.            <a href="/post/443/ftx-unloading-kin">
  1369.                                FTX unloading KIN            </a>
  1370.        </h2>
  1371.        <p class="post-meta">
  1372.                     <span class="slurp"><a href="/c/kin">c/kin</a></span>
  1373.                        posted by
  1374.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1375.                        16 hours ago                    </p>
  1376.  
  1377.    <div class="mb-1"></div>
  1378.  
  1379.        <div class="post-actions vote-and-boost" data-post-id="443">
  1380.                            <a href="/post/443/ftx-unloading-kin" class=" btn-sm btn-link no-comments-text">
  1381.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1382. comment
  1383.                </a>
  1384.             &nbsp;&middot;&nbsp;
  1385.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="443">boost</a>
  1386. &nbsp;&middot;&nbsp;
  1387. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1388.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown443" data-bs-toggle="dropdown" aria-expanded="false">
  1389.                    share
  1390.                </a>
  1391.                <ul class="dropdown-menu" aria-labelledby="shareDropdown443">
  1392.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F443%2Fftx-unloading-kin&text=ftx+unloading+kin+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1393.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F443%2Fftx-unloading-kin" target="_blank">Telegram</a></li>
  1394.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F443%2Fftx-unloading-kin" target="_blank">WhatsApp</a></li>
  1395.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/443/ftx-unloading-kin">Copy Link</a></li>
  1396.                </ul>
  1397.            </a>
  1398. </div>
  1399.    </div>
  1400. </div>
  1401.                                                    <div class="reddit-post mb-2
  1402. ">
  1403.            <div class="main-vote-container main-orientation-left">
  1404.            <div class="vote-and-boost vote-orientation-left" data-post-id="442">
  1405.                <button class="upvote " data-vote-type="upvote">
  1406.                   â–²
  1407.                </button>
  1408.                <span class="vote-count">1</span>
  1409.                <button class="downvote " data-vote-type="downvote">
  1410.                    â–¼
  1411.                </button>
  1412.            </div>
  1413.        </div>
  1414.        <div class="post-content url-wrap ">
  1415.        <h2 class="post-title">
  1416.            <a href="/post/442/ftx-unloading-kin">
  1417.                                FTX unloading KIN            </a>
  1418.        </h2>
  1419.        <p class="post-meta">
  1420.                     <span class="slurp"><a href="/c/kin">c/kin</a></span>
  1421.                        posted by
  1422.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1423.                        16 hours ago                    </p>
  1424.  
  1425.    <div class="mb-1"></div>
  1426.  
  1427.        <div class="post-actions vote-and-boost" data-post-id="442">
  1428.                            <a href="/post/442/ftx-unloading-kin" class=" btn-sm btn-link no-comments-text">
  1429.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1430. comment
  1431.                </a>
  1432.             &nbsp;&middot;&nbsp;
  1433.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="442">boost</a>
  1434. &nbsp;&middot;&nbsp;
  1435. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1436.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown442" data-bs-toggle="dropdown" aria-expanded="false">
  1437.                    share
  1438.                </a>
  1439.                <ul class="dropdown-menu" aria-labelledby="shareDropdown442">
  1440.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F442%2Fftx-unloading-kin&text=ftx+unloading+kin+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1441.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F442%2Fftx-unloading-kin" target="_blank">Telegram</a></li>
  1442.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F442%2Fftx-unloading-kin" target="_blank">WhatsApp</a></li>
  1443.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/442/ftx-unloading-kin">Copy Link</a></li>
  1444.                </ul>
  1445.            </a>
  1446. </div>
  1447.    </div>
  1448. </div>
  1449.                                                    <div class="reddit-post mb-2
  1450. ">
  1451.            <div class="main-vote-container main-orientation-left">
  1452.            <div class="vote-and-boost vote-orientation-left" data-post-id="441">
  1453.                <button class="upvote " data-vote-type="upvote">
  1454.                   â–²
  1455.                </button>
  1456.                <span class="vote-count">1</span>
  1457.                <button class="downvote " data-vote-type="downvote">
  1458.                    â–¼
  1459.                </button>
  1460.            </div>
  1461.        </div>
  1462.        <div class="post-content url-wrap ">
  1463.        <h2 class="post-title">
  1464.            <a href="/post/441/best-vanlife-spots-spain">
  1465.                                best vanlife spots spain            </a>
  1466.        </h2>
  1467.        <p class="post-meta">
  1468.                     <span class="slurp"><a href="/c/vanlife">c/vanlife</a></span>
  1469.                        posted by
  1470.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1471.                        17 hours ago                    </p>
  1472.  
  1473.    <div class="post-image">
  1474.        <a href="/post/441/best-vanlife-spots-spain">
  1475.            <img src="https://i.imgur.com/3dw1o49.png" alt="Image preview" class="mb-2 mt-2 img-preview" height="100" style="max-width:100%;">
  1476.        </a>
  1477.    </div>
  1478.  
  1479.        <div class="post-actions vote-and-boost" data-post-id="441">
  1480.                            <a href="/post/441/best-vanlife-spots-spain" class=" btn-sm btn-link no-comments-text">
  1481.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1482. comment
  1483.                </a>
  1484.             &nbsp;&middot;&nbsp;
  1485.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="441">boost</a>
  1486. &nbsp;&middot;&nbsp;
  1487. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1488.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown441" data-bs-toggle="dropdown" aria-expanded="false">
  1489.                    share
  1490.                </a>
  1491.                <ul class="dropdown-menu" aria-labelledby="shareDropdown441">
  1492.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F441%2Fbest-vanlife-spots-spain&text=best+vanlife+spots+spain+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1493.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F441%2Fbest-vanlife-spots-spain" target="_blank">Telegram</a></li>
  1494.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F441%2Fbest-vanlife-spots-spain" target="_blank">WhatsApp</a></li>
  1495.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/441/best-vanlife-spots-spain">Copy Link</a></li>
  1496.                </ul>
  1497.            </a>
  1498. </div>
  1499.    </div>
  1500. </div>
  1501.                                                    <div class="reddit-post mb-2
  1502. ">
  1503.            <div class="main-vote-container main-orientation-left">
  1504.            <div class="vote-and-boost vote-orientation-left" data-post-id="440">
  1505.                <button class="upvote " data-vote-type="upvote">
  1506.                   â–²
  1507.                </button>
  1508.                <span class="vote-count">2</span>
  1509.                <button class="downvote " data-vote-type="downvote">
  1510.                    â–¼
  1511.                </button>
  1512.            </div>
  1513.        </div>
  1514.        <div class="post-content url-wrap ">
  1515.        <h2 class="post-title">
  1516.            <a href="/post/440/miwa-make-internet-wholesome-again">
  1517.                                MIWA &quot;Make Internet Wholesome Again&quot;            </a>
  1518.        </h2>
  1519.        <p class="post-meta">
  1520.                     <span class="slurp"><a href="/c/social-networks">c/social-networks</a></span>
  1521.                        posted by
  1522.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1523.                        17 hours ago                    </p>
  1524.  
  1525.    <div class="mb-1"></div>
  1526.  
  1527.        <div class="post-actions vote-and-boost" data-post-id="440">
  1528.                            <a href="/post/440/miwa-make-internet-wholesome-again" class=" btn-sm btn-link no-comments-text">
  1529.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1530. comment
  1531.                </a>
  1532.             &nbsp;&middot;&nbsp;
  1533.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="440">boost</a>
  1534. &nbsp;&middot;&nbsp;
  1535. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1536.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown440" data-bs-toggle="dropdown" aria-expanded="false">
  1537.                    share
  1538.                </a>
  1539.                <ul class="dropdown-menu" aria-labelledby="shareDropdown440">
  1540.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F440%2Fmiwa-make-internet-wholesome-again&text=miwa+%22make+internet+wholesome+again%22+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1541.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F440%2Fmiwa-make-internet-wholesome-again" target="_blank">Telegram</a></li>
  1542.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F440%2Fmiwa-make-internet-wholesome-again" target="_blank">WhatsApp</a></li>
  1543.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/440/miwa-make-internet-wholesome-again">Copy Link</a></li>
  1544.                </ul>
  1545.            </a>
  1546. </div>
  1547.    </div>
  1548. </div>
  1549.                                                    <div class="reddit-post mb-2
  1550. ">
  1551.            <div class="main-vote-container main-orientation-left">
  1552.            <div class="vote-and-boost vote-orientation-left" data-post-id="439">
  1553.                <button class="upvote " data-vote-type="upvote">
  1554.                   â–²
  1555.                </button>
  1556.                <span class="vote-count">1</span>
  1557.                <button class="downvote " data-vote-type="downvote">
  1558.                    â–¼
  1559.                </button>
  1560.            </div>
  1561.        </div>
  1562.        <div class="post-content url-wrap ">
  1563.        <h2 class="post-title">
  1564.            <a href="/post/439/miwa-make-internet-wholesome-again">
  1565.                                MIWA &quot;Make Internet Wholesome Again&quot;            </a>
  1566.        </h2>
  1567.        <p class="post-meta">
  1568.                     <span class="slurp"><a href="/c/kintop">c/kintop</a></span>
  1569.                        posted by
  1570.                            <span class="slurp"><a href="/user/jaycuba">jaycuba</a></span>
  1571.                        17 hours ago                    </p>
  1572.  
  1573.    <div class="mb-1"></div>
  1574.  
  1575.        <div class="post-actions vote-and-boost" data-post-id="439">
  1576.                            <a href="/post/439/miwa-make-internet-wholesome-again" class=" btn-sm btn-link no-comments-text">
  1577.                    <!--<i class="fa-solid fa-message no-comments"></i>-->
  1578. comment
  1579.                </a>
  1580.             &nbsp;&middot;&nbsp;
  1581.            <a href="#" class=" btn-sm btn-link superboost-btn" data-bs-toggle="modal" data-bs-target="#superboostModal" data-post-id="439">boost</a>
  1582. &nbsp;&middot;&nbsp;
  1583. &nbsp;&middot;&nbsp;<a class="dropdown d-inline-block">
  1584.                <a class=" btn-sm btn-link dropdown-toggle" type="button" id="shareDropdown439" data-bs-toggle="dropdown" aria-expanded="false">
  1585.                    share
  1586.                </a>
  1587.                <ul class="dropdown-menu" aria-labelledby="shareDropdown439">
  1588.                                        <li><a class="dropdown-item" href="https://twitter.com/intent/tweet?hashtags=solana&url=http%3A%2F%2Fkin.top%2Fpost%2F439%2Fmiwa-make-internet-wholesome-again&text=miwa+%22make+internet+wholesome+again%22+%24kin+@getcode+" target="_blank">Twitter / X</a></li>
  1589.                    <li><a class="dropdown-item" href="https://t.me/share/url?url=http%3A%2F%2Fkin.top%2Fpost%2F439%2Fmiwa-make-internet-wholesome-again" target="_blank">Telegram</a></li>
  1590.                    <li><a class="dropdown-item" href="https://api.whatsapp.com/send?text=http%3A%2F%2Fkin.top%2Fpost%2F439%2Fmiwa-make-internet-wholesome-again" target="_blank">WhatsApp</a></li>
  1591.                    <li><a class="dropdown-item copy-link" href="#" data-url="http://kin.top/post/439/miwa-make-internet-wholesome-again">Copy Link</a></li>
  1592.                </ul>
  1593.            </a>
  1594. </div>
  1595.    </div>
  1596. </div>
  1597.                                                            </div>
  1598.            </div>
  1599.        </div>
  1600.    </div>
  1601. </div>
  1602.  
  1603. <div class="modal fade" id="reportUserModal" tabindex="-1" aria-labelledby="reportUserModalLabel" aria-hidden="true">
  1604.    <div class="modal-dialog">
  1605.        <div class="modal-content">
  1606.            <div class="modal-header">
  1607.                <h5 class="modal-title" id="reportUserModalLabel">Report User</h5>
  1608.                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1609.            </div>
  1610.            <div class="modal-body">
  1611.                <form id="reportUserForm">
  1612.                    <div class="mb-3">
  1613.                        <label for="reportReason" class="form-label">Reason for reporting</label>
  1614.                        <select class="form-select" id="reportReason" name="reason" required>
  1615.                            <option value="">Select a reason</option>
  1616.                            <option value="Scammer">Scammer</option>
  1617.                            <option value="harassment">Harassment</option>
  1618.                                                    </select>
  1619.                    </div>
  1620.                    <input type="hidden" name="reported_user_id" value="2">
  1621.                </form>
  1622.            </div>
  1623.            <div class="modal-footer">
  1624.                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  1625.                <button type="button" class="btn btn-primary" id="submitReportBtn">Submit Report</button>
  1626.            </div>
  1627.        </div>
  1628.    </div>
  1629. </div>
  1630.  
  1631. <script>
  1632. $(document).ready(function() {
  1633.    $('#submitReportBtn').click(function() {
  1634.        var reason = $('#reportReason').val();
  1635.        var reportedUserId = $('input[name="reported_user_id"]').val();
  1636.  
  1637.        if (!reason) {
  1638.            alert('Please select a reason for reporting.');
  1639.            return;
  1640.        }
  1641.  
  1642.        $.ajax({
  1643.            url: '/report_user.php',
  1644.            type: 'POST',
  1645.            data: {
  1646.                reported_user_id: reportedUserId,
  1647.                reason: reason
  1648.            },
  1649.            dataType: 'json',
  1650.            success: function(response) {
  1651.                if (response.success) {
  1652.                    alert(response.message);
  1653.                    $('#reportUserModal').modal('hide');
  1654.                } else {
  1655.                    alert(response.message);
  1656.                }
  1657.            },
  1658.            error: function() {
  1659.                alert('An error occurred. Please try again.');
  1660.            }
  1661.        });
  1662.    });
  1663.    
  1664.    $('#sendMessageBtn').click(function() {
  1665.        var username = 'jaycuba';
  1666.        var isFriend = false;
  1667.        var isFollowedBy = false;
  1668.  
  1669.        if (!isFriend && !isFollowedBy) {
  1670.            alert("You can only send messages to friends or users who follow you.");
  1671.            return;
  1672.        }
  1673.  
  1674.        $.ajax({
  1675.            url: '/messages/create_conversation.php',
  1676.            type: 'POST',
  1677.            data: { username: username },
  1678.            dataType: 'json',
  1679.            success: function(response) {
  1680.                if (response.success) {
  1681.                    window.location.href = '/messages/index.php?conversation_id=' + response.conversation_id;
  1682.                } else {
  1683.                    alert(response.message);
  1684.                }
  1685.            },
  1686.            error: function() {
  1687.                alert('An error occurred. Please try again.');
  1688.            }
  1689.        });
  1690.    });
  1691.  
  1692.    $('.vote-buttons button').click(function() {
  1693.        var $this = $(this);
  1694.        var postId = $this.parent().data('post-id');
  1695.        var voteType = $this.hasClass('upvote') ? 'upvote' : 'downvote';
  1696.  
  1697.        $.ajax({
  1698.            url: '/vote.php',
  1699.            type: 'POST',
  1700.            data: { post_id: postId, vote_type: voteType },
  1701.            dataType: 'json',
  1702.            success: function(response) {
  1703.                if (response.success) {
  1704.                    $this.siblings('.vote-count').text(response.vote_count);
  1705.                } else {
  1706.                    alert(response.message);
  1707.                }
  1708.            },
  1709.            error: function() {
  1710.                alert('An error occurred. Please try again.');
  1711.            }
  1712.        });
  1713.    });
  1714.  
  1715.    $('#friendRequestBtn').click(function() {
  1716.        $.ajax({
  1717.            url: '/friend_request.php',
  1718.            type: 'POST',
  1719.            data: { receiver_id: 2 },
  1720.            dataType: 'json',
  1721.            success: function(response) {
  1722.                if (response.success) {
  1723.                    $('#friendRequestBtn').prop('disabled', true).text('Request Sent');
  1724.                } else {
  1725.                    alert(response.message);
  1726.                }
  1727.            },
  1728.            error: function() {
  1729.                alert('An error occurred. Please try again.');
  1730.            }
  1731.        });
  1732.    });
  1733.  
  1734. $('#followBtn').click(function() {
  1735. $.ajax({
  1736. url: '/follow.php',
  1737. type: 'POST',
  1738. data: { followed_id: 2 },
  1739. dataType: 'json',
  1740. success: function(response) {
  1741. if (response.success) {
  1742. $('#followBtn').prop('disabled', true).text('Following');
  1743. } else {
  1744. alert('Error: ' + response.message);
  1745. }
  1746. },
  1747. error: function(jqXHR, textStatus, errorThrown) {
  1748. alert('AJAX error: ' + textStatus + '\n' + errorThrown + '\n' + jqXHR.responseText);
  1749. }
  1750. });
  1751. });
  1752. });
  1753. </script>
  1754.  
  1755.    </main>
  1756.    <footer class="bg-light text-center text-lg-start mt-4">
  1757.        <div class="container p-4">
  1758.            <p>&copy; 2024 Kin.top. All rights reserved.</p>
  1759.        </div>
  1760.    </footer>
  1761.     <div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
  1762.        <div class="modal-dialog">
  1763.            <div class="modal-content">
  1764.                <div class="modal-header">
  1765.                    <h5 class="modal-title" id="loginModalLabel">Login Required</h5>
  1766.                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1767.                </div>
  1768.                <div class="modal-body">
  1769.                    <p>You need to be logged in to vote. Please log in or sign up to continue.</p>
  1770.                </div>
  1771.                <div class="modal-footer">
  1772.                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
  1773.                    <a href="/login.php" class="btn btn-primary">Log In</a>
  1774.                    <a href="/register.php" class="btn btn-success">Sign Up</a>
  1775.                </div>
  1776.            </div>
  1777.        </div>
  1778.    </div>
  1779.    <script src="/voting.js?id=6688a0dd5c60c"></script>
  1780.  
  1781. <div class="modal fade" id="superboostModal" tabindex="-1" aria-labelledby="superboostModalLabel" aria-hidden="true">
  1782.    <div class="modal-dialog">
  1783.        <div class="modal-content">
  1784.            <div class="modal-header">
  1785.                <h5 class="modal-title" id="superboostModalLabel">Increase visibility with Tip & Boost</h5>
  1786.                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  1787.            </div>
  1788.            <div class="modal-body" data-post-id="">
  1789. Buying a Tip & Boost sends a tip to the poster & increases visibility of the post<br><br>
  1790.                <p>Select an amount to superboost this post. each 10 cents is equal to 1 vote. the tip goes 50% to the poster and 50% to kin.top. if a user has been invited by another user
  1791. earnings are split 50% poster, 30% kin.top, 20% inviter<br></p>
  1792.                <div class="btn-group mb-3" role="group" aria-label="Superboost amount">
  1793.                    <button type="button" class="btn btn-outline-primary amount-btn active" data-amount="0.10">$0.10</button>
  1794.                    <button type="button" class="btn btn-outline-primary amount-btn" data-amount="0.50">$0.50</button>
  1795.                    <button type="button" class="btn btn-outline-primary amount-btn" data-amount="1.00">$1.00</button>
  1796.                    <button type="button" class="btn btn-outline-primary amount-btn" data-amount="2.00">$2.00</button>
  1797.                    <button type="button" class="btn btn-outline-primary amount-btn" data-amount="5.00">$5.00</button>
  1798.                </div>
  1799.                <div id="button-container" style="height: 3.75rem;"></div>
  1800. <br>
  1801. <div id="kinAddressStatus" class="mt-0"></div>
  1802.                <p class="mt-1 text-xs text-muted">Don't have the Code Wallet app yet?
  1803.                <a href="https://www.getcode.com/#Download" target="_blank" class="text-primary">Download It Now</a> and get your first $1 free</p>
  1804.            </div>
  1805.        </div>
  1806.    </div>
  1807. </div>
  1808.  
  1809.  
  1810. <script>
  1811.  
  1812.  
  1813.  
  1814. document.addEventListener('DOMContentLoaded', function() {
  1815.    $('.superboost-btn').click(function() {
  1816.        var postId = $(this).closest('.vote-and-boost').data('post-id');
  1817.        loadSuperboostButton(postId);
  1818.    });
  1819. });
  1820.  
  1821.  
  1822. </script>
  1823. <script type="module">
  1824. import code from 'https://js.getcode.com/v1';
  1825.  
  1826.  
  1827. let superboostButton;
  1828. const defaultAmount = 0.10;
  1829. const defaultDestination = 'CtVDfDHknkhnwMooPwNBnzZQdiJzS1XK4qohVUtnygPn'; // Replace with a valid default Solana address
  1830. const feeDestination = 'CtVDfDHknkhnwMooPwNBnzZQdiJzS1XK4qohVUtnygPn'; // Fixed fee destination
  1831. let currentPostId;
  1832. let currentDestination = defaultDestination; // Initialize with default value
  1833. let currentAmount = 0.10; // Initialize with the default amount
  1834.  
  1835. function setupAmountButtons(postId) {
  1836.    console.log('Setting up amount buttons');
  1837.    const modalBody = document.querySelector('#superboostModal .modal-body');
  1838.    const amountBtns = modalBody.querySelectorAll('.amount-btn');
  1839.    amountBtns.forEach(btn => {
  1840.        btn.addEventListener('click', () => {
  1841.            console.log('Amount button clicked:', btn.dataset.amount);
  1842.            const selectedAmount = parseFloat(btn.dataset.amount);
  1843. currentAmount = parseFloat(btn.dataset.amount);
  1844.            amountBtns.forEach(b => b.classList.remove('active'));
  1845.            btn.classList.add('active');
  1846.            const newConfig = createButtonConfig(currentDestination || defaultDestination, currentAmount, postId);
  1847.            console.log('Updating button with new config:', newConfig);
  1848.            superboostButton.update(newConfig);
  1849.        });
  1850.    });
  1851. }
  1852.  
  1853. window.setupAmountButtons = setupAmountButtons;
  1854.  
  1855.  
  1856. function createButtonConfig(destination, amount, postId, inviterKinAddress) {
  1857.    const config = {
  1858.        currency: 'usd',
  1859.        amount: amount,
  1860.        destination: destination,
  1861.        confirmParams: {
  1862.            success: {
  1863.                url: `/superboost_success.php?amount=${amount}&post_id=${postId}&intent_id={{INTENT_ID}}`,
  1864.            },
  1865.            cancel: {
  1866.                url: `/superboost_cancel.php?post_id=${postId}`,
  1867.            },
  1868.        },
  1869.    };
  1870.  
  1871.    const usedAddresses = new Set([destination]);
  1872.  
  1873.    if (destination !== feeDestination && !usedAddresses.has(feeDestination)) {
  1874.        if (inviterKinAddress && !usedAddresses.has(inviterKinAddress)) {
  1875.            config.fees = [
  1876.                {
  1877.                    destination: feeDestination,
  1878.                    basisPoints: 3000, // 30% fee
  1879.                },
  1880.                {
  1881.                    destination: inviterKinAddress,
  1882.                    basisPoints: 2000, // 20% fee
  1883.                }
  1884.            ];
  1885.            usedAddresses.add(feeDestination);
  1886.            usedAddresses.add(inviterKinAddress);
  1887.        } else if (!usedAddresses.has(feeDestination)) {
  1888.            config.fees = [
  1889.                {
  1890.                    destination: feeDestination,
  1891.                    basisPoints: 5000, // 50% fee
  1892.                }
  1893.            ];
  1894.            usedAddresses.add(feeDestination);
  1895.        }
  1896.    }
  1897.  
  1898.    return config;
  1899. }
  1900. window.createButtonConfig = createButtonConfig;
  1901.  
  1902. // ... (previous code remains the same)
  1903.  
  1904. function loadSuperboostButton(postId) {
  1905.    console.log('Loading superboost button for post:', postId);
  1906.    currentPostId = postId;
  1907.    fetch(`/get_kinaddress.php?post_id=${postId}`)
  1908.        .then(response => response.json())
  1909.        .then(data => {
  1910.            if (data.success) {
  1911.                console.log('New destination loaded:', data.kinaddress);
  1912.                currentDestination = data.kinaddress || defaultDestination;
  1913.                const config = createButtonConfig(currentDestination, currentAmount, postId, data.inviterKinAddress);
  1914.                superboostButton.update(config);
  1915.                console.log('Button config updated:', config);
  1916.                
  1917.                // Update modal content based on Kin address status
  1918.                const modalBody = document.querySelector('#superboostModal .modal-body');
  1919.                const statusMessage = modalBody.querySelector('#kinAddressStatus');
  1920.                if (!statusMessage) {
  1921.                    const statusElement = document.createElement('p');
  1922.                    statusElement.id = 'kinAddressStatus';
  1923.                    modalBody.insertBefore(statusElement, modalBody.firstChild);
  1924.                }
  1925.                
  1926.                if (data.kinaddress) {
  1927.                    document.getElementById('kinAddressStatus').textContent = 'The poster has Code Wallet enabled. Your superboost will be sent directly to them.';
  1928.                    document.getElementById('kinAddressStatus').className = 'text-success';
  1929.                } else {
  1930.                    document.getElementById('kinAddressStatus').textContent = 'The poster has Code Wallet not enabled. The superboost will help them though. the money goes to kin.top.';
  1931.                    document.getElementById('kinAddressStatus').className = 'text-warning';
  1932.                }
  1933.                
  1934.                // Reset active state on amount buttons
  1935.                document.querySelectorAll('.amount-btn').forEach(btn => btn.classList.remove('active'));
  1936.                document.querySelector('.amount-btn[data-amount="0.10"]').classList.add('active');
  1937.            } else {
  1938.                console.error('Error loading Kin address:', data.message || 'Invalid or missing Kin address for this post.');
  1939.                alert('Error: ' + (data.message || 'Invalid or missing Kin address for this post.'));
  1940.            }
  1941.        })
  1942.        .catch(error => {
  1943.            console.error('Error:', error);
  1944.            alert('An error occurred while loading the superboost button.');
  1945.        });
  1946. }
  1947.  
  1948. // ... (rest of the code remains the same)
  1949.  
  1950. window.loadSuperboostButton = loadSuperboostButton;
  1951.  
  1952. function initializeSuperboostButton(postId) {
  1953.    console.log('Initializing Superboost Button for post:', postId);
  1954.    currentPostId = postId;
  1955.    currentDestination = defaultDestination; // Set initial currentDestination
  1956. console.log('current amount'+currentAmount);
  1957.    const config = createButtonConfig(currentDestination, currentAmount, postId);
  1958.    console.log('Initial button config:', config);
  1959.    const { button } = code.elements.create('button', config);
  1960. /*
  1961.    button.on('invoke', async () => {
  1962.        console.log('Invoke event triggered');
  1963.        try {
  1964.            console.log('Attempting to create intent');
  1965.            const res = await fetch('/create-intent.php', {
  1966.                method: 'POST',
  1967.                headers: {
  1968.                    'Content-Type': 'application/json',
  1969.                },
  1970.                body: JSON.stringify({
  1971.                    amount: config.amount,
  1972.                    destination: config.destination,
  1973.                    post_id: postId
  1974.                })
  1975.            });
  1976.  
  1977.            console.log('Fetch response status:', res.status);
  1978.  
  1979.            if (res.status === 401) {
  1980.                console.log('User not logged in');
  1981.                alert('You need to be logged in to superboost. Please log in and try again.');
  1982.                return true; // Cancel the payment intent
  1983.            }
  1984.  
  1985.            if (!res.ok) {
  1986.                console.error('Fetch response not OK:', res.status, res.statusText);
  1987.                throw new Error('Failed to create intent');
  1988.            }
  1989.  
  1990.            const data = await res.json();
  1991.            console.log('Response data:', data);
  1992.  
  1993.            if (data.success) {
  1994.                console.log('Updating button with client secret');
  1995.                button.update({ clientSecret: data.clientSecret });
  1996.                console.log('Payment intent created with ID:', data.id);
  1997.                return false; // Don't cancel the payment intent
  1998.            } else {
  1999.                throw new Error(data.error || 'Unknown error occurred');
  2000.            }
  2001.        } catch (error) {
  2002.            console.error('Error in invoke event:', error);
  2003.            alert('An error occurred while preparing the superboost. Please try again.');
  2004.            return true; // Cancel the payment intent
  2005.        }
  2006.    });
  2007. */
  2008. superboostButton = button;
  2009.    console.log('Mounting button to container');
  2010.    button.mount('#button-container');
  2011.    console.log('Button mounted successfully');
  2012.  
  2013.    // Set up amount buttons
  2014.    setupAmountButtons(postId);
  2015. }
  2016.  
  2017.  
  2018.  
  2019. function updatePostVotes(postId, newVoteCount) {
  2020.    const voteCountElement = document.querySelector(`.vote-count[data-post-id="${postId}"]`);
  2021.    if (voteCountElement) {
  2022.        voteCountElement.textContent = newVoteCount;
  2023.    }
  2024. }
  2025.  
  2026. $(document).ready(function() {
  2027.   $('.superboost-btn').click(function() {
  2028.        console.log('Superboost button clicked');
  2029.        var postId = $(this).closest('.vote-and-boost').data('post-id');
  2030.        console.log('Post ID:', postId);
  2031.             initializeSuperboostButton(postId);
  2032.        loadSuperboostButton(postId);
  2033.    });
  2034.  
  2035. $('#superboostModal').on('hidden.bs.modal', function () {
  2036.    console.log('Modal hidden, resetting button');
  2037.    // Reset the button to its default state
  2038.    currentDestination = defaultDestination;
  2039.    const postId = $(this).find('.modal-body').attr('data-post-id');
  2040.    const config = createButtonConfig(currentDestination, currentAmount, postId);
  2041.    superboostButton.update(config);
  2042.    console.log('Button reset to default config:', config);
  2043.    // Reset active state on amount buttons
  2044.    const modalBody = $(this).find('.modal-body');
  2045.    modalBody.find('.amount-btn').removeClass('active');
  2046.    modalBody.find('.amount-btn[data-amount="0.10"]').addClass('active');
  2047. });
  2048. });
  2049. </script>
  2050.  
  2051. <script>
  2052. $(document).ready(function(){
  2053. $('#nsfwToggle').change(function() {
  2054.        var showNsfw = $(this).is(':checked') ? 1 : 0;
  2055. updateNsfwVisibility(showNsfw);
  2056.        $.ajax({
  2057.            url: 'update_nsfw_settings.php',
  2058.            method: 'POST',
  2059.            data: { show_nsfw: showNsfw },
  2060.            dataType: 'json',
  2061.            success: function(response) {
  2062.                if (response.success) {
  2063.                    console.log('NSFW settings updated successfully');
  2064. // location.reload();
  2065.                } else {
  2066.                    console.error('Failed to update NSFW settings:', response.message);
  2067.                    // Revert the toggle if the update failed
  2068.                    $('#nsfwToggle').prop('checked', !showNsfw);
  2069.                }
  2070.            },
  2071.            error: function(xhr, status, error) {
  2072.                console.error('AJAX error:', error);
  2073.                // Revert the toggle on AJAX error
  2074.                $('#nsfwToggle').prop('checked', !showNsfw);
  2075.            }
  2076.        });
  2077.    });
  2078.  function updateNsfwVisibility(showNsfw) {
  2079.        if(showNsfw) {
  2080.            $('.nsfw-post').removeClass('hide-nsfw');
  2081.        } else {
  2082.            $('.nsfw-post').addClass('hide-nsfw');
  2083.        }
  2084.    }
  2085.  
  2086.  
  2087.  
  2088. $('.bookmark-btn').click(function() {
  2089.        var postId = $(this).data('post-id');
  2090.        var $button = $(this);
  2091.        console.log('book postid:' + postId);
  2092.        $.ajax({
  2093.            url: '/toggle_bookmark.php?v=6688a0dd5c612',
  2094.            method: 'POST',
  2095.            data: { post_id: postId },
  2096.            success: function(response) {
  2097.                console.log('book response:', response);
  2098.                if (response.success) {
  2099.                    if (response.bookmarked) {
  2100.                        $button.html('<i class="fas fa-bookmark"></i> Bookmarked');
  2101.                    } else {
  2102.                        $button.html('<i class="far fa-bookmark"></i> Bookmark');
  2103.                    }
  2104.                } else {
  2105.                    alert('Error: ' + response.message);
  2106.                }
  2107.            },
  2108.            error: function(jqXHR, textStatus, errorThrown) {
  2109.                console.error('Error details:', textStatus, errorThrown, jqXHR.responseText);
  2110.                alert('An error occurred. Please try again.');
  2111.            }
  2112.        });
  2113.    });
  2114. });
  2115.  
  2116.  
  2117. !function(e,t){if("function"==typeof define&&define.amd)define(["exports","module"],t);else if("undefined"!=typeof exports&&"undefined"!=typeof module)t(exports,module);else{var n={exports:{}};t(n.exports,n),e.autosize=n.exports}}(this,function(e,t){"use strict";function n(e){function t(){var t=window.getComputedStyle(e,null);v=t.overflowY,"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),p="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(p)&&(p=0),s()}function n(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,v=t,f&&(e.style.overflowY=t),r()}function o(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){var t=e.style.height,n=o(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="auto";var i=e.scrollHeight+p;return 0===e.scrollHeight?void(e.style.height=t):(e.style.height=i+"px",h=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),void(r&&(document.documentElement.scrollTop=r)))}function s(){var t=e.style.height;r();var o=window.getComputedStyle(e,null);if(o.height!==e.style.height?"visible"!==v&&n("visible"):"hidden"!==v&&n("hidden"),t!==e.style.height){var i=d("autosize:resized");e.dispatchEvent(i)}}var l=void 0===arguments[1]?{}:arguments[1],a=l.setOverflowX,u=void 0===a?!0:a,c=l.setOverflowY,f=void 0===c?!0:c;if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!i.has(e)){var p=null,v=null,h=e.clientWidth,y=function(){e.clientWidth!==h&&s()},m=function(t){window.removeEventListener("resize",y,!1),e.removeEventListener("input",s,!1),e.removeEventListener("keyup",s,!1),e.removeEventListener("autosize:destroy",m,!1),e.removeEventListener("autosize:update",s,!1),i["delete"](e),Object.keys(t).forEach(function(n){e.style[n]=t[n]})}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",m,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",s,!1),window.addEventListener("resize",y,!1),e.addEventListener("input",s,!1),e.addEventListener("autosize:update",s,!1),i.add(e),u&&(e.style.overflowX="hidden",e.style.wordWrap="break-word"),t()}}function o(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=d("autosize:destroy");e.dispatchEvent(t)}}function r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=d("autosize:update");e.dispatchEvent(t)}}var i="function"==typeof Set?new Set:function(){var e=[];return{has:function(t){return Boolean(e.indexOf(t)>-1)},add:function(t){e.push(t)},"delete":function(t){e.splice(e.indexOf(t),1)}}}(),d=function(e){return new Event(e)};try{new Event("test")}catch(s){d=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=function(e){return e},l.destroy=function(e){return e},l.update=function(e){return e}):(l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},l.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=l});
  2118.    document.addEventListener('DOMContentLoaded', function() {
  2119.  autosize(document.querySelectorAll('textarea'));
  2120.    });
  2121.  
  2122. </script>
  2123.  
  2124. <div class="toast-container position-fixed bottom-0 end-0 p-3"></div>
  2125.  
  2126. <footer class="footer mt-auto py-2 bg-dark fixed-bottom customfooter" id=mainFooter>
  2127.    <div class="container">
  2128. <div class="d-flex justify-content-between">
  2129.                <div class="d-flex justify-content-between">
  2130.                <a href="/feed" class="footer-btn"><i class="fas fa-zap"></i><span>Feed</span></a>
  2131.       <a href="/photos" class="footer-btn"><i class="fas fa-photo-film"></i><span>Photos</span></a>
  2132.       <a href="/messages/" class="footer-btn"><i class="fas fa-comment"></i><span>Chat</span></a>
  2133.          <a href="/dating/" class="footer-btn"><i class="fas fa-heart"></i><span>Dating</span></a>
  2134.            </div>
  2135.            <div class="d-flex justify-content-between">
  2136.                                    <a href="/register.php" class="footer-btn"><i class="fas fa-user-plus"></i><span>Signup</span></a>
  2137.                    <a href="/login.php" class="footer-btn"><i class="fas fa-sign-in-alt"></i><span>Login</span></a>
  2138.                            </div>
  2139.        </div>
  2140.    </div>
  2141. </footer>
  2142. <script>
  2143. document.addEventListener('DOMContentLoaded', function() {
  2144.    let lastScrollTop = 0;
  2145.    const footer = document.getElementById('mainFooter');
  2146.    
  2147.    window.addEventListener('scroll', function() {
  2148.        let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
  2149.        
  2150.        if (scrollTop > lastScrollTop) {
  2151.            // Scroll down - hide footer
  2152.            footer.style.transform = 'translateY(100%)';
  2153.        } else {
  2154.            // Scroll up - show footer
  2155.            footer.style.transform = 'translateY(0)';
  2156.        }
  2157.        lastScrollTop = scrollTop;
  2158.    });
  2159. });
  2160. </script>
  2161. <style>
  2162. .customfooter{
  2163. background-color:#333333;
  2164. background: rgb(134,66,255);
  2165. background: linear-gradient(0deg, rgba(134,66,255,1) 0%, rgba(173,0,255,1) 100%);
  2166. border:0px !important;
  2167. padding-bottom:2px !important;
  2168. }
  2169.  .modal.bottom-modal .modal-dialog {
  2170.            position: fixed;
  2171.            bottom: 0;
  2172.            left: 0;
  2173.            right: 0;
  2174.            margin: 0;
  2175.        }
  2176.        .modal.bottom-modal .modal-content {
  2177.            border-radius: 0;
  2178.        }
  2179. .footer {
  2180.    background-color: #000;
  2181.    border-top: 1px solid #333;
  2182. }
  2183.  
  2184. .footer-btn {
  2185.    display: flex;
  2186.    flex-direction: column;
  2187.    align-items: center;
  2188.    color: #fff;
  2189.    text-decoration: none;
  2190.    font-size: 0.8rem;
  2191.    transition: color 0.3s ease;
  2192.    border: none;
  2193.    background: none;
  2194.    cursor: pointer;
  2195.    padding: 5px;
  2196. }
  2197.  
  2198. .footer-btn:hover, .footer-btn:focus {
  2199.    color: #1da1f2;
  2200. }
  2201.  
  2202. .footer-btn i {
  2203.    font-size: 1.5rem;
  2204.    margin-bottom: 0px;
  2205. }
  2206.  
  2207. .footer-btn span {
  2208.    display: block;
  2209.    text-align: center;
  2210. }
  2211.  
  2212. @media (max-width: 576px) {
  2213. .customfooter{
  2214.  
  2215. padding-bottom:6px !important;
  2216. }
  2217.  
  2218.    .footer-btn span {
  2219.        display: none;
  2220.    }
  2221.    
  2222.    .footer-btn i {
  2223.        font-size: 1.2rem;
  2224.    }
  2225. }
  2226.  
  2227. .footer-btn:hover, .footer-btn:focus {
  2228.    color: #ffffcc;
  2229.  
  2230. }
  2231.  
  2232. .loader {
  2233.    border: 5px solid #f3f3f3;
  2234.    border-top: 5px solid #3498db;
  2235.    border-radius: 50%;
  2236.    width: 40px;
  2237.    height: 40px;
  2238.    animation: spin 1s linear infinite;
  2239.    display: none;
  2240.    margin: 20px auto;
  2241. }
  2242.  
  2243. @keyframes spin {
  2244.    0% { transform: rotate(0deg); }
  2245.    100% { transform: rotate(360deg); }
  2246. }
  2247. </style>
  2248.    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  2249.    <!-- Photo confirmation modal -->
  2250. <div class="modal fade bottom-modal" id="photoUploadModal" tabindex="-1" aria-labelledby="photoUploadModalLabel" aria-hidden="true">
  2251.    <div class="modal-dialog">
  2252.        <div class="modal-content">
  2253.            <div class="modal-header">
  2254.                <h5 class="modal-title" id="photoUploadModalLabel">Upload Photo</h5>
  2255.                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  2256.            </div>
  2257.            <div class="modal-body">
  2258.                <button id="takePhotoBtn" class="btn btn-primary me-2"><i class="fas fa-camera"></i> Take Photo</button>
  2259.                <button id="chooseFromGalleryBtn" class="btn btn-primary"><i class="fas fa-images"></i> Choose from Gallery</button>
  2260.                <input type="file" id="photoUpload" style="display: none;" accept="image/*">
  2261.                <div class="loader" id="photoLoader"></div>
  2262.            </div>
  2263.        </div>
  2264.    </div>
  2265. </div>
  2266.  
  2267. <div class="modal fade bottom-modal" id="photoConfirmModal" tabindex="-1" aria-labelledby="photoConfirmModalLabel" aria-hidden="true">
  2268.    <div class="modal-dialog">
  2269.        <div class="modal-content">
  2270.            <div class="modal-header">
  2271.                <h5 class="modal-title" id="photoConfirmModalLabel">Confirm Photo Upload</h5>
  2272.                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  2273.            </div>
  2274.            <div class="modal-body">
  2275.                <img id="photoPreview" src="" alt="Photo preview" style="max-width: 100%; height: auto;">
  2276.                <textarea id="photoCaption" class="form-control mt-3" rows="3" placeholder="Add a caption..."></textarea>
  2277.            </div>
  2278.            <div class="modal-footer">
  2279.                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
  2280.                <button type="button" class="btn btn-primary" id="confirmUpload">Upload</button>
  2281.            </div>
  2282.        </div>
  2283.    </div>
  2284. </div>
  2285.    <script>
  2286.   // Photo upload button click handler
  2287.    $('#photoUploadBtn').click(function() {
  2288.        $('#photoUploadModal').modal('show');
  2289.    });
  2290.  
  2291.    // Take photo button click handler
  2292.    $('#takePhotoBtn').click(function() {
  2293.        $('#photoUpload').attr('capture', 'camera');
  2294.        $('#photoUpload').click();
  2295.    });
  2296.  
  2297.    // Choose from gallery button click handler
  2298.    $('#chooseFromGalleryBtn').click(function() {
  2299.        $('#photoUpload').removeAttr('capture');
  2300.        $('#photoUpload').click();
  2301.    });
  2302.  
  2303.    // File input change handler
  2304.    $('#photoUpload').change(function(event) {
  2305.        var file = event.target.files[0];
  2306.        if (file) {
  2307.            $('#photoLoader').show();
  2308.            $('#photoUploadModal').modal('hide');
  2309.            processAndUploadFile(file);
  2310.        }
  2311.    });
  2312.  
  2313.    // Process and upload file
  2314.    function processAndUploadFile(file) {
  2315.        if (file.size > 1024 * 1024) {
  2316.            compressImage(file, uploadAndPreview);
  2317.        } else {
  2318.            uploadAndPreview(file);
  2319.        }
  2320.    }
  2321.  
  2322.    // Compress image
  2323.    function compressImage(file, callback) {
  2324.        var reader = new FileReader();
  2325.        reader.onload = function(e) {
  2326.            var img = new Image();
  2327.            img.onload = function() {
  2328.                var canvas = document.createElement('canvas');
  2329.                var ctx = canvas.getContext('2d');
  2330.                var width = img.width;
  2331.                var height = img.height;
  2332.                
  2333.                if (width > height) {
  2334.                    if (width > 1920) {
  2335.                        height *= 1920 / width;
  2336.                        width = 1920;
  2337.                    }
  2338.                } else {
  2339.                    if (height > 1920) {
  2340.                        width *= 1920 / height;
  2341.                        height = 1920;
  2342.                    }
  2343.                }
  2344.                
  2345.                canvas.width = width;
  2346.                canvas.height = height;
  2347.                ctx.drawImage(img, 0, 0, width, height);
  2348.                
  2349.                canvas.toBlob(function(blob) {
  2350.                    callback(new File([blob], file.name, {
  2351.                        type: 'image/jpeg',
  2352.                        lastModified: Date.now()
  2353.                    }));
  2354.                }, 'image/jpeg', 0.7);
  2355.            };
  2356.            img.onerror = function() {
  2357.                $('#photoLoader').hide();
  2358.                alert('Error loading image. Please try another file.');
  2359.            };
  2360.            img.src = e.target.result;
  2361.        };
  2362.        reader.onerror = function() {
  2363.            $('#photoLoader').hide();
  2364.            alert('Error reading file. Please try again.');
  2365.        };
  2366.        reader.readAsDataURL(file);
  2367.    }
  2368.  
  2369.    // Upload and preview image
  2370.    function uploadAndPreview(file) {
  2371.        var formData = new FormData();
  2372.        formData.append('photo', file);
  2373.  
  2374.        $.ajax({
  2375.            url: '/upload_photo.php',
  2376.            type: 'POST',
  2377.            data: formData,
  2378.            processData: false,
  2379.            contentType: false,
  2380.            success: function(response) {
  2381.                $('#photoLoader').hide();
  2382.                try {
  2383.                    var data = JSON.parse(response);
  2384.                    if (data.success) {
  2385.                        $('#photoPreview').attr('src', data.image_url);
  2386.                        $('#photoPreview').data('photo-id', data.photo_id);
  2387.                        $('#photoConfirmModal').modal('show');
  2388.                    } else {
  2389.                        alert('Error uploading photo: ' + data.message);
  2390.                    }
  2391.                } catch (e) {
  2392.                    console.error('Error parsing server response:', e);
  2393.                    alert('An unexpected error occurred while uploading the photo.');
  2394.                }
  2395.            },
  2396.            error: function(jqXHR, textStatus, errorThrown) {
  2397.                $('#photoLoader').hide();
  2398.                console.error('AJAX error:', textStatus, errorThrown);
  2399.                alert('An error occurred while uploading the photo: ' + textStatus);
  2400.            }
  2401.        });
  2402.    }
  2403.  
  2404.    // Confirm upload button click handler
  2405.    $('#confirmUpload').click(function() {
  2406.        var captionText = $('#photoCaption').val();
  2407.        var photoId = $('#photoPreview').data('photo-id');
  2408.        
  2409.        $.ajax({
  2410.            url: '/upload_photo_caption.php',
  2411.            type: 'POST',
  2412.            data: {
  2413.                photo_id: photoId,
  2414.                caption: captionText
  2415.            },
  2416.            success: function(response) {
  2417.                var data = JSON.parse(response);
  2418.                if (data.success) {
  2419.                    $('#photoConfirmModal').modal('hide');
  2420.                    window.location.href = '/photos';
  2421.                } else {
  2422.                    alert('Error saving caption: ' + data.error);
  2423.                }
  2424.            },
  2425.            error: function() {
  2426.                alert('An error occurred while saving the caption.');
  2427.            }
  2428.        });
  2429.    });
  2430.    </script>
  2431.  
  2432. </body>
  2433. </html>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda