CSS выехал из инлайна.

This commit is contained in:
lopar 2021-08-22 21:58:28 +03:00
parent 7c7ac67ddb
commit 2b1287397d

View File

@ -2,7 +2,6 @@
use Battles\Bank;
use Battles\Database\DBPDO;
use Battles\GameLogs;
use Battles\Item;
use Battles\ShopItem;
use Battles\Template;
@ -99,49 +98,113 @@ Template::header('Магазин');
background-color: #ccc;
display: block;
}
a.sell {
background-color: #cdc;
}
a.alltypes {
background-color: #ccd;
}
.status {
color:darkgreen;
background:#afa;
color: darkgreen;
background: #afa;
}
table.shop {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
padding: 4px;
}
table.shop > tbody > tr > td {
vertical-align: top;
}
table.shop > tbody > tr > td:nth-child(1) {
text-align: left;
}
table.shop > tbody > tr > td:nth-child(2) {
width: 280px;
}
table.shop table {
width: 100%;
border-collapse: separate;
border-spacing: 1px;
padding: 2px;
}
table.shop table tr {
background-color: #C7C7C7;
}
table.shop table td {
padding: 5px;
}
table.shop table tr:nth-child(even) {
background-color: #D5D5D5;
}
table.shop table td:nth-child(1) {
width: 150px;
text-align: center;
}
table.shop table td:nth-child(2) {
vertical-align: top;
}
h3 + div {
text-align: center;
}
table.shop strong span:last-child {
color: darkgreen;
}
hr + div {
text-align: center;
font-weight: bold;
}
</style>
<h1>Государственный магазин</h1>
<a href=# onclick=hrefToFrame('city.php?cp')> ← выйти на Центральную площадь</a>
<div class="status"><?= $status ?></div>
<table style="width: 100%; border-collapse: collapse; border-spacing: 0; padding: 4px;">
<table class="shop">
<tr>
<td style="vertical-align: top; text-align: left;">
<td>
<h3><?= $shopCategoryType ?></h3>
<?php if ($saleItems): ?>
<div style="text-align: center;">Вы можете продать ваши предметы за сущие копейки.</div>
<div>Вы можете продать ваши предметы за сущие копейки.</div>
<?php endif; ?>
<!--Магазин-->
<table class="zebra" style="width: 100%; border-collapse: separate; border-spacing: 1px; padding: 2px;">
<table>
<?php
foreach ($iteminfo as $ii) {
if ($ii->getItemType() != $shopCategoryTypeNumber && $shopCategoryTypeNumber != 'sale') {
continue;
}
echo "<tr><td style='width: 150px; text-align: center; padding: 5px;'>";
echo $ii->printImage();
echo "<tr><td>";
$ii->printImage();
$ii->printControls();
echo "<td style='vertical-align: top; padding: 5px;'>";
echo "<td>";
$ii->printInfo();
}
?>
</table>
<td style="width: 280px; vertical-align: top;">
<td>
<strong>
Масса всех ваших вещей: <?= getItemsMassaInfo() ?> <br>
У вас в банке: <span style="color: darkgreen;"><?= $bank->getMoney() ?></span> банкнот.
У вас в банке: <span><?= $bank->getMoney() ?></span> банкнот.
</strong>
<hr>
<div style="text-align: center; font-weight: bold;">Отделы магазина</div>
<div>Отделы магазина</div>
<a class="waretype" href="?otdel=6&rnd=<?= mt_rand() ?>">Оружие</a>
<a class="waretype" href="?otdel=1&rnd=<?= mt_rand() ?>">Шлемы</a>
<a class="waretype" href="?otdel=2&rnd=<?= mt_rand() ?>">Броня</a>