From 5ef6696614796899529b6013c43f248c8eeb18d9 Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Mon, 6 Jul 2020 12:23:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D1=80=D0=B8=D0=B2=D0=BE=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D0=BE=D0=BD=D0=B8=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=81=D0=BB=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=B2.=20=D0=A0=D0=B0=D0=B7=D0=B2=D0=BE=D1=80=D0=BE=D1=82=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D0=B5=D0=B9=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/User.php | 10 ++++++---- css/main.css | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/classes/User.php b/classes/User.php index 1f77bae..79b434a 100644 --- a/classes/User.php +++ b/classes/User.php @@ -49,14 +49,14 @@ class User } } - protected function showItem($item = 0) + protected function showItem($item) { $itemSlot = $item['dressed_slot'] ?? 0; $itemName = $item['name'] ?? ''; $itemImage = $item['image'] ?? ''; if ($itemSlot) { echo << +{$itemName} {$itemName} SLOT; } else { @@ -75,9 +75,11 @@ EMPTY_SLOT; for ($i = 1; $i <= 12; $i++) { echo sprintf('
', $i); if (isset($dressed_item[$i])) { - $this->showItem($dressed_item[$i]); + //$this->showItem($dressed_item[$i]); + $itemString = '%s%s'; + echo sprintf($itemString, $dressed_item[$i]['image'], $dressed_item[$i]['name'], $dressed_item[$i]['name']); } else { - $this->showItem($i); + echo sprintf('Пустой слот [%s]', $i, $i); } echo sprintf('
', $i); } diff --git a/css/main.css b/css/main.css index 4743538..705021b 100644 --- a/css/main.css +++ b/css/main.css @@ -358,10 +358,10 @@ div.user-info-container > div.slot-8 { grid-row: 4; } -div.user-info-container > div.slot-5, -div.user-info-container > div.slot-6, -div.user-info-container > div.slot-7, -div.user-info-container > div.slot-8 { +div.user-info-container > div.slot-9, +div.user-info-container > div.slot-10, +div.user-info-container > div.slot-11, +div.user-info-container > div.slot-12 { grid-row: 5; }