Alpha v0.7
This commit is contained in:
parent
83107ef847
commit
d2db986282
@ -42,9 +42,9 @@ body {
|
||||
|
||||
/* Resources Bar */
|
||||
#top-bar {
|
||||
background: var(--nord-0);
|
||||
background: rgba(10, 15, 30, 0.95);
|
||||
border-bottom: 2px solid var(--nord-1);
|
||||
padding: 10px;
|
||||
padding: 10px 40px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
@ -53,13 +53,78 @@ body {
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.resource-box {
|
||||
background: rgba(0,0,0,0.5);
|
||||
border: 1px solid var(--nord-3);
|
||||
background: rgba(46, 52, 64, 0.5);
|
||||
border: 1px solid rgba(136, 192, 208, 0.2);
|
||||
padding: 8px 15px;
|
||||
min-width: 140px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 6px rgba(0,0,0,0.2);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.resource-box:hover {
|
||||
background: rgba(136, 192, 208, 0.1);
|
||||
border-color: var(--nord-8);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.resource-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.resource-icon i {
|
||||
font-size: 20px;
|
||||
color: var(--nord-8);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.resource-icon img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.resource-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.resource-name {
|
||||
font-size: 9px;
|
||||
color: var(--nord-8);
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.resource-val-prod {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.resource-value {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.resource-prod {
|
||||
font-size: 10px;
|
||||
color: #a3be8c;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
/* Grid System */
|
||||
|
||||
BIN
assets/pasted-20260223-020340-7a082e1b.png
Normal file
BIN
assets/pasted-20260223-020340-7a082e1b.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
35
index.php
35
index.php
@ -36,7 +36,7 @@ $factions_map = []; foreach($factions_db as $f) $factions_map[$f['id']] = $f;
|
||||
$grid_size = 36;
|
||||
|
||||
// Mock Resources
|
||||
$header_resources = $db->query("SELECT * FROM game_resources WHERE show_in_header = 1 ORDER BY name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
$header_resources = $db->query("SELECT * FROM game_resources WHERE show_in_header = 1 ORDER BY CASE WHEN name = 'Crédits' THEN 1 WHEN name = 'Materials' THEN 2 WHEN name = 'Energie' THEN 3 WHEN name = 'Données' THEN 4 ELSE 5 END ASC, name ASC")->fetchAll(PDO::FETCH_ASSOC);
|
||||
$resources = []; foreach($header_resources as $hr) { $resources[$hr["name"]] = ["val" => "0", "prod" => "", "icon" => $hr["icon"] ?: "fa-gem", "image" => $hr["image_url"]]; }
|
||||
|
||||
if ($view === 'sector') {
|
||||
@ -130,17 +130,9 @@ function getStatusColor($status, $statuses_map) {
|
||||
<style>
|
||||
body { background: #000; color: #fff; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; }
|
||||
#main-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
|
||||
header#top-bar { background: rgba(10, 15, 30, 0.95); border-bottom: 2px solid #2d3545; padding: 10px 40px; }
|
||||
.user-auth-bar { display: flex; justify-content: flex-end; gap: 20px; font-size: 11px; color: #8c92a3; margin-bottom: 10px; }
|
||||
.user-auth-bar a { color: #88c0d0; text-decoration: none; font-weight: bold; }
|
||||
.user-auth-bar .username { color: #ebcb8b; }
|
||||
|
||||
.resource-container { display: flex; gap: 25px; align-items: center; justify-content: center; }
|
||||
.resource-box { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 80px; }
|
||||
.resource-box i { position: absolute; right: -15px; top: 5px; font-size: 20px; color: rgba(136, 192, 208, 0.2); }
|
||||
.resource-name { font-size: 10px; color: #88c0d0; text-transform: uppercase; font-weight: bold; }
|
||||
.resource-value { font-size: 14px; font-weight: bold; color: #fff; }
|
||||
.resource-prod { font-size: 9px; color: #a3be8c; }
|
||||
|
||||
#game-container { flex: 1; padding: 30px; display: flex; flex-direction: column; align-items: center; }
|
||||
.nav-panel { background: rgba(10, 15, 30, 0.95); border: 1px solid #2d3545; padding: 20px; width: 180px; }
|
||||
@ -429,14 +421,20 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div class="resource-container">
|
||||
<?php foreach($resources as $name => $res): ?>
|
||||
<div class="resource-box">
|
||||
<div class="resource-name"><?php echo $name; ?></div>
|
||||
<div class="resource-value"><?php echo $res['val']; ?></div>
|
||||
<div class="resource-prod"><?php echo $res['prod']; ?></div>
|
||||
<?php if (!empty($res["image"])): ?>
|
||||
<img src="<?php echo htmlspecialchars($res["image"]); ?>?v=<?php echo time(); ?>" style="position: absolute; right: -15px; top: 5px; max-width: 25px; max-height: 25px; opacity: 0.6;">
|
||||
<?php else: ?>
|
||||
<i class="fa-solid <?php echo htmlspecialchars($res["icon"]); ?>"></i>
|
||||
<?php endif; ?>
|
||||
<div class="resource-icon">
|
||||
<?php if (!empty($res["image"])): ?>
|
||||
<img src="<?php echo htmlspecialchars($res["image"]); ?>?v=<?php echo time(); ?>">
|
||||
<?php else: ?>
|
||||
<i class="fa-solid <?php echo htmlspecialchars($res["icon"]); ?>"></i>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="resource-info">
|
||||
<div class="resource-name"><?php echo htmlspecialchars($name); ?></div>
|
||||
<div class="resource-val-prod">
|
||||
<span class="resource-value"><?php echo htmlspecialchars($res['val']); ?></span>
|
||||
<span class="resource-prod"><?php echo htmlspecialchars($res['prod']); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@ -617,7 +615,7 @@ function getStatusColor($status, $statuses_map) {
|
||||
<div id="planetModal" class="modal-overlay" onclick="if(event.target === this) closePlanetModal()">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h2 id="m-planet-name">Planet Name</h2>
|
||||
<div style="display: flex; flex-direction: column; align-items: flex-start;"><h2 id="m-planet-name">Planet Name</h2><div id="m-planet-type" style="font-style: italic; font-size: 13px; color: #88c0d0; opacity: 0.8; margin-top: 2px;"></div></div>
|
||||
<button class="modal-close" onclick="closePlanetModal()">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@ -666,6 +664,7 @@ function getStatusColor($status, $statuses_map) {
|
||||
const factionInfo = factionsMap[data.faction_id] || { name: 'Aucune', color: '#8c92a3' };
|
||||
|
||||
document.getElementById('m-planet-name').innerText = data.name;
|
||||
document.getElementById('m-planet-type').innerText = typeInfo.name || data.type;
|
||||
document.getElementById('m-planet-img').src = typeInfo.image_url || '';
|
||||
document.getElementById('m-planet-status').innerText = statusInfo.name || data.status;
|
||||
document.getElementById('m-planet-status').style.background = statusInfo.color || 'rgba(255,255,255,0.1)';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user