Changes for page 3D Printing
Last modified by XWikiGuest on 2026/03/11 21:09
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,1 +1,37 @@ 1 1 Deze sectie wordt nog gevuld. 2 + 3 +{{html clean="false"}} 4 +<div id="linkding-bookmarks-tech-threedprinting">Laden...</div> 5 +<script> 6 +(function() { 7 + var config = { 8 + url: 'https://bookmarks.rhebergen.org/api/bookmarks/', 9 + token: '3b7443e0f84e2b2b269adebb96d7475e4a5e653e', 10 + tag: 'Hardware-&-Electronics', 11 + count: 10 12 + }; 13 + var apiUrl = config.url + '?limit=' + config.count + '&q=%23' + encodeURIComponent(config.tag); 14 + fetch(apiUrl, { 15 + headers: { 'Authorization': 'Token ' + config.token } 16 + }) 17 + .then(function(r) { return r.json(); }) 18 + .then(function(data) { 19 + var container = document.getElementById('linkding-bookmarks-tech-threedprinting'); 20 + var total = data.count || 0; 21 + var html = '<h3>Bookmarks: ' + config.tag + ' (' + total + ' totaal)</h3><ul>'; 22 + (data.results || []).forEach(function(bm) { 23 + var title = bm.title || bm.website_title || bm.url; 24 + html += '<li><a href="' + bm.url + '" target="_blank">' + title + '</a></li>'; 25 + }); 26 + html += '</ul>'; 27 + if (total > config.count) { 28 + html += '<p><em>Toont ' + config.count + ' van ' + total + '. <a href="https://bookmarks.rhebergen.org/bookmarks?q=%23' + config.tag + '">Meer in Linkding</a></em></p>'; 29 + } 30 + container.innerHTML = html; 31 + }) 32 + .catch(function(err) { 33 + document.getElementById('linkding-bookmarks-tech-threedprinting').innerHTML = '<p>Kon bookmarks niet laden: ' + err.message + '</p>'; 34 + }); 35 +})(); 36 +</script> 37 +{{/html}}