generated from nhcarrigan/template
feat: site-wide content and feature updates (#2)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m7s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m7s
A wide-ranging set of updates across multiple pages that accumulated over time. ## Tarot - Expanded spread descriptions and added "good for" guidance to help users pick the right spread - Cards now start face-down and flip individually on click, with a synthesised flip sound and text fade-in - "Click card to reveal" hint shown on each unflipped card - Spread selection and draw button are locked until all cards in the current reading have been revealed ## Nocturne - Added dedicated sacred scriptures showcase section - Added patron saints section with avatar images - Added Naomi's Prayer - Added sacred practices section (expanded to six cards) - Added clergy and hierarchy section - Added titles of address section - Added testimonial and expanded FAQ - Capitalised She/Her pronouns referring to Naomi ## Scripture - Converted page to interactive book with page-turning - Expanded canon through the Fourth Edition across multiple updates - Synced the Ten Commandments with Nocturne - Fixed meta description to reflect fourteen books - Capitalised She/Her pronouns referring to Naomi ## Other Pages - Books, games, and music pages now redirect to `library.nhcarrigan.com` - Updated user manual with additional context - Added 404 error page ## Chore / Fixes - Updated sitemap with new and corrected entries - Fixed null-safe while loop for filename handling in scripts - Updated scripts to use correct Windows paths via WSL - Cleaned up data files and added JSON to `.gitignore` - Added secret #13 ✨ This PR was created with help from Hikari~ 🌸 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Reviewed-on: #2 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com>
This commit was merged in pull request #2.
This commit is contained in:
+6
-114
@@ -4,123 +4,15 @@
|
||||
<title>Naomi's Music Library</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="An interactive explorer for the music Naomi listens to." />
|
||||
<meta name="description" content="Naomi's music library has moved to library.nhcarrigan.com." />
|
||||
<script src="https://cdn.nhcarrigan.com/headers/index.js" async defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<h1>Naomi's Music Library</h1>
|
||||
<section>
|
||||
<p>An interactive explorer for the music Naomi listens to.</p>
|
||||
<p id="count">Loading library...</p>
|
||||
</section>
|
||||
<div style="display: none;">
|
||||
<span>Search Artists: </span>
|
||||
<input type="text" id="artist" />
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<span>Search Titles: </span>
|
||||
<input type="text" id="title" />
|
||||
</div>
|
||||
<div style="display: none;">
|
||||
<button type="button" id="clear">Clear Filters</button>
|
||||
</div>
|
||||
<table id="songs">
|
||||
|
||||
</table>
|
||||
<h1>Naomi's Music Library</h1>
|
||||
<section>
|
||||
<p>This page has moved! You can find Naomi's music library at <a href="https://library.nhcarrigan.com">library.nhcarrigan.com</a>.</p>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
<script>
|
||||
const artistQuery = document.getElementById('artist');
|
||||
const titleQuery = document.getElementById('title');
|
||||
const resetButton = document.getElementById('clear');
|
||||
const songTable = document.getElementById('songs');
|
||||
const filterSongs = (artist, title) => {
|
||||
let result = [...songList];
|
||||
if(artist) {
|
||||
result = result.filter(song => song.artist.toLowerCase().includes(artist.toLowerCase()));
|
||||
}
|
||||
if(title) {
|
||||
result = result.filter(song => song.title.toLowerCase().includes(title.toLowerCase()));
|
||||
}
|
||||
resetButton.parentElement.style.display = artist || title ? "block" : "none";
|
||||
document.getElementById('count').innerText = artist || title ? `Filtered to ${result.length} songs from ${songList.length}.` : `Naomi currently has ${songList.length} songs.`;
|
||||
updateTable(result);
|
||||
}
|
||||
const loadSongs = (songs) => {
|
||||
songList.push(...songs);
|
||||
artistQuery.value = "";
|
||||
titleQuery.value = "";
|
||||
artistQuery.parentElement.style.display = "block";
|
||||
titleQuery.parentElement.style.display = "block";
|
||||
document.getElementById('count').innerText = `Naomi currently has ${songs.length} songs.`;
|
||||
updateTable(songs);
|
||||
}
|
||||
const updateTable = (songs) => {
|
||||
songs = songs.sort((a, b) => a.title.localeCompare(b.title));
|
||||
songTable.innerHTML = "";
|
||||
const header = document.createElement('tr');
|
||||
const artistHeader = document.createElement('th');
|
||||
artistHeader.innerText = "Artist";
|
||||
const titleHeader = document.createElement('th');
|
||||
titleHeader.innerText = "Title";
|
||||
header.appendChild(titleHeader);
|
||||
header.appendChild(artistHeader);
|
||||
songTable.appendChild(header);
|
||||
songs.forEach(song => {
|
||||
const row = document.createElement('tr');
|
||||
const artist = document.createElement('td');
|
||||
artist.innerText = song.artist;
|
||||
const title = document.createElement('td');
|
||||
title.innerText = song.title;
|
||||
row.appendChild(title);
|
||||
row.appendChild(artist);
|
||||
songTable.appendChild(row);
|
||||
});
|
||||
}
|
||||
const songList = [];
|
||||
fetch("./songs.json").then(res => res.json()).then(data => loadSongs(data))
|
||||
|
||||
artistQuery?.addEventListener("input", (e) => filterSongs(e.target.value, titleQuery.value));
|
||||
titleQuery?.addEventListener("input", (e) => filterSongs(artistQuery.value, e.target.value));
|
||||
resetButton?.addEventListener("click", () => {
|
||||
artistQuery.value = "";
|
||||
titleQuery.value = "";
|
||||
filterSongs("", "");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
}
|
||||
tr:nth-of-type(even) {
|
||||
background-color: var(--foreground);
|
||||
color: var(--background);
|
||||
}
|
||||
input {
|
||||
background:var(--foreground);
|
||||
color:var(--background);
|
||||
border:1px solid white;
|
||||
border-radius:10px;
|
||||
padding:.25rem
|
||||
}
|
||||
button {
|
||||
background:var(--foreground);
|
||||
color:var(--background);
|
||||
border:1px solid white;
|
||||
border-radius:10px;
|
||||
padding:.25rem;
|
||||
cursor:url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
|
||||
}
|
||||
tr {
|
||||
max-width: 100%;
|
||||
}
|
||||
td {
|
||||
max-width: 50%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
-82528
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user