Новая уменьшенная кукла, +1 слот, автогенерация слотов по циклу.
This commit is contained in:
parent
5ff23b7b26
commit
566d8356d0
@ -66,7 +66,28 @@ EMPTY_SLOT;
|
||||
}
|
||||
}
|
||||
|
||||
public function UserInfo()
|
||||
private function UserInfoDoll() {
|
||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||
while ($row = $dressed_items->fetch_assoc()) {
|
||||
$dressed_item[$row['dressed_slot']] = $row;
|
||||
}
|
||||
echo '<div class="user-info-container">';
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
echo sprintf('<div class="slot-%s">', $i);
|
||||
if (isset($dressed_item[$i])) {
|
||||
$this->showItem($dressed_item[$i]);
|
||||
} else {
|
||||
$this->showItem($i);
|
||||
}
|
||||
echo sprintf('</div><!-- slot-%s -->', $i);
|
||||
}
|
||||
echo '<div class="slot-image">';
|
||||
echo sprintf('<img src="/i/shadow/%s" alt="%s">', $this->shadow, $this->login);
|
||||
echo '</div><!-- slot-image -->';
|
||||
echo '</div><!-- user-info-container -->';
|
||||
}
|
||||
|
||||
private function UserInfo()
|
||||
{
|
||||
$dressed_items = db::c()->query('SELECT * FROM inventory WHERE owner_id = ?i AND dressed_slot > 0', $this->id);
|
||||
while ($row = $dressed_items->fetch_assoc()) {
|
||||
@ -223,7 +244,7 @@ EMPTY_SLOT;
|
||||
}
|
||||
throw new Exception('<span class="error">Персонаж ' . $this->login . ' обезличен ' . $date . '.</span>');
|
||||
} else {
|
||||
$this->UserInfo();
|
||||
$this->UserInfoDoll();
|
||||
}
|
||||
}
|
||||
|
||||
|
33
css/main.css
33
css/main.css
@ -261,8 +261,8 @@ hr {
|
||||
}
|
||||
|
||||
img.item-wrap-normal {
|
||||
width: 98px;
|
||||
height: 98px;
|
||||
width: 73px;
|
||||
height: 73px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.25);
|
||||
display: inline-block;
|
||||
@ -319,8 +319,8 @@ img.tip:hover + span.tiptext {
|
||||
/* Отображение информации о персонаже в inf.php (класс User.php) */
|
||||
div.user-info-container {
|
||||
display: grid;
|
||||
grid-template-columns: 100px 200px 100px auto 100px;
|
||||
grid-template-rows: repeat(4, 100px) auto;
|
||||
grid-template-columns: repeat(4, 75px) auto 100px;
|
||||
grid-template-rows: repeat(5, 75px) auto;
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ 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 {
|
||||
grid-column: 3;
|
||||
grid-column: 4;
|
||||
}
|
||||
|
||||
div.user-info-container > div.slot-1,
|
||||
@ -358,20 +358,27 @@ 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 {
|
||||
grid-row: 5;
|
||||
}
|
||||
|
||||
div.user-info-container > div.slot-image {
|
||||
grid-column: 2;
|
||||
grid-column: 2 / 4;
|
||||
grid-row: 1 / 5;
|
||||
}
|
||||
|
||||
div.user-info-container > div.slot-image > img {
|
||||
width: 200px;
|
||||
height: 430px;
|
||||
width: 160px;
|
||||
height: 330px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
div.user-info-container > div.slot-lower {
|
||||
grid-column: 1 / 4;
|
||||
grid-row: 5;
|
||||
grid-column: 1 / 5;
|
||||
grid-row: 6;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -380,8 +387,8 @@ div.user-info-container > div.slot-lower > img {
|
||||
}
|
||||
|
||||
div.user-info-container > div.user-info {
|
||||
grid-column: 4;
|
||||
grid-row: 1 / 6;
|
||||
grid-column: 5;
|
||||
grid-row: 1 / 7;
|
||||
}
|
||||
|
||||
div.user-info-container > div.user-info > div.stats-container {
|
||||
@ -400,7 +407,7 @@ div.user-info-container > div.user-info > div.stats-container > div.column + div
|
||||
}
|
||||
|
||||
div.user-info-container > div.user-signs {
|
||||
grid-column: 5;
|
||||
grid-column: 6;
|
||||
grid-row: 1 / 6;
|
||||
}
|
||||
/*-----------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user