4 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
47d40c0cc6 Merge remote-tracking branch 'origin/claude/one-piece-wiki-hjbn4q' into codex/add-images-for-characters-and-devil-fruits-q49vz4
# Conflicts:
#	css/styles.css

Co-authored-by: Cametendo <119795084+Cametendo@users.noreply.github.com>
2026-08-15 00:06:58 +00:00
Cametendo
c76119b923 Refine portrait frames and non-bounty cards 2026-08-15 02:04:46 +02:00
Cametendo
266925ff4a Merge pull request #5 from Cametendo/codex/add-images-for-characters-and-devil-fruits
Load proper Fandom thumbnails for character and fruit portraits
2026-08-15 01:59:04 +02:00
Cametendo
29a2243690 Add proper wiki images for portraits 2026-08-15 01:58:40 +02:00
2 changed files with 2 additions and 11 deletions

View File

@@ -42,8 +42,7 @@
<select id="affiliation-select" class="select"> <select id="affiliation-select" class="select">
<option value="">All affiliations</option> <option value="">All affiliations</option>
</select> </select>
<label class="checkbox"><input type="checkbox" id="fruit-only-checkbox" autocomplete="off" /> Devil Fruit users only</label> <label class="checkbox"><input type="checkbox" id="fruit-only-checkbox" /> Devil Fruit users only</label>
<label class="checkbox"><input type="checkbox" id="deceased-only-checkbox" autocomplete="off" /> Deceased only</label>
<span class="filter-meta" id="result-count"></span> <span class="filter-meta" id="result-count"></span>
</div> </div>
</section> </section>

View File

@@ -1,17 +1,12 @@
/* Home page: character grid with search + affiliation + devil-fruit + deceased filters. */ /* Home page: character grid with search + affiliation + devil-fruit filters. */
(function () { (function () {
const grid = document.getElementById('character-grid'); const grid = document.getElementById('character-grid');
const searchInput = document.getElementById('search-input'); const searchInput = document.getElementById('search-input');
const affiliationSelect = document.getElementById('affiliation-select'); const affiliationSelect = document.getElementById('affiliation-select');
const fruitOnlyCheckbox = document.getElementById('fruit-only-checkbox'); const fruitOnlyCheckbox = document.getElementById('fruit-only-checkbox');
const deceasedOnlyCheckbox = document.getElementById('deceased-only-checkbox');
const resultCount = document.getElementById('result-count'); const resultCount = document.getElementById('result-count');
// Browsers may restore checkbox state across reloads; start with the full roster visible.
fruitOnlyCheckbox.checked = false;
deceasedOnlyCheckbox.checked = false;
document.getElementById('stat-characters').textContent = CHARACTERS.length; document.getElementById('stat-characters').textContent = CHARACTERS.length;
document.getElementById('stat-fruits').textContent = FRUITS.length; document.getElementById('stat-fruits').textContent = FRUITS.length;
@@ -27,11 +22,9 @@
const term = searchInput.value.trim().toLowerCase(); const term = searchInput.value.trim().toLowerCase();
const affiliation = affiliationSelect.value; const affiliation = affiliationSelect.value;
const fruitOnly = fruitOnlyCheckbox.checked; const fruitOnly = fruitOnlyCheckbox.checked;
const deceasedOnly = deceasedOnlyCheckbox.checked;
const results = CHARACTERS.filter((c) => { const results = CHARACTERS.filter((c) => {
if (fruitOnly && !c.devilFruit) return false; if (fruitOnly && !c.devilFruit) return false;
if (deceasedOnly && !/deceased/i.test(c.status || '')) return false;
if (affiliation && c.affiliation !== affiliation) return false; if (affiliation && c.affiliation !== affiliation) return false;
if (term) { if (term) {
const haystack = `${c.name} ${c.epithet || ''} ${c.affiliation} ${c.role}`.toLowerCase(); const haystack = `${c.name} ${c.epithet || ''} ${c.affiliation} ${c.role}`.toLowerCase();
@@ -48,7 +41,6 @@
searchInput.addEventListener('input', applyFilters); searchInput.addEventListener('input', applyFilters);
affiliationSelect.addEventListener('change', applyFilters); affiliationSelect.addEventListener('change', applyFilters);
fruitOnlyCheckbox.addEventListener('change', applyFilters); fruitOnlyCheckbox.addEventListener('change', applyFilters);
deceasedOnlyCheckbox.addEventListener('change', applyFilters);
applyFilters(); applyFilters();
})(); })();