.bare-acts-index { font-family: inherit; max-width: 860px; margin: 0 auto; }
.bare-acts-index .intro { font-size: 15px; color: #555; margin-bottom: 30px; }
.bare-acts-index .letter-section { margin-bottom: 28px; }
.bare-acts-index .letter-heading { font-size: 22px !important; font-weight: 700 !important; color: #1a1a1a !important; border-bottom: 2px solid #1a1a1a !important; padding-bottom: 5px; margin-bottom: 12px; }
.bare-acts-index .act-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.bare-acts-index .act-list li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px; font-style: normal !important; }
.bare-acts-index .act-list li a { color: #1a1a1a !important; text-decoration: none !important; font-weight: 500; font-style: normal !important; }
.bare-acts-index .act-list li a:hover { text-decoration: underline !important; color: #000 !important; }
.bare-acts-index .act-list li.coming-soon { color: #b0b0b0 !important; font-style: italic !important; }
document.addEventListener("DOMContentLoaded", function () {
var index = document.querySelector(".bare-acts-index");
if (!index) return;
// --- JUMP LINKS ---
var jumpBar = document.createElement("div");
jumpBar.style.cssText = "display:flex;flex-wrap:wrap;gap:6px;margin-bottom:24px;";
var letters = index.querySelectorAll(".letter-heading");
letters.forEach(function (heading) {
var letter = heading.textContent.trim();
var btn = document.createElement("a");
btn.textContent = letter;
btn.href = "#";
btn.style.cssText = "display:inline-block;width:32px;height:32px;line-height:32px;text-align:center;border:1px solid #ccc;border-radius:4px;font-weight:700;font-size:14px;color:#1a1a1a;text-decoration:none;background:#f9f9f9;";
btn.addEventListener("mouseover", function () { this.style.background = "#1a1a1a"; this.style.color = "#fff"; });
btn.addEventListener("mouseout", function () { this.style.background = "#f9f9f9"; this.style.color = "#1a1a1a"; });
btn.addEventListener("click", function (e) {
e.preventDefault();
heading.scrollIntoView({ behavior: "smooth", block: "start" });
});
jumpBar.appendChild(btn);
});
index.insertBefore(jumpBar, index.firstChild);
// --- SEARCH BOX ---
var searchWrap = document.createElement("div");
searchWrap.style.cssText = "margin-bottom:24px;";
var searchBox = document.createElement("input");
searchBox.type = "text";
searchBox.placeholder = "Search acts... e.g. contract, tax, marriage";
searchBox.style.cssText = "width:100%;padding:10px 14px;font-size:15px;border:1px solid #ccc;border-radius:6px;outline:none;box-sizing:border-box;";
var noResult = document.createElement("p");
noResult.textContent = "No acts found matching your search.";
noResult.style.cssText = "color:#999;font-style:italic;display:none;margin-top:12px;";
searchWrap.appendChild(searchBox);
searchWrap.appendChild(noResult);
index.insertBefore(searchWrap, jumpBar.nextSibling);
// --- SEARCH LOGIC ---
searchBox.addEventListener("input", function () {
var query = this.value.toLowerCase().trim();
var totalVisible = 0;
var sections = index.querySelectorAll(".letter-section");
sections.forEach(function (section) {
var items = section.querySelectorAll(".act-list li");
var sectionVisible = 0;
items.forEach(function (item) {
var text = item.textContent.toLowerCase();
if (query === "" || text.includes(query)) {
item.style.display = "";
sectionVisible++;
totalVisible++;
} else {
item.style.display = "none";
}
});
section.style.display = sectionVisible > 0 ? "" : "none";
});
jumpBar.style.display = query === "" ? "flex" : "none";
noResult.style.display = totalVisible === 0 ? "block" : "none";
});
// --- FOCUS STYLE ---
searchBox.addEventListener("focus", function () { this.style.borderColor = "#1a1a1a"; });
searchBox.addEventListener("blur", function () { this.style.borderColor = "#ccc"; });
});
.bare-acts-index { font-family: inherit; max-width: 860px; margin: 0 auto; }
.bare-acts-index .intro { font-size: 15px; color: #555; margin-bottom: 30px; line-height: 1.6; }
.bare-acts-index .letter-section { margin-bottom: 28px; }
.bare-acts-index .letter-heading { font-size: 24px !important; font-weight: 800 !important; color: #1a1a1a !important; border-bottom: 2px solid #1a1a1a !important; padding-bottom: 5px; margin-bottom: 12px; letter-spacing: 1px; }
.bare-acts-index .act-list { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.bare-acts-index .act-list li { padding: 7px 4px; border-bottom: 1px solid #efefef; font-size: 15.5px; font-weight: 600 !important; line-height: 1.5; transition: transform 0.15s ease, background 0.15s ease; cursor: default; border-radius: 4px; }
.bare-acts-index .act-list li:hover { transform: scale(1.02); background: #f7f7f7; }
.bare-acts-index .act-list li a { color: #1a1a1a !important; text-decoration: none !important; font-weight: 600 !important; font-style: normal !important; display: block; }
.bare-acts-index .act-list li a:hover { text-decoration: none !important; color: #000 !important; }
.bare-acts-index .act-list li.coming-soon { color: #aaaaaa !important; font-style: italic !important; font-weight: 500 !important; }
.bare-acts-index .act-list li.coming-soon:hover { transform: scale(1.02); background: #f7f7f7; }
Legal Sandook Page
Bare Acts (A–Z)
A complete alphabetical index of bare acts on Legal Sandook. Acts shown as links are fully published and available to read. Acts in grey are coming soon. A Advocates Act,...