a-blog/html/js/index.js
derzombiiie 065fc93298 - Added configs!
- Made configs work!
configs:
- debug
- logging
- logfile
- ipget_endpoint_set
- ipget_endpoint_get
- site_name
- search_enable
- post_ranking_auto
- index_post_sort
- comment_sync_on_write
- comment_auto_sync

- logging framework!
loglevels:
- -1 - none
- 0 - basic
- 10 - datahorder
- 1337 - haxxer

now just logging commands!
2021-08-10 04:25:43 +02:00

22 lines
785 B
JavaScript

// index.js used for /index.html
console.log(
` // ------------------------------------------ //
// Author: derzombiiie (derz@elidragon.com) //
// License: GPLv3 (if not noted otherwise) //
// ------------------------------------------ //`)
// get newest 10 blog articles from api
$.get(`/posts?api&${conf.index_post_sort}&len=10`, json => {
displayshare()
if ( json.type != "s" )
return false
else {
elements = []
for( let i = 0 ; i < json.content.length ; i++ ) {
let elem = new entry(json.content[i].title, json.content[i].author, json.content[i].desc, json.content[i].href, json.content[i].tags, json.content[i].id)
elements.push(elem)
$(".content").append(elem.createelement())
}
}
})