Exact reference recreation of Wikivault Main Page |
Exact reference recreation of Wikidesk Main Page |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
<html><div class="wv-homepage-wrapper"> | <html> | ||
<div class="wv-homepage-wrapper"> | |||
<div class="wv-hero-ref"> | <div class="wv-hero-ref"> | ||
<div class="wv-hero-backdrop-left"></div> | <div class="wv-hero-backdrop-left"></div> | ||
<div class="wv-hero-backdrop-right"></div> | <div class="wv-hero-backdrop-right"></div> | ||
<div class="wv-hero-ref-content"> | <div class="wv-hero-ref-content"> | ||
<div class="wv-hero-ref-title">Welcome to | <div class="wv-hero-ref-title">Welcome to Wikidesk</div> | ||
<div class="wv-hero-ref-subtitle">An editorially curated encyclopedia dedicated to verified public knowledge.</div> | <div class="wv-hero-ref-subtitle">An editorially curated encyclopedia dedicated to verified public knowledge.</div> | ||
<div class="wv-hero-search-wrap"> | <div class="wv-hero-search-wrap"> | ||
<form action="/wiki1/index.php" method="get" class="wv-hero-search-form"> | <form action="/wiki1/index.php" method="get" class="wv-hero-search-form" autocomplete="off"> | ||
<input type="hidden" name="title" value="Special:Search" /> | <input type="hidden" name="title" value="Special:Search" /> | ||
<input type="text" name="search" id="wv-main-search-input" class="wv-hero-search-input" placeholder="Search biographies, companies, organizations, news and more..." autocomplete="off" autofocus /> | |||
<input type="text" name="search" class="wv-hero-search-input" placeholder="Search biographies, companies, organizations, news and more..." | <button type="submit" class="wv-hero-search-btn" aria-label="Search">Search</button> | ||
<button type="submit" class="wv-hero-search-btn">Search</button> | |||
</form> | </form> | ||
</div> | </div> | ||
| Line 29: | Line 29: | ||
</div> | </div> | ||
<div class="wv-hero-trust-bar"> | <div class="wv-hero-trust-bar"> | ||
<span>Trusted content. Editorially curated. Verified sources.</span> | <span>Trusted content. Editorially curated. Verified sources.</span> | ||
</div> | </div> | ||
| Line 45: | Line 44: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="Albert Einstein" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/Albert_Einstein">Albert Einstein</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/Albert_Einstein">Albert Einstein</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">BIOGRAPHY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 62: | Line 61: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="Tesla, Inc." class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/Tesla,_Inc.">Tesla, Inc.</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/Tesla,_Inc.">Tesla, Inc.</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">COMPANY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 79: | Line 78: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="United Nations" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/United_Nations">United Nations</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/United_Nations">United Nations</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">ORGANIZATION</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 97: | Line 96: | ||
<a href="/wiki1/index.php/Special:NewPages" class="wv-sec-link">View all →</a> | <a href="/wiki1/index.php/Special:NewPages" class="wv-sec-link">View all →</a> | ||
</div> | </div> | ||
< | <!-- RECENT_PUBLICATIONS_BLOCK --> | ||
<div class="wv-sec-header"> | <div class="wv-sec-header"> | ||
<h2 class="wv-sec-title">Browse by category</h2> | <h2 class="wv-sec-title">Browse by category</h2> | ||
| Line 115: | Line 108: | ||
<p class="wv-horiz-card-body">Profiles of notable leaders, executives, scientists, and creators.</p> | <p class="wv-horiz-card-body">Profiles of notable leaders, executives, scientists, and creators.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 126: | Line 116: | ||
<p class="wv-horiz-card-body">Verified profiles of enterprise corporations, startups, and firms.</p> | <p class="wv-horiz-card-body">Verified profiles of enterprise corporations, startups, and firms.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 137: | Line 124: | ||
<p class="wv-horiz-card-body">Institutions, non-profits, foundations, and research bodies.</p> | <p class="wv-horiz-card-body">Institutions, non-profits, foundations, and research bodies.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 148: | Line 132: | ||
<p class="wv-horiz-card-body">Editorial coverage, press announcements, and industry updates.</p> | <p class="wv-horiz-card-body">Editorial coverage, press announcements, and industry updates.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 159: | Line 140: | ||
<p class="wv-horiz-card-body">Media figures, arts, film, publishing, and cultural initiatives.</p> | <p class="wv-horiz-card-body">Media figures, arts, film, publishing, and cultural initiatives.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 170: | Line 148: | ||
<p class="wv-horiz-card-body">Innovations, computing, artificial intelligence, and engineering.</p> | <p class="wv-horiz-card-body">Innovations, computing, artificial intelligence, and engineering.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 185: | Line 160: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="Apple Inc." class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/Apple_Inc.">Apple Inc.</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/Apple_Inc.">Apple Inc.</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">TECHNOLOGY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 199: | Line 174: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="Microsoft Corporation" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/Microsoft_Corporation">Microsoft Corporation</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/Microsoft_Corporation">Microsoft Corporation</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">TECHNOLOGY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 213: | Line 188: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="Google LLC" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/Google_LLC">Google LLC</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/Google_LLC">Google LLC</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">TECHNOLOGY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
<p class="wv-horiz-card-body">Provides | <p class="wv-horiz-card-body">Provides Internet services, search, cloud computing and digital advertising platforms.</p> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 233: | Line 208: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="United Nations" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/United_Nations">United Nations</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/United_Nations">United Nations</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">INTERNATIONAL ORGANIZATION</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 247: | Line 222: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="World Health Organization" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/World_Health_Organization">World Health Organization</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/World_Health_Organization">World Health Organization</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">PUBLIC HEALTH AGENCY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 261: | Line 236: | ||
<div class="wv-horiz-card-header"> | <div class="wv-horiz-card-header"> | ||
<div class="wv-horiz-card-thumb"> | <div class="wv-horiz-card-thumb"> | ||
<img src="/wiki1/resources/assets/wv/ | <img src="/wiki1/resources/assets/wv/Wikivault-logo_-_Copy.png" alt="UNESCO" class="wv-horiz-card-img" /> | ||
</div> | </div> | ||
<div class="wv-horiz-card-header-text"> | <div class="wv-horiz-card-header-text"> | ||
<div class="wv-horiz-card-title"><a href="/wiki1/index.php/UNESCO">UNESCO</a></div> | <div class="wv-horiz-card-title"><a href="/wiki1/index.php/UNESCO">UNESCO</a></div> | ||
<div class="wv-horiz-card-subtitle"> | <div class="wv-horiz-card-subtitle">UNITED NATIONS AGENCY</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 308: | Line 283: | ||
<a href="/wiki1/index.php/Special:RecentChanges" class="wv-side-link">More events on this day →</a> | <a href="/wiki1/index.php/Special:RecentChanges" class="wv-side-link">More events on this day →</a> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
<div class="wv-editorial-footer"> | <div class="wv-editorial-footer"> | ||
<div class="wv-footer-links"> | <div class="wv-footer-links"> | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:About">About Wikidesk</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Editorial_Policy">Editorial policy</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Privacy_Policy">Privacy policy</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Terms_of_Use">Terms of use</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Community_Guidelines">Community guidelines</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Contact">Contact us</a> • | ||
<a href="/wiki1/index.php/ | <a href="/wiki1/index.php/Wikidesk:Request_Correction">Request a correction</a> | ||
</div> | </div> | ||
<div class="wv-footer-copyright"> | <div class="wv-footer-copyright"> | ||
© 2026 | © 2026 Wikidesk. All rights reserved. | ||
</div> | |||
</div> | </div> | ||
</div> | </div> | ||
</div></html> | <script> | ||
(function() { | |||
function initWvHeroAutocomplete() { | |||
var input = document.getElementById("wv-main-search-input") || document.querySelector(".wv-hero-search-input"); | |||
if (!input) return; | |||
if (input.dataset.wvAutocompleteInitialized === "true") return; | |||
input.dataset.wvAutocompleteInitialized = "true"; | |||
input.setAttribute("autocomplete", "off"); | |||
setTimeout(function() { | |||
try { input.focus(); } catch(e) {} | |||
}, 50); | |||
var form = input.closest("form"); | |||
var wrap = input.closest(".wv-hero-search-wrap") || (form ? form.parentNode : input.parentNode); | |||
if (!wrap) return; | |||
wrap.style.position = "relative"; | |||
var dropdown = wrap.querySelector(".wv-search-suggestions-dropdown"); | |||
if (!dropdown) { | |||
dropdown = document.createElement("div"); | |||
dropdown.className = "wv-search-suggestions-dropdown"; | |||
wrap.appendChild(dropdown); | |||
} | |||
var timer = null; | |||
var selectedIndex = -1; | |||
function closeDropdown() { | |||
dropdown.classList.remove("active"); | |||
dropdown.innerHTML = ""; | |||
selectedIndex = -1; | |||
} | |||
function escapeRegexp(s) { | |||
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); | |||
} | |||
function highlight(text, q) { | |||
if (!q) return text; | |||
var r = new RegExp("(" + escapeRegexp(q) + ")", "gi"); | |||
return text.replace(r, '<span class="wv-search-suggestion-match">$1</span>'); | |||
} | |||
function updateSel(items) { | |||
items.forEach(function(it, idx) { | |||
if (idx === selectedIndex) { | |||
it.classList.add("selected"); | |||
if (it.scrollIntoView) it.scrollIntoView({ block: "nearest" }); | |||
} else { | |||
it.classList.remove("selected"); | |||
} | |||
}); | |||
} | |||
function canUserCreatePage() { | |||
if (window.mw && window.mw.config) { | |||
var groups = window.mw.config.get("wgUserGroups") || []; | |||
var userName = window.mw.config.get("wgUserName"); | |||
if (userName && (groups.indexOf("sysop") !== -1 || groups.indexOf("editor") !== -1 || groups.indexOf("user") !== -1)) { | |||
return true; | |||
} | |||
} | |||
if (document.getElementById("pt-logout") || document.querySelector(".mw-userlink") || document.cookie.indexOf("UserID") !== -1 || document.cookie.indexOf("UserName") !== -1 || document.cookie.indexOf("session") !== -1) { | |||
return true; | |||
} | |||
return false; | |||
} | |||
function getCategoryBadge(catTitle, pageTitle) { | |||
pageTitle = pageTitle || ""; | |||
if (catTitle) { | |||
catTitle = catTitle.toLowerCase(); | |||
if (catTitle.indexOf("biograph") !== -1 || catTitle.indexOf("people") !== -1 || catTitle.indexOf("person") !== -1) return "Biography"; | |||
if (catTitle.indexOf("compan") !== -1 || catTitle.indexOf("business") !== -1) return "Company"; | |||
if (catTitle.indexOf("organiza") !== -1 || catTitle.indexOf("institution") !== -1) return "Organization"; | |||
if (catTitle.indexOf("news") !== -1) return "News"; | |||
if (catTitle.indexOf("event") !== -1 || catTitle.indexOf("entertain") !== -1 || catTitle.indexOf("mission") !== -1) return "Event"; | |||
if (catTitle.indexOf("technolog") !== -1 || catTitle.indexOf("topic") !== -1 || catTitle.indexOf("science") !== -1) return "Topic"; | |||
} | |||
var lowerT = pageTitle.toLowerCase(); | |||
if (lowerT.indexOf("kalam") !== -1 || lowerT.indexOf("einstein") !== -1 || lowerT.indexOf("jobs") !== -1 || lowerT.indexOf("pichai") !== -1 || lowerT.indexOf("musk") !== -1 || lowerT.indexOf("dr.") !== -1 || lowerT.indexOf("sir") !== -1 || lowerT.indexOf("abdul") !== -1 || lowerT.indexOf("albert") !== -1 || lowerT.indexOf("steve") !== -1 || lowerT.indexOf("sundar") !== -1) { | |||
return "Biography"; | |||
} | |||
if (lowerT.indexOf("inc") !== -1 || lowerT.indexOf("corp") !== -1 || lowerT.indexOf("ltd") !== -1 || lowerT.indexOf("apple") !== -1 || lowerT.indexOf("tesla") !== -1 || lowerT.indexOf("spacex") !== -1 || lowerT.indexOf("google") !== -1 || lowerT.indexOf("microsoft") !== -1) { | |||
return "Company"; | |||
} | |||
if (lowerT.indexOf("nations") !== -1 || lowerT.indexOf("union") !== -1 || lowerT.indexOf("org") !== -1 || lowerT.indexOf("association") !== -1 || lowerT.indexOf("institute") !== -1) { | |||
return "Organization"; | |||
} | |||
if (lowerT.indexOf("summit") !== -1 || lowerT.indexOf("mission") !== -1 || lowerT.indexOf("landing") !== -1 || lowerT.indexOf("artemis") !== -1) { | |||
return "Event"; | |||
} | |||
return "Article"; | |||
} | |||
function fetchSuggestions(query) { | |||
query = query.trim(); | |||
if (query.length < 1) { | |||
closeDropdown(); | |||
return; | |||
} | |||
var canCreate = canUserCreatePage(); | |||
var titleCased = query.replace(/\b\w/g, function(l) { return l.toUpperCase(); }); | |||
var url1 = "/wiki1/api.php?action=opensearch&search=" + encodeURIComponent(query) + "&limit=6&format=json"; | |||
var url2 = "/wiki1/api.php?action=opensearch&search=" + encodeURIComponent(titleCased) + "&limit=6&format=json"; | |||
var url3 = "/wiki1/api.php?action=query&list=search&srsearch=" + encodeURIComponent(query) + "*&srlimit=6&format=json"; | |||
var req1 = fetch(url1).then(function(r) { return r.json(); }).catch(function() { return null; }); | |||
var req2 = (titleCased !== query) ? fetch(url2).then(function(r) { return r.json(); }).catch(function() { return null; }) : Promise.resolve(null); | |||
var req3 = fetch(url3).then(function(r) { return r.json(); }).catch(function() { return null; }); | |||
Promise.all([req1, req2, req3]) | |||
.then(function(results) { | |||
if (input.value.trim().toLowerCase() !== query.toLowerCase()) { | |||
return; | |||
} | |||
var res1 = results[0]; | |||
var res2 = results[1]; | |||
var res3 = results[2]; | |||
var titles = []; | |||
var urls = []; | |||
var seen = {}; | |||
function addOpensearch(res) { | |||
if (res && res[1]) { | |||
res[1].forEach(function(t, idx) { | |||
if (!seen[t]) { | |||
seen[t] = true; | |||
titles.push(t); | |||
urls.push(res[3] ? res[3][idx] : ""); | |||
} | |||
}); | |||
} | |||
} | |||
addOpensearch(res1); | |||
addOpensearch(res2); | |||
if (res3 && res3.query && res3.query.search) { | |||
res3.query.search.forEach(function(item) { | |||
var t = item.title; | |||
if (!seen[t]) { | |||
seen[t] = true; | |||
titles.push(t); | |||
urls.push("/wiki1/index.php/" + encodeURIComponent(t.replace(/ /g, "_"))); | |||
} | |||
}); | |||
} | |||
titles = titles.slice(0, 6); | |||
urls = urls.slice(0, 6); | |||
var lowerQuery = query.toLowerCase(); | |||
var hasExactMatch = titles.some(function(t) { return t.toLowerCase().trim() === lowerQuery; }); | |||
var hasPrefixMatch = titles.some(function(t) { return t.toLowerCase().startsWith(lowerQuery); }); | |||
var showCreateItem = canCreate && !hasExactMatch && (titles.length === 0 || !hasPrefixMatch); | |||
if (titles.length === 0 && !showCreateItem) { | |||
closeDropdown(); | |||
return; | |||
} | |||
var catPromise = Promise.resolve({}); | |||
if (titles.length > 0) { | |||
var catUrl = "/wiki1/api.php?action=query&titles=" + encodeURIComponent(titles.join("|")) + "&prop=categories&format=json"; | |||
catPromise = fetch(catUrl) | |||
.then(function(r) { return r.json(); }) | |||
.then(function(catData) { | |||
var map = {}; | |||
if (catData && catData.query && catData.query.pages) { | |||
Object.values(catData.query.pages).forEach(function(page) { | |||
var pTitle = page.title; | |||
var cats = page.categories || []; | |||
if (cats.length > 0) { | |||
map[pTitle] = cats[0].title; | |||
} | |||
}); | |||
} | |||
return map; | |||
}) | |||
.catch(function() { return {}; }); | |||
} | |||
catPromise.then(function(catMap) { | |||
if (input.value.trim().toLowerCase() !== query.toLowerCase()) { | |||
return; | |||
} | |||
dropdown.innerHTML = ""; | |||
selectedIndex = -1; | |||
titles.forEach(function(t, idx) { | |||
var u = urls[idx] || ("/wiki1/index.php/" + encodeURIComponent(t.replace(/ /g, "_"))); | |||
var item = document.createElement("a"); | |||
item.className = "wv-search-suggestion-item"; | |||
item.href = u; | |||
var icon = '<span class="wv-search-suggestion-icon"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline></svg></span>'; | |||
var highlightedTitle = highlight(t, query); | |||
var catLabel = getCategoryBadge(catMap[t] || "", t); | |||
var badgeHtml = '<span class="wv-search-cat-badge">' + catLabel + '</span>'; | |||
item.innerHTML = icon + '<span class="wv-search-suggestion-title">' + highlightedTitle + '</span>' + badgeHtml; | |||
item.addEventListener("mousedown", function(e) { | |||
e.preventDefault(); | |||
window.location.href = u; | |||
}); | |||
dropdown.appendChild(item); | |||
}); | |||
var footer = document.createElement("div"); | |||
footer.className = "wv-search-suggestion-footer"; | |||
var searchUrl = "/wiki1/index.php?title=Special:Search&search=" + encodeURIComponent(query); | |||
footer.innerHTML = '<span class="wv-search-suggestion-icon"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></span> Search for pages containing "<strong>' + highlight(query, query) + '</strong>"'; | |||
footer.addEventListener("mousedown", function(e) { | |||
e.preventDefault(); | |||
window.location.href = searchUrl; | |||
}); | |||
dropdown.appendChild(footer); | |||
if (showCreateItem) { | |||
var createItem = document.createElement("a"); | |||
createItem.className = "wv-search-suggestion-create"; | |||
var createUrl = "/wiki1/index.php?title=" + encodeURIComponent(query.replace(/ /g, "_")) + "&action=edit"; | |||
createItem.href = createUrl; | |||
var plusIcon = '<span class="wv-search-suggestion-icon"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg></span>'; | |||
createItem.innerHTML = plusIcon + '<span>Create new page "<strong>' + highlight(query, query) + '</strong>"</span> <span class="wv-search-suggestion-create-badge">Create</span>'; | |||
createItem.addEventListener("mousedown", function(e) { | |||
e.preventDefault(); | |||
window.location.href = createUrl; | |||
}); | |||
dropdown.appendChild(createItem); | |||
} | |||
dropdown.classList.add("active"); | |||
}); | |||
}) | |||
.catch(function() { | |||
closeDropdown(); | |||
}); | |||
} | |||
input.addEventListener("input", function() { | |||
var val = this.value; | |||
clearTimeout(timer); | |||
if (val.trim().length === 0) { | |||
closeDropdown(); | |||
return; | |||
} | |||
timer = setTimeout(function() { | |||
fetchSuggestions(val); | |||
}, 120); | |||
}); | |||
input.addEventListener("focus", function() { | |||
if (this.value.trim().length >= 1) { | |||
fetchSuggestions(this.value); | |||
} | |||
}); | |||
input.addEventListener("keydown", function(e) { | |||
var items = dropdown.querySelectorAll(".wv-search-suggestion-item, .wv-search-suggestion-footer, .wv-search-suggestion-create"); | |||
if (!dropdown.classList.contains("active") || items.length === 0) return; | |||
if (e.key === "ArrowDown") { | |||
e.preventDefault(); | |||
selectedIndex++; | |||
if (selectedIndex >= items.length) selectedIndex = 0; | |||
updateSel(items); | |||
} else if (e.key === "ArrowUp") { | |||
e.preventDefault(); | |||
selectedIndex--; | |||
if (selectedIndex < 0) selectedIndex = items.length - 1; | |||
updateSel(items); | |||
} else if (e.key === "Enter") { | |||
if (selectedIndex >= 0 && items[selectedIndex]) { | |||
e.preventDefault(); | |||
items[selectedIndex].click(); | |||
} | |||
} else if (e.key === "Escape") { | |||
closeDropdown(); | |||
} | |||
}); | |||
document.addEventListener("click", function(e) { | |||
if (!wrap.contains(e.target)) { | |||
closeDropdown(); | |||
} | |||
}); | |||
} | |||
if (document.readyState === "loading") { | |||
document.addEventListener("DOMContentLoaded", initWvHeroAutocomplete); | |||
} else { | |||
initWvHeroAutocomplete(); | |||
} | |||
})(); | |||
</script> | |||
</html> | |||
Latest revision as of 07:30, 27 August 2026
Explore knowledge. Discover people, ideas & institutions.
Featured today

Marques Brownlee
Marques Brownlee, widely known online as MKBHD, is an American technology reviewer, video producer and podcast host. He is… Read more

Onkar Singh Batra
Onkar Singh Batra is an Indian entrepreneur and space technology executive known for founding Apolink, a Palo Alto-based space… Read more

Andrew Huberman
Andrew Huberman is an American neuroscientist, professor and science communicator known for his research on brain development,… Read more
Recent publications
Did you know?
The first submarine cable between India and Europe was established in 1870, transforming long-distance communication.
India's postal network is the largest in the world, with over 150,000 post offices serving both rural and urban areas.
Discover another factOn this day
A clearer way to explore public knowledge.
BeyondProfile brings biographies, companies, organizations, news and topics together in an editorially structured knowledge platform designed for discovery and reference. Every entry is written and reviewed with a focus on accuracy, verifiable sourcing, and a neutral, encyclopedic tone, so readers can trust what they find. Our coverage spans emerging entrepreneurs and public figures, established companies and institutions, and the news and events shaping the world today. Whether you're researching a person, tracking an organization, or simply exploring a new subject, BeyondProfile aims to be a clear and reliable starting point.



