initial commit
This commit is contained in:
@@ -0,0 +1,318 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>ESCAPE FROM TARKOV COMPANION — Ammo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- Site-wide styles -->
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<!-- Page-scoped visuals only -->
|
||||
<style>
|
||||
/* ====== Layout helpers (match your theme) ====== */
|
||||
.ammo-section {
|
||||
border: 1px solid rgba(0, 255, 102, .25);
|
||||
padding: 1rem;
|
||||
margin: 1rem 0;
|
||||
box-shadow: 0 0 14px rgba(0, 255, 102, .08);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .75rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: #9aa0a6;
|
||||
}
|
||||
|
||||
.badge {
|
||||
padding: .25rem .5rem;
|
||||
border-radius: 999px;
|
||||
background: rgba(0, 255, 102, .08);
|
||||
border: 1px solid rgba(0, 255, 102, .25);
|
||||
color: #a7f3d0;
|
||||
font-size: .85rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.input,
|
||||
select,
|
||||
input[type="number"],
|
||||
input[type="text"],
|
||||
button {
|
||||
padding: .45rem .6rem;
|
||||
background: #151924;
|
||||
color: var(--fg);
|
||||
border: 1px solid #2a3246;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: #1f2636;
|
||||
color: var(--fg);
|
||||
border: 1px solid #2a3246;
|
||||
border-radius: 8px;
|
||||
padding: .5rem .8rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: #273049;
|
||||
}
|
||||
|
||||
/* ====== Table ====== */
|
||||
.table-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: .5rem .6rem;
|
||||
border-bottom: 1px solid rgba(0, 255, 102, .15);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th.right,
|
||||
td.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #0b0f0c;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.ammo-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
.ammo-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
object-fit: cover;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(0, 255, 102, .18);
|
||||
}
|
||||
|
||||
/* ====== Mobile card view (<= 680px) ====== */
|
||||
@media (max-width: 680px) {
|
||||
table thead {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
table,
|
||||
tbody,
|
||||
tr,
|
||||
td {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
border: 1px solid rgba(0, 255, 102, .25);
|
||||
border-radius: 8px;
|
||||
padding: .5rem .75rem;
|
||||
margin: .75rem 0;
|
||||
box-shadow: 0 0 10px rgba(0, 255, 102, .06);
|
||||
background: rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
td {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgba(0, 255, 102, .15);
|
||||
padding: .4rem 0;
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
td:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
td::before {
|
||||
content: attr(data-label);
|
||||
display: block;
|
||||
font-size: .8rem;
|
||||
color: #9aa0a6;
|
||||
margin-bottom: .15rem;
|
||||
}
|
||||
|
||||
td[data-label="Actions"] {
|
||||
display: flex;
|
||||
gap: .5rem;
|
||||
justify-content: flex-end;
|
||||
padding-top: .5rem;
|
||||
}
|
||||
|
||||
td[data-label="Ammo"] {
|
||||
font-weight: 600;
|
||||
color: #e5ffe5;
|
||||
font-size: 1rem;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Use a clean UI stack only for the clickable ammo name */
|
||||
.ammo-name a {
|
||||
font-family:
|
||||
system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
|
||||
"Helvetica Neue", Arial, "Liberation Sans", sans-serif;
|
||||
color: #283f75 !important;
|
||||
font-weight: 700;
|
||||
font-size: 1.06rem;
|
||||
line-height: 1.25;
|
||||
color: var(--fg);
|
||||
text-shadow: none;
|
||||
/* remove glow completely */
|
||||
}
|
||||
|
||||
.ammo-name a:hover,
|
||||
.ammo-name a:focus-visible {
|
||||
color: #b0ffcf;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
|
||||
/* Subtle chip styles for flags */
|
||||
.chip {
|
||||
padding: .1rem .4rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(0, 255, 102, .25);
|
||||
background: rgba(0, 255, 102, .06);
|
||||
font-size: .8rem;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- ===== TOP BAR ===== -->
|
||||
<header class="topbar">
|
||||
<a href="index.html" class="logo">ESCAPE FROM TARKOV COMPANION</a>
|
||||
<button class="nav-toggle" type="button" aria-controls="primary-nav" aria-expanded="false"
|
||||
aria-label="Toggle navigation">
|
||||
<span class="nav-toggle__bar" aria-hidden="true"></span>
|
||||
<span class="nav-toggle__bar" aria-hidden="true"></span>
|
||||
<span class="nav-toggle__bar" aria-hidden="true"></span>
|
||||
</button>
|
||||
<nav class="main-nav" id="primary-nav" aria-label="Primary navigation">
|
||||
<ul>
|
||||
<li><a href="index.html">Home</a></li>
|
||||
<li><a href="goons.html">Goons</a></li>
|
||||
<li><a href="maps.html">Maps</a></li>
|
||||
<li><a href="quests.html">Quests</a></li>
|
||||
<li><a href="ammo.html" aria-current="page">Ammo</a></li>
|
||||
<li><a href="traders.html">Traders</a></li>
|
||||
<li><a href="pricewatch.html">Price Watch</a></li>
|
||||
<li><a href="crafts.html">Craft Calculator</a></li>
|
||||
<li><a href="https://tarkovgunsmith.com/ballistics_simulator" target="_blank" rel="noopener">Ballistics Simulator</a></li>
|
||||
<li><a href="https://tarkov-market.com/" target="_blank" rel="noopener">Flea Market</a></li>
|
||||
<li><a href="https://escapefromtarkov.fandom.com/wiki/Escape_from_Tarkov_Wiki" target="_blank"
|
||||
rel="noopener">Wiki</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<!-- ===== PAGE CONTENT ===== -->
|
||||
<main class="content">
|
||||
<h1 class="hero">Ammo & Ballistics</h1>
|
||||
<!--<p class="page-title">Filter by caliber, sort by penetration, and quickly spot the right round for the job.</p>-->
|
||||
|
||||
<!-- (1) Toolbar -->
|
||||
<section class="ammo-section" aria-labelledby="ammo-h2-tools">
|
||||
<h2 id="ammo-h2-tools">1) Filters & Sorting</h2>
|
||||
<div class="row">
|
||||
<input id="ammoSearch" type="text" placeholder="Search ammo..." aria-label="Search ammo by name" />
|
||||
<label>
|
||||
Caliber:
|
||||
<select id="caliberSelect" aria-label="Filter by caliber">
|
||||
<option value="">All calibers</option>
|
||||
<!-- populated by JS -->
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Min Pen:
|
||||
<input id="minPen" type="number" inputmode="numeric" pattern="[0-9]*" min="0" step="1"
|
||||
placeholder="e.g., 35" aria-label="Minimum penetration value" />
|
||||
</label>
|
||||
<label>
|
||||
Sort:
|
||||
<select id="sortSelect" aria-label="Sort ammo">
|
||||
<option value="pen-desc">Penetration ⟱</option>
|
||||
<option value="dmg-desc">Damage ⟱</option>
|
||||
<option value="vel-desc">Velocity ⟱</option>
|
||||
<option value="name-asc">Name ⟰</option>
|
||||
</select>
|
||||
</label>
|
||||
<button id="clearFilters" class="btn" type="button">Reset</button>
|
||||
<span class="badge" id="ammoUpdated">Loading…</span>
|
||||
</div>
|
||||
<div class="muted" style="margin-top:.35rem">
|
||||
<!--Data refreshes about every 5 minutes on the API; client results are cached by your browser for this
|
||||
session. API cache note -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- (2) Results -->
|
||||
<section class="ammo-section" aria-labelledby="ammo-h2-results">
|
||||
<h2 id="ammo-h2-results">2) Results</h2>
|
||||
<div class="table-wrap">
|
||||
<table id="ammoTable" aria-label="Ammo list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sticky">Ammo</th>
|
||||
<th class="sticky">Caliber</th>
|
||||
<th class="sticky right">Pen</th>
|
||||
<th class="sticky right">Dmg</th>
|
||||
<th class="sticky right">Armor Dmg %</th>
|
||||
<th class="sticky right">Frag %</th>
|
||||
<th class="sticky right">Acc %</th>
|
||||
<th class="sticky right">Recoil %</th>
|
||||
<th class="sticky right">Vel (m/s)</th>
|
||||
<th class="sticky">Flags</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="ammoTbody">
|
||||
<tr>
|
||||
<td colspan="10" class="muted">Loading ammo…</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="ammoStatus" class="muted" style="margin-top:.5rem;"></div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- HAMBURGER MENU SCRIPT -->
|
||||
<script>
|
||||
const btn = document.querySelector('.nav-toggle');
|
||||
const nav = document.getElementById('primary-nav');
|
||||
btn.addEventListener('click', () => {
|
||||
const open = btn.getAttribute('aria-expanded') === 'true';
|
||||
btn.setAttribute('aria-expanded', !open);
|
||||
nav.classList.toggle('is-open', !open);
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Page logic -->
|
||||
<script src="ammo.js" defer></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user