Main Page: Difference between revisions
Load all people pages in main page slider |
Make main page people slider load reliably |
||
| Line 1,145: | Line 1,145: | ||
<div class="vu-people-controls"> | <div class="vu-people-controls"> | ||
<button class="vu-slide-button" id="vu-person-prev" type="button" aria-label="Previous person"> | <button class="vu-slide-button" id="vu-person-prev" type="button" aria-label="Previous person"><</button> | ||
<button class="vu-slide-button" id="vu-person-toggle" type="button" aria-label="Pause slideshow">Pause</button> | <button class="vu-slide-button" id="vu-person-toggle" type="button" aria-label="Pause slideshow">Pause</button> | ||
| Line 1,154: | Line 1,154: | ||
<div class="vu-slide-count" id="vu-person-count">1 / 1</div> | <div class="vu-slide-count" id="vu-person-count">1 / 1</div> | ||
<button class="vu-slide-button" id="vu-person-next" type="button" aria-label="Next person"> | <button class="vu-slide-button" id="vu-person-next" type="button" aria-label="Next person">></button> | ||
</div> | </div> | ||
</section> | </section> | ||
<div class="vu-heading"> | <div class="vu-heading"> | ||
<div class="vu-heading-title">How to use this wiki</div> | <div class="vu-heading-title">How to use this wiki</div> | ||
| Line 1,244: | Line 1,243: | ||
var root = document.querySelector(".vu-main"); | var root = document.querySelector(".vu-main"); | ||
var slider = document.getElementById("vu-people-slider"); | var slider = document.getElementById("vu-people-slider"); | ||
var status = document.getElementById("vu-people-status"); | |||
var image = document.getElementById("vu-person-image"); | var image = document.getElementById("vu-person-image"); | ||
var title = document.getElementById("vu-person-title"); | var title = document.getElementById("vu-person-title"); | ||
| Line 1,256: | Line 1,256: | ||
!root || | !root || | ||
!slider || | !slider || | ||
!status || | |||
!image || | !image || | ||
!title || | !title || | ||
| Line 1,269: | Line 1,270: | ||
var fallbackImage = "/wiki/Special:Redirect/file/Vu-logo.png"; | var fallbackImage = "/wiki/Special:Redirect/file/Vu-logo.png"; | ||
var cacheKey = "vu-main-people-slides- | var cacheKey = "vu-main-people-slides-v7"; | ||
var cacheLifetime = 6 * 60 * 60 * 1000; | var cacheLifetime = 6 * 60 * 60 * 1000; | ||
var slideInterval = 9000; | var slideInterval = 9000; | ||
var apiPath = "/wiki/api.php"; | |||
var people = []; | var people = []; | ||
var currentIndex = 0; | var currentIndex = 0; | ||
| Line 1,282: | Line 1,284: | ||
count.textContent = "1 / 1"; | count.textContent = "1 / 1"; | ||
toggle.textContent = "Play"; | toggle.textContent = "Play"; | ||
previous.textContent = "<"; | |||
next.textContent = ">"; | |||
function showStatus(message) { | |||
if (!message) { | |||
status.hidden = true; | |||
status.textContent = ""; | |||
return; | |||
} | |||
status.textContent = message; | |||
status.hidden = false; | |||
} | |||
function shuffle(items) { | function shuffle(items) { | ||
| Line 1,322: | Line 1,337: | ||
var finalSpace = cut.lastIndexOf(" "); | var finalSpace = cut.lastIndexOf(" "); | ||
return cut.slice(0, finalSpace > 0 ? finalSpace : limit) + " | return cut.slice(0, finalSpace > 0 ? finalSpace : limit) + "..."; | ||
} | } | ||
| Line 1,337: | Line 1,352: | ||
} | } | ||
function | function pageUrl(pageTitle) { | ||
if (window.mw && mw.util) { | |||
return mw.util.getUrl(pageTitle); | |||
} | |||
return "/wiki/" + encodeURIComponent(pageTitle.replace(/ /g, "_")); | |||
} | |||
function normalizePages(pages) { | |||
return shuffle( | return shuffle( | ||
pages | pages | ||
| Line 1,362: | Line 1,378: | ||
extract: pageExtract, | extract: pageExtract, | ||
image: getImage(page) || fallbackImage, | image: getImage(page) || fallbackImage, | ||
url: | url: page.fullurl || pageUrl(page.title) | ||
}; | }; | ||
}) | }) | ||
| Line 1,497: | Line 1,506: | ||
function activateSlides(items) { | function activateSlides(items) { | ||
if (!Array.isArray(items) || !items.length) { | if (!Array.isArray(items) || !items.length) { | ||
showStatus("No people pages were loaded."); | |||
return; | return; | ||
} | } | ||
| Line 1,502: | Line 1,512: | ||
people = shuffle(items); | people = shuffle(items); | ||
currentIndex = 0; | currentIndex = 0; | ||
previous.disabled = | previous.disabled = people.length < 2; | ||
next.disabled = | next.disabled = people.length < 2; | ||
toggle.disabled = | toggle.disabled = people.length < 2; | ||
showStatus(""); | |||
showSlide(0); | showSlide(0); | ||
setPlaying( | setPlaying(people.length > 1); | ||
} | } | ||
| Line 1,539: | Line 1,550: | ||
} | } | ||
}); | }); | ||
function buildQuery(params) { | |||
var parts = []; | |||
Object.keys(params).forEach(function (key) { | |||
parts.push( | |||
encodeURIComponent(key) + | |||
"=" + | |||
encodeURIComponent(params[key]) | |||
); | |||
}); | |||
return parts.join("&"); | |||
} | |||
function requestJson(params) { | |||
return window | |||
.fetch(apiPath + "?" + buildQuery(params), { | |||
credentials: "same-origin" | |||
}) | |||
.then(function (response) { | |||
if (!response.ok) { | |||
throw new Error("API HTTP " + response.status); | |||
} | |||
return response.json(); | |||
}); | |||
} | |||
function copyParams(params) { | function copyParams(params) { | ||
| Line 1,550: | Line 1,589: | ||
} | } | ||
function loadPeoplePages( | function loadPeoplePages(params, collectedPages) { | ||
return | return requestJson(params).then(function (data) { | ||
var nextPages = | var nextPages = | ||
data && | data && | ||
| Line 1,567: | Line 1,606: | ||
}); | }); | ||
return loadPeoplePages( | showStatus("Loading people... " + String(allPages.length)); | ||
return loadPeoplePages(nextParams, allPages); | |||
} | } | ||
return | return allPages; | ||
}); | }); | ||
} | } | ||
| Line 1,584: | Line 1,620: | ||
} | } | ||
if (!window. | if (!window.fetch) { | ||
showStatus("This browser cannot load the people list."); | |||
return; | return; | ||
} | } | ||
showStatus("Loading people..."); | |||
loadPeoplePages( | |||
.then( | { | ||
action: "query", | |||
generator: "categorymembers", | |||
gcmtitle: "Category:People", | |||
gcmnamespace: 0, | |||
gcmtype: "page", | |||
gcmlimit: "max", | |||
prop: "extracts|pageimages|info", | |||
exintro: 1, | |||
explaintext: 1, | |||
exchars: 700, | |||
piprop: "thumbnail|original", | |||
pithumbsize: 1000, | |||
inprop: "url", | |||
redirects: 1, | |||
formatversion: 2, | |||
format: "json" | |||
}, | |||
[] | |||
) | |||
.then(function (pages) { | |||
var loadedPeople = normalizePages(pages); | |||
saveCache(loadedPeople); | |||
activateSlides(loadedPeople); | |||
}) | |||
.catch(function () { | |||
showStatus("Could not load people list."); | |||
}); | |||
. | |||
/* | /* | ||
| Line 1,648: | Line 1,661: | ||
* keep MediaWiki's red-link appearance. | * keep MediaWiki's red-link appearance. | ||
*/ | */ | ||
mw.loader | if (window.mw && mw.loader) { | ||
.using(["mediawiki.api", "mediawiki.util"]) | mw.loader | ||
.using(["mediawiki.api", "mediawiki.util"]) | |||
.then(function () { | |||
var api = new mw.Api(); | |||
var links = Array.prototype.slice.call( | |||
root.querySelectorAll("a[data-wiki-title]") | |||
); | |||
var titles = links | |||
.map(function (item) { | |||
return item.getAttribute("data-wiki-title"); | |||
}) | |||
.filter(function (item, index, allItems) { | |||
return item && allItems.indexOf(item) === index; | |||
}); | |||
if (!titles.length) { | |||
return; | |||
} | |||
return api | |||
.get({ | |||
action: "query", | |||
titles: titles.join("|"), | |||
formatversion: 2 | |||
}) | |||
.then(function (data) { | |||
var missing = {}; | |||
if (data.query && Array.isArray(data.query.pages)) { | |||
data.query.pages.forEach(function (page) { | |||
if (page.missing) { | |||
missing[page.title] = true; | |||
} | |||
}); | |||
} | |||
links.forEach(function (item) { | |||
var pageTitle = | |||
item.getAttribute("data-wiki-title"); | |||
if (!missing[pageTitle]) { | |||
return; | |||
} | |||
item.classList.add("new"); | |||
item.href = mw.util.getUrl(pageTitle, { | |||
action: "edit", | |||
redlink: 1 | |||
}); | |||
item.title = | |||
pageTitle + " (page does not exist)"; | |||
}); | }); | ||
}); | }); | ||
}); | |||
} | |||
}); | }); | ||
})(); | })(); | ||
Revision as of 13:59, 19 June 2026
About the wiki
The Vrienden Universe began in 2019 as De Lijers De Vrienden, a project about De Vrienden. The project expanded as related pages were added and became a single encyclopedia covering the wider history around its original subject.
The wiki now contains hundreds of connected pages developed over several years. Information established on one page is carried into related articles, allowing readers to follow the same history throughout the site.
Reichsministerium für Bergbau und Rohstoffe
The Reichsministerium für Bergbau und Rohstoffe was a central ministry of the Government of the Tanoa Einsatzgruppen. It administered mining and the state supply of raw materials.
The ministry supported the command economy of Tanoa and supplied the regime's industrial system.
Open page
Browse
Toonio Noord
Toonio Noord, born 4 April 1969, is a Dutch registration official and former security guard from Vriendendam. He works for the Stichting Noord Registratiebureau and is a member of the Noord family.
Open pageChoose a starting point
Most articles link directly to the subjects needed to continue through the history. Readers can begin with De Vrienden or select a broader section above.
The principal family pages provide the main route from De Vrienden into family history. Index pages provide access to the rest of the site.
Principal families
Community
Information about contributing is available on the community page.
Details
Information about the scope of the site is available in the disclaimer.