From 3a455af5aea643de686a2a0e0ce64bacfbca6f31 Mon Sep 17 00:00:00 2001
From: Eugene <59817721+SKZGx@users.noreply.github.com>
Date: Wed, 17 Apr 2024 15:59:09 +0300
Subject: [PATCH] 	modified:   css/cards.css 	modified:   js/item.js

---
 css/cards.css | 13 ++++----
 js/item.js    | 82 +++++++++++++++++++++++++++------------------------
 2 files changed, 51 insertions(+), 44 deletions(-)

diff --git a/css/cards.css b/css/cards.css
index a0902cf..00baddf 100644
--- a/css/cards.css
+++ b/css/cards.css
@@ -39,9 +39,6 @@
     width: auto; /* Allow FiltersContainer to take its natural width */
   }
 
-  .CPContainer {
-    margin-left: 20px; /* Add some space between FiltersContainer and CPContainer */
-  }
 }
 
 @media only screen and (max-width: 617px) {
@@ -80,7 +77,13 @@ html {
   position: relative;
 }
 
-
+.CPContainer{
+  min-width: calc(100% - 900px);
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: center;
+  align-items: center;
+}
 
 h2 {
   color: #ecf9fb;
@@ -152,7 +155,7 @@ p {
 }
 
 .CardsContainer {
-  max-width: 1520px;
+  max-width: 1420px;
   min-height: 850px;
   display: flex;
   align-items: center;
diff --git a/js/item.js b/js/item.js
index 3131ceb..e7e7af6 100644
--- a/js/item.js
+++ b/js/item.js
@@ -197,45 +197,49 @@ async function updateItemPage() {
             if (selectedItem) {
                 document.title = "СУМ" + " - переклад " + selectedItem.title;
 
-                // Update meta description
-                const metaDescription = document.createElement('meta');
-                metaDescription.setAttribute('name', 'description');
-                metaDescription.setAttribute('content', selectedItem.description);
-                document.head.appendChild(metaDescription);
-                // Update og:description
-                const ogDescription = document.createElement('meta');
-                ogDescription.setAttribute('property', 'og:description');
-                ogDescription.setAttribute('content', selectedItem.description);
-                ogDescription.setAttribute('content', truncateText(selectedItem.description, 120));
-                document.head.appendChild(ogDescription);
-
-                //update meta og:title
-                const ogTitle = document.createElement('meta');
-                ogTitle.setAttribute('property', 'og:title');
-                ogTitle.setAttribute('content', "СУМ" + " - переклад " + selectedItem.title);
-                document.head.appendChild(ogTitle);
-                //update meta og:image
-                const ogImage = document.createElement('meta');
-                ogImage.setAttribute('property', 'og:image');
-                ogImage.setAttribute('content', selectedItem.image);
-                document.head.appendChild(ogImage);
-                //update meta twitter:description
-                const twitterDescription = document.createElement('meta');
-                twitterDescription.setAttribute('name', 'twitter:description');
-                twitterDescription.setAttribute('content', selectedItem.description);
-                twitterDescription.setAttribute('content', truncateText(selectedItem.description, 120));
-                document.head.appendChild(twitterDescription);
-
-                //update meta twitter:title
-                const twitterTitle = document.createElement('meta');
-                twitterTitle.setAttribute('name', 'twitter:title');
-                twitterTitle.setAttribute('content', "СУМ" + " - переклад " + selectedItem.title);
-                document.head.appendChild(twitterTitle);
-                //update meta twitter:image
-                const twitterImage = document.createElement('meta');
-                twitterImage.setAttribute('name', 'twitter:image');
-                twitterImage.setAttribute('content', selectedItem.image);
-                document.head.appendChild(twitterImage);
+                    // Update meta description
+                    const metaDescription = document.createElement('meta');
+                    metaDescription.setAttribute('name', 'description');
+                    metaDescription.setAttribute('content', selectedItem.description);
+                    document.head.appendChild(metaDescription);
+                    // Update og:description
+                    const ogDescription = document.createElement('meta');
+                    ogDescription.setAttribute('property', 'og:description');
+                    ogDescription.setAttribute('content', selectedItem.description);
+                    document.head.appendChild(ogDescription);
+
+                    //update og:title
+                    //update meta og:title
+                    const ogTitle = document.createElement('meta');
+                    ogTitle.setAttribute('property', 'og:title');
+                    ogTitle.setAttribute('content', "СУМ" + " - переклад " + selectedItem.title);
+                    document.head.appendChild(ogTitle);
+
+                    //update og:image
+                    //update meta og:image
+                    const ogImage = document.createElement('meta');
+                    ogImage.setAttribute('property', 'og:image');
+                    ogImage.setAttribute('content', selectedItem.image);
+                    document.head.appendChild(ogImage);
+
+                    //update meta twitter:description
+                    const twitterDescription = document.createElement('meta');
+                    twitterDescription.setAttribute('name', 'twitter:description');
+                    twitterDescription.setAttribute('content', selectedItem.description);
+                    document.head.appendChild(twitterDescription);
+
+                    //update meta twitter:title
+                    const twitterTitle = document.createElement('meta');
+                    twitterTitle.setAttribute('name', 'twitter:title');
+                    twitterTitle.setAttribute('content', "СУМ" + " - переклад " + selectedItem.title);
+                    document.head.appendChild(twitterTitle);
+
+                    //update meta twitter:image
+                    const twitterImage = document.createElement('meta');
+                    twitterImage.setAttribute('name', 'twitter:image');
+                    twitterImage.setAttribute('content', selectedItem.image);
+                    document.head.appendChild(twitterImage);
+
 
                 // Create HTML string for tooltip content
                 const tooltipContent = selectedItem.tooltip ? selectedItem.tooltip : (selectedItem.verified ? 'Переклад вже в моді! Завантаження додаткових файлів не потрібно. Насолоджуйтеся грою з українською локалізацією!' : '');